Is there a way to toggle leaf names in ModelSim th

2020-07-05 07:21发布

问题:

I am looking for a way to toggle leaf names of the nets in ModelSim view, in GUI mode. In other words, an equivalent of pressing "Toggle leaf names <-> full names" button:

I am aware of the way of adding short names. For example, I've been using code like this:

add wave -group "stimulus" -label "valid" ${sim_module}/aso_src0_valid
add wave -group "stimulus" -label "ready" ${sim_module}/aso_src0_ready
add wave -group "stimulus" -label "data" -radix ascii ${sim_module}/aso_src0_data
add wave -group "stimulus" -label "begin" ${sim_module}/aso_src0_startofpacket
add wave -group "stimulus" -label "end" ${sim_module}/aso_src0_endofpacket
add wave -group "stimulus" -label "error" ${sim_module}/aso_src0_error

However, for a quick simulation script sketch-up when I would like to add all signals for a module that seems like too much to type, and so I just do this:

add wave -group "stimulus" "/aso_src0_*"

And by default it shows full names under the group "stimulus". I could not find a parameter of add function or another function that toggles between leaf and full names. Given how powerful ModelSim is, it is hard to believe it doesn't have this API or other easy way to achieve what I want. So is there a way and what is it?

回答1:

config wave -signalnamewidth 1

From ModelSim Reference Manual, v6.5e:

-signalnamewidth [<value>] 

(optional) Controls the number of hierarchical regions displayed as part of a signal name shown in the pathname pane. Related Tcl variable is PrefWave(SignalNameWidth). Can also be set with the WaveSignalNameWidth variable in the modelsim.ini file.

<value> — Any non-negative integer where the default is 0 (display the full path. For example,1 displays only the leaf path element, 2 displays the last two path elements, and so on.



标签: modelsim