一、硬件环境
二、源码
1、只有一个文件tb_top.sv
`timescale 1ns/1ns
`include "uvm_pkg.sv"
module tb_top;
import uvm_pkg::*;
`include "uvm_macros.svh"
initial begin
`uvm_info ("info1","Hello World!", UVM_LOW)
end
endmodule
2、准备脚本文件run.do
vdel -all -lib work
set UVM_DPI_HOME C:/modeltech64_10.5/uvm-1.2/win64
vlib work
vlog "./src/*.sv"
vsim -c -sv_lib $UVM_DPI_HOME/uvm_dpi work.tb_top
run 100ns
3、准备bat文件
set bin_path=C:\\modeltech64_10.5\\win64
C:\modeltech64_10.5\win64
call %bin_path%/vsim -do "do {run.do}" -l simulate.log
if "%errorlevel%"=="1" goto END
if "%errorlevel%"=="0" goto SUCCESS
:END
exit 1
:SUCCESS
exit 0
执行效果
三、工程文件
链接