summaryrefslogtreecommitdiff
path: root/src/systemc/ext/dt/fx
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/ext/dt/fx
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/ext/dt/fx')
-rw-r--r--src/systemc/ext/dt/fx/_fx.hh1
-rw-r--r--src/systemc/ext/dt/fx/_using.hh12
-rw-r--r--src/systemc/ext/dt/fx/messages.hh50
-rw-r--r--src/systemc/ext/dt/fx/sc_context.hh5
-rw-r--r--src/systemc/ext/dt/fx/sc_fxdefs.hh12
-rw-r--r--src/systemc/ext/dt/fx/sc_fxnum.hh51
-rw-r--r--src/systemc/ext/dt/fx/scfx_other_defs.hh33
-rw-r--r--src/systemc/ext/dt/fx/scfx_params.hh5
8 files changed, 118 insertions, 51 deletions
diff --git a/src/systemc/ext/dt/fx/_fx.hh b/src/systemc/ext/dt/fx/_fx.hh
index e21acb657..85f9841f8 100644
--- a/src/systemc/ext/dt/fx/_fx.hh
+++ b/src/systemc/ext/dt/fx/_fx.hh
@@ -30,6 +30,7 @@
#ifndef __SYSTEMC_EXT_CORE_DT_FX__FX_HH__
#define __SYSTEMC_EXT_CORE_DT_FX__FX_HH__
+#include "messages.hh"
#include "sc_context.hh"
#include "sc_fix.hh"
#include "sc_fixed.hh"
diff --git a/src/systemc/ext/dt/fx/_using.hh b/src/systemc/ext/dt/fx/_using.hh
index d6b17f386..97fe540a3 100644
--- a/src/systemc/ext/dt/fx/_using.hh
+++ b/src/systemc/ext/dt/fx/_using.hh
@@ -73,4 +73,16 @@ using sc_dt::sc_context_begin;
using sc_dt::SC_NOW;
using sc_dt::SC_LATER;
+using sc_core::SC_ID_INVALID_WL_;
+using sc_core::SC_ID_INVALID_N_BITS_;
+using sc_core::SC_ID_INVALID_DIV_WL_;
+using sc_core::SC_ID_INVALID_CTE_WL_;
+using sc_core::SC_ID_INVALID_MAX_WL_;
+using sc_core::SC_ID_INVALID_FX_VALUE_;
+using sc_core::SC_ID_INVALID_O_MODE_;
+using sc_core::SC_ID_OUT_OF_RANGE_;
+using sc_core::SC_ID_CONTEXT_BEGIN_FAILED_;
+using sc_core::SC_ID_CONTEXT_END_FAILED_;
+using sc_core::SC_ID_WRAP_SM_NOT_DEFINED_;
+
#endif //__SYSTEMC_EXT_DT_FX__USING_HH__
diff --git a/src/systemc/ext/dt/fx/messages.hh b/src/systemc/ext/dt/fx/messages.hh
new file mode 100644
index 000000000..3ddd964bd
--- /dev/null
+++ b/src/systemc/ext/dt/fx/messages.hh
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2018 Google, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Authors: Gabe Black
+ */
+
+#ifndef __SYSTEMC_EXT_DT_FX_MESSAGES_HH__
+#define __SYSTEMC_EXT_DT_FX_MESSAGES_HH__
+
+namespace sc_core
+{
+
+extern const char SC_ID_INVALID_WL_[];
+extern const char SC_ID_INVALID_N_BITS_[];
+extern const char SC_ID_INVALID_DIV_WL_[];
+extern const char SC_ID_INVALID_CTE_WL_[];
+extern const char SC_ID_INVALID_MAX_WL_[];
+extern const char SC_ID_INVALID_FX_VALUE_[];
+extern const char SC_ID_INVALID_O_MODE_[];
+extern const char SC_ID_OUT_OF_RANGE_[];
+extern const char SC_ID_CONTEXT_BEGIN_FAILED_[];
+extern const char SC_ID_CONTEXT_END_FAILED_[];
+extern const char SC_ID_WRAP_SM_NOT_DEFINED_[];
+
+} // namespace sc_core
+
+#endif // __SYSTEMC_EXT_DT_FX_MESSAGES_HH__
diff --git a/src/systemc/ext/dt/fx/sc_context.hh b/src/systemc/ext/dt/fx/sc_context.hh
index 075d38401..23c3fbbd7 100644
--- a/src/systemc/ext/dt/fx/sc_context.hh
+++ b/src/systemc/ext/dt/fx/sc_context.hh
@@ -62,6 +62,7 @@
#include "../../core/sc_process_handle.hh"
#include "../../utils/sc_report_handler.hh"
+#include "messages.hh"
namespace sc_dt
{
@@ -245,7 +246,7 @@ sc_context<T>::begin()
m_old_value_ptr = m_def_value_ptr;
m_def_value_ptr = &m_value;
} else {
- SC_REPORT_ERROR("context begin failed", 0);
+ SC_REPORT_ERROR(sc_core::SC_ID_CONTEXT_BEGIN_FAILED_, 0);
}
}
@@ -257,7 +258,7 @@ sc_context<T>::end()
m_def_value_ptr = m_old_value_ptr;
m_old_value_ptr = 0;
} else {
- SC_REPORT_ERROR("context end failed", 0);
+ SC_REPORT_ERROR(sc_core::SC_ID_CONTEXT_END_FAILED_, 0);
}
}
diff --git a/src/systemc/ext/dt/fx/sc_fxdefs.hh b/src/systemc/ext/dt/fx/sc_fxdefs.hh
index f31867ebc..f563a78ab 100644
--- a/src/systemc/ext/dt/fx/sc_fxdefs.hh
+++ b/src/systemc/ext/dt/fx/sc_fxdefs.hh
@@ -50,6 +50,7 @@
#include "../../utils/messages.hh"
#include "../../utils/sc_report_handler.hh"
#include "../int/sc_nbutils.hh"
+#include "messages.hh"
#if ULONG_MAX > 0xffffffffUL
# define SC_LONG_64 1
@@ -249,21 +250,20 @@ const int SC_DEFAULT_MAX_WL_ = SC_BUILTIN_MAX_WL_;
#define SC_ERROR_IF_(cnd,id) SC_ERROR_IF_IMPL_(cnd, id, 0)
-#define SC_CHECK_WL_(wl) SC_ERROR_IF_((wl) <= 0, \
- "(E300) total wordlength <= 0 is not valid")
+#define SC_CHECK_WL_(wl) SC_ERROR_IF_((wl) <= 0, sc_core::SC_ID_INVALID_WL_)
#define SC_CHECK_N_BITS_(n_bits) \
- SC_ERROR_IF_((n_bits) < 0, "number of bits < 0 is not valid")
+ SC_ERROR_IF_((n_bits) < 0, sc_core::SC_ID_INVALID_N_BITS_)
#define SC_CHECK_DIV_WL_(div_wl) \
- SC_ERROR_IF_((div_wl) <= 0, "division wordlength <= 0 is not valid")
+ SC_ERROR_IF_((div_wl) <= 0, sc_core::SC_ID_INVALID_DIV_WL_)
#define SC_CHECK_CTE_WL_(cte_wl) \
- SC_ERROR_IF_((cte_wl) <= 0, "constant wordlength <= 0 is not valid")
+ SC_ERROR_IF_((cte_wl) <= 0, sc_core::SC_ID_INVALID_CTE_WL_)
#define SC_CHECK_MAX_WL_(max_wl) \
SC_ERROR_IF_((max_wl) <= 0 && (max_wl) != -1, \
- "maximum wordlength <= 0 and != -1 is not valid")
+ sc_core::SC_ID_INVALID_MAX_WL_)
// ----------------------------------------------------------------------------
diff --git a/src/systemc/ext/dt/fx/sc_fxnum.hh b/src/systemc/ext/dt/fx/sc_fxnum.hh
index 8a0b7f612..24006f7a3 100644
--- a/src/systemc/ext/dt/fx/sc_fxnum.hh
+++ b/src/systemc/ext/dt/fx/sc_fxnum.hh
@@ -62,6 +62,7 @@
#include <iostream>
#include "../bit/sc_lv_base.hh"
+#include "messages.hh"
#include "sc_fxnum_observer.hh"
#include "sc_fxval.hh"
#include "scfx_params.hh"
@@ -2174,7 +2175,7 @@ sc_fxnum::observer() const
inline void
sc_fxnum::cast()
{
- SC_ERROR_IF_(!m_rep->is_normal(), "invalid fixed-point value");
+ SC_ERROR_IF_(!m_rep->is_normal(), sc_core::SC_ID_INVALID_FX_VALUE_);
if (m_params.cast_switch() == SC_ON)
m_rep->cast(m_params, m_q_flag, m_o_flag);
@@ -2818,7 +2819,7 @@ sc_fxnum::operator -- ()
inline const sc_fxnum_bitref
sc_fxnum::operator [] (int i) const
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_bitref(const_cast<sc_fxnum &>(*this),
i - m_params.fwl());
}
@@ -2826,14 +2827,14 @@ sc_fxnum::operator [] (int i) const
inline sc_fxnum_bitref
sc_fxnum::operator [] (int i)
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_bitref(*this, i - m_params.fwl());
}
inline const sc_fxnum_bitref
sc_fxnum::bit(int i) const
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_bitref(const_cast<sc_fxnum &>(*this),
i - m_params.fwl());
}
@@ -2841,7 +2842,7 @@ sc_fxnum::bit(int i) const
inline sc_fxnum_bitref
sc_fxnum::bit(int i)
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_bitref(*this, i - m_params.fwl());
}
@@ -2850,8 +2851,8 @@ sc_fxnum::bit(int i)
inline const sc_fxnum_subref
sc_fxnum::operator () (int i, int j) const
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
- SC_ERROR_IF_(j < 0 || j >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
+ SC_ERROR_IF_(j < 0 || j >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_subref(const_cast<sc_fxnum &>(*this),
i - m_params.fwl(), j - m_params.fwl());
@@ -2860,8 +2861,8 @@ sc_fxnum::operator () (int i, int j) const
inline sc_fxnum_subref
sc_fxnum::operator () (int i, int j)
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
- SC_ERROR_IF_(j < 0 || j >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
+ SC_ERROR_IF_(j < 0 || j >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_subref(*this, i - m_params.fwl(), j - m_params.fwl());
}
@@ -2869,8 +2870,8 @@ sc_fxnum::operator () (int i, int j)
inline const sc_fxnum_subref
sc_fxnum::range(int i, int j) const
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
- SC_ERROR_IF_(j < 0 || j >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
+ SC_ERROR_IF_(j < 0 || j >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_subref(const_cast<sc_fxnum &>(*this),
i - m_params.fwl(), j - m_params.fwl());
@@ -2879,8 +2880,8 @@ sc_fxnum::range(int i, int j) const
inline sc_fxnum_subref
sc_fxnum::range(int i, int j)
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
- SC_ERROR_IF_(j < 0 || j >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
+ SC_ERROR_IF_(j < 0 || j >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_subref(*this, i - m_params.fwl(), j - m_params.fwl());
}
@@ -3773,7 +3774,7 @@ sc_fxnum_fast::operator -- ()
inline const sc_fxnum_fast_bitref
sc_fxnum_fast::operator [] (int i) const
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_fast_bitref(const_cast<sc_fxnum_fast &>(*this),
i - m_params.fwl());
}
@@ -3781,14 +3782,14 @@ sc_fxnum_fast::operator [] (int i) const
inline sc_fxnum_fast_bitref
sc_fxnum_fast::operator [] (int i)
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_fast_bitref(*this, i - m_params.fwl());
}
inline const sc_fxnum_fast_bitref
sc_fxnum_fast::bit(int i) const
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_fast_bitref(const_cast<sc_fxnum_fast &>(*this),
i - m_params.fwl());
}
@@ -3796,7 +3797,7 @@ sc_fxnum_fast::bit(int i) const
inline sc_fxnum_fast_bitref
sc_fxnum_fast::bit(int i)
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_fast_bitref(*this, i - m_params.fwl());
}
@@ -3804,8 +3805,8 @@ sc_fxnum_fast::bit(int i)
inline const sc_fxnum_fast_subref
sc_fxnum_fast::operator () (int i, int j) const
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
- SC_ERROR_IF_(j < 0 || j >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
+ SC_ERROR_IF_(j < 0 || j >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_fast_subref(const_cast<sc_fxnum_fast &>(*this),
i - m_params.fwl(), j - m_params.fwl());
@@ -3814,8 +3815,8 @@ sc_fxnum_fast::operator () (int i, int j) const
inline sc_fxnum_fast_subref
sc_fxnum_fast::operator () (int i, int j)
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
- SC_ERROR_IF_(j < 0 || j >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
+ SC_ERROR_IF_(j < 0 || j >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_fast_subref(*this, i - m_params.fwl(), j - m_params.fwl());
}
@@ -3823,8 +3824,8 @@ sc_fxnum_fast::operator () (int i, int j)
inline const sc_fxnum_fast_subref
sc_fxnum_fast::range(int i, int j) const
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
- SC_ERROR_IF_(j < 0 || j >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
+ SC_ERROR_IF_(j < 0 || j >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_fast_subref(const_cast<sc_fxnum_fast &>(*this),
i - m_params.fwl(), j - m_params.fwl());
@@ -3833,8 +3834,8 @@ sc_fxnum_fast::range(int i, int j) const
inline sc_fxnum_fast_subref
sc_fxnum_fast::range(int i, int j)
{
- SC_ERROR_IF_(i < 0 || i >= m_params.wl(), "index out of range");
- SC_ERROR_IF_(j < 0 || j >= m_params.wl(), "index out of range");
+ SC_ERROR_IF_(i < 0 || i >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
+ SC_ERROR_IF_(j < 0 || j >= m_params.wl(), sc_core::SC_ID_OUT_OF_RANGE_);
return sc_fxnum_fast_subref(*this, i - m_params.fwl(), j - m_params.fwl());
}
diff --git a/src/systemc/ext/dt/fx/scfx_other_defs.hh b/src/systemc/ext/dt/fx/scfx_other_defs.hh
index 71eec9ff8..7af2181cd 100644
--- a/src/systemc/ext/dt/fx/scfx_other_defs.hh
+++ b/src/systemc/ext/dt/fx/scfx_other_defs.hh
@@ -51,6 +51,7 @@
#include "../int/sc_signed.hh"
#include "../int/sc_uint_base.hh"
#include "../int/sc_unsigned.hh"
+#include "messages.hh"
namespace sc_dt
{
@@ -64,7 +65,7 @@ inline const sc_signed &
sc_signed::operator = (const sc_fxval &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_signed::operator = ( const sc_fxval& )");
return *this;
}
@@ -78,7 +79,7 @@ inline const sc_signed &
sc_signed::operator = (const sc_fxval_fast &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_signed::operator = ( const sc_fxval_fast& )");
return *this;
}
@@ -93,7 +94,7 @@ inline const sc_signed &
sc_signed::operator = (const sc_fxnum &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_signed::operator = ( const sc_fxnum& )");
return *this;
}
@@ -108,7 +109,7 @@ inline const sc_signed &
sc_signed::operator = (const sc_fxnum_fast &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_signed::operator = ( const sc_fxnum_fast& )");
return *this;
}
@@ -130,7 +131,7 @@ inline const sc_unsigned &
sc_unsigned::operator = (const sc_fxval &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_unsigned::operator = ( const sc_fxval& )");
return *this;
}
@@ -145,7 +146,7 @@ inline const sc_unsigned &
sc_unsigned::operator = (const sc_fxval_fast &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_unsigned::operator = ( const sc_fxval_fast& )");
return *this;
}
@@ -160,7 +161,7 @@ inline const sc_unsigned &
sc_unsigned::operator = (const sc_fxnum &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_unsigned::operator = ( const sc_fxnum& )" );
return *this;
}
@@ -175,7 +176,7 @@ inline const sc_unsigned &
sc_unsigned::operator = (const sc_fxnum_fast &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_unsigned::operator = ( const sc_fxnum_fast& )" );
return *this;
}
@@ -197,7 +198,7 @@ inline sc_int_base &
sc_int_base::operator = (const sc_fxval &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_int_base::operator = ( const sc_fxval& )");
return *this;
}
@@ -212,7 +213,7 @@ inline sc_int_base &
sc_int_base::operator = (const sc_fxval_fast &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_int_base::operator = ( const sc_fxval_fast& )");
return *this;
}
@@ -227,7 +228,7 @@ inline sc_int_base &
sc_int_base::operator = (const sc_fxnum &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_int_base::operator = ( const sc_fxnum& )");
return *this;
}
@@ -242,7 +243,7 @@ inline sc_int_base &
sc_int_base::operator = (const sc_fxnum_fast &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_int_base::operator = ( const sc_fxnum_fast& )");
return *this;
}
@@ -263,7 +264,7 @@ inline sc_uint_base &
sc_uint_base::operator = (const sc_fxval &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_uint_base::operator = ( const sc_fxval& )");
return *this;
}
@@ -278,7 +279,7 @@ inline sc_uint_base &
sc_uint_base::operator = (const sc_fxval_fast &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_uint_base::operator = ( const sc_fxval_fast& )");
return *this;
}
@@ -293,7 +294,7 @@ inline sc_uint_base &
sc_uint_base::operator = (const sc_fxnum &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_uint_base::operator = ( const sc_fxnum& )");
return *this;
}
@@ -308,7 +309,7 @@ inline sc_uint_base &
sc_uint_base::operator = (const sc_fxnum_fast &v)
{
if (!v.is_normal()) { /* also triggers OBSERVER_READ call */
- SC_REPORT_ERROR("invalid fixed-point value",
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_FX_VALUE_,
"sc_uint_base::operator = ( const sc_fxnum_fast& )");
return *this;
}
diff --git a/src/systemc/ext/dt/fx/scfx_params.hh b/src/systemc/ext/dt/fx/scfx_params.hh
index dd5c9b695..eabc9a05d 100644
--- a/src/systemc/ext/dt/fx/scfx_params.hh
+++ b/src/systemc/ext/dt/fx/scfx_params.hh
@@ -47,6 +47,7 @@
#ifndef __SYSTEMC_EXT_DT_FX_SCFX_PARAMS_HH__
#define __SYSTEMC_EXT_DT_FX_SCFX_PARAMS_HH__
+#include "messages.hh"
#include "sc_fxcast_switch.hh"
#include "sc_fxtype_params.hh"
@@ -101,8 +102,8 @@ inline scfx_params::scfx_params(const sc_fxtype_params &type_params_,
m_type_params(type_params_), m_enc(enc_), m_cast_switch(cast_sw)
{
if (m_enc == SC_US_ && m_type_params.o_mode() == SC_WRAP_SM) {
- SC_REPORT_ERROR("invalid overflow mode",
- "SC_WRAP_SM not defined for unsigned numbers");
+ SC_REPORT_ERROR(sc_core::SC_ID_INVALID_O_MODE_,
+ sc_core::SC_ID_WRAP_SM_NOT_DEFINED_);
// may continue, if suppressed
}
}