summaryrefslogtreecommitdiff
path: root/src/systemc/core/scheduler.hh
AgeCommit message (Collapse)Author
2018-09-05systemc: Implement pending activity related functionsGabe Black
Track the number of notifications/timeouts that are scheduled at any given time. This lets us implement sc_pending_activity_at_current_time, sc_pending_activity_at_future_time, and sc_time_to_pending_activity. Change-Id: Ia3fcd29bdbfe1a6c77eb52ce4836982d4705263c Reviewed-on: https://gem5-review.googlesource.com/12032 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-09-05systemc: Implement sc_pause, sc_stop, and re-sc_start-ing.Gabe Black
This change further modifies the scheduler to implement the sc_pause and sc_stop functions, and to ensure that calling sc_start again works. Also, some small changes were made to how processes and contexts are hooked up. Now, rather than checking whether a process is running to determine wether it started on its own or needs to be started manually, there's a bool which explicitly tracks whether it needs this step. The problem was that once a thread finished, it wasn't considered running any more. In that case it had run but finished, but that was indistinguishable from it needing to run but not having been started. Change-Id: I3aefb5493f91d9efa1a1382586196339b67925fe Reviewed-on: https://gem5-review.googlesource.com/12031 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-09-05systemc: Implement the sensitivity mechanism.Gabe Black
This change lets processes be sensitive to events, timeouts, etc. Change-Id: If30a256dfa8a2e92192c1f9c96b48e2aa28ec27e Reviewed-on: https://gem5-review.googlesource.com/11713 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-09-05systemc: Implement channel updates and rework the scheduler.Gabe Black
This change implements channel updates, and also reworks the scheduler to delegate more to the gem5 event queue by taking advantage of event priorities to ensure things happen in the right order. There's a lengthy comment in scheduler.hh describes how that all works. Change-Id: I5dee71b86b2e612bb720a4429f3a72e4b7c6d01f Reviewed-on: https://gem5-review.googlesource.com/11710 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-09-05systemc: Partially implement the scheduler.Gabe Black
This change implements the "evaluate" part of the delta cycles, and sketches out a function to run delta cycles and the initialization phase. The kernel object now schedules an event at time zero which runs the initialization phase. Also, some small places which were stubbed out pending a way to check the currently running process have been filled in now that that's being tracked. Change-Id: I6899569eb0195ff1c059fa4e68e90ef162b2f2df Reviewed-on: https://gem5-review.googlesource.com/11709 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>