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.

init_signal_driver<br />

Call only once<br />

Syntax<br />

Returns<br />

init_signal_driver UM-419<br />

The init_signal_driver() procedure drives the value of a VHDL signal or Verilog net (called<br />

the src_object) onto an existing VHDL signal or Verilog net (called the dest_object). This<br />

allows you to drive signals or nets at any level of the design hierarchy from within a VHDL<br />

architecture (e.g., a testbench).<br />

The init_signal_driver procedure drives the value onto the destination signal just as if the<br />

signals were directly connected in the HDL code. Any existing or subsequent drive or force<br />

of the destination signal, by some other means, will be considered with the<br />

init_signal_driver value in the resolution of the signal.<br />

The init_signal_driver procedure creates a persistent relationship between the source <strong>and</strong><br />

destination signals. Hence, you need to call init_signal_driver only once for a particular<br />

pair of signals. Once init_signal_driver is called, any change on the source signal will be<br />

driven on the destination signal until the end of the simulation.<br />

Thus, we recommend that you place all init_signal_driver calls in a VHDL process. You<br />

need to code the VHDL process correctly so that it is executed only once. The VHDL<br />

process should not be sensitive to any signals <strong>and</strong> should contain only init_signal_driver<br />

calls <strong>and</strong> a simple wait statement. The process will execute once <strong>and</strong> then wait forever. See<br />

the example below.<br />

Nothing<br />

init_signal_driver(src_object, dest_object, delay, delay_type, verbose)<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!