-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
59 additions
and
181 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Verification Testsuites | ||
|
||
The next folders contain all the verification flow within the hart is tested. | ||
|
||
All the testcases rely on [SVUT](https://github.com/dpretet/svut) and | ||
[Icarus Verilog](http://iverilog.icarus.com) or [Verilator](https://github.com/verilator). | ||
|
||
The testbench provides two configurations: | ||
|
||
- `core`: the hart is connected upon an AXI4-lite dual port RAM model, the instruction | ||
bus on one port, the data bus on the other. Hart-only configuration. | ||
- `platform`: the core is connected upon an AXI4 crossbar with some peripherals | ||
(GPIOs, UART, CLINT) and share the same master interface to the AXI4-lite RAM molde | ||
|
||
All testsuites support different tools and configuration, except [Apps](./apps) which support only | ||
Verilator and `platform` top level. A testsuite can contain one or more ASM/C file. | ||
|
||
To execute the flow, possible arguments are: | ||
|
||
```bash | ||
# To run all testcases over a specific configuration | ||
./run.sh --tb "core" // to run the core-only simulation | ||
./run.sh --tb "platform" // to run the platform, the core + the peripherals | ||
|
||
# To run with a specific simulator: | ||
./run.sh --simulator verilator | ||
|
||
# To run a specific testcase: | ||
./run.sh --tc ./tests/rv32ui-p-test0.v | ||
|
||
# Combined arguments: | ||
./run.sh --tb platform --simulator --tc ./tests/rv32ui-p-test0.v | ||
``` | ||
|
||
[Common](../common) folder contains: | ||
|
||
- `sim_main.cpp`: the verilator C++ testbench | ||
- `bin2hex.py*`: the utility to convert the assembler to binary used to initialize the RAM booted by | ||
the core | ||
- `functions.sh*`: a setup of functions used compile and run the testsuites | ||
- `trace.py*`: a script to format the trace of the hart logging the jump/branch (debug purpose) | ||
- `axi4l_ram.sv`: the RAM used to store the program and boot the core | ||
- a set of waveform: | ||
- `debug_core_icarus.gtkw` | ||
- `debug_core_verilator.gtkw` | ||
- `debug_platform_icarus.gtkw` | ||
- `debug_platform_verilator.gtkw` | ||
- `files.f`: the file list to compile the testbench | ||
- `friscv_testbench.sv`: the system verilog testbench | ||
- `lfsr.sv`: a pseudo-random number generator used across the testbench |
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,38 +1,11 @@ | ||
# C Testsuite | ||
|
||
## Overview | ||
|
||
This testsuite is composed by several applications, stressing out C toolchain and | ||
verifying the core. The testsuite is made of various C code, verifying the basics | ||
of C lang and its support with a hart. | ||
|
||
The testbench provides two configurations: | ||
|
||
- `core`: the hart is connected upon an AXI4-lite dual port RAM model, the instruction | ||
bus on one port, the data bus on the other. Nothing else than a hart. | ||
- `platform`: the core is connected upon an AXI4 crossbar with some peripherals | ||
(GPIOs, UART, CLINT) and share the same master interface to the AXI4-lite RAM model | ||
|
||
To execute the flow: | ||
|
||
```bash | ||
./run.sh --tb "core" // to run the core-only simulation | ||
./run.sh --tb "platform" // to run the platform, the core + the peripherals | ||
``` | ||
|
||
This will make all programs in tests/* folders, copy the RAM content generated, | ||
convert it to Verilog format then execute SVUT to run the testbench on each | ||
testcase. | ||
|
||
For more information about the bash front-end flow: | ||
|
||
```bash | ||
./run.sh -h | ||
``` | ||
|
||
All the testcases rely on [SVUT](https://github.com/dpretet/svut) and | ||
[Icarus Verilog](http://iverilog.icarus.com) or [Verilator](https://github.com/verilator). | ||
|
||
[Common](tests/common) folder contains a Makefile and a linker setup shared between | ||
all the testcases and symlinked into each test folder. A C runtime (crt0.S) is also provided | ||
to applications to boot the processor, initialize the stack and jump to the main. |
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,23 +1,3 @@ | ||
# RISCV-Tests | ||
|
||
Official compliance testsuite from [RISCV test github](https://github.com/riscv/riscv-tests/). | ||
|
||
To execute the flow: | ||
|
||
```bash | ||
./run.sh --simulator icarus | ||
./run.sh --simulator verilator | ||
./run.sh --tb platform | ||
./run.sh --tb core | ||
``` | ||
|
||
This will make all programs in tests/* folders, copy the RAM content generated, | ||
convert it to Verilog format then execute SVUT to run the testbench on each | ||
testcase. | ||
|
||
All the testcases rely on [SVUT](https://github.com/dpretet/svut) and | ||
[Icarus Verilog](http://iverilog.icarus.com) or [Verilator](https://github.com/verilator). | ||
|
||
[Common](../common) folder contains a Makefile and a linker setup shared between | ||
all the testcases and symlinked into each test folder. A folder can contain | ||
one or more ASM/C file and a markdown file describing the testcase scenarios. |
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