quartus与modelsim联合仿真的一点技巧

Modelsim联合Quartus仿真的一点小技巧:

如图操作:

 

       编译,在output dir中对应的目录下有*.vo(网表文件)*.sdo;

             (1) 在Modelsim的功能仿真时有以下几种组合:

           a. 顶层文件+子模块所在的源文件;

           b. 顶层文件+子模块所在的源文件的网表文件;

 

           tcl代码如下:

                      

 vlog *.v
vlog *.vo
#vsim -L {D:/Program Files/modelsim/altera_lib} -novopt -sdftyp {/dut=D:/Program #Files/modelsim/cgs/ram/ram_v.sdo}  work.ram_test
vsim -L {D:/Program Files/modelsim/altera_lib} -novopt work.ram_test
add wave -radix unsigned /ram_test/*
run 1us
puts "enter /"resume/"to quit simulation"
pause
quit -sim 

            

              (2)Modelsim的时序仿真时只需要vo文件和sdo文件即可,其他文件都不需要。当然也可以源文件+sdo文件

 vlog *.v
vlog *.vo
#vsim -L {D:/Program Files/modelsim/altera_lib} -novopt -sdftyp {/dut=D:/Program #Files/modelsim/cgs/ram/ram_v.sdo}  work.ram_test
vsim -L {D:/Program Files/modelsim/altera_lib} -novopt work.ram_test
add wave -radix unsigned /ram_test/*
run 1us
puts "enter /"resume/"to quit simulation"
pause
quit -sim 

或者将vsim -L {D:/Program Files/modelsim/altera_lib} -novopt work.ram_test去掉,将两行注释处反注释也可以
   

你可能感兴趣的:(fpga)