Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/13196 )
Change subject: systemc: Change how the timing of binding ports works.
......................................................................
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 <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/systemc/core/port.hh
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
diff --git a/src/systemc/core/port.hh b/src/systemc/core/port.hh
index eb8dbfe..bf3b73a 100644
--- a/src/systemc/core/port.hh
+++ b/src/systemc/core/port.hh
@@ -144,7 +144,10 @@
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
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13196
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: Ib82d324ee2be9e56e6a41561611c7fca4f4f4e72
Gerrit-Change-Number: 13196
Gerrit-PatchSet: 5
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Matthias Jung <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev