pipeline = new Minor::Pipeline(*this, params);
activityRecorder = pipeline->getActivityRecorder();
+
+ fetchEventWrapper = NULL;
}
MinorCPU::~MinorCPU()
{
delete pipeline;
+ if (fetchEventWrapper != NULL)
+ delete fetchEventWrapper;
+
for (ThreadID thread_id = 0; thread_id < threads.size(); thread_id++) {
delete threads[thread_id];
}
/* Wake up the thread, wakeup the pipeline tick */
threads[thread_id]->activate();
wakeupOnEvent(Minor::Pipeline::CPUStageId);
- pipeline->wakeupFetch(thread_id);
+
+ if (!threads[thread_id]->getUseForClone())//the thread is not cloned
+ {
+ pipeline->wakeupFetch(thread_id);
+ } else { //the thread from clone
+ if (fetchEventWrapper != NULL)
+ delete fetchEventWrapper;
+ fetchEventWrapper = new EventFunctionWrapper([this, thread_id]
+ { pipeline->wakeupFetch(thread_id); }, "wakeupFetch");
+ schedule(*fetchEventWrapper, clockEdge(Cycles(0)));
+ }
BaseCPU::activateContext(thread_id);
}
using VecRegContainer = TheISA::VecRegContainer;
using VecElem = TheISA::VecElem;
using VecPredRegContainer = TheISA::VecPredRegContainer;
+ bool useForClone = false;
public:
+ bool getUseForClone() { return useForClone; }
+
+ void setUseForClone(bool newUseForClone)
+ {
+ useForClone = newUseForClone;
+ }
+
enum Status
{
/// Running. Instructions should be executed only when
cpu_type,
num_cpus=4,
max_tick=10000000000,
- ruby=True,
+ ruby=False,
debug_flags=None, # Debug flags passed to gem5
full_system = False
):
# https://gem5.atlassian.net/browse/GEM5-496
# https://gem5.atlassian.net/browse/GEM5-497
binaries = (
-# 'rv64samt-ps-sysclone_d',
-# 'rv64samt-ps-sysfutex1_d',
+ 'rv64samt-ps-sysclone_d',
+ 'rv64samt-ps-sysfutex1_d',
# 'rv64samt-ps-sysfutex2_d',
-# 'rv64samt-ps-sysfutex3_d',
+ 'rv64samt-ps-sysfutex3_d',
# 'rv64samt-ps-sysfutex_d',
'rv64ua-ps-amoadd_d',
'rv64ua-ps-amoadd_w',
'rv64ua-ps-amoxor_d',
'rv64ua-ps-amoxor_w',
'rv64ua-ps-lrsc',
-# 'rv64uamt-ps-amoadd_d',
-# 'rv64uamt-ps-amoand_d',
-# 'rv64uamt-ps-amomax_d',
-# 'rv64uamt-ps-amomaxu_d',
-# 'rv64uamt-ps-amomin_d',
-# 'rv64uamt-ps-amominu_d',
-# 'rv64uamt-ps-amoor_d',
-# 'rv64uamt-ps-amoswap_d',
-# 'rv64uamt-ps-amoxor_d',
-# 'rv64uamt-ps-lrsc_d',
+ 'rv64uamt-ps-amoadd_d',
+ 'rv64uamt-ps-amoand_d',
+ 'rv64uamt-ps-amomax_d',
+ 'rv64uamt-ps-amomaxu_d',
+ 'rv64uamt-ps-amomin_d',
+ 'rv64uamt-ps-amominu_d',
+ 'rv64uamt-ps-amoor_d',
+ 'rv64uamt-ps-amoswap_d',
+ 'rv64uamt-ps-amoxor_d',
+ 'rv64uamt-ps-lrsc_d',
'rv64ud-ps-fadd',
'rv64ud-ps-fclass',
'rv64ud-ps-fcmp',