Pipeline Lab2
Pipeline Lab2
* File : pipeline.cpp
* Author : Soham J. Desai
* Date : 14th January 2014
* Description : Superscalar Pipeline for Lab2 ECE 6100
**********************************************************************/
#include "pipeline.h"
#include <cstdlib>
/**********************************************************************
* Support Function: Read 1 Trace Record From File and populate Fetch Op
**********************************************************************/
return;
}
/**********************************************************************
* Pipeline Class Member Functions
**********************************************************************/
p->tr_file = tr_file_in;
p->halt_op_id = ((uint64_t)-1) - 3;
// Allocated Branch Predictor
if(BPRED_POLICY){
p->b_pred = new BPRED(BPRED_POLICY);
}
return p;
}
/**********************************************************************
* Print the pipeline state (useful for debugging)
**********************************************************************/
/**********************************************************************
* Pipeline Main Function: Every cycle, cycle the stage
**********************************************************************/
pipe_cycle_WB(p);
pipe_cycle_MA(p);
pipe_cycle_EX(p);
pipe_cycle_ID(p);
pipe_cycle_IF(p);
}
/**********************************************************************
* ----------- DO NOT MODIFY THE CODE ABOVE THIS LINE ----------------
**********************************************************************/
//--------------------------------------------------------------------//
//--------------------------------------------------------------------//
if(ENABLE_MEM_FWD){
// todo
}
if(ENABLE_EXE_FWD){
// todo
}
}
}
//--------------------------------------------------------------------//
if(BPRED_POLICY){
pipe_check_bpred(p, &fetch_op);
}
//--------------------------------------------------------------------//
//--------------------------------------------------------------------//