util: Fix gem5_within_systemc and tlm coupling
authorLukas Steiner <lsteiner@rhrk.uni-kl.de>
Fri, 15 Jan 2021 08:21:59 +0000 (09:21 +0100)
committerLukas Steiner <lsteiner@rhrk.uni-kl.de>
Fri, 15 Jan 2021 23:11:57 +0000 (23:11 +0000)
Adapt the code to changes introduced with commits 3fb9139 and 392c1ce.

Jira Issue: https://gem5.atlassian.net/browse/GEM5-874

Change-Id: I0023157f1a2e5935f624c0a12e61f6b3e0d98b97
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39215
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
util/systemc/gem5_within_systemc/sc_module.cc
util/tlm/src/sc_master_port.cc

index 9e6d5aa4c6202917657c04f8c2cdd57d5f552cd5..a0f36c74ddbc0cbeb8519584f8fa3c9a7f33b582 100644 (file)
@@ -71,6 +71,7 @@ void
 setTickFrequency()
 {
     ::setClockFrequency(1000000000000);
+    ::fixClockFrequency();
 }
 
 Module::Module(sc_core::sc_module_name name) : sc_core::sc_channel(name),
index 2d569e871f5931fcbd7be7879c37191be83dfa1b..0008e9bedd273d370c265a8b29239cf164f5ce41 100644 (file)
@@ -47,7 +47,7 @@ SCMasterPort::generatePacket(tlm::tlm_generic_payload& trans)
     Request::Flags flags;
     auto req = std::make_shared<Request>(
         trans.get_address(), trans.get_data_length(), flags,
-        owner.masterId);
+        owner.id);
 
     MemCmd cmd;