diff options
author | Gabe Black <gabeblack@google.com> | 2018-10-07 01:38:41 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-16 01:10:42 +0000 |
commit | a8f873a8069b69e34e95de6ebbb3d0d41fffb221 (patch) | |
tree | 295bd515e052aef483e653e48b2bc61ced58b068 /src/systemc | |
parent | d5b44338fd571534b36bf5999bf3fc76d4ba153d (diff) | |
download | gem5-a8f873a8069b69e34e95de6ebbb3d0d41fffb221.tar.xz |
systemc: Check the maximum port size when finializing bindings.
Change-Id: Ie7d704547bb8523a3c44479a89d2af4fcce6e8b6
Reviewed-on: https://gem5-review.googlesource.com/c/13326
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc')
-rw-r--r-- | src/systemc/core/port.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/systemc/core/port.cc b/src/systemc/core/port.cc index c1d77d9d0..e8a783231 100644 --- a/src/systemc/core/port.cc +++ b/src/systemc/core/port.cc @@ -125,6 +125,14 @@ Port::finalize() 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) |