I am writing code to check the pulse width of the clock. I am storing the width of the pulse inside the queue. Since the simulation is going to run for 2 seconds, the size of the queue is going to enormous. I wanted to know what is the maximum size of the queue?
When I look in the IEEE Std 1800-2017, section 7.10 Queues, I do not see a maximum size for a queue explicitly specified. In that case, I would assume that you can not rely on it to be any specific value. It might depend on your simulation software and on your OS.
I do see this in the Std:
7.10.2.1 Size()
The prototype for the size() method is as follows:
function int size();
int
is specified as signed 32-bit. Perhaps we can assume a maximum of about 2 billion.
In order to avoid having a huge queue, you should check the pulsewidth on every cycle of the clock. There should be no need to wait until the end of the simulation.