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.

System tasks <strong>and</strong> functions UM-151<br />

The tcheck_cond argument conditions the data_event for the hold check <strong>and</strong> the<br />

clk_event for the setup check. This alternate method of conditioning precludes specifying<br />

conditions in the clk_event <strong>and</strong> data_event arguments.<br />

The delayed_clk argument is a net that is continuously assigned the value of the net<br />

specified in the clk_event. The delay is non-zero if the setup_limit is negative, zero<br />

otherwise.<br />

The delayed_data argument is a net that is continuously assigned the value of the net<br />

specified in the data_event. The delay is non-zero if the hold_limit is negative, zero<br />

otherwise.<br />

The delayed_clk <strong>and</strong> delayed_data arguments are provided to ease the modeling of<br />

devices that may have negative timing constraints. The model's logic should reference<br />

the delayed_clk <strong>and</strong> delayed_data nets in place of the normal clk <strong>and</strong> data nets. This<br />

ensures that the correct data is latched in the presence of negative constraints. The<br />

simulator automatically calculates the delays for delayed_clk <strong>and</strong> delayed_data such that<br />

the correct data is latched as long as a timing constraint has not been violated. See<br />

"Negative timing check limits" (UM-136) for more details.<br />

The following system tasks are Verilog-XL system tasks that are not implemented in<br />

<strong>ModelSim</strong> Verilog, but have equivalent simulator comm<strong>and</strong>s.<br />

$input("filename")<br />

This system task reads comm<strong>and</strong>s from the specified filename. The equivalent simulator<br />

comm<strong>and</strong> is do .<br />

$list[(hierarchical_name)]<br />

This system task lists the source code for the specified scope. The equivalent<br />

functionality is provided by selecting a module in the structure pane of the Workspace.<br />

The corresponding source code is displayed in a Source window.<br />

$reset<br />

This system task resets the simulation back to its time 0 state. The equivalent simulator<br />

comm<strong>and</strong> is restart.<br />

$restart("filename")<br />

This system task sets the simulation to the state specified by filename, saved in a previous<br />

call to $save. The equivalent simulator comm<strong>and</strong> is restore .<br />

$save("filename")<br />

This system task saves the current simulation state to the file specified by filename. The<br />

equivalent simulator comm<strong>and</strong> is checkpoint .<br />

$scope(hierarchical_name)<br />

This system task sets the interactive scope to the scope specified by hierarchical_name.<br />

The equivalent simulator comm<strong>and</strong> is environment .<br />

$showscopes<br />

This system task displays a list of scopes defined in the current interactive scope. The<br />

equivalent simulator comm<strong>and</strong> is show.<br />

$showvars<br />

This system task displays a list of registers <strong>and</strong> nets defined in the current interactive<br />

scope. The equivalent simulator comm<strong>and</strong> is show.<br />

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

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

Saved successfully!

Ooh no, something went wrong!