Re: Adding internal signals in Modelsim

Discussion in 'VHDL' started by Al, Nov 11, 2006.

  1. Al

    Al Guest

    > 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
     
    Al, Nov 11, 2006
    #1
    1. Advertising

  2. 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
     
    Mike Treseler, Nov 11, 2006
    #2
    1. Advertising

  3. Al

    Al Guest

    Mike Treseler wrote:
    > 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


    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.

    --
    Alessandro Basili
    CERN, PH/UGC
    Hardware Designer
     
    Al, Nov 11, 2006
    #3
  4. 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
     
    Mike Treseler, Nov 11, 2006
    #4
  5. Al

    Al Guest

    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.



    --
    Alessandro Basili
    CERN, PH/UGC
    Hardware Designer
     
    Al, Nov 13, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ALuPin
    Replies:
    5
    Views:
    2,061
    ALuPin
    Jan 8, 2004
  2. DonQ
    Replies:
    2
    Views:
    937
    Amontec Team, Laurent Gauch
    Feb 28, 2004
  3. Martin Maurer
    Replies:
    2
    Views:
    2,164
    Charles Bailey
    May 21, 2004
  4. Nikola Skoric
    Replies:
    3
    Views:
    1,558
    Mike Treseler
    Jun 23, 2006
  5. Joseph
    Replies:
    4
    Views:
    3,419
    Kevin Neilson
    Mar 27, 2008
Loading...

Share This Page