Matthias Jung has uploaded this change for review. (
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
---
M util/tlm/src/sim_control.cc
1 file changed, 2 insertions(+), 1 deletion(-)
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: newchange
Gerrit-Change-Id: I8aafab9dd593eb4697a3c7f69ce181fd9cdd05c4
Gerrit-Change-Number: 4520
Gerrit-PatchSet: 1
Gerrit-Owner: Matthias Jung <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev