summaryrefslogtreecommitdiff
path: root/src/systemc/dt
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-09-05 00:06:26 -0700
committerGabe Black <gabeblack@google.com>2018-10-03 00:55:01 +0000
commite38594f758d0e01db763724d73cae19c02d65ca0 (patch)
tree2f24b75b8b87ed126e14c7361a2835d67fd0c740 /src/systemc/dt
parent1b3ff4d6a8a4ba10a4754ceb316712bab06bc0b2 (diff)
downloadgem5-e38594f758d0e01db763724d73cae19c02d65ca0.tar.xz
systemc: "Fix" some error message formatting.
These changes make the output match what Accellera outputs so that the tests will pass. Change-Id: I1260cec35fa39586fbef39047b9da4ff3c03b3ed Reviewed-on: https://gem5-review.googlesource.com/c/12592 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/dt')
-rw-r--r--src/systemc/dt/bit/sc_bit.cc8
-rw-r--r--src/systemc/dt/bit/sc_logic.cc10
-rw-r--r--src/systemc/dt/int/sc_nbutils.cc2
-rw-r--r--src/systemc/dt/int/sc_signed.cc2
-rw-r--r--src/systemc/dt/int/sc_unsigned.cc2
5 files changed, 13 insertions, 11 deletions
diff --git a/src/systemc/dt/bit/sc_bit.cc b/src/systemc/dt/bit/sc_bit.cc
index 7572a0e56..8382c880c 100644
--- a/src/systemc/dt/bit/sc_bit.cc
+++ b/src/systemc/dt/bit/sc_bit.cc
@@ -77,8 +77,8 @@ void
sc_bit::invalid_value(char c)
{
std::stringstream msg;
- msg << "sc_bit('" << c << "')";
- SC_REPORT_ERROR("value is not valid", msg.str().c_str());
+ msg << "sc_bit( '" << c << "' )";
+ SC_REPORT_ERROR("(E204) value is not valid", msg.str().c_str());
sc_core::sc_abort(); // can't recover from here
}
@@ -86,8 +86,8 @@ void
sc_bit::invalid_value(int i)
{
std::stringstream msg;
- msg << "sc_bit(" << i << ")";
- SC_REPORT_ERROR("value is not valid", msg.str().c_str());
+ msg << "sc_bit( " << i << " )";
+ SC_REPORT_ERROR("(E204) value is not valid", msg.str().c_str());
sc_core::sc_abort(); // can't recover from here
}
diff --git a/src/systemc/dt/bit/sc_logic.cc b/src/systemc/dt/bit/sc_logic.cc
index 81663fcee..4943d3df1 100644
--- a/src/systemc/dt/bit/sc_logic.cc
+++ b/src/systemc/dt/bit/sc_logic.cc
@@ -72,7 +72,7 @@ sc_logic::invalid_value(char c)
{
std::stringstream msg;
msg << "sc_logic('" << c << "')";
- SC_REPORT_ERROR("value is not valid", msg.str().c_str());
+ SC_REPORT_ERROR("(E204) value is not valid", msg.str().c_str());
}
void
@@ -80,7 +80,7 @@ sc_logic::invalid_value(int i)
{
std::stringstream msg;
msg << "sc_logic(" << i << ")";
- SC_REPORT_ERROR("value is not valid", msg.str().c_str());
+ SC_REPORT_ERROR("(E204) value is not valid", msg.str().c_str());
}
@@ -88,9 +88,11 @@ void
sc_logic::invalid_01() const
{
if ((int)m_val == Log_Z) {
- SC_REPORT_WARNING("sc_logic value 'Z' cannot be converted to bool", 0);
+ SC_REPORT_WARNING(
+ "(W211) sc_logic value 'Z' cannot be converted to bool", 0);
} else {
- SC_REPORT_WARNING("sc_logic value 'X' cannot be converted to bool", 0);
+ SC_REPORT_WARNING(
+ "(W212) sc_logic value 'X' cannot be converted to bool", 0);
}
}
diff --git a/src/systemc/dt/int/sc_nbutils.cc b/src/systemc/dt/int/sc_nbutils.cc
index df7cc554d..5d2c50fc9 100644
--- a/src/systemc/dt/int/sc_nbutils.cc
+++ b/src/systemc/dt/int/sc_nbutils.cc
@@ -89,7 +89,7 @@ is_valid_base(sc_numrep base)
std::stringstream msg;
msg << "is_valid_base( sc_numrep base ) : base = " << base <<
" is not valid";
- SC_REPORT_ERROR("value is not valid", msg.str().c_str() );
+ SC_REPORT_ERROR("(E204) value is not valid", msg.str().c_str() );
}
}
diff --git a/src/systemc/dt/int/sc_signed.cc b/src/systemc/dt/int/sc_signed.cc
index 1cb71123b..74660b371 100644
--- a/src/systemc/dt/int/sc_signed.cc
+++ b/src/systemc/dt/int/sc_signed.cc
@@ -132,7 +132,7 @@ sc_signed::invalid_range(int l, int r) const
{
std::stringstream msg;
msg << "sc_bigint part selection: left = " <<
- l << ", right = " << r << "\n"
+ l << ", right = " << r << " \n"
" violates either (" << (nbits-1) << " >= left >= 0) or "
"(" << (nbits-1) << " >= right >= 0)";
SC_REPORT_ERROR("(E5) out of bounds", msg.str().c_str());
diff --git a/src/systemc/dt/int/sc_unsigned.cc b/src/systemc/dt/int/sc_unsigned.cc
index aca49bac6..ffea95a68 100644
--- a/src/systemc/dt/int/sc_unsigned.cc
+++ b/src/systemc/dt/int/sc_unsigned.cc
@@ -140,7 +140,7 @@ sc_unsigned::invalid_range(int l, int r) const
{
std::stringstream msg;
msg << "sc_biguint part selection: left = " <<
- l << ", right = " << r << "\n"
+ l << ", right = " << r << " \n"
" violates either (" << (nbits - 2) << " >= left >= 0) or "
"(" << (nbits-2) << " >= right >= 0)";
SC_REPORT_ERROR("(E5) out of bounds", msg.str().c_str());