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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

UM-624 G - Logic Modeling SmartModels<br />

Memory arrays<br />

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

lmcwin write<br />

The lmcwin write comm<strong>and</strong> writes a value into a window. The format of the value<br />

argument is the same as used in other simulator comm<strong>and</strong>s that take value arguments. For<br />

example, to write 1 to window wb, <strong>and</strong> all 1’s to window wc:<br />

lmcwin write /top/u1/wb 1<br />

lmcwin write /top/u1/wc X"FFFFFFFFFFFFFFFF"<br />

lmcwin enable<br />

The lmcwin enable comm<strong>and</strong> enables continuous monitoring of a window. The specified<br />

window is added to the model instance as a signal (with the same name as the window) of<br />

type std_logic or std_logic_vector. This signal's values can then be referenced in simulator<br />

comm<strong>and</strong>s that read signal values, such as the add list comm<strong>and</strong> (CR-48) shown below. The<br />

window signal is continuously updated to reflect the value in the model. For example, to<br />

list window wa:<br />

lmcwin enable /top/u1/wa<br />

add list /top/u1/wa<br />

lmcwin disable<br />

The lmcwin disable comm<strong>and</strong> disables continuous monitoring of a window. The window<br />

signal is not deleted, but it no longer is updated when the model’s window register changes<br />

value. For example, to disable continuous monitoring of window wa:<br />

lmcwin disable /top/u1/wa<br />

lmcwin release<br />

Some windows are actually nets, <strong>and</strong> the lmcwin write comm<strong>and</strong> behaves more like a<br />

continuous force on the net. The lmcwin release comm<strong>and</strong> disables the effect of a previous<br />

lmcwin write comm<strong>and</strong> on a window net.<br />

A memory model usually makes the entire register array available as a window. In this case,<br />

the window comm<strong>and</strong>s operate only on a single element at a time. The element is selected<br />

as an array reference in the window instance specification. For example, to read element 5<br />

from the window memory mem:<br />

lmcwin read /top/u2/mem(5)<br />

Omitting the element specification defaults to element 0. Also, continuous monitoring is<br />

limited to a single array element. The associated window signal is updated with the most<br />

recently enabled element for continuous monitoring.

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

Saved successfully!

Ooh no, something went wrong!