极简仿真环境 with irun/xrun

Basic

xrun -sv -top top_module_name top_module_name.sv top_rtl.v

plus option

-incdir . -incdir ./rtl_define // include directory
+define+NUM=5 // define MACRO
+access+rwc -input dump.tcl // dump signal
+xmcovfile+…/cov_param_define.txt // specify coverage option file
-covoverwrite // overwrite existing test output dir
-makelib -incdir …/ primitive.v -endlib
-f file_name // include file including these params
+sv_lib=libdpi.so // generate from c
-uvm_home $UVM_HOME // include uvm directory
-uvm // run with uvm

dump.tcl content

database -open -default -shm -compress -into waves.shm waves
probe top -all -depth all -database waves -name my_probe
run

cov_param_define.txt content

select_coverage -all -module RTL_top
select_functional
set_covergroup -new_instance_reporting

c script

gcc -DPARAM=1 -fpic -shared -o libdpi.so reference.c -I tool_include_path

merge coverage database

-coverage all -covtest test_name
imc -batch
>merge cov_work/scope/test_name1 cov_work/scope/test_name2 -out merge_out // merge_out will under cov_work/scope
imc -gui

generate fsdb file

(1) config
$NOVAS_HOME: VERDI install dir
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$NOVAS_HOME/share/PLI/lib/LINUX:$NOVAS_HOME/share/PLI/IUS/LINUX/boot"
(2) code in testbench
//Enable dump fsdb
initial
begin
$fsdbDumpfile(“test.fsdb”);
$fsdbDumpvars(0,TB);
end
(3) compile/elab/simulation option
irun -access +rwc -loadpli1 debpli:novas_pli_boot -f XXXXXXX.f

你可能感兴趣的:(芯片验证)