Gabe Black has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/15062 )

Change subject: systemc: Stop using the non-standard sc_time % in TLM.
......................................................................

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.gutier...@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutier...@amd.com>
---
M src/systemc/tlm_core/2/quantum/global_quantum.cc
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Anthony Gutierrez: Looks good to me, approved; Looks good to me, approved



diff --git a/src/systemc/tlm_core/2/quantum/global_quantum.cc b/src/systemc/tlm_core/2/quantum/global_quantum.cc
index 7ba44e3..69a68aa 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 @@
     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;
     }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/15062
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Ic381eb1ada2c994d04e65896db178f58446944ae
Gerrit-Change-Number: 15062
Gerrit-PatchSet: 5
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Anthony Gutierrez <anthony.gutier...@amd.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Matthias Jung <jun...@eit.uni-kl.de>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to