You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently simulations cannot continue for more than approx 2,000,000,000 clock cycles (2^31 - 1) because time is represented by an int32. This limit can be reached within a few minutes on a small circuit.
Describe the solution you'd like
Make this limit arbitrary by using bigint not int to represent times. Note that although time is now bigint indexes into the (limited size) circular array are still int.
Describe alternatives you've considered
It would be possible to use uint32 for an easy doubling of range - that is not really enough
It would be possible to use int64 - but the JS translation of int64 is bigint anyway!
Additional context
This is relatively easy refactoring but will require understanding of the simulator code in some detail
The code that calls the simulator is currently very messy - with layers of functions calling the underlying top-level simulation function FastRun.runFastSimulation
As part of the refactoring these functions should be traced and fully documented to make future changes this code easier.
Refactoring Notes
The simulation time is held inside the fast simulation record as a mutable fs.ClockTick. That means changing the type of ClockTick will probably via the compiler lead to the necessary refactoring of simulation times.
Most problematic will be the display functions for time which will need to be changed. Displaying int64 would however be enough since practically we cannot get beyond max int64 clock ticks.
The simulator is called from a number of other top-level functions in FastRun. Those must all be checked for possible necessary refactoring of the simulation time type.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently simulations cannot continue for more than approx 2,000,000,000 clock cycles (2^31 - 1) because time is represented by an int32. This limit can be reached within a few minutes on a small circuit.
Describe the solution you'd like
Make this limit arbitrary by using bigint not int to represent times. Note that although time is now bigint indexes into the (limited size) circular array are still int.
Describe alternatives you've considered
Additional context
FastRun.runFastSimulation
Refactoring Notes
fs.ClockTick
. That means changing the type ofClockTick
will probably via the compiler lead to the necessary refactoring of simulation times.The text was updated successfully, but these errors were encountered: