Finding signal types within Modelsim using TCL

A

aclegg1986

Hi,

Within the Modelsim I am trying to force all signals (integer,
std_logic, std_logic_vector and type) named RET_ within a particular
instance to an active state.
I understand that I use: find signals sim:/tb_dut/dut/pro/RET_* to
find all signals within that region, but how do then find out the
particular type of a signal, so that I know how to force it i.e left
most value for integers, right most value for types, 1 for std_logic
and 1's for std_logic_vector? Would I need to use the describe
command?

Thanks
Andy
 
J

Jonathan Bromley

Hi,

Within the Modelsim I am trying to force all signals (integer,
std_logic, std_logic_vector and type) named RET_ within a particular
instance to an active state.
I understand that I use: find signals sim:/tb_dut/dut/pro/RET_* to
find all signals within that region, but how do then find out the
particular type of a signal, so that I know how to force it i.e left
most value for integers, right most value for types, 1 for std_logic
and 1's for std_logic_vector? Would I need to use the describe
command?

Yes, I think that does what you want.

Unfortunately, the result of [describe] is designed for
human rather than machine readership. However, the
format isn't too complicated and an easy bit of Tcl
will unravel most of the common cases. For enums, the
first word of the first line is "Enumeration" and the
second line contains a convenient list of the literals.
Records and arrays are described in a nierarchical way,
with indentation (using spaces) to indicate levels
of hierarchy. Not trivial, but definitely possible.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
(e-mail address removed)
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top