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.

Forcing a variable in Modelsim or questasim simulation

Status
Not open for further replies.

achaleus

Member level 5
Joined
Dec 21, 2012
Messages
85
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,288
Location
Bangalore
Activity points
1,866
Hello edaboard,
how can I force a variable/signal in modelsim/questasim to all ones.

suppose I have a signal with vector length 512 so how can I force to all one's

thank you,
achaleus
 

From the ModelSim SE Command Ref manual : The force command allows you to apply stimulus interactively to VHDL signals and Verilog nets. Since force commands (like all commands) can be included in a macro file, it is possible to create complex sequences of stimuli.

Alternatively a force can also be applied from the ModelSim/Questa GUI. Just right click on the signal/net and you should be able to find the 'Force' option (or something very similar to this process; currently I am not running ModelSim/Questa).

However for a variable, 'force' will not work. Variables cannot be forced to a new value. If you want to change the value of a variable, you need to use the command change.
 

Are you talking about VHDL or Verilog? VHDL variables cannot be forced.

force <path>.<sig> FFFFFFFFFF (plus lots more Fs)

But I ask why? signal forcing should only be for error injection, not stimulus.
 

Whatever may be the reason, to me it seems that the OP has not performed a basic google search. Of course he has mixed up signals and variables.
 

Are you talking about VHDL or Verilog? VHDL variables cannot be forced.

force <path>.<sig> FFFFFFFFFF (plus lots more Fs)

But I ask why? signal forcing should only be for error injection, not stimulus.

Hello TrickyDicky,
we have an option in verilog coding like {256{F}} something like that can we force (error injection or whatever maybe) through wave window
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top