我的SV/UVM小环境,用以快速测试SV及UVM相关方法的使用。
tb.sv
`include "uvm_macros.svh" module tb; import uvm_pkg::*; class try; string name = "try"; function string type_name(); return name; endfunction endclass : try try dut; initial begin dut = new(); #100; `uvm_info("tb", dut.type_name(), UVM_LOW) end initial begin $timeformat(-9,2,"ns",16); $fsdbDumpfile("tb.fsdb"); $fsdbDumpvars(0,tb); end endmodule
Makefile
.PHONY: all clean comp simv verdi all: clean comp simv comp: vcs -full64 -sverilog tb.sv -debug_access+all -ntb -ntb_opts uvm +vpi simv: ./simv 2>&1 | tee -i run.log clean: rm -rf *.log simv.daidir csrc simv ucli.key verdi: bsub -I verdi -sverilog tb.sv -ssf tb.fsdb &