diff options
author | Korey Sewell <ksewell@umich.edu> | 2009-03-04 22:37:45 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2009-03-04 22:37:45 -0500 |
commit | 9e1dc7f20549e9590c5b1450be17ff03057e346f (patch) | |
tree | 29e8dd06790c50fa35ae1feba632bba0be72ce0d /src/cpu/inorder/pipeline_stage.cc | |
parent | 7c8d54421665ccbc204487cb6a9faa31c1b3c243 (diff) | |
download | gem5-9e1dc7f20549e9590c5b1450be17ff03057e346f.tar.xz |
InOrderCPU: Clean up Constructors to initialize variables correctly (i.e. in a way for the compiler to play *nice*)
Diffstat (limited to 'src/cpu/inorder/pipeline_stage.cc')
-rw-r--r-- | src/cpu/inorder/pipeline_stage.cc | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/cpu/inorder/pipeline_stage.cc b/src/cpu/inorder/pipeline_stage.cc index ab7328f4a..cb69464b0 100644 --- a/src/cpu/inorder/pipeline_stage.cc +++ b/src/cpu/inorder/pipeline_stage.cc @@ -38,24 +38,17 @@ using namespace std; using namespace ThePipeline; PipelineStage::PipelineStage(Params *params, unsigned stage_num) + : stageNum(stage_num), stageWidth(ThePipeline::StageWidth), + numThreads(ThePipeline::MaxThreads), _status(Inactive), + stageBufferMax(ThePipeline::interStageBuffSize[stage_num]), + prevStageValid(false), nextStageValid(false) { - init(params, stage_num); + init(params); } void -PipelineStage::init(Params *params, unsigned stage_num) +PipelineStage::init(Params *params) { - stageNum = stage_num; - stageWidth = ThePipeline::StageWidth; - - _status = Inactive; - - numThreads = ThePipeline::MaxThreads; - - prevStageValid = false; - nextStageValid = false; - - // Init. structures for(int tid=0; tid < numThreads; tid++) { stageStatus[tid] = Idle; @@ -69,8 +62,6 @@ PipelineStage::init(Params *params, unsigned stage_num) else lastStallingStage[tid] = NumStages - 1; } - - stageBufferMax = ThePipeline::interStageBuffSize[stage_num]; } |