Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

modelsim script to select signal

Not open for further replies.


Member level 2
Dec 16, 2008
Reaction score
Trophy points
Activity points
can I write a script to select signal for waveform display in modelsim ??
If yes how to write ??

yes , you can
try something like this.
after the VSIM ....
write something like this

view wave
add wave -noupdate -format Logic -label clk /top_tb/top_DUT/CLK0_OUT

for more information on this commnad you can refer to the modelsim reference manual.


You can create a macro file and use the add wave command:

add wave <options> /top/clk
add wave <options> /top/u0/u1/enable

In the waveform viewer you can load (File > Load) this macro file.


I am not writing any script to run modelsim.
I am invoking it from ISE.
In ISE i have selected ModelSim as simulator.

I dont know how to run script, whether to run it in modelsim or ISE.
I never used any scripts till now,

can you please give me if you have any example scripts like this.


You can create a script outside ISE/Modelsim to create the macro file. In this macro file use the "add wave" to select signals you want to view in Modelsim waveform viewer.

From within Modelsim you can also create this macro file: select all signals you want to view in the waveform viewer. In the waveform viewer select File > Save. By default it saves the macro file to When you open Modelsim again you can load this by selecting File > Load in Modelsim waveform viewer. This saves you time by selecting the same signals again (and again) in Modelsim.

But you can create this macro file also with any script language (Tcl, Perl, ...). The only thing you have to know is the exact path of the signal you want to view and the options for the "add wave" command.


when you are working in modelsim, you need to type the command in Modelsim prompt.

By GUI, get in libray>work>top_entity_name, right click on it and say add waves. You will find command got printed in prompt.

Get help from modelsim command reference manual.

Not open for further replies.

Part and Inventory Search

Welcome to