Add parameters for backwards and forwards sizes for time buffers.
src/base/timebuf.hh: Add a function to return the size of the time buffer. --HG-- extra : convert_revision : 8ffacd8b9013eb76264df065244e00dc1460efd4
This commit is contained in:
parent
43245d9c2f
commit
fcaafdc48c
|
@ -215,6 +215,11 @@ class TimeBuffer
|
|||
{
|
||||
return wire(this, 0);
|
||||
}
|
||||
|
||||
int getSize()
|
||||
{
|
||||
return size;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // __BASE_TIMEBUF_HH__
|
||||
|
|
|
@ -102,7 +102,9 @@ Param<unsigned> renameToROBDelay;
|
|||
Param<unsigned> commitWidth;
|
||||
Param<unsigned> squashWidth;
|
||||
Param<Tick> trapLatency;
|
||||
Param<Tick> fetchTrapLatency;
|
||||
|
||||
Param<unsigned> backComSize;
|
||||
Param<unsigned> forwardComSize;
|
||||
|
||||
Param<std::string> predType;
|
||||
Param<unsigned> localPredictorSize;
|
||||
|
@ -222,7 +224,9 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(DerivO3CPU)
|
|||
INIT_PARAM(commitWidth, "Commit width"),
|
||||
INIT_PARAM(squashWidth, "Squash width"),
|
||||
INIT_PARAM_DFLT(trapLatency, "Number of cycles before the trap is handled", 6),
|
||||
INIT_PARAM_DFLT(fetchTrapLatency, "Number of cycles before the fetch trap is handled", 12),
|
||||
|
||||
INIT_PARAM(backComSize, "Time buffer size for backwards communication"),
|
||||
INIT_PARAM(forwardComSize, "Time buffer size for forward communication"),
|
||||
|
||||
INIT_PARAM(predType, "Type of branch predictor ('local', 'tournament')"),
|
||||
INIT_PARAM(localPredictorSize, "Size of local predictor"),
|
||||
|
@ -350,7 +354,9 @@ CREATE_SIM_OBJECT(DerivO3CPU)
|
|||
params->commitWidth = commitWidth;
|
||||
params->squashWidth = squashWidth;
|
||||
params->trapLatency = trapLatency;
|
||||
params->fetchTrapLatency = fetchTrapLatency;
|
||||
|
||||
params->backComSize = backComSize;
|
||||
params->forwardComSize = forwardComSize;
|
||||
|
||||
params->predType = predType;
|
||||
params->localPredictorSize = localPredictorSize;
|
||||
|
|
|
@ -141,15 +141,14 @@ FullO3CPU<Impl>::FullO3CPU(Params *params)
|
|||
TheISA::NumMiscRegs * number_of_threads,
|
||||
TheISA::ZeroReg),
|
||||
|
||||
// For now just have these time buffers be pretty big.
|
||||
// @todo: Make these time buffer sizes parameters or derived
|
||||
// from latencies
|
||||
timeBuffer(5, 5),
|
||||
fetchQueue(5, 5),
|
||||
decodeQueue(5, 5),
|
||||
renameQueue(5, 5),
|
||||
iewQueue(5, 5),
|
||||
activityRec(NumStages, 10, params->activity),
|
||||
timeBuffer(params->backComSize, params->forwardComSize),
|
||||
fetchQueue(params->backComSize, params->forwardComSize),
|
||||
decodeQueue(params->backComSize, params->forwardComSize),
|
||||
renameQueue(params->backComSize, params->forwardComSize),
|
||||
iewQueue(params->backComSize, params->forwardComSize),
|
||||
activityRec(NumStages,
|
||||
params->backComSize + params->forwardComSize,
|
||||
params->activity),
|
||||
|
||||
globalSeqNum(1),
|
||||
|
||||
|
@ -214,7 +213,6 @@ FullO3CPU<Impl>::FullO3CPU(Params *params)
|
|||
commit.setIEWQueue(&iewQueue);
|
||||
commit.setRenameQueue(&renameQueue);
|
||||
|
||||
commit.setFetchStage(&fetch);
|
||||
commit.setIEWStage(&iew);
|
||||
rename.setIEWStage(&iew);
|
||||
rename.setCommitStage(&commit);
|
||||
|
@ -851,7 +849,7 @@ void
|
|||
FullO3CPU<Impl>::takeOverFrom(BaseCPU *oldCPU)
|
||||
{
|
||||
// Flush out any old data from the time buffers.
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
for (int i = 0; i < timeBuffer.getSize(); ++i) {
|
||||
timeBuffer.advance();
|
||||
fetchQueue.advance();
|
||||
decodeQueue.advance();
|
||||
|
|
|
@ -42,8 +42,7 @@ using namespace std;
|
|||
|
||||
template<class Impl>
|
||||
DefaultIEW<Impl>::DefaultIEW(Params *params)
|
||||
: // @todo: Make this into a parameter.
|
||||
issueToExecQueue(5, 5),
|
||||
: issueToExecQueue(params->backComSize, params->forwardComSize),
|
||||
instQueue(params),
|
||||
ldstQueue(params),
|
||||
fuPool(params->fuPool),
|
||||
|
@ -413,7 +412,7 @@ DefaultIEW<Impl>::takeOverFrom()
|
|||
updateLSQNextCycle = false;
|
||||
|
||||
// @todo: Fix hardcoded number
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
for (int i = 0; i < issueToExecQueue.getSize(); ++i) {
|
||||
issueToExecQueue.advance();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,6 +114,12 @@ class O3Params : public BaseO3CPU::Params
|
|||
Tick trapLatency;
|
||||
Tick fetchTrapLatency;
|
||||
|
||||
//
|
||||
// Timebuffer sizes
|
||||
//
|
||||
unsigned backComSize;
|
||||
unsigned forwardComSize;
|
||||
|
||||
//
|
||||
// Branch predictor (BP, BTB, RAS)
|
||||
//
|
||||
|
|
|
@ -53,6 +53,9 @@ class DerivO3CPU(BaseCPU):
|
|||
trapLatency = Param.Tick("Trap latency")
|
||||
fetchTrapLatency = Param.Tick("Fetch trap latency")
|
||||
|
||||
backComSize = Param.Unsigned("Time buffer size for backwards communication")
|
||||
forwardComSize = Param.Unsigned("Time buffer size for forward communication")
|
||||
|
||||
predType = Param.String("Branch predictor type ('local', 'tournament')")
|
||||
localPredictorSize = Param.Unsigned("Size of local predictor")
|
||||
localCtrBits = Param.Unsigned("Bits per counter")
|
||||
|
|
Loading…
Reference in a new issue