summaryrefslogtreecommitdiff
path: root/src/systemc/ext/channel/sc_fifo.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-10-07 05:23:49 -0700
committerGabe Black <gabeblack@google.com>2018-10-16 01:12:58 +0000
commite07f7efb75f0f7322d752608eb1cb1e1145b4a98 (patch)
treec70d86ba3130636fd8c6ff3c0d159727b81932c8 /src/systemc/ext/channel/sc_fifo.hh
parent3420f0e223888bf70cd502efb5a534e651891b5c (diff)
downloadgem5-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/channel/sc_fifo.hh')
-rw-r--r--src/systemc/ext/channel/sc_fifo.hh17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/systemc/ext/channel/sc_fifo.hh b/src/systemc/ext/channel/sc_fifo.hh
index a1c454a8f..0c83f6692 100644
--- a/src/systemc/ext/channel/sc_fifo.hh
+++ b/src/systemc/ext/channel/sc_fifo.hh
@@ -36,6 +36,7 @@
#include "../core/sc_module.hh" // for sc_gen_unique_name
#include "../core/sc_prim.hh"
#include "../utils/sc_report_handler.hh"
+#include "messages.hh"
#include "sc_fifo_in_if.hh"
#include "sc_fifo_out_if.hh"
@@ -69,22 +70,16 @@ class sc_fifo : public sc_fifo_in_if<T>,
std::string tn(iface_type_name);
if (tn == typeid(sc_fifo_in_if<T>).name() ||
tn == typeid(sc_fifo_blocking_in_if<T>).name()) {
- if (_reader) {
- SC_REPORT_ERROR(
- "(E104) sc_fifo<T> cannot have more than one reader",
- "");
- }
+ if (_reader)
+ SC_REPORT_ERROR(SC_ID_MORE_THAN_ONE_FIFO_READER_, "");
_reader = &port;
} else if (tn == typeid(sc_fifo_out_if<T>).name() ||
tn == typeid(sc_fifo_blocking_out_if<T>).name()) {
- if (_writer) {
- SC_REPORT_ERROR(
- "(E105) sc_fifo<T> cannot have more than one writer",
- "");
- }
+ if (_writer)
+ SC_REPORT_ERROR(SC_ID_MORE_THAN_ONE_FIFO_WRITER_, "");
_writer = &port;
} else {
- SC_REPORT_ERROR("(E107) bind interface to port failed",
+ SC_REPORT_ERROR(SC_ID_BIND_IF_TO_PORT_,
"sc_fifo<T> port not recognized");
}
}