systemc: Fix how the maximum size is computed for sc_ports.
authorGabe Black <gabeblack@google.com>
Sun, 7 Oct 2018 08:37:52 +0000 (01:37 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 16 Oct 2018 01:10:15 +0000 (01:10 +0000)
Change-Id: I073eb16cbeb892f24ac3860daca056ed2fb09086
Reviewed-on: https://gem5-review.googlesource.com/c/13325
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/systemc/core/port.hh

index fa98c6002d5f521514ccafb65693e02d5c60876b..b9f070ffb7177bce0f5199188e28ce8bbab200f1 100644 (file)
@@ -168,7 +168,7 @@ class Port
     void regPort();
 
     int size() { return _size; }
-    int maxSize() { return _maxSize; }
+    int maxSize() { return _maxSize ? _maxSize : _size; }
 };
 
 } // namespace sc_gem5