summaryrefslogtreecommitdiff
path: root/src/systemc/ext/utils/sc_trace_file.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-06-13 18:46:06 -0700
committerGabe Black <gabeblack@google.com>2018-08-15 01:36:35 +0000
commita7c7b939713b62043646c6b9b9254faa8e8b98ce (patch)
tree86925ffe4ee64b177449940b933d82cb2b778141 /src/systemc/ext/utils/sc_trace_file.hh
parenta51eb91659d759215422c73165ce2a46ccc7a662 (diff)
downloadgem5-a7c7b939713b62043646c6b9b9254faa8e8b98ce.tar.xz
systemc: Add some non-standard sc_trace variants.
These overloads of sc_trace take the unsigned version of some primitive types. The compiler thought it was ambiguous how to convert an unsigned integer value into a signed one since there were several different functions which took signed integer parameters of various sizes. These versions of sc_trace aren't in the standard, but they are in the Accellera implementation and do fix building of the regression tests. Change-Id: I26fd06d90ae6bf5fc5aed24bc2ac826ad69eee31 Reviewed-on: https://gem5-review.googlesource.com/11182 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/ext/utils/sc_trace_file.hh')
-rw-r--r--src/systemc/ext/utils/sc_trace_file.hh24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/systemc/ext/utils/sc_trace_file.hh b/src/systemc/ext/utils/sc_trace_file.hh
index ec4fd4d6a..9e9e75b35 100644
--- a/src/systemc/ext/utils/sc_trace_file.hh
+++ b/src/systemc/ext/utils/sc_trace_file.hh
@@ -107,6 +107,26 @@ void sc_trace(sc_trace_file *, const sc_dt::sc_fxnum_fast &,
void sc_trace(sc_trace_file *, const sc_dt::sc_fxnum_fast *,
const std::string &);
+
+// Nonstandard - unsigned versions necessary to avoid ambiguous overload
+// resolution.
+void sc_trace(sc_trace_file *, const unsigned char &,
+ const std::string &, int width=(8 * sizeof(char)));
+void sc_trace(sc_trace_file *, const unsigned char *,
+ const std::string &, int width=(8 * sizeof(char)));
+void sc_trace(sc_trace_file *, const unsigned short &,
+ const std::string &, int width=(8 * sizeof(char)));
+void sc_trace(sc_trace_file *, const unsigned short *,
+ const std::string &, int width=(8 * sizeof(char)));
+void sc_trace(sc_trace_file *, const unsigned int &,
+ const std::string &, int width=(8 * sizeof(char)));
+void sc_trace(sc_trace_file *, const unsigned int *,
+ const std::string &, int width=(8 * sizeof(char)));
+void sc_trace(sc_trace_file *, const unsigned long &,
+ const std::string &, int width=(8 * sizeof(char)));
+void sc_trace(sc_trace_file *, const unsigned long *,
+ const std::string &, int width=(8 * sizeof(char)));
+
void sc_trace(sc_trace_file *, const char &,
const std::string &, int width=(8 * sizeof(char)));
void sc_trace(sc_trace_file *, const char *,
@@ -132,6 +152,10 @@ void sc_trace(sc_trace_file *, const sc_dt::uint64 &,
void sc_trace(sc_trace_file *, const sc_dt::uint64 *,
const std::string &, int width=(8 * sizeof(char)));
+// Nonstandard function for enums
+void sc_trace(sc_trace_file *, const unsigned int &,
+ const std::string &, const char **enum_literals);
+
template <class T>
void
sc_trace(sc_trace_file *, const sc_signal_in_if<T> &, const std::string &)