Make cpu's capable of having a phase shift
--HG-- extra : convert_revision : 7f082ba5c1cd2445aec731950c31a877aac23a75
This commit is contained in:
@@ -520,6 +520,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(AtomicSimpleCPU)
|
||||
#endif // FULL_SYSTEM
|
||||
|
||||
Param<int> clock;
|
||||
Param<int> phase;
|
||||
|
||||
Param<bool> defer_registration;
|
||||
Param<int> width;
|
||||
@@ -555,6 +556,7 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(AtomicSimpleCPU)
|
||||
#endif // FULL_SYSTEM
|
||||
|
||||
INIT_PARAM(clock, "clock speed"),
|
||||
INIT_PARAM_DFLT(phase, "clock phase", 0),
|
||||
INIT_PARAM(defer_registration, "defer system registration (for sampling)"),
|
||||
INIT_PARAM(width, "cpu width"),
|
||||
INIT_PARAM(function_trace, "Enable function trace"),
|
||||
@@ -575,6 +577,7 @@ CREATE_SIM_OBJECT(AtomicSimpleCPU)
|
||||
params->max_loads_all_threads = max_loads_all_threads;
|
||||
params->progress_interval = progress_interval;
|
||||
params->deferRegistration = defer_registration;
|
||||
params->phase = phase;
|
||||
params->clock = clock;
|
||||
params->functionTrace = function_trace;
|
||||
params->functionTraceStart = function_trace_start;
|
||||
|
||||
@@ -169,7 +169,7 @@ TimingSimpleCPU::resume()
|
||||
|
||||
fetchEvent =
|
||||
new EventWrapper<TimingSimpleCPU, &TimingSimpleCPU::fetch>(this, false);
|
||||
fetchEvent->schedule(curTick);
|
||||
fetchEvent->schedule(nextCycle());
|
||||
}
|
||||
|
||||
changeState(SimObject::Running);
|
||||
@@ -241,7 +241,7 @@ TimingSimpleCPU::activateContext(int thread_num, int delay)
|
||||
// kick things off by initiating the fetch of the next instruction
|
||||
fetchEvent =
|
||||
new EventWrapper<TimingSimpleCPU, &TimingSimpleCPU::fetch>(this, false);
|
||||
fetchEvent->schedule(curTick + cycles(delay));
|
||||
fetchEvent->schedule(nextCycle(curTick + cycles(delay)));
|
||||
}
|
||||
|
||||
|
||||
@@ -683,6 +683,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(TimingSimpleCPU)
|
||||
#endif // FULL_SYSTEM
|
||||
|
||||
Param<int> clock;
|
||||
Param<int> phase;
|
||||
|
||||
Param<bool> defer_registration;
|
||||
Param<int> width;
|
||||
@@ -718,6 +719,7 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(TimingSimpleCPU)
|
||||
#endif // FULL_SYSTEM
|
||||
|
||||
INIT_PARAM(clock, "clock speed"),
|
||||
INIT_PARAM_DFLT(phase, "clock phase", 0),
|
||||
INIT_PARAM(defer_registration, "defer system registration (for sampling)"),
|
||||
INIT_PARAM(width, "cpu width"),
|
||||
INIT_PARAM(function_trace, "Enable function trace"),
|
||||
@@ -739,6 +741,7 @@ CREATE_SIM_OBJECT(TimingSimpleCPU)
|
||||
params->progress_interval = progress_interval;
|
||||
params->deferRegistration = defer_registration;
|
||||
params->clock = clock;
|
||||
params->phase = phase;
|
||||
params->functionTrace = function_trace;
|
||||
params->functionTraceStart = function_trace_start;
|
||||
params->system = system;
|
||||
|
||||
Reference in New Issue
Block a user