Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Assign random values to the inputs with TCL in NCSim

Status
Not open for further replies.

Amir Yazdanbakhsh

Newbie level 5
Newbie level 5
Joined
Jun 18, 2013
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
66
Hi,

I am trying to assign random values to the inputs of my design. I would like to do in the TCL scripts. I have the TCL for the Modelsim. I need something similar in the NCSim.

Code:
set DUTInS [] # Set to store all the inputs

# Find all the inputs and add them to the set
foreach k [find signals -in DUT/*] {
       set o [string map {DUT GM} $k]
       lappend DUTInS $k
}

# Assign a random value to them

foreach k1 $DUTInS {
     set r [ expr { int(floor(rand() * 2.0)) } ]
     force $k1 $r 0ps
}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top