Re: Adding internal signals in Modelsim

A

Al

ALuPin said:
try:

add wave sim:/tb_packetfile_ctrl/u1/*

or from the gui:

view,structure,right-click on u1, add, add to wave

If that doesn't do it, the signal is not there.


Wait a minute. You are siming a netlist, not source code.
This may be the reason last_block is gone.
Compile the source files and try
vsim TB_PACKETFILE_CTRL

-- Mike Treseler

In old archives I found this thread, started from ALuPin.
I think I have the same problem when trying to "add wave" internal
signals with ModelSim. Going through several trials it looks like is not
possible to add wave of a netlist, unless is a port of the hierarchy.
But then I realized there is a -internal option I assumed was for this
purpose, but it didn't work at all, or at least I didn't manage to make
it work.

Then if I go to the Workspace and look for the signals, I find some of
them are shown in one way some others in another:

\mysignal1\
mysignal2

When I type:

add wave /mytest/dut/mysignal2

nothing happens. But if I do write

add wave /mytest/dut/mysignal2/q

the q of the flip-flop is shown on the wave. This is based (i think) on
the fact that can be shown only component's port of a netlist (is that
right?).
The same approach doesn't work for mysignal1, because of these backslash
that i do not understand. It looks like the backslash are inserted on
vectors, but I'm not pretty sure, then if I browse for the vector in the
workspace I find something like this:

\vector[0]\
\vector[1]\
\vector[2]\
\vector[3]\
..
..
..

but how can I add them to the wave from command line? using wildcards do
not help. This is my trials log, where count1_in is a std_logic_vector
(7 downto 0):


add wave -internal /test_counter/dut/count1_in/q
# (vish-4014) No objects found matching '/test_counter/dut/count1_in/q'.
add wave -internal /test_counter/dut/count1_in*/q
# (vish-4014) No objects found matching '/test_counter/dut/count1_in*/q'.
add wave -internal /test_counter/dut/\count1_in*\/q
# (vish-4014) No objects found matching '/test_counter/dut/count1_in*/q'.
add wave -internal /test_counter/dut/\count1_in[0]\/q
# invalid command name "0"

Moreover the option -internal looks to seem useless.
Any suggestions?

Thanks a lot

Al
 
M

Mike Treseler

Al said:
In old archives I found this thread, started from ALuPin.
I think I have the same problem when trying to "add wave" internal
signals with ModelSim.
Any suggestions?

Maybe you didn't try this.
add wave -r /*

-- Mike Treseler
 
A

Al

Mike said:
Al wrote:




Maybe you didn't try this.
add wave -r /*

-- Mike Treseler

Ok, so the recursive option will include all the opjects starting from
the / point. Still there should be a way to search for an internal
signal (unless it is pruned away from the synthesizer), whether if it is
a vector of signals or a single one.
With your suggestion I managed to make a better search and I realized
that all the vectors will be add as they are only if there are no
optimization at the netlist level (of course), in that case it's needed
to specify directly the name of the vector index like this:

add wave {sim: /tb/dut/\data_reg[12]\/q}

So which is the meaning of -internal option? It didn't change anything
even on source simulation.
 
M

Mike Treseler

Al said:
Still there should be a way to search for an internal
signal (unless it is pruned away from the synthesizer), whether if it is
a vector of signals or a single one.

I use find nets

let's see

63 Sat Nov 11 /evtfs/home/tres/vhdl/ref_design> vsim -c test_uart
Reading /flip/usr1/modeltech/tcl/vsim/pref.tcl
VSIM 1> find nets write_stb_s
# /test_uart/write_stb_s

There's also a gui find that works with waveforms.
So which is the meaning of -internal option? It didn't change anything
even on source simulation.

Don't know. Check the docs.

-- Mike Treseler
 
A

Al

Mike said:
Al wrote:




I use find nets

let's see

63 Sat Nov 11 /evtfs/home/tres/vhdl/ref_design> vsim -c test_uart
Reading /flip/usr1/modeltech/tcl/vsim/pref.tcl
VSIM 1> find nets write_stb_s
# /test_uart/write_stb_s

There's also a gui find that works with waveforms.

That helped a lot! Thanks.
Don't know. Check the docs.
Here is what the docs say:

ModelSim Command Reference
add wave
.
.
-internal
For use with wildcard searches. Specifies that the scope of the search is to include
internal objects (non-port objects) if they match the object_name specification. Optional.

But apparently it doesn't do what is expected to do. Apparently the -r
option is much more efficient.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top