ruby: consumer: avoid using receiver side clock
Review Request #1763 - Created March 8, 2013 and submitted
| Information | |
|---|---|
| Nilay Vaish | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 9590:db23351f5faa --------------------------- ruby: consumer: avoid using receiver side clock A set of patches was recently committed to allow multiple clock domains in ruby. In those patches, I had inadvertently made an incorrect use of the clocks. Suppose object A needs to schedule an event on object B. It was possible that A accesses B's clock to schedule the event. This is not possible in actual system. Hence, changes are being to the Consumer class so as to avoid such happenings. Note that in a multi eventq simulation, this can possibly lead to an incorrect simulation. There are two functions in the Consumer class that are used for scheduling events. The first function takes in the relative delay over the current time as the argument and adds the current time to it for scheduling the event. The second function takes in the absolute time (in ticks) for scheduling the event. The first function is now being moved to protected section of the class so that only objects of the derived classes can use it. All other objects will have to specify absolute time while scheduling an event for some consumer.
Posted (March 12, 2013, 8:45 a.m.)
I'm a little bit confused with how things are scheduled here. The MessageBuffer is bi-synchronous and it makes sense that it has to deal with two clocks (or just absolute ticks). The other objects I am less convinced should ever have to worry. There is definitely some source of confusion here in that the output of object A currently might end up calling a function on object B at clk_a edge rather clk_b edge, but that's literally happening in 10's or even 100's of places in the codebase. If we "solve" it I'd rather go for something generic, otherwise we will have to resort to ticks everywhere which also is not feasible with the DVFS work requiring cycles.
