diff options
author | Gabe Black <gabeblack@google.com> | 2019-04-15 19:58:16 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-04-24 11:00:56 +0000 |
commit | e52e6cc08cd1a6f421a8f113ee13001173c1bc79 (patch) | |
tree | f040d4f24b4f3b1a265757d9d0c9f1a09d825ca8 /src/systemc/tlm_bridge | |
parent | e76777d5e641633d378a0ee4da5904a6edb8219d (diff) | |
download | gem5-e52e6cc08cd1a6f421a8f113ee13001173c1bc79.tar.xz |
systemc: Use the new TLM socket types in the TLM bridge SimObjects.
These are in the definition of the python version of the SimObjects.
Change-Id: Iadb143158815df68cf32cc254ad19f755ab4e78a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18173
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/tlm_bridge')
-rw-r--r-- | src/systemc/tlm_bridge/TlmBridge.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/systemc/tlm_bridge/TlmBridge.py b/src/systemc/tlm_bridge/TlmBridge.py index dcc545280..e3c15c2dc 100644 --- a/src/systemc/tlm_bridge/TlmBridge.py +++ b/src/systemc/tlm_bridge/TlmBridge.py @@ -29,6 +29,8 @@ from m5.objects.SystemC import SystemC_ScModule from m5.params import * from m5.proxy import * +from m5.objects.Tlm import TlmTargetSocket, TlmInitiatorSocket + class Gem5ToTlmBridgeBase(SystemC_ScModule): type = 'Gem5ToTlmBridgeBase' abstract = True @@ -38,7 +40,6 @@ class Gem5ToTlmBridgeBase(SystemC_ScModule): system = Param.System(Parent.any, "system") gem5 = SlavePort('gem5 slave port') - tlm = MasterPort('TLM initiator socket') addr_ranges = VectorParam.AddrRange([], 'Addresses served by this port\'s TLM side') @@ -51,7 +52,6 @@ class TlmToGem5BridgeBase(SystemC_ScModule): system = Param.System(Parent.any, "system") gem5 = MasterPort('gem5 master port') - tlm = SlavePort('TLM target socket') class Gem5ToTlmBridge32(Gem5ToTlmBridgeBase): @@ -60,12 +60,16 @@ class Gem5ToTlmBridge32(Gem5ToTlmBridgeBase): cxx_class = 'sc_gem5::Gem5ToTlmBridge<32>' cxx_header = 'systemc/tlm_bridge/gem5_to_tlm.hh' + tlm = TlmInitiatorSocket(32, 'TLM initiator socket') + class Gem5ToTlmBridge64(Gem5ToTlmBridgeBase): type = 'Gem5ToTlmBridge64' cxx_template_params = [ 'unsigned int BITWIDTH' ] cxx_class = 'sc_gem5::Gem5ToTlmBridge<64>' cxx_header = 'systemc/tlm_bridge/gem5_to_tlm.hh' + tlm = TlmInitiatorSocket(64, 'TLM initiator socket') + class TlmToGem5Bridge32(TlmToGem5BridgeBase): type = 'TlmToGem5Bridge32' @@ -73,8 +77,12 @@ class TlmToGem5Bridge32(TlmToGem5BridgeBase): cxx_class = 'sc_gem5::TlmToGem5Bridge<32>' cxx_header = 'systemc/tlm_bridge/tlm_to_gem5.hh' + tlm = TlmTargetSocket(32, 'TLM target socket') + class TlmToGem5Bridge64(TlmToGem5BridgeBase): type = 'TlmToGem5Bridge64' cxx_template_params = [ 'unsigned int BITWIDTH' ] cxx_class = 'sc_gem5::TlmToGem5Bridge<64>' cxx_header = 'systemc/tlm_bridge/tlm_to_gem5.hh' + + tlm = TlmTargetSocket(64, 'TLM target socket') |