Tony, Probably what is going on is that the mem dependency unit is saying that it has drained when it actually hasn't and then when it is told to switch it hits an assert.
When drain() is called on every object each object returns how many things it still needs to drain before the system can switch. Each object that returns a positive number will call drainObject->process() n times. After everyone has call the process() function the count of simobjects left to drain will be 0. At this point m5 will call drain() on everyone again to verify that everyone is drained and it wasn't just a transient blip (e.g. a packet passed from one object to another that now need to do something with it). At this point the drain is complete or tries again until it gets it succeeds. When that happens you could then switch cpu models. I imagine what is happening is something isn't reporting that it has an instruction still in flight, even though it should (it's returning a drain count of n, when it should return n+1). Make sense? Ali On Mar 24, 2011, at 6:29 PM, Anthony Gutierrez wrote: > I am having a problem switching from an O3 CPU to a TimingSimpleCPU. There > are cases I am encountering where there are instructions remaining in certain > structures in the pipeline after drain. The assertion failure I'm > encountering is Assertion `instList[0].empty()' failed. During the > mem_dep_unit switchout function. It seems the cpu is in IDLE state when it > enters drain, and thus returns immediately. The instruction that is remaining > in the mem_dep_unit is an uncacheable load and so it gets sent directly to > commit before it's handled. My question is how should drain be handling this? > Should the uncacheable load be removed from the mem_dep_unit when it's sent > to commit? Also, if I change which cycle I do the switchout I can avoid this > case but run in to another case of Assertion `!loadQueue[i]' failed. I always > seem to get one of this assertion failures no matter when I switch. Does > anybody have any ideas on why this may be happening? > > Also, can somebody explain the drain functionality in a little more depth. > > -Tony > _______________________________________________ > 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
