New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding schedule_next_max_ticks to Simulator #927
base: develop
Are you sure you want to change the base?
Conversation
This commit extends the Simulator class to allow the user to set a max_tick with Simulator::run which will be the total sum of simulated ticks (through exiting due to exit events and re-enterin), and schedule next_max_ticks which allows the user to schedule simulation for next_max_ticks ticks from curTick. Change-Id: I17334ac74d0a0c540cb67199f02ccdbc1209be32
a444d24
to
85f1990
Compare
:param max_ticks: The maximum number of ticks to simulate overall. | ||
If this ``max_ticks`` value is met, a ``MAX_TICK`` | ||
exit event is received, if another simulation exit | ||
event is met the tick count is reset. This is the | ||
**maximum number of ticks per simulation run**. | ||
event is met the tick count is reset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this changing the behavior? If so, it concerns me. Either way, the description still isn't clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's changing the behavior. I am not hellbent on getting this merged, if you don't see any value in this I can close this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with changing behavior is that there are many scripts out there that expect the old behavior. We could add a new parameter which has this behavior and deprecate max_ticks
, but we can't just break people's current scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I can make that change.
I think it's fine to add this feature but i don't think you should interfere with max_ticks current behavior. Remember we want to extent, not modify, when adding a new feature. I think we over-use |
This commit extends the Simulator class to allow the user to set a max_tick with Simulator::run which will be the total sum of simulated ticks (through exiting due to exit events and re-enterin), and schedule next_max_ticks which allows the user to schedule simulation for next_max_ticks ticks from curTick.
Change-Id: I17334ac74d0a0c540cb67199f02ccdbc1209be32