Hi Yu,

 

I’m not terribly familiar with the Sampler, but I think we generally use it to do periodic switching of CPUs instead of using the “m5 switchcpu”, which is why we never run into this error.  Looking at the SimpleCPU code it does appear that we’re checking conditions incorrectly; when you execute the “m5 switchcpu” command inside of the SimpleCPU, it will change the SimpleCPU’s state to SwitchedOut, which isn’t in that assertion at the end of the tick() function.  Here’s my suggestion to get this (hopefully) working:

 

Record within the SimpleCPU when it’s in the tick() function. Upon call to the CPU’s switchOut(), check if the SimpleCPU is currently in the tick() function.  If it is, then schedule a new event for the end of the current cycle that will call switchOut() again, and change the CPU’s status to SwitchingOut or something along those lines (be sure to add that to the valid states in the assert).

 

This will let the CPU complete the “m5 switchcpu” instruction and then switch out after the instruction is complete.

 

Let me know if this doesn’t work out,

 

Kevin

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yu Zhang
Sent: Thursday, June 22, 2006 12:06 AM
To: [email protected]
Subject: [m5sim-users] cpu switch

 

Hi all,

 

When I try to switch cpu mode under Sampler system with "m5 switchcpu", there would always be an error: "m5.opt: m5/cpu/simple/cpu.cc:806: void SimpleCPU::tick(): Assertion `status() == Running || status() == Idle || status() == DcacheMissStall' failed.", and the simulation terminated. I wonder if I was doing in the wrong way to switch cpu.

 

Thanks,

Yu

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
m5sim-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/m5sim-users

Reply via email to