OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sim/] [README.md] - Blame information for rev 64

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 62 zero_gravi
# Simulation Source Folder
2 40 zero_gravi
 
3
 
4 64 zero_gravi
## [simple](simple)
5 40 zero_gravi
 
6 62 zero_gravi
Simple testbench for the NEORV32 Processor and script for simulation using GHDL.
7 40 zero_gravi
 
8 64 zero_gravi
- [`ghdl.setup.sh`](simple/ghdl.setup.sh)
9
- [`ghdl.run.sh`](simple/ghdl.run.sh)
10
- [`ghdl.sh`](simple/ghdl.sh)
11
- [`neorv32_tb.simple.vhd`](simple/neorv32_tb.simple.vhd)
12
- [`neorv32_imem.simple.vhd`](simple/neorv32_imem.simple.vhd): memory component optimized for simulation.
13
- [`neorv32_imem.iram.simple.vhd`](simple/neorv32_imem.iram.simple.vhd)
14
- [`uart_rx.simple.vhd`](simple/uart_rx.simple.vhd)
15 62 zero_gravi
 
16
 
17 64 zero_gravi
## VUnit testbench
18 40 zero_gravi
 
19 64 zero_gravi
VUnit testbench for the NEORV32 Processor.
20 40 zero_gravi
 
21 64 zero_gravi
- [`run.py`](run.py)
22
- [`neorv32_tb.vhd`](neorv32_tb.vhd)
23
- [`uart_rx_pkg.vhd`](uart_rx_pkg.vhd)
24
- [`uart_rx.vhd`](uart_rx.vhd)
25 40 zero_gravi
 
26
 
27 62 zero_gravi
## [`run_riscv_arch_test.sh`](run_riscv_arch_test.sh): NEORV32 RISC-V Architecture Test Framework
28
 
29
This script tests the NEORV32 Processor for RISC-V compatibility using the
30
[official RISC-V architecture test suite v2+](https://github.com/riscv/riscv-arch-test).
31
The core's HDL sources are *simulated* using `GHDL` to provide a virtual execution platform for the test framework:
32
 
33
* `rv32i_m/C` - compressed instructions
34
* `rv32i_m/I` - base ISA
35
* `rv32i_m/M` - hardware integer multiplication and division
36
* `rv32i_m/privilege` - privileged architecture
37
* `rv32i_m/Zifencei` - instruction stream synchronization (for example for self-modifying code)
38
 
39
:warning: The RISC-V GCC toolchain (`riscv{32|64}-unknown-elf`) is required for program compilation, and the simulation
40 64 zero_gravi
  depends on `simple/ghdl_sim.sh`.
41 62 zero_gravi
 
42
To execute all the supported tests open a terminal and run [`./sim/run_riscv_arch_test.sh`](run_riscv_arch_test.sh),
43
which does the following:
44
 
45 64 zero_gravi
* Make a local copy of the NEORV32 `rtl` folder in `work/`, to keep the project's core files clean.
46 62 zero_gravi
* Clone (as `git submodule`) the [riscv-arch-test repository](https://github.com/riscv/riscv-arch-test) into `sw/isa-test/riscv-arch-test`.
47
* Install (copy) the custom `neorv32` test target from `sw/isa-test/port-neorv32` to the
48 64 zero_gravi
test suite's target folder `work/riscv-arch-test/riscv-target/neorv32`.
49 62 zero_gravi
* Run the actual tests.
50
 
51 64 zero_gravi
:warning: Simulating all the test cases takes quite some time. Some tests use an optimised description of IMEM
52
  (`neorv32_imem.simple.vhd`), but others require the original because they execute self-modifying code.
53 62 zero_gravi
 
54
:warning: If the simulation of a test does not generate any signature output at all or if the signature is truncated,
55
try increasing the simulation time by modiying the `SIM_TIME` variable when calling the test makefiles in `run_riscv_arch_test.sh`.
56
 
57
More datails regarding the actual simulation process can be found in the
58
[target's `README`](../sw/riscv-arch-test/port-neorv32/framework_v2.0/riscv-target/neorv32/README.md).

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.