Gabe Black has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/13320 )

Change subject: systemc: Make suppress_id work like the test expects.
......................................................................

systemc: Make suppress_id work like the test expects.

This is in contrast to how Accellera actually implements it, implying
they would fail their own test.

The specific difference is that suppress_id should only suppress
SC_INFO and SC_WARNING, not all severity levels like the Accellera
implementation will do.

Change-Id: I34f0d2d5912548963433a785cfa6ef88ad818042
Reviewed-on: https://gem5-review.googlesource.com/c/13320
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/systemc/utils/sc_report.cc
1 file changed, 16 insertions(+), 5 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved



diff --git a/src/systemc/utils/sc_report.cc b/src/systemc/utils/sc_report.cc
index 83e0662..e76dfcb 100644
--- a/src/systemc/utils/sc_report.cc
+++ b/src/systemc/utils/sc_report.cc
@@ -102,7 +102,11 @@
     if (it == sc_gem5::reportIdToMsgMap.end())
         return false;

-    return sc_gem5::reportMsgInfoMap[it->second].actions == SC_DO_NOTHING;
+    auto &msgInfo = sc_gem5::reportMsgInfoMap[it->second];
+
+    return (msgInfo.actions == SC_DO_NOTHING ||
+            (msgInfo.sevActions[SC_INFO] == SC_DO_NOTHING &&
+             msgInfo.sevActions[SC_WARNING] == SC_DO_NOTHING));
 }

 void
@@ -139,10 +143,17 @@
     if (it == sc_gem5::reportIdToMsgMap.end())
         return;

-    if (suppress)
-        sc_gem5::reportMsgInfoMap[it->second].actions = SC_DO_NOTHING;
-    else
-        sc_gem5::reportMsgInfoMap[it->second].actions = SC_UNSPECIFIED;
+    if (suppress) {
+        sc_gem5::reportMsgInfoMap[it->second].
+            sevActions[SC_INFO] = SC_DO_NOTHING;
+        sc_gem5::reportMsgInfoMap[it->second].
+            sevActions[SC_WARNING] = SC_DO_NOTHING;
+    } else {
+        sc_gem5::reportMsgInfoMap[it->second].
+            sevActions[SC_INFO] = SC_UNSPECIFIED;
+        sc_gem5::reportMsgInfoMap[it->second].
+            sevActions[SC_WARNING] = SC_UNSPECIFIED;
+    }
 }

 void

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13320
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I34f0d2d5912548963433a785cfa6ef88ad818042
Gerrit-Change-Number: 13320
Gerrit-PatchSet: 4
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Matthias Jung <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to