ECC Controller as dummy created.

This commit is contained in:
Johannes Feldmann
2017-02-27 08:57:34 +01:00
parent 10f9f2caff
commit af20dcb647
4 changed files with 52 additions and 3 deletions

View File

@@ -169,7 +169,8 @@ HEADERS += \
src/controller/core/configuration/ConfigurationLoader.h \
src/error/errormodel.h \
src/simulation/ExampleInitiator.h \
src/controller/core/powerdown/PowerDownManagerTimeoutBankwise.h
src/controller/core/powerdown/PowerDownManagerTimeoutBankwise.h \
src/error/controllerECC.h
thermalsim = $$(THERMALSIM)
isEmpty(thermalsim) {

View File

@@ -0,0 +1,40 @@
#ifndef CONTROLLERECC_H
#define CONTROLLERECC_H
#include <systemc.h>
using namespace std;
using namespace tlm;
struct ControllerECC: sc_module
{
tlm_utils::multi_passthrough_target_socket<ControllerECC> t_socket;
tlm_utils::multi_passthrough_initiator_socket<ControllerECC> i_socket;
SC_CTOR(ControllerECC)
: t_socket("t_socket")
, i_socket("i_socket")
{
t_socket.register_nb_transport_fw (this, &ControllerECC::nb_transport_fw);
i_socket.register_nb_transport_bw (this, &ControllerECC::nb_transport_bw);
}
// Forward interface
virtual tlm::tlm_sync_enum nb_transport_fw( int id, tlm::tlm_generic_payload& trans,
tlm::tlm_phase& phase, sc_time& delay )
{
return i_socket[id]->nb_transport_fw( trans, phase, delay );
}
// Backward interface
virtual tlm::tlm_sync_enum nb_transport_bw( int id, tlm::tlm_generic_payload& trans,
tlm::tlm_phase& phase, sc_time& delay )
{
return t_socket[id]->nb_transport_bw( trans, phase, delay );
}
};
#endif // CONTROLLERECC_H

View File

@@ -117,6 +117,10 @@ void Simulation::instantiateModules(const string &traceName, const string &pathT
// Create and properly initialize TLM recorders. They need to be ready before creating some modules.
setupTlmRecorders(traceName, pathToResources, devices);
// Create ECC Controller
ecc = new ControllerECC("ecc");
// Create Arbiter
arbiter = new Arbiter("arbiter");
arbiter->setTlmRecorders(tlmRecorders);
@@ -142,7 +146,9 @@ void Simulation::instantiateModules(const string &traceName, const string &pathT
void Simulation::bindSockets()
{
tSocket.bind(arbiter->tSocket);
tSocket.bind(ecc->t_socket);
ecc->i_socket(arbiter->tSocket);
//tSocket.bind(arbiter->tSocket);
if(Configuration::getInstance().CheckTLM2Protocol) {
for (size_t i = 0; i < Configuration::getInstance().NumberOfMemChannels; i++) {

View File

@@ -49,7 +49,7 @@
#include "../controller/Controller.h"
#include "../common/third_party/tinyxml2/tinyxml2.h"
#include "../common/tlm2_base_protocol_checker.h"
#include "../error/controllerECC.h"
struct DramSetup
{
@@ -96,6 +96,8 @@ private:
//TLM 2.0 Protocol Checkers
std::vector<tlm_utils::tlm2_base_protocol_checker<>*> controllersTlmCheckers;
// All transactions pass first through the ECC Controller
ControllerECC *ecc;
// All transactions pass through the same arbiter
Arbiter *arbiter;
// Each DRAM unit has a controller