systemc: Stop using the non-standard sc_time % in TLM.
authorGabe Black <gabeblack@google.com>
Tue, 11 Dec 2018 07:21:39 +0000 (23:21 -0800)
committerGabe Black <gabeblack@google.com>
Wed, 9 Jan 2019 01:34:10 +0000 (01:34 +0000)
The TLM headers were using the non-standard % operator on sc_time.
This change replaces that with % applied to the result of
sc_time::value().

Change-Id: Ic381eb1ada2c994d04e65896db178f58446944ae
Reviewed-on: https://gem5-review.googlesource.com/c/15062
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

src/systemc/tlm_core/2/quantum/global_quantum.cc

index 7ba44e3cbdf4c87a3ec7e56df4e8ec400e9e02eb..69a68aa9cd9b81ac60399f7d81b88688fa3a26c6 100644 (file)
@@ -40,7 +40,8 @@ tlm_global_quantum::compute_local_quantum()
     if (m_global_quantum != sc_core::SC_ZERO_TIME) {
         const sc_core::sc_time current = sc_core::sc_time_stamp();
         const sc_core::sc_time g_quant = m_global_quantum;
-        return g_quant - (current % g_quant);
+        return sc_core::sc_time::from_value(
+                g_quant.value() - (current.value() % g_quant.value()));
     } else {
         return sc_core::SC_ZERO_TIME;
     }