Hi Fela, As part of the initialisation, the various SimObjects schedule their own events and place them on the event queue (there can as many event queues as you want, but in most cases there will only be a single one). This is done as part of the init(), initState/loadState, startup() sequence that takes place when launching the simulator.
The objects are traversed in the order they were created, so if Object A and Object B both create events at time T, then Object A will have its event executed first. The event queue works like any 'normal' discrete-event simulator. It is sorted on time, denoted in Ticks, and after the initalisation is done, the queue picks the first event, updates the current tick to match the time of this event, and then processes/executes the event. There is also a notion of even priorities to order events within the same tick. This is used, amongst other things, to ensure that all Œexecution¹ is done before dumping statistics. In the execution of an event more events may be created, also for the current tick. If this is the case they are insertion sorted into the event queue based on their tick and priority. They will thus happen after any existing events in the current tick that have the same priority. Have a look at eventq.hh/cc to see the details of how this works. Andreas On 07/11/2014 10:54, "fela via gem5-users" <[email protected]> wrote: > >Hi Andreas, > >Of course, I can do it but I have to first understand how gem5 works. >I'm asking about sequential simulation. > >Let's begin by the initialization phase: >At this phase, where are initial events inserted? Is there one data >structure for the future events? or one per module (simObject)? > >After that, how are events comsumed from the event queue(s)? >How is time simulation advanced? Does the simulation kernel advance it? >How the simObject order processing is determined? (delta cycle notion?) >Can you give me a description of this process? >May be over an example of two objects exchanging two messages (specifying >the clock values of each simObject, the simulation time, the events and >the >contents of the event queue (s) ). > >I hope my question is clear. > >Fela, >PhD student. > > > >_______________________________________________ >gem5-users mailing list >[email protected] >http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users > -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590 ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782 _______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
