this one slipped through the cracks.... I meant to add a new priority here instead of the offset (like discussed a while back)
I'll get to this and Matt's changes tomorrow... On Sun, Jan 31, 2010 at 6:32 PM, Korey Sewell <[email protected]> wrote: > changeset d807273f17c0 in /z/repo/m5 > details: http://repo.m5sim.org/m5?cmd=changeset;node=d807273f17c0 > description: > inorder: add event priority offset > allow for events to schedule themselves later if desired. this is > important > because of cases like where you need to activate a thread only after > the previous > thread has been deactivated. The ordering there has to be enforced > > diffstat: > > 2 files changed, 12 insertions(+), 8 deletions(-) > src/cpu/inorder/cpu.cc | 15 +++++++++------ > src/cpu/inorder/cpu.hh | 5 +++-- > > diffs (57 lines): > > diff -r edf3d0c7a485 -r d807273f17c0 src/cpu/inorder/cpu.cc > --- a/src/cpu/inorder/cpu.cc Sun Jan 31 18:26:13 2010 -0500 > +++ b/src/cpu/inorder/cpu.cc Sun Jan 31 18:26:26 2010 -0500 > @@ -84,8 +84,10 @@ > } > > InOrderCPU::CPUEvent::CPUEvent(InOrderCPU *_cpu, CPUEventType e_type, > - Fault fault, ThreadID _tid, DynInstPtr inst) > - : Event(CPU_Tick_Pri), cpu(_cpu) > + Fault fault, ThreadID _tid, DynInstPtr > inst, > + unsigned event_pri_offset) > + : Event(Event::Priority((unsigned int)CPU_Tick_Pri + > event_pri_offset)), > + cpu(_cpu) > { > setEvent(e_type, fault, _tid, inst); > } > @@ -611,13 +613,14 @@ > void > InOrderCPU::scheduleCpuEvent(CPUEventType c_event, Fault fault, > ThreadID tid, DynInstPtr inst, > - unsigned delay) > + unsigned delay, unsigned event_pri_offset) > { > - CPUEvent *cpu_event = new CPUEvent(this, c_event, fault, tid, inst); > + CPUEvent *cpu_event = new CPUEvent(this, c_event, fault, tid, inst, > + event_pri_offset); > > if (delay >= 0) { > - DPRINTF(InOrderCPU, "Scheduling CPU Event (%s) for cycle %i.\n", > - eventNames[c_event], curTick + delay); > + DPRINTF(InOrderCPU, "Scheduling CPU Event (%s) for cycle %i, > [tid:%i].\n", > + eventNames[c_event], curTick + delay, tid); > mainEventQueue.schedule(cpu_event,curTick + delay); > } else { > cpu_event->process(); > diff -r edf3d0c7a485 -r d807273f17c0 src/cpu/inorder/cpu.hh > --- a/src/cpu/inorder/cpu.hh Sun Jan 31 18:26:13 2010 -0500 > +++ b/src/cpu/inorder/cpu.hh Sun Jan 31 18:26:26 2010 -0500 > @@ -206,7 +206,7 @@ > public: > /** Constructs a CPU event. */ > CPUEvent(InOrderCPU *_cpu, CPUEventType e_type, Fault fault, > - ThreadID _tid, DynInstPtr inst); > + ThreadID _tid, DynInstPtr inst, unsigned > event_pri_offset); > > /** Set Type of Event To Be Scheduled */ > void setEvent(CPUEventType e_type, Fault _fault, ThreadID _tid, > @@ -234,7 +234,8 @@ > > /** Schedule a CPU Event */ > void scheduleCpuEvent(CPUEventType cpu_event, Fault fault, ThreadID > tid, > - DynInstPtr inst, unsigned delay = 0); > + DynInstPtr inst, unsigned delay = 0, > + unsigned event_pri_offset = 0); > > public: > /** Interface between the CPU and CPU resources. */ > _______________________________________________ > m5-dev mailing list > [email protected] > http://m5sim.org/mailman/listinfo/m5-dev > -- - Korey
_______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
