configs/inorder: add options for switch-on-miss to inorder cpu

This commit is contained in:
Korey Sewell 2010-01-31 18:25:13 -05:00
parent 7b3b362ba5
commit 0e96798fe0
3 changed files with 24 additions and 2 deletions

View file

@ -30,10 +30,15 @@ from m5.params import *
from m5.proxy import *
from BaseCPU import BaseCPU
class ThreadModel(Enum):
vals = ['Single', 'SMT', 'SwitchOnCacheMiss']
class InOrderCPU(BaseCPU):
type = 'InOrderCPU'
activity = Param.Unsigned(0, "Initial count")
threadModel = Param.ThreadModel('SMT', "Multithreading model (SE-MODE only)")
cachePorts = Param.Unsigned(2, "Cache Ports")
stageWidth = Param.Unsigned(1, "Stage width")

View file

@ -216,6 +216,15 @@ InOrderCPU::InOrderCPU(Params *params)
"in your InOrder implementation or "
"edit your workload size.");
}
if (active_threads > 1) {
threadModel = (InOrderCPU::ThreadModel) params->threadModel;
} else {
threadModel = Single;
}
#endif
// Bind the fetch & data ports from the resource pool.

View file

@ -100,6 +100,15 @@ class InOrderCPU : public BaseCPU
/** Type of core that this is */
std::string coreType;
// Only need for SE MODE
enum ThreadModel {
Single,
SMT,
SwitchOnCacheMiss
};
ThreadModel threadModel;
int readCpuId() { return cpu_id; }
void setCpuId(int val) { cpu_id = val; }
@ -117,7 +126,6 @@ class InOrderCPU : public BaseCPU
/** Overall CPU status. */
Status _status;
private:
/** Define TickEvent for the CPU */
class TickEvent : public Event