10.06.2016 Views

eldo_user

Create successful ePaper yourself

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

Eldo Control Language<br />

Task Instantiation<br />

Related Topics<br />

Task Instantiation<br />

Statement Overview<br />

Defining and Running Simulations<br />

Task Instantiation<br />

A task has to be instantiated to be executed. Tasks may be instantiated directly inside the netlist,<br />

or also inside other tasks (in which case they will be executed only if the calling task is<br />

instantiated in the netlist). Tasks can even be recursive.<br />

For an example of this, see Example Three.<br />

To instantiate a task in the netlist file, its name must be prefixed with a '.' and no parenthesis nor<br />

comma must be specified to separate the input arguments, as if it was a <strong>user</strong>-defined command.<br />

Contrary to testbenches or usual commands, tasks have precedence over everything else. As<br />

soon as some tasks are instantiated in the netlist file, only instantiated tasks will be executed. If<br />

the file also contains a circuit description and usual simulation commands, they will be ignored<br />

(except if an instantiated task performs a simulation with the simulation command; see<br />

“Defining and Running Simulations” on page 841 for more information).<br />

Task Input Parameters<br />

Task input parameters may be given specific values during instantiation. If not, their default<br />

values will be used. See “Examples” on page 818.<br />

Task Output Parameters<br />

If output parameters were defined for a task, their result values (that is to say the values they<br />

have at the end of the execution of the task) can be used by the calling task: they are usually<br />

directly saved inside some local variables of the calling task. Task output parameters are not<br />

passed by reference, but by value: when the task having output parameters is executed, its<br />

output parameters are not references to local variables of the calling task; on the contrary, they<br />

really have a value of their own, which can be accessed at the end of the execution of the task by<br />

the calling task, using the '@' operator.<br />

For example, if the definition of a task is:<br />

.define_task task_name(input_param1=default_value1, ...<br />

+ @output_param1=default_value2, ...)<br />

...<br />

output_param1 = final_value1<br />

.end_define_task<br />

then its instantiation inside another task is:<br />

Eldo® User's Manual, 15.3 817

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

Saved successfully!

Ooh no, something went wrong!