Technical data

force
ModelSim EE/SE Command Reference ModelSim Commands CR-89
If the time units are not specified, then the default is the resolution units selected
at simulation start-up. Optional.
A zero-delay force command causes the change to occur in the current (rather than
the next) simulation delta cycle.
Examples
force input1 0
Forces input1 to 0 at the current simulator time.
force bus1 01XZ 100 ns
Forces bus1 to 01XZ at 100 nanoseconds after the current simulator time.
force bus1 16#f @200
Forces bus1 to 16#F at the absolute time 200 measured in the resolution units selected at
simulation start-up.
force input1 1 10, 0 20 -r 100
Forces input1 to 1 at 10 time units after the current simulator time and to 0 at 20 time units
after the current simulation time. This repeats every 100 time units, so the next transition is
to 1 at 110 time units afterwards.
force input1 1 10 ns, 0 {20 ns} -r 100ns
Similar to the previous example, but also specifies the time units. Time unit expressions
preceding the "-r" must be placed in curly braces.
force s 1 0, 0 100 -repeat 200 -cancel 1000
Forces signal s to alternate between values 1 and 0 every 100 time units until time 1000.
Cancellation occurs at the last simulation delta cycle of a time unit. So,
force s 1 0 -cancel 0
will force signal s to 1 for the duration of the current time period.
See also
noforce command
(CR-101), and change command (CR-43)