diff options
author | Gabe Black <gabeblack@google.com> | 2018-10-07 05:23:49 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-16 01:12:58 +0000 |
commit | e07f7efb75f0f7322d752608eb1cb1e1145b4a98 (patch) | |
tree | c70d86ba3130636fd8c6ff3c0d159727b81932c8 /src/systemc/ext/core/sc_port.hh | |
parent | 3420f0e223888bf70cd502efb5a534e651891b5c (diff) | |
download | gem5-e07f7efb75f0f7322d752608eb1cb1e1145b4a98.tar.xz |
systemc: Switch to using predefined messages for channels.
Create and use predefined messages for channels which match the ones
Accellera uses.
Change-Id: I179214838bbd83604e50225926cdc6b5b1b16923
Reviewed-on: https://gem5-review.googlesource.com/c/13330
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/ext/core/sc_port.hh')
-rw-r--r-- | src/systemc/ext/core/sc_port.hh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/systemc/ext/core/sc_port.hh b/src/systemc/ext/core/sc_port.hh index aa9a322b8..c4160bafe 100644 --- a/src/systemc/ext/core/sc_port.hh +++ b/src/systemc/ext/core/sc_port.hh @@ -33,6 +33,7 @@ #include <typeinfo> #include <vector> +#include "../channel/messages.hh" #include "../utils/sc_report_handler.hh" #include "sc_module.hh" // for sc_gen_unique_name #include "sc_object.hh" @@ -129,7 +130,7 @@ class sc_port_b : public sc_port_base operator -> () { if (_interfaces.empty()) { - report_error("(E112) get interface failed", "port is not bound"); + report_error(SC_ID_GET_IF_, "port is not bound"); sc_abort(); } return _interfaces[0]; @@ -138,7 +139,7 @@ class sc_port_b : public sc_port_base operator -> () const { if (_interfaces.empty()) { - report_error("(E112) get interface failed", "port is not bound"); + report_error(SC_ID_GET_IF_, "port is not bound"); sc_abort(); } return _interfaces[0]; @@ -148,7 +149,7 @@ class sc_port_b : public sc_port_base operator [] (int n) { if (n < 0 || n >= size()) { - report_error("(E112) get interface failed", "index out of range"); + report_error(SC_ID_GET_IF_, "index out of range"); return NULL; } return _interfaces[n]; @@ -157,7 +158,7 @@ class sc_port_b : public sc_port_base operator [] (int n) const { if (n < 0 || n >= size()) { - report_error("(E112) get interface failed", "index out of range"); + report_error(SC_ID_GET_IF_, "index out of range"); return NULL; } return _interfaces[n]; @@ -219,7 +220,7 @@ class sc_port_b : public sc_port_base _gem5Interface(int n) const { if (n < 0 || n >= size()) { - report_error("(E112) get interface failed", "index out of range"); + report_error(SC_ID_GET_IF_, "index out of range"); return NULL; } return _interfaces[n]; @@ -231,7 +232,7 @@ class sc_port_b : public sc_port_base sc_assert(interface); for (int i = 0; i < _interfaces.size(); i++) { if (interface == _interfaces[i]) { - report_error("(E107) bind interface to port failed", + report_error(SC_ID_BIND_IF_TO_PORT_, "interface already bound to port"); } } |