Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/13326

Change subject: systemc: Check the maximum port size when finializing bindings.
......................................................................

systemc: Check the maximum port size when finializing bindings.

Change-Id: Ie7d704547bb8523a3c44479a89d2af4fcce6e8b6
---
M src/systemc/core/port.cc
1 file changed, 8 insertions(+), 0 deletions(-)



diff --git a/src/systemc/core/port.cc b/src/systemc/core/port.cc
index c1d77d9..e8a7832 100644
--- a/src/systemc/core/port.cc
+++ b/src/systemc/core/port.cc
@@ -125,6 +125,14 @@

     resets.clear();

+    if (size() > maxSize()) {
+        std::ostringstream ss;
+        ss << size() << " binds exceeds maximum of " << maxSize() <<
+            " allowed";
+        portBase->report_error(
+                "(E109) complete binding failed", ss.str().c_str());
+    }
+
     switch (portBase->_portPolicy()) {
       case sc_core::SC_ONE_OR_MORE_BOUND:
         if (size() == 0)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13326
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: Ie7d704547bb8523a3c44479a89d2af4fcce6e8b6
Gerrit-Change-Number: 13326
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to