Computer Architecture
check here
reference to this RISC-V Compliance Tests
The goal of compliance tests is to check whether the processor under development meets the open RISC-V standards or not.
at README.md mentioned that
The only setup required is to define where the toolchain is found, and where the target / device is found.
For the toolchain, the binaries must be in the search path and the compiler prefix is defined on the make line. The default value for this isRISCV_PREFIX ?= riscv64-unknown-elf-
in this homework, we use the file imperas-riscv-tests
to test instead of riscv-compliance
, because the behind one is lack of execute file riscvOVPsim.exe*
, the file is located at /home/_path/imperas-riscv-tests/riscvOVPsim.exe*
Before started, we have to modified the Makefile
to match our requirement, add the following to Makefile
and remember to modified
that's the GNU toolchain for riscv we use in Lab2, and we have to source it because I don't add it to .bashrc
Makefile.include
Makefile.include
is at /home/_path/imperas-riscv-tests/riscv-target/riscvOVPsim/device/rv32i
In this assignment, I'm trying to simulate the hw2 Counting Leading Zero, we have to compliance the test case .S
file into .elf
file, first we place the .S
file under /home/_path/imperas-riscv-tests/riscv-test-suite/rv32i/src
, and the generated .elf
and .signature.output
file will be placed under /home/_path/imperas-riscv-tests/work/rv32i
as we run make
, there will generate 4 files CLZ.elf
, CLZ.elf.objdump
, CLZ.signature.output
, CLZ.log
under the path /home/_path/imperas-riscv-tests/work/rv32i
, then we can copy them to /home/_path/Reindeer/sim/compliance
, and run make
at /home/_path/Reindeer/sim/verilator
Finally we get CLZ.vcd
, we can trace it using the tool gtkwave
TODO : analyze
TBD
Verilator is a software which can convert HDL(Verilog) code to C++, at the second point in Verilator introduction
Verilator is invoked with parameters similar to GCC or Synopsys’s VCS. It "Verilates" the specified Verilog or SystemVerilog code by reading it, performing lint checks, and optionally inserting assertion checks and coverage-analysis points. It outputs single- or multi-threaded .cpp and .h files, the "Verilated" code.
overview