-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
64 changed files
with
8,353 additions
and
484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
--- | ||
# This file is based off of the current tx2.yaml config and serves as an example configuration for RISC-V cores. | ||
# The following resources where utilised to create the config file and naming schemes: | ||
# https://en.wikichip.org/wiki/cavium/microarchitectures/vulcan | ||
|
||
Core: | ||
ISA: rv64 | ||
Simulation-Mode: outoforder | ||
Clock-Frequency: 2.5 | ||
Fetch-Block-Size: 32 | ||
Fetch: | ||
Fetch-Block-Size: 32 | ||
Loop-Buffer-Size: 0 | ||
Loop-Detection-Threshold: 0 | ||
Process-Image: | ||
Heap-Size: 1073741824 | ||
Stack-Size: 1048576 | ||
Register-Set: | ||
GeneralPurpose-Count: 154 | ||
FloatingPoint-Count: 90 | ||
Pipeline-Widths: | ||
Commit: 4 | ||
Dispatch-Rate: 4 | ||
FrontEnd: 4 | ||
LSQ-Completion: 2 | ||
Queue-Sizes: | ||
ROB: 180 | ||
Load: 64 | ||
Store: 36 | ||
Branch-Predictor: | ||
BTB-Tag-Bits: 11 | ||
Saturating-Count-Bits: 2 | ||
Global-History-Length: 10 | ||
RAS-entries: 1 | ||
Fallback-Static-Predictor: "Always-Taken" | ||
Branch-Predictor: | ||
BTB-bitlength: 16 | ||
L1-Data-Memory: | ||
Interface-Type: Fixed | ||
L1-Instruction-Memory: | ||
Interface-Type: Flat | ||
LSQ-L1-Interface: | ||
Access-Latency: 4 | ||
Exclusive: False | ||
Load-Bandwidth: 32 | ||
Store-Bandwidth: 16 | ||
Permitted-Requests-Per-Cycle: 2 | ||
Permitted-Loads-Per-Cycle: 2 | ||
Permitted-Stores-Per-Cycle: 1 | ||
Ports: | ||
0: | ||
Portname: Port 0 | ||
Instruction-Support: | ||
- INT_SIMPLE | ||
- INT_MUL | ||
1: | ||
Portname: Port 1 | ||
Instruction-Support: | ||
- INT | ||
2: | ||
Portname: Port 2 | ||
Instruction-Support: | ||
- INT_SIMPLE | ||
- INT_MUL | ||
- BRANCH | ||
3: | ||
Portname: Port 4 | ||
Instruction-Support: | ||
- LOAD | ||
4: | ||
Portname: Port 5 | ||
Instruction-Support: | ||
- LOAD | ||
5: | ||
Portname: Port 3 | ||
Instruction-Support: | ||
- STORE | ||
Reservation-Stations: | ||
0: | ||
Size: 60 | ||
Dispatch-Rate: 4 | ||
Ports: | ||
- Port 0 | ||
- Port 1 | ||
- Port 2 | ||
- Port 4 | ||
- Port 5 | ||
- Port 3 | ||
Execution-Units: | ||
0: | ||
Pipelined: True | ||
1: | ||
Pipelined: True | ||
2: | ||
Pipelined: True | ||
3: | ||
Pipelined: True | ||
4: | ||
Pipelined: True | ||
5: | ||
Pipelined: True | ||
Latencies: | ||
0: | ||
Instruction-Groups: | ||
- INT_SIMPLE_ARTH | ||
- INT_SIMPLE_LOGICAL | ||
Execution-Latency: 1 | ||
Execution-Throughput: 1 | ||
1: | ||
Instruction-Groups: | ||
- INT_MUL | ||
Execution-Latency: 5 | ||
Execution-Throughput: 1 | ||
2: | ||
Instruction-Groups: | ||
- INT_DIV | ||
Execution-Latency: 39 | ||
Execution-Throughput: 39 | ||
# CPU-Info mainly used to generate a replica of the special (or system) file directory | ||
# structure | ||
CPU-Info: | ||
# Set Generate-Special-Dir to 'T' to generate the special files directory, or to 'F' to not. | ||
# (Not generating the special files directory may require the user to copy over files manually) | ||
Generate-Special-Dir: true | ||
# Core-Count MUST be 1 as multi-core is not supported at this time. (TX2 true value is 32) | ||
Core-Count: 1 | ||
# Socket-Count MUST be 1 as multi-socket simulations are not supported at this time. (TX2 true value is 2) | ||
Socket-Count: 1 | ||
# SMT MUST be 1 as Simultanious-Multi-Threading is not supported at this time. (TX2 true value is 4) | ||
SMT: 1 | ||
# Below are the values needed to generate /proc/cpuinfo | ||
BogoMIPS: 400.00 | ||
Features: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics cpuid asimdrdm | ||
CPU-Implementer: "0x43" | ||
CPU-Architecture: 8 | ||
CPU-Variant: "0x1" | ||
CPU-Part: "0x0af" | ||
CPU-Revision: 2 | ||
# Package-Count is used to generate | ||
# /sys/devices/system/cpu/cpu{0..Core-Count}/topology/{physical_package_id, core_id} | ||
Package-Count: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# M1 Firestorm core | ||
Core: | ||
ISA: AArch64 | ||
Simulation-Mode: outoforder | ||
Clock-Frequency: 3.2 | ||
Timer-Frequency: 100 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# M1 Firestorm core | ||
Core: | ||
ISA: AArch64 | ||
Simulation-Mode: outoforder | ||
Clock-Frequency: 3.2 | ||
Timer-Frequency: 100 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.