Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Adding internal signals in Modelsim

206 views
Skip to first unread message

Al

unread,
Nov 11, 2006, 8:05:04 AM11/11/06
to
> ALuPin wrote:
>
>> If I write the following command in my macro I do not get a wave of
>> this signal
>> "add wave sim:/tb_packetfile_ctrl/u1/last_block"
>
> 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.
>
>> MACRO:
>> cd H:/EDA/Altera/Extender/Packetfile_Ctrl/simulation/modelsim
>> vlib modelsim_work
>> vmap work modelsim_work
>> vsim -sdftyp /U1=packetfile_ctrl_vhd.sdo work.TB_PACKETFILE_CTRL
>
> 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


--
Alessandro Basili
CERN, PH/UGC
Hardware Designer

Mike Treseler

unread,
Nov 11, 2006, 10:04:13 AM11/11/06
to
Al wrote:

> 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

Al

unread,
Nov 11, 2006, 11:53:14 AM11/11/06
to

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.

Mike Treseler

unread,
Nov 11, 2006, 12:50:43 PM11/11/06
to
Al wrote:

> 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

Al

unread,
Nov 13, 2006, 3:04:38 AM11/13/06
to
Mike Treseler wrote:
> Al wrote:
>
>
>>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.
>

That helped a lot! Thanks.

>
>>So which is the meaning of -internal option? It didn't change anything
>>even on source simulation.
>
>
> 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.

0 new messages