diff --git a/src/arch/arm/fastmodel/amba_from_tlm_bridge.cc b/src/arch/arm/fastmodel/amba_from_tlm_bridge.cc index 4baf0ef7aa..8db0d6af63 100644 --- a/src/arch/arm/fastmodel/amba_from_tlm_bridge.cc +++ b/src/arch/arm/fastmodel/amba_from_tlm_bridge.cc @@ -37,7 +37,9 @@ namespace gem5 namespace fastmodel { -AmbaFromTlmBridge64::AmbaFromTlmBridge64(const sc_core::sc_module_name& name) : +AmbaFromTlmBridge64::AmbaFromTlmBridge64( + const AmbaFromTlmBridge64Params ¶ms, + const sc_core::sc_module_name& name) : amba_pv::amba_pv_from_tlm_bridge<64>(name), targetProxy("target_proxy"), initiatorProxy("initiator_proxy"), @@ -116,11 +118,4 @@ AmbaFromTlmBridge64::syncControlExtension(amba_pv::amba_pv_transaction &trans) } } // namespace fastmodel - -fastmodel::AmbaFromTlmBridge64 * -AmbaFromTlmBridge64Params::create() const -{ - return new fastmodel::AmbaFromTlmBridge64(name.c_str()); -} - } // namespace gem5 diff --git a/src/arch/arm/fastmodel/amba_from_tlm_bridge.hh b/src/arch/arm/fastmodel/amba_from_tlm_bridge.hh index 8ea8b8a731..11f7b5d400 100644 --- a/src/arch/arm/fastmodel/amba_from_tlm_bridge.hh +++ b/src/arch/arm/fastmodel/amba_from_tlm_bridge.hh @@ -33,6 +33,7 @@ #include "amba_pv.h" #pragma GCC diagnostic pop #include "arch/arm/fastmodel/amba_ports.hh" +#include "params/AmbaFromTlmBridge64.hh" #include "systemc/tlm_port_wrapper.hh" namespace gem5 @@ -46,7 +47,11 @@ namespace fastmodel class AmbaFromTlmBridge64 : public amba_pv::amba_pv_from_tlm_bridge<64> { public: - AmbaFromTlmBridge64(const sc_core::sc_module_name &name); + AmbaFromTlmBridge64(const AmbaFromTlmBridge64Params ¶ms, + const sc_core::sc_module_name &name); + AmbaFromTlmBridge64(const AmbaFromTlmBridge64Params ¶ms) : + AmbaFromTlmBridge64(params, params.name.c_str()) + {} gem5::Port &gem5_getPort(const std::string &if_name, int idx=-1) override; diff --git a/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc b/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc index 58f6eeab6b..888e077386 100644 --- a/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc +++ b/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc @@ -71,7 +71,8 @@ struct FarAtomicOpFunctor : public AtomicOpFunctor namespace fastmodel { -AmbaToTlmBridge64::AmbaToTlmBridge64(const sc_core::sc_module_name& name) : +AmbaToTlmBridge64::AmbaToTlmBridge64(const AmbaToTlmBridge64Params ¶ms, + const sc_core::sc_module_name& name) : amba_pv::amba_pv_to_tlm_bridge<64>(name), targetProxy("target_proxy"), initiatorProxy("initiator_proxy"), @@ -198,11 +199,4 @@ AmbaToTlmBridge64::setupControlExtension(amba_pv::amba_pv_transaction &trans) } } // namespace fastmodel - -fastmodel::AmbaToTlmBridge64 * -AmbaToTlmBridge64Params::create() const -{ - return new fastmodel::AmbaToTlmBridge64(name.c_str()); -} - } // namespace gem5 diff --git a/src/arch/arm/fastmodel/amba_to_tlm_bridge.hh b/src/arch/arm/fastmodel/amba_to_tlm_bridge.hh index addaac67f9..176d31fbf1 100644 --- a/src/arch/arm/fastmodel/amba_to_tlm_bridge.hh +++ b/src/arch/arm/fastmodel/amba_to_tlm_bridge.hh @@ -33,6 +33,7 @@ #include "amba_pv.h" #pragma GCC diagnostic pop #include "arch/arm/fastmodel/amba_ports.hh" +#include "params/AmbaToTlmBridge64.hh" #include "systemc/tlm_port_wrapper.hh" namespace gem5 @@ -46,7 +47,11 @@ namespace fastmodel class AmbaToTlmBridge64 : public amba_pv::amba_pv_to_tlm_bridge<64> { public: - AmbaToTlmBridge64(const sc_core::sc_module_name &name); + AmbaToTlmBridge64(const AmbaToTlmBridge64Params ¶ms, + const sc_core::sc_module_name &name); + AmbaToTlmBridge64(const AmbaToTlmBridge64Params ¶ms) : + AmbaToTlmBridge64(params, params.name.c_str()) + {} gem5::Port &gem5_getPort(const std::string &if_name, int idx=-1) override;