Events are scheduled for a specific time, and it's the event queues job to
go through them in chronological order and call them to do whatever they're
supposed to do. Events happen instantly, in the sense that time does not
pass or change while they're running. They also can't normally affect what
time other events are scheduled. As the event queue processes events, the
current tick is just the time the event which is currently being processed
was scheduled for. New events can't be scheduled for earlier in time, so
time only ever stays in place (if multiple events are scheduled for the
same time) or moves forward.

Gabe

On Mon, Jun 15, 2020 at 4:47 PM Taiyu Zhou via gem5-users <
[email protected]> wrote:

> Hi guys!
> I am using simpleTimingCPU. And I am so confusing on how event affect
> curTick?  I see there is a “setCurTick()” after calling "serviceOne() “ in
> “serviceEvents”. Is this denotes that curTick will be change by event?
> I tried to add a “delayEvent” in addToWriteQueue in dram_ctrl.cc before
> call nextReqEvent. This code likes
> ”
> //before delay
>         if(pkt->isWrite()){
>         if (!delayEvent.scheduled())
>                 schedule(delayEvent, curTick()+1);
>         }
> //after delay
>   if (!nextReqEvent.scheduled()) {
>         DPRINTF(DRAM, "Request scheduled immediately\n");
>         schedule(nextReqEvent, curTick());
>         }
> ”
> In my understand, I though this will make every events in the eventqueue
> that after “delayEvent” will be delayed 1,because curTIck + 1. And finally
> make gem5 delay 1. But the result shows that there is no affect to those
> event that after delayEvent.
>
> I want to ask
> 1. Is Event insert into eventq on code sequence (which means delayEvent in
> front of nextReqEvent in eventq) or on chronological order(which means 
> nextReqEvent
> in front of delayEvent in eventq) ?
>
> 2. Are there any method to make event after “delayEvent" delay a specified
> time ?
>
> _______________________________________________
> gem5-users mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________
gem5-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to