You can try using a TimeBuffer to communicate in a "pipelined" fashion for
your custom unit.
Both the InOrder and O3 pipelines communicate between stages using a
templated TimeBuffer and then a communication struct defined in comm.hh.

The TimeBuffer allows you to place data in a buffer that can only be read at
X cycles later. For example sake, say you define a TimeBuffer that that is
for 2 cycles in time. Then what happens is say the execute stage can write
into that timebuffer (say maybe for a branch mispredict) and then the fetch
will look into that timebuffer but only see that value 2 cycles later.
TimeBuffers have "wires" that you can tap into them as well to achieve this
effect.  Example of this are in both the inorder and o3 cpu , where
TimeBuffer classes are defined and different objects/stages use "getWire" to
read/write from these structures. This may or may not be a good description
of the TimeBuffer, but look in the code for both models for examples and
usage.


On Fri, Apr 29, 2011 at 11:17 AM, reena panda <[email protected]> wrote:

> Hi Korey,
>
> Thanks for replying. Yeah, I was also slightly skeptical to use the term
> "pipeline", but I could not come up with some thing appropriate :).
>
> Yes, you are correct in some sense that I want to be able to monitor the
> activity in the actual instruction pipeline and do some post-processing on
> what I monitor. So, this will be kind of a parallel helper unit, which would
> monitor certain events in the instruction pipeline (but would not be tied to
> any stage/instruction itself) and should be able to do some independent
> processing on it. But this post-processing work cannot be done in a single
> cycle and so, I want it to be split into stages of work that can talk to
> each other (that's why termed it a pipeline). Finally, in my case, the
> helper unit's work will be used to aid in prefetching and hence I want it to
> be timed properly. Do I make sense?
>
> Also, I would want to use certain resources from the resource pool(if there
> are free slots) during these post processing steps in the helper unit. But I
> was unsure how could I do that given that current resources can be only
> used/issued by instructions.
>
> Thanks,
> Reena
>
>
> On Fri, Apr 29, 2011 at 8:18 AM, Korey Sewell <[email protected]> wrote:
>
>> "What I mean is that this parallel pipeline might be able to watch over
>> the main instruction pipeline, but would do not instruction processing. "
>> How is it a pipeline if no instructions are going through it?
>>
>> Sounds like you want to attach some type of monitoring unit. If so, you
>> can probably add something to the cpu->tick() function which calls tick() on
>> all the pipeline stages. You can either do some monitoring before each
>> pipeline stage is run or at the end of each cycle do some monitoring on the
>> whole pipeline.
>>
>>
>> --
>> - Korey
>>
>> _______________________________________________
>> m5-users mailing list
>> [email protected]
>> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
>>
>
>
> _______________________________________________
> m5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
>



-- 
- Korey
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to