tree: e7750efd6c728f5919b44ec9cf9fb1f4b8c83e24 [path history] [tgz]
  1. expected_out.py
  2. predv_expected.txt
  3. prim_crc32_sim.cc
  4. prim_crc32_sim.core
  5. prim_crc32_sim.sv
  6. README.md
  7. run_predv.sh
hw/ip/prim/pre_dv/prim_crc32/README.md

CRC32 Calculator Testbench

This is a primitive testbench to check the basic functionality of the CRC32 primitive. It is not intended as a full verification environment.

It is built via fusesoc (from repository root)

fusesoc --cores-root=. run --target=sim --setup --build lowrisc:prim:crc32_sim
./build/lowrisc_prim_crc32_sim_0/sim-verilator/Vprim_crc32_sim

predv_expected.txt contains the expected output which can be generated by the expected_out.py python script. This is simply a dump of expected CRC values as test data is fed in.

The run_predv.sh script will build and run the simulator and diff the output against the expected output, producing an error if this results in a mismatch or any other part of the process fails.