119 formal void parameters added to keep -Wstrict-prototypes happy.
Process found one real missing prototype in vpi/vcd_priv.h:
EXTERN void vcd_names_delete(struct vcd_names_list_s*tab);
8 such warnings left, all in Tony's code
Icarus is not actually fast enough to run into this issue in a
reasonable amount of time. I discovered this by thinking about
the algorithm and verified the fix with custom code.
To get the correct definition for _FILE_OFFSET_SIZE we must include
the header that loads this before calling the other system headers.
This patch also fixes a minor spacing issues.
After some more thought I believe it is better for $q_full to return
'bx instead of 2 when $q_full is given an invalid id. This will make
the typical full/not full checks both return false. We still return
an error code in the status variable.
This patch adds support for calculating the average queue wait
time. This is accomplished by keeping two 64 bit values that
represent the high and low total wait time for all previous
queue elements. The current wait time for any elements still
in the queue are added to this total. The wait time total is
then divided by the total number of items added to the queue.
This patch adds support for calculating the queue mean inter-arrival
time. This is just the latest add time minus the first add time
divided by the number of intervals (the number of adds minus one).
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).