summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-12-10 23:21:39 -0800
committerGabe Black <gabeblack@google.com>2019-01-09 01:34:10 +0000
commit370b103d6d8f1aed0294525105ed0b9497b28521 (patch)
treee40da527ac95f0e0a5ff294da7105a36c06723dd
parentb890b471812ffef669e9bb059ee5bcddd04ba0b1 (diff)
downloadgem5-370b103d6d8f1aed0294525105ed0b9497b28521.tar.xz
systemc: Stop using the non-standard sc_time % in TLM.
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>
-rw-r--r--src/systemc/tlm_core/2/quantum/global_quantum.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/systemc/tlm_core/2/quantum/global_quantum.cc b/src/systemc/tlm_core/2/quantum/global_quantum.cc
index 7ba44e3cb..69a68aa9c 100644
--- a/src/systemc/tlm_core/2/quantum/global_quantum.cc
+++ b/src/systemc/tlm_core/2/quantum/global_quantum.cc
@@ -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;
}