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-424 17 - Signal Spy<br />

Example<br />

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

library ieee;<br />

library modelsim_lib;<br />

use ieee.std_logic_1164.all;<br />

use modelsim_lib.util.all;<br />

entity top is<br />

end;<br />

architecture only of top is<br />

signal top_sig1 : std_logic;<br />

begin<br />

...<br />

spy_process : process<br />

begin<br />

init_signal_spy("/top/uut/inst1/sig1","/top/top_sig1",1,1);<br />

wait;<br />

end process spy_process;<br />

...<br />

spy_enable_disable : process(enable_sig)<br />

begin<br />

if (enable_sig = '1') then<br />

enable_signal_spy("/top/uut/inst1/sig1","/top/top_sig1",0);<br />

elseif (enable_sig = '0')<br />

disable_signal_spy("/top/uut/inst1/sig1","/top/top_sig1",0);<br />

end if;<br />

end process spy_enable_disable;<br />

...<br />

end;<br />

In this example, the value of /top/uut/inst1/sig1 is mirrored onto /top/top_sig1.

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

Saved successfully!

Ooh no, something went wrong!