24.03.2013 Views

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

UM-426 17 - Signal Spy<br />

Related procedures<br />

Limitations<br />

Example<br />

<strong>ModelSim</strong> <strong>SE</strong> User’s <strong>Manual</strong><br />

Name Type Description<br />

cancel_period time Optional. Cancels the signal_force comm<strong>and</strong><br />

after the specified period of time units.<br />

Cancellation occurs at the last simulation<br />

delta cycle of a time unit. A value of zero<br />

cancels the force at the end of the current time<br />

period. Default is -1 ms. A negative value<br />

means that the force will not be cancelled.<br />

verbose integer Optional. Possible values are 0 or 1. Specifies<br />

whether you want a message reported in the<br />

Transcript stating that the value is being<br />

forced on the dest_object at the specified time.<br />

Default is 0, no message.<br />

init_signal_driver (UM-419), init_signal_spy (UM-422), signal_release (UM-427)<br />

You cannot force bits or slices of a register; you can force only the entire register.<br />

library IEEE, modelsim_lib;<br />

use IEEE.std_logic_1164.all;<br />

use modelsim_lib.util.all;<br />

entity testbench is<br />

end;<br />

architecture only of testbench is<br />

begin<br />

force_process : process<br />

begin<br />

signal_force("/testbench/uut/blk1/reset", "1", 0 ns, freeze, open, 1);<br />

signal_force("/testbench/uut/blk1/reset", "0", 40 ns, freeze, 2 ms, 1);<br />

wait;<br />

end process force_process;<br />

...<br />

end;<br />

The above example forces reset to a "1" from time 0 ns to 40 ns. At 40 ns, reset is forced<br />

to a "0", 2 ms after the second signal_force call was executed.<br />

If you want to skip parameters so that you can specify subsequent parameters, you need to<br />

use the keyword "open" as a placeholder for the skipped parameter(s). The first<br />

signal_force procedure illustrates this, where an "open" for the cancel_period parameter<br />

means that the default value of -1 ms is used.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!