当前位置:   article > 正文

modelsim do文件仿真

modelsim do if file exiest vlib work

1.编写sim.do文件

##### Quit the Simulation #####
quit -sim
 
##### Make work directory && Create the Project/Lib #####
if {[file exists work]} {
file delete -force
work vlib work
puts "Successfully Created work1 directory"
} else {
vlib work
puts "Successfully Created work directory"
}
 
##### Compile the verilog #####
vlog ../testbench/counter_tb.v
vlog ../prj/ip/counter.v
 
##### Start Simulation #####
vsim -t ps -novopt -L lpm -L altera_mf -L altera_primitives work.counter_tb
radix hex
add wave -position insertpoint sim:/counter_tb/counter0/*
run -all

2.modelsim_run.bat文件

modelsim -do sim.do

转载于:https://www.cnblogs.com/billyzh/p/5627854.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/331018
推荐阅读
相关标签
  

闽ICP备14008679号