On Sun, Feb 7, 2010 at 8:36 AM, Korey Sewell <ksew...@umich.edu> wrote:
>
>
>> The checkSignalsAndUpdate() routine seems to be taking care of
>> squashes for each thread. FirstStage::processStage() proceeds to fetch
>> instructions after that. So, why not just insert the check on
>> drainPending between the two tasks? Let me know if my understanding is
>> incorrect.
>
> Yea, I just double checked this and you are probably on the right path in
> terms of
> where to insert the drainPending check at (Although checkSignals should be
> checking
> both squash and stall signals , not just stall signals)..
>
> Ideally, that checkSignals function should also be able to set the pipeline
> stage
> to a "Blocked" state such that that processThread functions never gets
> called
> if the stage is blocked in the first place. Since the "drain Pending" can
> essentially be seen as a signal to the CPU it might be
> best to somehow fit that in the checkSignals function. BUT, if you put
> something in checkSignals
> it's going to affect all of the pipeline stages and we dont want to block
> all the pipeline stages,
> just the first one. So it's better to just edit the code in first_stage.cc
> in the place you suggested.
Yes, this seem to be working fine (I followed the trace). But I have
to wait till I can get the checkpoint restoration to work so that I
can test it more.

>
>> Yes, this is pretty simple. Since instDone() only schedules
>> instructions to be removed from the global instruction list of active
>> instructions, I added this logic in cleanUpRemovedInsts().
>
> Okay, so you're saying that you need to catch instructions that might get
> squashed and
> instDone() will only catch committed instructions...
>
> If possible, It'd be nice to keep that functionality out of
> cleanUpRemovedInsts since I believe that
> function is primarily for memory management purposes and we dont want to
> confuse
> things.
>
> Hmmm....I'm wondering if there isnt a "removeFromActiveList" function (and
> if not, do we need to
> write one), so that we can add a check there for the drainPending. Would
> that make sense for a more general
> solution?
Yes, that is absolutely correct! the list of instructions to be
removed during a tick by the cleanUpRemovedInsts() routine comprises
of both instructions that graduate and instructions that get squashed!
And, cleanUpRemovedInsts() just removes the instruction schedule
associated (and its register dependencies) by an instruction before
removing it from "instList" (the global list of all instructions in
flight in the pipeline). So, it appears ok to add the logic to drain
the cpu here. Could you look into the cleanUpRemovedInsts() one more
time?

I was looking into the takeOverFrom() routine and it appears to
involve a lot more work! But, I'll work on it later.

regards,
Soumyaroop

>
> --
> - Korey
>
> _______________________________________________
> m5-dev mailing list
> m5-dev@m5sim.org
> http://m5sim.org/mailman/listinfo/m5-dev
>
>



-- 
Soumyaroop Roy
Ph.D. Candidate
Department of Computer Science and Engineering
University of South Florida, Tampa
http://www.csee.usf.edu/~sroy
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to