Gabe Black has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/13297 )

Change subject: systemc: Keep track of progress when positionally binding.
......................................................................

systemc: Keep track of progress when positionally binding.

Positionally binding more than once (like with the deprecated comma or
<< operators) should pick up where it left off the last time instead
of starting again from the beginning.

Change-Id: Ifc33520d6ce40544bd0ad80a5657b1a38a7914e4
Reviewed-on: https://gem5-review.googlesource.com/c/13297
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/systemc/core/module.cc
M src/systemc/core/module.hh
2 files changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved



diff --git a/src/systemc/core/module.cc b/src/systemc/core/module.cc
index f342b7f..8cbde8f 100644
--- a/src/systemc/core/module.cc
+++ b/src/systemc/core/module.cc
@@ -49,7 +49,7 @@

 Module::Module(const char *name) :
     _name(name), _sc_mod(nullptr), _obj(nullptr), _ended(false),
-    _deprecatedConstructor(false)
+    _deprecatedConstructor(false), bindingIndex(0)
 {
     panic_if(_new_module, "Previous module not finished.\n");
     _new_module = this;
@@ -109,6 +109,7 @@

     auto proxyIt = proxies.begin();
     auto portIt = ports.begin();
+    portIt += bindingIndex;
     for (; proxyIt != proxies.end(); proxyIt++, portIt++) {
         auto proxy = *proxyIt;
         auto port = *portIt;
@@ -117,6 +118,7 @@
         else
             port->vbind(*proxy->port());
     }
+    bindingIndex += proxies.size();
 }

 void
diff --git a/src/systemc/core/module.hh b/src/systemc/core/module.hh
index 695f305..8d6df81 100644
--- a/src/systemc/core/module.hh
+++ b/src/systemc/core/module.hh
@@ -125,6 +125,8 @@
     std::vector<::sc_core::sc_port_base *> ports;
     std::vector<::sc_core::sc_export_base *> exports;

+    int bindingIndex;
+
     void beforeEndOfElaboration();
     void endOfElaboration();
     void startOfSimulation();

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13297
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: Ifc33520d6ce40544bd0ad80a5657b1a38a7914e4
Gerrit-Change-Number: 13297
Gerrit-PatchSet: 4
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

Reply via email to