systemc: Use sc_assert to check the number of interfaces.
authorGabe Black <gabeblack@google.com>
Thu, 23 Aug 2018 07:41:22 +0000 (00:41 -0700)
committerGabe Black <gabeblack@google.com>
Wed, 26 Sep 2018 00:01:02 +0000 (00:01 +0000)
commitabb7d288e9e278a0e7428846909c2d5c790c5e3a
tree3421e0399198cacc53a9317350aeb47ecb310284
parent5627f7c14e9dd7f056b7b9d83284aefa4e5e9a9d
systemc: Use sc_assert to check the number of interfaces.

The sc_port code had been using the .at() function of the vector class,
but when that failed it threw an exception, and it was very difficult
to tell where the exception came from from how gem5 crashed. This
change switches to sc_assert (the systemc version of assert) which
makes the cause/location of failures much more obvious.

Change-Id: I1cd51c86f47b314be551c304b014c44cfa030175
Reviewed-on: https://gem5-review.googlesource.com/12262
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
src/systemc/ext/core/sc_port.hh