cpu: Make accesses to comInstEventQueue indirect through methods.
This lets us move the event queue itself around, or change how those services are provided. Change-Id: Ie36665b353cf9788968f253cf281a854a6eff4f4 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22107 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -465,6 +465,31 @@ class BaseCPU : public ClockedObject
|
||||
*/
|
||||
uint64_t getCurrentInstCount(ThreadID tid);
|
||||
|
||||
Tick
|
||||
nextInstEventCount(ThreadID tid)
|
||||
{
|
||||
return comInstEventQueue[tid]->empty() ?
|
||||
MaxTick : comInstEventQueue[tid]->nextTick();
|
||||
}
|
||||
|
||||
void
|
||||
serviceInstCountEvents(ThreadID tid, Tick count)
|
||||
{
|
||||
comInstEventQueue[tid]->serviceEvents(count);
|
||||
}
|
||||
|
||||
void
|
||||
scheduleInstCountEvent(ThreadID tid, Event *event, Tick count)
|
||||
{
|
||||
comInstEventQueue[tid]->schedule(event, count);
|
||||
}
|
||||
|
||||
void
|
||||
descheduleInstCountEvent(ThreadID tid, Event *event)
|
||||
{
|
||||
comInstEventQueue[tid]->deschedule(event);
|
||||
}
|
||||
|
||||
public:
|
||||
/**
|
||||
* @{
|
||||
|
||||
Reference in New Issue
Block a user