diff options
Diffstat (limited to 'src/cpu/inorder/pipeline_stage.cc')
-rw-r--r-- | src/cpu/inorder/pipeline_stage.cc | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/src/cpu/inorder/pipeline_stage.cc b/src/cpu/inorder/pipeline_stage.cc index f356c0e1a..4ded50bf0 100644 --- a/src/cpu/inorder/pipeline_stage.cc +++ b/src/cpu/inorder/pipeline_stage.cc @@ -38,35 +38,10 @@ using namespace std; using namespace ThePipeline; PipelineStage::PipelineStage(Params *params, unsigned stage_num) - : numThreads(ThePipeline::MaxThreads) { - stageNum = stage_num; - stageWidth = ThePipeline::StageWidth; - - _status = Inactive; - - prevStageValid = false; - nextStageValid = false; - - // Init. structures - for(int tid=0; tid < numThreads; tid++) { - stageStatus[tid] = Idle; - - for (int stNum = 0; stNum < NumStages; stNum++) { - stalls[tid].stage[stNum] = false; - } - stalls[tid].resources.clear(); - - if (stageNum < BackEndStartStage) - lastStallingStage[tid] = BackEndStartStage - 1; - else - lastStallingStage[tid] = NumStages - 1; - } - - stageBufferMax = ThePipeline::interStageBuffSize[stage_num]; + init(params, stage_num); } - void PipelineStage::init(Params *params, unsigned stage_num) { @@ -189,7 +164,7 @@ PipelineStage::setNextStageQueue(TimeBuffer<InterStageStruct> *next_stage_ptr) // Setup wire to write information to proper place in stage queue. nextStage = nextStageQueue->getWire(0); - + nextStage->size = 0; nextStageValid = true; } @@ -682,6 +657,9 @@ PipelineStage::tick() bool status_change = false; + if (nextStageValid) + nextStage->size = 0; + toNextStageIndex = 0; sortInsts(); |