Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RISC-V Support SE-148 #234

Merged
merged 142 commits into from
Nov 28, 2022
Merged

RISC-V Support SE-148 #234

merged 142 commits into from
Nov 28, 2022

Conversation

dANW34V3R
Copy link
Contributor

This pull request adds support for rv64iam. That is 64 bit RISC-V base, atomic and multiply extensions working in all three simulation modes.

Expanding on previous work, the general code base has been adjusted to be more ISA agnostic. Specific config option parsing has been moved to the ISA specific classes and the exception handler has become more generic. Some more work may be needed on this as exception types are currently ISA specific; this causes the need for repeated functions which is undesirable.

Almost all of the base, atomic and multiply extension instructions have been implemented along with their pseudoinstructions. To note:

FENCE is implemented as a NOP which is considered allowable by the spec
EBREAK is unimplemented but only needed for debugging
Atomics don't operate truly atomically which is currently functional for single threaded programs but not accurate
MULH and MULHSU aren't implemented as they will need a library such as GMP. Tests are implemented and expected to fail
This functionality is sufficient to run many benchmarks including STREAM, Dhrystone and an implementation of the Smith-Waterman algorithm.

FinnWilkinson and others added 30 commits April 4, 2022 18:28
…ency, rather than update the VCT register to total cycles completed.
A fix for handling missing system registers in the aarch64 systemRegisterMap_ map. A missing entry will return a -1 and a decoded instruction accessing an unmapped system register will raise a new UnmappedSysReg fatal exception.
Fixes output error present for miniBUDE when compiled with GCC-10.3.0 targeting armv8.4-a+sve, caused by an incorrect implementation of the FNEG sve instruction.

Additionally, other SVE instructions were updated to accomodate for optional patterns.
A new generic branch predictor containing parameterisable BTB and RAS structures, global indexing, and better identification of branch instructions. Additionally, a parameterisable loop buffer has been implemented in the fetch unit and a loop detection scheme in the ROB unit.
…tions. Also added the ability to define ISA extensions to target as a parameter to the parent regression class run function
…enmp codes. Current additions omit functionality as it's not required for the codes to execute correctly.
Copy link
Contributor

@jj16791 jj16791 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several comments and some clarifications needed.

docs/sphinx/developer/arch/supported/riscv.rst Outdated Show resolved Hide resolved
docs/sphinx/developer/arch/supported/riscv.rst Outdated Show resolved Hide resolved
docs/sphinx/developer/arch/supported/riscv.rst Outdated Show resolved Hide resolved
docs/sphinx/developer/arch/supported/riscv.rst Outdated Show resolved Hide resolved
src/lib/kernel/Linux.cc Outdated Show resolved Hide resolved
src/lib/kernel/Linux.cc Outdated Show resolved Hide resolved
src/lib/kernel/Linux.cc Show resolved Hide resolved
src/lib/kernel/Linux.cc Show resolved Hide resolved
src/include/simeng/arch/riscv/Architecture.hh Outdated Show resolved Hide resolved
Copy link
Contributor

@jj16791 jj16791 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work resolving comments. Few more but nothing major.

docs/sphinx/developer/arch/supported/riscv.rst Outdated Show resolved Hide resolved
src/include/simeng/arch/aarch64/Instruction.hh Outdated Show resolved Hide resolved
Copy link
Contributor

@FinnWilkinson FinnWilkinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At long last! This looks good, Dan. Well done for constantly updating and getting the RISC-V support to a really good state

Copy link
Contributor

@jj16791 jj16791 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me. Great job Dan.

Copy link
Contributor

@rahahahat rahahahat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Work! All looks good to me.

@jj16791
Copy link
Contributor

jj16791 commented Nov 17, 2022

#rerun tests

1 similar comment
@dANW34V3R
Copy link
Contributor Author

#rerun tests

configs/a64fx.yaml Show resolved Hide resolved
configs/DEMO_RISCV.yaml Show resolved Hide resolved
src/include/simeng/CoreInstance.hh Show resolved Hide resolved
@dANW34V3R dANW34V3R merged commit 53f99f9 into dev Nov 28, 2022
FinnWilkinson pushed a commit that referenced this pull request Nov 29, 2022
This pull request adds support for rv64iam. That is, 64 bit RISC-V base, atomic and multiply extensions working in all three simulation modes.

Expanding on previous work, the general code base has been adjusted to be more ISA agnostic. Specific config option parsing has been moved to the ISA specific classes and the exception handler has become more generic. Some more work may be needed on this as exception types are currently ISA specific; this causes the need for repeated functions which is undesirable.

Almost all of the base, atomic and multiply extension instructions have been implemented along with their pseudoinstructions. 

### Architecture updates

- rv64i - RISC-V base extension
- a - RISC-V atomic extension
- m - RISC-V multiply/divide extension

### Changes to config options

- Addition of ```ISA``` option with valid arguments <```aarch64```, ```rv64```>

### To note

- FENCE is implemented as a NOP which is considered allowable by the spec
- EBREAK is unimplemented but only needed for debugging
- Atomics don't operate truly atomically which is currently functional for single threaded programs but not accurate
- MULH and MULHSU aren't implemented as they will need a library such as GMP. Tests are implemented and expected to fail 

This functionality is sufficient to run many benchmarks including STREAM, Dhrystone and an implementation of the Smith-Waterman algorithm.
jj16791 pushed a commit that referenced this pull request May 19, 2023
This pull request adds support for rv64iam. That is, 64 bit RISC-V base, atomic and multiply extensions working in all three simulation modes.

Expanding on previous work, the general code base has been adjusted to be more ISA agnostic. Specific config option parsing has been moved to the ISA specific classes and the exception handler has become more generic. Some more work may be needed on this as exception types are currently ISA specific; this causes the need for repeated functions which is undesirable.

Almost all of the base, atomic and multiply extension instructions have been implemented along with their pseudoinstructions. 

### Architecture updates

- rv64i - RISC-V base extension
- a - RISC-V atomic extension
- m - RISC-V multiply/divide extension

### Changes to config options

- Addition of ```ISA``` option with valid arguments <```aarch64```, ```rv64```>

### To note

- FENCE is implemented as a NOP which is considered allowable by the spec
- EBREAK is unimplemented but only needed for debugging
- Atomics don't operate truly atomically which is currently functional for single threaded programs but not accurate
- MULH and MULHSU aren't implemented as they will need a library such as GMP. Tests are implemented and expected to fail 

This functionality is sufficient to run many benchmarks including STREAM, Dhrystone and an implementation of the Smith-Waterman algorithm.
@dANW34V3R dANW34V3R deleted the riscv-support branch October 13, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants