(1)下载puvm.tar.gz和uvm-1.1d.tar.gz压缩包 ,使用分别使用tar zxvf puvm.tar.gz和 tar zxvf uvm-1.1d.tar.gz解压到当前目录下
(2)找到puvm->src->ch2->dut->dut.sv文件,将该文件拷贝到puvm->src->ch2->section2.2->2.2.1目录下
(3)打开puvm->src->ch2->section2.2->2.2.1->Makefile.vcs文件并按照下面的方法进行编辑,编辑完后,在终端敲入:make -f Makefile.vcs文章来源:https://www.toymoban.com/news/detail-707984.html
UVM_HOME =/home/ICer/ic_prjs/uvm_prj/example_and_uvm_source_code/uvm-1.1d
include /home/ICer/ic_prjs/uvm_prj/example_and_uvm_source_code/uvm-1.1d/examples/Makefile.vcs
all: clean comp run
comp:
$(VCS) +incdir+. \
dut.sv top_tb.sv my_driver.sv
run:
$(SIMV)
$(CHECK)
TEST = /usr/bin/test
N_ERRS = 0
N_FATALS = 0
# -fsdb_old -ntb_opts
VCS = vcs -full64 -sverilog -ntb_opts -timescale=1ns/1ns \
+acc +vpi \
+define+UVM_OBJECT_MUST_HAVE_CONSTRUCTOR \
+incdir+$(UVM_HOME)/src $(UVM_HOME)/src/uvm.sv \
$(UVM_HOME)/src/dpi/uvm_dpi.cc -CFLAGS -DVCS
SIMV = ./simv +UVM_TESTNAME=dut +UVM_VERBOSITY=$(UVM_VERBOSITY) -l vcs.log
URG = urg -format text -dir simv.vdb
CHECK = \
@$(TEST) \( `grep -c 'UVM_ERROR : $(N_ERRS)' vcs.log` -eq 1 \) -a \
\( `grep -c 'UVM_FATAL : $(N_FATALS)' vcs.log` -eq 1 \)
clean:
rm -rf *~ core csrc simv* vc_hdrs.h ucli.key urg* *.log
(3.a)设置UVM_HOME的路径:
UVM_HOME =/home/ICer/ic_prjs/uvm_prj/example_and_uvm_source_code/uvm-1.1d
(3.2)将uvm-1.1d目录下的Makefile.vcs添加进来,这些命令用于编译uvm库
include /home/ICer/ic_prjs/uvm_prj/example_and_uvm_source_code/uvm-1.1d/examples/Makefile.vcs
(4)最后在终端敲入:./simv
(5)最终显示结果如下:文章来源地址https://www.toymoban.com/news/detail-707984.html
到了这里,关于基于UVM+VCS基本平台,运行《UVM实战》中的第一个UVM代码并输出结果的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!