Technical data
force
ModelSim EE/PLUS Reference Manual Simulator Command Reference
-
319
force
The
force
command allows you to apply stimulus to VHDL signals and Verilog
nets interactively. Since
force
commands (like all VSIM commands) can be
included in a macro file, it is possible to create complex sequences of stimuli.
Syntax
force
[-freeze | -drive | -deposit] [-repeat <period>]
<item_name> <value> [<time>] [, <value> <time> ...]
Arguments
-freeze
Freezes the item at the specified value until it is forced again or until it is unforced with a
noforce
command (p332). Optional.
-drive
Attaches a driver to the item and drives the specified value until the item is forced again or
until it is unforced with a
noforce
command (p332). Optional.
This option is illegal for unresolved signals.
-deposit
Sets the item to the specified value. The value remains until there is a subsequent driver
transaction, or until the item is forced again, or until it is unforced with a
noforce
command
(p332). Optional.
If one of the
-freeze
,
-drive
, or
-deposit
options is not used, then
-freeze
is the
default for unresolved items and
-drive
is the default for resolved items.
If you prefer
-freeze
as the default for resolved and unresolved VHDL signals, you
can change the default force kind in the
modelsim.tcl
file (see "System
Initialization/Project File" (p413)), or by using the DefaultForceKind variable
(p253).
-repeat <period>
Repeats the
force
command, where period is the amount of time of the repeat period.
Optional.
<item_name>
Specifies the name of the HDL item to be forced. Required. A wildcard is permitted only
if it matches one item. See "HDL item pathnames" (p249) for the full syntax of an item