はじめに
xelab コマンドに -R オプションを付けると、エラボレーション後に、シミュレーションを開始します。HDLの修正無に再度シミュレーションをするには、xsim コマンドを使います。
xsim コマンド
xsim コマンドを-helpオプションを付けて実行すると、次のようなメッセージが表示されます。
xsim -help ****** Vivado Simulator v2021.2 **** Copyright 1986-2021 Xilinx, Inc. All Rights Reserved. Usage: /mnt/usb/XILINX/Vivado/2021.2/bin/unwrapped/lnx64.o/xsim [options] (Switches with double dash '--' can also be used with a single dash '-') --R : Run simulation till end i.e. do 'run all;quit' --autoloadwcfg : Load already saved waveform configuration file --cov_db_dir : Functional Coverage database dump directory. The coverage data will be present under <arg>/xsim.covdb/<cov_db_name> directory. Default is ./ or inherits value set in xelab. --cov_db_name : Functional Coverage database name. The coverage data will be present under <cov_db_dir>/xsim.covdb/<arg> directory. Default is snapshot name or inherits value set in xelab. --downgrade_error2info : Downgrade severity level of HDL messages from Error to Info. --downgrade_error2warning : Downgrade severity level of HDL messages from Error to Warning. --downgrade_fatal2info : Downgrade severity level of HDL messages from Fatal to Info. --downgrade_fatal2warning : Downgrade severity level of HDL messages from Fatal to Warning. --downgrade_severity : Downgrade severity level of HDL messages. Choices are:error2warning|error2info|fatal2warning|fatal2info --f : Take command line options from a file --file : Take command line options from a file --g : Run with interactive GUI --gui : Run with interactive GUI --h : Print help message and exit --help : Print help message and exit --ieeewarnings : Enable warnings from VHDL IEEE functions --ignore_assertions : Ignore System Verilog Concurrent Assertions. --ignore_coverage : Ignore System Verilog Functional Coverage. --ignore_feature : Ignore effect of specific HDL feature or construct. Choices are: assertion --log : Specify the log file name --maxdeltaid : Specify the maximum delta number. Will report error if it exceeds maximum simulation loops at the same time --maxlogsize : Set the maximum size a log file can reach in MB. The default setting is unlimited --nolog : Suppress log file generation --nosignalhandlers : Run with no signal handlers to avoid conflict with security software. --onerror : Specify behavior upon simulation run-time error: quit|stop --onfinish : Specify behavior at end of simulation: quit|stop --protoinst : Specify a .protoinst file for protocol analysis --runall : Run simulation till end i.e. do 'run all;quit' --stats : Display memory and cpu stats upon exiting --sv_seed : seed for sv constraint random --t : Specify the TCL file for batch mode execution --tclbatch : Specify the TCL file for batch mode execution --tempDir : Specify the temporary directory name --testplusarg : Specify plus args to be used by $test$plusargs and $value$plusargs system functions --tl : Enable printing of file name and line number of statements being executed. --tp : Enable printing of hierarchical names of process being executed. --version : Print the simulator version and quit. --view : Open a wave configuration file. This switch should be used together with -gui switch --wdb : Specify the waveform database output file
--wdb オプション
xelab コマンドで -R オプションと --debug wave オプションを指定すると、波形ダンプが実行されます。下記のコマンドでは、work.top.wdb が波形ダンプファイルが生成されます。
xelab top -R --debug wave
xsim コマンドで --wdb オプションにて、波形ダンプファイル名を指定できます。
xsim --wdb top.wdb -R top ****** xsim v2021.2 (64-bit) **** SW Build 3367213 on Tue Oct 19 02:47:39 MDT 2021 **** IP Build 3369179 on Thu Oct 21 08:25:16 MDT 2021 ** Copyright 1986-2021 Xilinx, Inc. All Rights Reserved. source xsim.dir/work.top/xsim_script.tcl # xsim {work.top} -wdb {top.wdb} -autoloadwcfg -runall Time resolution is 1 ps run -all $finish called at time : 10 us : File "/mnt/c/Users/haray/home/src/All-of-SystemVerilog/xsim/xsi/src/top.sv" Line 19 exit INFO: [Common 17-206] Exiting xsim at Sun Jun 12 14:40:49 2022...
top.wdb というファイルが生成されます。--wdb オプションを指定しないと、work.top.wdb という名前で波形ダンプファイルが生成されます。
おわりに
xsim コマンドで波形ダンプのファイル名を指定する方法をみてみました。