Delay statement times are 64bit.

In certain special cases, the compiler did not properly work with
long64 while handling delay statement times.
This commit is contained in:
Stephen Williams 2009-01-05 20:22:54 -08:00
parent 707a3ebe27
commit eaea529c28
2 changed files with 6 additions and 3 deletions

View File

@ -2741,7 +2741,7 @@ NetProc* PDelayStatement::elaborate(Design*des, NetScope*scope) const
return new NetPDelay(tmp->value().as_ulong64(), return new NetPDelay(tmp->value().as_ulong64(),
statement_->elaborate(des, scope)); statement_->elaborate(des, scope));
else else
return new NetPDelay(tmp->value().as_ulong(), 0); return new NetPDelay(tmp->value().as_ulong64(), 0);
delete dex; delete dex;

View File

@ -280,14 +280,17 @@ will be deactivated. For a full deactivation the <base> is 0 and
The same as %deassign above except this is used for real variables. The same as %deassign above except this is used for real variables.
* %delay <delay> * %delay <low>, <high>
This opcode pauses the thread, and causes it to be rescheduled for a This opcode pauses the thread, and causes it to be rescheduled for a
time in the future. The <amount> is the number of the ticks in the time in the future. The amount is the number of the ticks in the
future to reschedule, and is >= 0. If the %delay is zero, then the future to reschedule, and is >= 0. If the %delay is zero, then the
thread yields the processor for another thread, but will be resumed in thread yields the processor for another thread, but will be resumed in
the current time step. the current time step.
The delay amount is given as 2 32bit numbers, so that 64bit times may
be represented.
* %delayx <idx> * %delayx <idx>
This is similar to the %delay opcode, except that the parameter This is similar to the %delay opcode, except that the parameter