Players TLM Checkers
This commit is contained in:
@@ -58,6 +58,9 @@ class DRAMSys: public sc_module
|
||||
public:
|
||||
tlm_utils::multi_passthrough_target_socket<DRAMSys> tSocket;
|
||||
|
||||
std::vector<tlm_utils::tlm2_base_protocol_checker<>*>
|
||||
playersTlmCheckers;
|
||||
|
||||
sc_event terminateSimulation;
|
||||
|
||||
SC_HAS_PROCESS(DRAMSys);
|
||||
|
||||
@@ -93,8 +93,20 @@ int sc_main(int argc, char **argv)
|
||||
traceSetup *ts = new traceSetup(SimulationXML, resources, &players);
|
||||
|
||||
// Bind STL Players with DRAMSys:
|
||||
for (auto &p : players) {
|
||||
p->iSocket.bind(dramSys->tSocket);
|
||||
for (size_t i = 0; i < players.size(); i++) {
|
||||
if(Configuration::getInstance().CheckTLM2Protocol)
|
||||
{
|
||||
string str = "TLMCheckerPlayer" + std::to_string(i);
|
||||
tlm_utils::tlm2_base_protocol_checker<> *playerTlmChecker =
|
||||
new tlm_utils::tlm2_base_protocol_checker<>(str.c_str());
|
||||
dramSys->playersTlmCheckers.push_back(playerTlmChecker);
|
||||
players[i]->iSocket.bind(dramSys->playersTlmCheckers[i]->target_socket);
|
||||
dramSys->playersTlmCheckers[i]->initiator_socket.bind(dramSys->tSocket);
|
||||
}
|
||||
else
|
||||
{
|
||||
players[i]->iSocket.bind(dramSys->tSocket);
|
||||
}
|
||||
}
|
||||
|
||||
// Store the starting of the simulation in wallclock time:
|
||||
|
||||
Reference in New Issue
Block a user