?
?
以例子來說明 我要用testbench lpf_direct_tb.v 來測試文件lpf_direct.v
命令行方式和圖形界面兩種方式都可以
1 映射庫 .在編譯源文件之前,創建一個庫存放編譯的結果.
vlib lpf_direct_tb
把庫映射到工作目錄
vmap work lpf_direct_tb
2編譯設計文件 vlog lpf_direct.v lpf_direct_tb.v 如果是vhdl使用vcom
3把編譯好的工程加入模擬器? vsim lpf_direct_tb
4? 仿真
把要仿真的信號添加到視窗 add wave -position insertpoint? \?
sim:/lpf_direct_tb/clk \
sim:/lpf_direct_tb/reset \
sim:/lpf_direct_tb/x_in \
sim:/lpf_direct_tb/y_out
運行 run.可以設置仿真時間 run 100us .
5 調試可用的命令有describe, drivers,examine,force,log,show
When you get to the end of your rope, tie a knot and hang on.
--Franklin D. Roosevelt