diff options
author | Gabe Black <gabeblack@google.com> | 2018-10-01 22:47:27 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-16 00:45:13 +0000 |
commit | c736ef1b2f6447be1dcd9c9e62cc072befa91443 (patch) | |
tree | f6cbc03cbc68ded2122c6b56d454b5835b3c6be8 /src/systemc | |
parent | f93e27666f2ddc85afd618df6f2c3874ac967715 (diff) | |
download | gem5-c736ef1b2f6447be1dcd9c9e62cc072befa91443.tar.xz |
systemc: Don't use write() in sc_clock to set the clock value.
The two different processes we have to use to match Accellera behavior
would trip the checks in write.
Change-Id: Iee729b239bccd8f7b854894000c9ef2c47600563
Reviewed-on: https://gem5-review.googlesource.com/c/13202
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc')
-rw-r--r-- | src/systemc/ext/channel/sc_clock.hh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/systemc/ext/channel/sc_clock.hh b/src/systemc/ext/channel/sc_clock.hh index 3713394b6..ba9231542 100644 --- a/src/systemc/ext/channel/sc_clock.hh +++ b/src/systemc/ext/channel/sc_clock.hh @@ -101,8 +101,18 @@ class sc_clock : public sc_signal<bool> ::sc_gem5::ClockTick *_gem5UpEdge; ::sc_gem5::ClockTick *_gem5DownEdge; - void tickUp() { sc_signal<bool>::write(true); } - void tickDown() { sc_signal<bool>::write(false); } + void + tickUp() + { + m_new_val = true; + request_update(); + } + void + tickDown() + { + m_new_val = false; + request_update(); + } }; typedef sc_in<bool> sc_in_clk; |