Matthias Jung has submitted this change and it was merged. ( https://gem5-review.googlesource.com/4520 )

Change subject: tlm: Don't set SystemC time resolution
......................................................................

tlm: Don't set SystemC time resolution

Some simulators already set the time resolution of SystemC. By coupling
gem5 by means of SystemC with an other tool this can lead to problems:
When the resolution is set twice the simulation will not work.
Therefore, the line is changed to an assertion that checks if the time
resolution of the SystemC simulation is set to gem5's value of 1ps.

Change-Id: I8aafab9dd593eb4697a3c7f69ce181fd9cdd05c4
Reviewed-on: https://gem5-review.googlesource.com/4520
Reviewed-by: Paul Rosenfeld <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
---
M util/tlm/src/sim_control.cc
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Paul Rosenfeld: Looks good to me, approved



diff --git a/util/tlm/src/sim_control.cc b/util/tlm/src/sim_control.cc
index a96daf2..fae8db0 100644
--- a/util/tlm/src/sim_control.cc
+++ b/util/tlm/src/sim_control.cc
@@ -86,7 +86,8 @@
     Trace::setDebugLogger(&logger);

     Gem5SystemC::setTickFrequency();
-    sc_core::sc_set_time_resolution(1, sc_core::SC_PS);
+    assert(sc_core::sc_get_time_resolution()
+                    == sc_core::sc_time(1,sc_core::SC_PS));

     Gem5SystemC::Module::setupEventQueues(*this);
     initSignals();

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

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8aafab9dd593eb4697a3c7f69ce181fd9cdd05c4
Gerrit-Change-Number: 4520
Gerrit-PatchSet: 2
Gerrit-Owner: Matthias Jung <[email protected]>
Gerrit-Reviewer: Christian Menard <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Matthias Jung <[email protected]>
Gerrit-Reviewer: Paul Rosenfeld <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to