diff options
author | Gabe Black <gabeblack@google.com> | 2018-09-30 22:44:56 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-16 00:41:57 +0000 |
commit | 40e4a1c41895219732a610bc463bbe022523ad58 (patch) | |
tree | 30136864857a8d4c049175b00de2598b084caa16 /src | |
parent | e5a994140a1f0fcd08ba6ddad7d11d6daa3d07a0 (diff) | |
download | gem5-40e4a1c41895219732a610bc463bbe022523ad58.tar.xz |
systemc: Change how the timing of binding ports works.
In the Accellera implementation, interfaces are bound to ports
immediately if no ports have been bound, and otherwise saves them for
later along with the ports. The existing implementation would save
all interface and port bindings to finalize at the end of elaboration.
This seems like pointless complexity, but it's necessary to get the
output to match in the tests.
Change-Id: Ib82d324ee2be9e56e6a41561611c7fca4f4f4e72
Reviewed-on: https://gem5-review.googlesource.com/c/13196
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/systemc/core/port.hh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/systemc/core/port.hh b/src/systemc/core/port.hh index eb8dbfef3..bf3b73a84 100644 --- a/src/systemc/core/port.hh +++ b/src/systemc/core/port.hh @@ -144,7 +144,10 @@ class Port void bind(::sc_core::sc_interface *interface) { - bindings.push_back(new Binding(interface)); + if (bindings.empty()) + addInterface(interface); + else + bindings.push_back(new Binding(interface)); } void |