-
Notifications
You must be signed in to change notification settings - Fork 60
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
Need restart function for scheduler to avoid recursively call scheduler->run() #478
Comments
That's definitely a hard-core way to flush the events! A possible better approach might be to add a custom API to the Scheduler that allows you to flush all events at a given tick and later. It'd look like this:
|
I guess the But it needs to stop running first, and there is no method to restart running againg
While I add a method for scheduler
Please note that a zero cycle nop_event must be scheduled to avoid And do you have a plan for the |
I forgot I added Let me attempt to understand your use case:
Like I mentioned in my previous post, this is quite a large hammer to flush pending work in the simulator. Typically, the flush manager receives the flush (for the next cycle) and broadcasts that flush (via ports) to all the units that need to be notified. Each unit makes the decision on what needs to be flushed from the scheduler (using |
We try to stop and restart the scheduler by using |
I'm going through old issues and noticed I missed your response... I'd expect the flow of scheduler use (in your use case) would be:
You are correct that |
In my simulator based on sparta,I need flush all inflight events in my flush process, which means I need stop, clear events and re-run the scheduler.
While my flush function is in one event handler, so actually I use
scheduler->run()
in recursive.The flush event handler in my flush manager
It is handler bind to one inPort
I don't want to recursively call func, it may cause memory usage problem
The text was updated successfully, but these errors were encountered: