iverilog/vpi/system.sft

27 lines
769 B
Plaintext
Raw Permalink Normal View History

#
# This is the system function descriptor table for the
# builtin (system) functions.
#
$random vpiSysFuncInt
$rtoi vpiSysFuncInt
$urandom vpiSysFuncSized 32 unsigned
$urandom_range vpiSysFuncSized 32 unsigned
$dist_uniform vpiSysFuncInt
$dist_normal vpiSysFuncInt
$dist_exponential vpiSysFuncInt
$dist_poisson vpiSysFuncInt
$dist_chi_square vpiSysFuncInt
$dist_t vpiSysFuncInt
$dist_erlang vpiSysFuncInt
$clog2 vpiSysFuncInt
Add the stochastic (queue) tasks/function This patch adds full support for the stochastic tasks/functions except the mean inter-arrival and average wait statistics are not currently available. These will be added in a later patch. This implementation goes a bit beyond the standard and supports the following: 1. The job and inform arguments support 32 bit four state values. 2. The id for all routines, the job and inform arguments for $q_add(), the statistic code for $q_exam() along with the queue type and maximum length arguments for $q_initialize() can be less than or equal to 32 bits. The argument will be sign extended if needed to fill the internal 32 bit value. 3. The job and inform arguments to $q_remove() and the status argument for all the routines must be 32 bits, but do not have to be an integer variable (e.g. a 32 bit register or part select is OK). 4. An undefined bit in the id argument for any of the routines will return a status of 2 (undefined queue id). Undefined bits are not automatically converted to zero. 5. Undefined bits in the $q_initialize() queue type and maximum length arguments or the $q_exam() statistic code argument are also flagged as an error (are not converted to zero). 6. The $q_full() function returns 2 on error, the other routines that return a value $q_remove() job/inform arguments and the $q_exam() statistic value argument will usually return x on error. 7. An invalid statistic code will set the $q_exam() status to 8. 8. The $q_exam() statistic value argument can be 32 bits or larger. This allows returning large statistical time values. 9. All time values are internally saved in simulation time units. They will be converted to the calling module's time unit (with rounding) before they are returned. 10. If a $q_exam() statistical value is too large to fit into the variable the maximum positive value will be returned and the status code will be set to 9 (value is too large). 11. If a statistical value is currently undefined $q_exam() will return 10 (no statistical information) (e.g. using code 5 on an empty queue).
2011-04-11 02:16:25 +02:00
$q_full vpiSysFuncInt
$abstime vpiSysFuncReal
$simparam vpiSysFuncReal
$simparam$str vpiSysFuncSized 1024 unsigned
$table_model vpiSysFuncReal
$ivl_string_method$len vpiSysFuncInt
$ivl_string_method$to_vec vpiSysFuncVoid