systemc: Remove a redundant error check.
authorGabe Black <gabeblack@google.com>
Sun, 7 Oct 2018 08:51:25 +0000 (01:51 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 16 Oct 2018 01:11:09 +0000 (01:11 +0000)
If the check doesn't abort the port binding in progress, it will be
reported twice.

Change-Id: I691ebd0f1598193f861c6085341dcd2fb05dd210
Reviewed-on: https://gem5-review.googlesource.com/c/13327
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/systemc/core/port.hh

index b9f070ffb7177bce0f5199188e28ce8bbab200f1..203bafb861047ab4f906c58ee28c88b6854c3f52 100644 (file)
@@ -67,17 +67,8 @@ class Port
     void
     addInterface(::sc_core::sc_interface *iface)
     {
-        for (int i = 0; i < _size; i++) {
-            if (getInterface(i) == iface) {
-                std::string msg =
-                    csprintf("interface already bound to port: port '%s' (%s)",
-                        portBase->name(), portBase->kind());
-                SC_REPORT_ERROR("(E107) bind interface to port failed",
-                        msg.c_str());
-            }
-        }
-        _size++;
         portBase->_gem5AddInterface(iface);
+        _size++;
     }
 
     void