Finding signal types within Modelsim using TCL

Guest
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
 
On Wed, 12 Sep 2007 11:02:27 -0000, aclegg1986@googlemail.com wrote:

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
jonathan.bromley@MYCOMPANY.com
http://www.MYCOMPANY.com

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

Welcome to EDABoard.com

Sponsor

Back
Top