Revision 1.1
Design Verification Methodology in Opentitan has been followed in matcha.
Currently, VCS is used as the major simulator for running DV tests in matcha.
At the root of shodan repo:
export ROOTDIR=`pwd` export titan_root=$ROOTDIR/hw/opentitan-upstream export PYTHONPATH=$ROOTDIR/hw/matcha/util:$titan_root/util:$titan_root/util/dvsim:$PYTHONPATH
cd $ROOTDIR/hw/matcha util/dvsim_match/dvsim.py \ hw/top_matcha/dv/chip_sim_cfg.hjson \ -i <test_name>
To dump waveforms from the simulation, use the -w
or --waves
option to pass the argument to dvsim.py. For example:
util/dvsim_match/dvsim.py \ hw/top_matcha/dv/chip_sim_cfg.hjson \ -i <test_name> \ -w fsdb
To debug with Verdi:
-kdb[=only]
option in VCS runsverdi -dbdir <path to simv.daidir>
Sparrow HW DV Notes describes how to set up the bazel runs on EDACloud.
In an air-gapped environment like EDACloud, DV tests can be invoked from hw/matcha with bazel. Here is the sample bazel command:
bazel run //util/dvsim_matcha:dvsim.py \ --distdir=`pwd` \ -- hw/top_matcha/dv/chip_sim_cfg.hjson \ -i chip_sw_uart_tx_rx
initial begin $assertoff(0, tb.dut); end
hw/top_matcha/ip/smc/rtl/smc_controller.sv
to avoid the unnecessary error messages