summaryrefslogtreecommitdiff
path: root/src/systemc/dt/fx/sc_fxnum.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-10-08 19:01:38 -0700
committerGabe Black <gabeblack@google.com>2018-10-16 01:13:23 +0000
commitc9f83ec94ba1d7de0cfc46a9a23af2f9e04450e8 (patch)
tree4993ca5a6892b108ae1bc040a23366ef326f190b /src/systemc/dt/fx/sc_fxnum.cc
parente07f7efb75f0f7322d752608eb1cb1e1145b4a98 (diff)
downloadgem5-c9f83ec94ba1d7de0cfc46a9a23af2f9e04450e8.tar.xz
systemc: Switch to using predefined messages for datatypes.
Create and use predefined messages for datatypes which match the ones Accellera uses. Change-Id: I92dd52f62462b864264217bb81f3ff1dcec020bf Reviewed-on: https://gem5-review.googlesource.com/c/13331 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/dt/fx/sc_fxnum.cc')
-rw-r--r--src/systemc/dt/fx/sc_fxnum.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/systemc/dt/fx/sc_fxnum.cc b/src/systemc/dt/fx/sc_fxnum.cc
index f47b4d342..d11a28774 100644
--- a/src/systemc/dt/fx/sc_fxnum.cc
+++ b/src/systemc/dt/fx/sc_fxnum.cc
@@ -53,6 +53,7 @@
#include <cmath>
+#include "systemc/ext/dt/fx/messages.hh"
#include "systemc/ext/dt/fx/sc_fxnum.hh"
namespace sc_dt
@@ -503,7 +504,7 @@ overflow(double &c, const scfx_params &params, bool &o_flag)
case SC_WRAP_SM: // sign magnitude wrap-around
{
SC_ERROR_IF_(params.enc() == SC_US_,
- "SC_WRAP_SM not defined for unsigned numbers");
+ sc_core::SC_ID_WRAP_SM_NOT_DEFINED_);
int n_bits = params.n_bits();
@@ -564,7 +565,7 @@ void
sc_fxnum_fast::cast()
{
scfx_ieee_double id(m_val);
- SC_ERROR_IF_(id.is_nan() || id.is_inf(), "invalid fixed-point value");
+ SC_ERROR_IF_(id.is_nan() || id.is_inf(), sc_core::SC_ID_INVALID_FX_VALUE_);
if (m_params.cast_switch() == SC_ON) {
m_q_flag = false;