Debugs improved - generating messages for every recorded phase (tlmRecorder->recordPhase())
This commit is contained in:
@@ -141,6 +141,8 @@ void TlmRecorder::introduceTransactionSystem(tlm::tlm_generic_payload& trans)
|
||||
else
|
||||
currentTransactionsInSystem[&trans].timeOfGeneration = GenerationExtension::getExtension(&trans).TimeOfGeneration();
|
||||
|
||||
printDebugMessage("New transaction #" + to_string(id + 1) + " generation time " + currentTransactionsInSystem[&trans].timeOfGeneration.to_string());
|
||||
|
||||
if (id % transactionCommitRate == 0)
|
||||
{
|
||||
printDebugMessage(
|
||||
@@ -154,6 +156,8 @@ void TlmRecorder::removeTransactionFromSystem(tlm::tlm_generic_payload& trans)
|
||||
{
|
||||
assert(currentTransactionsInSystem.count(&trans) != 0);
|
||||
|
||||
printDebugMessage("Removing transaction #" + to_string(currentTransactionsInSystem[&trans].id + 1));
|
||||
|
||||
Transaction& recordingData = currentTransactionsInSystem[&trans];
|
||||
recordedData.push_back(recordingData);
|
||||
currentTransactionsInSystem.erase(&trans);
|
||||
@@ -226,13 +230,21 @@ void TlmRecorder::createTables(string pathToURI)
|
||||
void TlmRecorder::setUpTransactionTerminatingPhases()
|
||||
{
|
||||
transactionTerminatingPhases.push_back(tlm::END_RESP);
|
||||
|
||||
// Refresh All
|
||||
transactionTerminatingPhases.push_back(static_cast<const tlm::tlm_phase>(END_REFA));
|
||||
|
||||
// Refresh Bank
|
||||
transactionTerminatingPhases.push_back(static_cast<const tlm::tlm_phase>(END_REFB));
|
||||
transactionTerminatingPhases.push_back(static_cast<const tlm::tlm_phase>(END_PDNP));
|
||||
|
||||
// Phases for Power Down
|
||||
transactionTerminatingPhases.push_back(static_cast<const tlm::tlm_phase>(END_PDNA));
|
||||
transactionTerminatingPhases.push_back(static_cast<const tlm::tlm_phase>(END_PDNP));
|
||||
transactionTerminatingPhases.push_back(static_cast<const tlm::tlm_phase>(END_SREF));
|
||||
transactionTerminatingPhases.push_back(static_cast<const tlm::tlm_phase>(END_PDNPB));
|
||||
|
||||
// Phases for Power Down Bankwise
|
||||
transactionTerminatingPhases.push_back(static_cast<const tlm::tlm_phase>(END_PDNAB));
|
||||
transactionTerminatingPhases.push_back(static_cast<const tlm::tlm_phase>(END_PDNPB));
|
||||
transactionTerminatingPhases.push_back(static_cast<const tlm::tlm_phase>(END_SREFB));
|
||||
}
|
||||
|
||||
|
||||
@@ -342,17 +342,27 @@ void Controller<BUSWIDTH>::controllerCorePEQCallback(tlm_generic_payload &payloa
|
||||
template<unsigned int BUSWIDTH>
|
||||
tlm_sync_enum Controller<BUSWIDTH>::nb_transport_fw(tlm_generic_payload &payload, tlm_phase &phase, sc_time &fwDelay)
|
||||
{
|
||||
sc_time recTime;
|
||||
sc_time notDelay;
|
||||
if (phase == BEGIN_REQ)
|
||||
{
|
||||
tlmRecorder->recordPhase(payload, phase, fwDelay + sc_time_stamp());
|
||||
frontendPEQ.notify(payload, phase,
|
||||
clkAlign(sc_time_stamp() + fwDelay) - (sc_time_stamp() + fwDelay) + Configuration::getInstance().memSpec.clk);
|
||||
recTime = fwDelay + sc_time_stamp();
|
||||
notDelay = clkAlign(sc_time_stamp() + fwDelay) - (sc_time_stamp() + fwDelay) + Configuration::getInstance().memSpec.clk;
|
||||
|
||||
printDebugMessage("[fw] Recording " + phaseNameToString(phase) + " at " + recTime.to_string() + " notification in " + notDelay.to_string());
|
||||
|
||||
tlmRecorder->recordPhase(payload, phase, recTime);
|
||||
frontendPEQ.notify(payload, phase, notDelay);
|
||||
}
|
||||
else if (phase == END_RESP)
|
||||
{
|
||||
tlmRecorder->recordPhase(payload, phase,
|
||||
fwDelay + sc_time_stamp() + Configuration::getInstance().memSpec.clk);
|
||||
frontendPEQ.notify(payload, phase, clkAlign(sc_time_stamp() + fwDelay) - (sc_time_stamp() + fwDelay));
|
||||
recTime = fwDelay + sc_time_stamp() + Configuration::getInstance().memSpec.clk;
|
||||
notDelay = clkAlign(sc_time_stamp() + fwDelay) - (sc_time_stamp() + fwDelay);
|
||||
|
||||
printDebugMessage("[fw] Recording " + phaseNameToString(phase) + " at " + recTime.to_string() + " notification in " + notDelay.to_string());
|
||||
|
||||
tlmRecorder->recordPhase(payload, phase, recTime);
|
||||
frontendPEQ.notify(payload, phase, notDelay);
|
||||
}
|
||||
return TLM_ACCEPTED;
|
||||
}
|
||||
@@ -478,8 +488,14 @@ void Controller<BUSWIDTH>::sendToFrontend(tlm_generic_payload &payload, const tl
|
||||
template<unsigned int BUSWIDTH>
|
||||
tlm_sync_enum Controller<BUSWIDTH>::nb_transport_bw(tlm_generic_payload &payload, tlm_phase &phase, sc_time &bwDelay)
|
||||
{
|
||||
dramPEQ.notify(payload, phase, bwDelay);
|
||||
tlmRecorder->recordPhase(payload, phase, bwDelay + sc_time_stamp());
|
||||
sc_time recTime = bwDelay + sc_time_stamp();
|
||||
sc_time notDelay = bwDelay;
|
||||
|
||||
printDebugMessage("[bw] Recording " + phaseNameToString(phase) + " at " + recTime.to_string() + " notification in " + notDelay.to_string());
|
||||
|
||||
dramPEQ.notify(payload, phase, notDelay);
|
||||
tlmRecorder->recordPhase(payload, phase, recTime);
|
||||
|
||||
return TLM_ACCEPTED;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,8 +104,13 @@ private:
|
||||
// This function is called when an arbiter's initiator socket receives a transaction from a memory controller
|
||||
tlm_sync_enum nb_transport_bw(int channelId, tlm_generic_payload &payload, tlm_phase &phase, sc_time &bwDelay)
|
||||
{
|
||||
tlmRecorders[channelId]->recordPhase(payload, phase, bwDelay + sc_time_stamp());
|
||||
payloadEventQueue.notify(payload, phase, bwDelay);
|
||||
sc_time recTime = bwDelay + sc_time_stamp();
|
||||
sc_time notDelay = bwDelay;
|
||||
|
||||
printDebugMessage("[bw] Recording " + phaseNameToString(phase) + " at " + recTime.to_string() + " notification in " + notDelay.to_string());
|
||||
|
||||
tlmRecorders[channelId]->recordPhase(payload, phase, recTime);
|
||||
payloadEventQueue.notify(payload, phase, notDelay);
|
||||
return TLM_ACCEPTED;
|
||||
}
|
||||
|
||||
@@ -210,6 +215,11 @@ private:
|
||||
DramExtension* extension = new DramExtension(Thread(socketId+1), Channel(decodedAddress.channel), Bank(decodedAddress.bank), BankGroup(decodedAddress.bankgroup), Row(decodedAddress.row), Column(decodedAddress.column),burstlength);
|
||||
payload.set_auto_extension(extension);
|
||||
}
|
||||
|
||||
void printDebugMessage(std::string message)
|
||||
{
|
||||
DebugManager::getInstance().printDebugMessage(this->name(), message);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* ARBITER_H_ */
|
||||
|
||||
Reference in New Issue
Block a user