Jason Lowe-Power has submitted this change and it was merged. ( https://gem5-review.googlesource.com/8941 )

Change subject: ruby: Make sure addresses print in hex
......................................................................

ruby: Make sure addresses print in hex

Added fix in the invalid transition panic and various places in ruby
random tester.

Change-Id: I879264da58369faf7de49d1a28b2da1cb935ef0a
Signed-off-by: Jason Lowe-Power <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/8941
Reviewed-by: Nikos Nikoleris <[email protected]>
---
M src/cpu/testers/rubytest/Check.cc
M src/mem/slicc/symbols/StateMachine.py
2 files changed, 9 insertions(+), 9 deletions(-)

Approvals:
  Nikos Nikoleris: Looks good to me, approved
  Jason Lowe-Power: Looks good to me, approved



diff --git a/src/cpu/testers/rubytest/Check.cc b/src/cpu/testers/rubytest/Check.cc
index e68196c..2ce79e7 100644
--- a/src/cpu/testers/rubytest/Check.cc
+++ b/src/cpu/testers/rubytest/Check.cc
@@ -209,7 +209,7 @@
         DPRINTF(RubyTest, "status before action update: %s\n",
                 (TesterStatus_to_string(m_status)).c_str());
         m_status = TesterStatus_Action_Pending;
-        DPRINTF(RubyTest, "Check %s, State=Action_Pending\n", m_address);
+        DPRINTF(RubyTest, "Check %#x, State=Action_Pending\n", m_address);
     } else {
         // If the packet did not issue, must delete
         // Note: No need to delete the data, the packet destructor
@@ -263,7 +263,7 @@
         DPRINTF(RubyTest, "status before check update: %s\n",
                 TesterStatus_to_string(m_status).c_str());
         m_status = TesterStatus_Check_Pending;
-        DPRINTF(RubyTest, "Check %s, State=Check_Pending\n", m_address);
+        DPRINTF(RubyTest, "Check %#x, State=Check_Pending\n", m_address);
     } else {
         // If the packet did not issue, must delete
         // Note: No need to delete the data, the packet destructor
@@ -301,10 +301,10 @@
         m_store_count++;
         if (m_store_count == CHECK_SIZE) {
             m_status = TesterStatus_Ready;
-            DPRINTF(RubyTest, "Check %s, State=Ready\n", m_address);
+            DPRINTF(RubyTest, "Check %#x, State=Ready\n", m_address);
         } else {
             m_status = TesterStatus_Idle;
-            DPRINTF(RubyTest, "Check %s, State=Idle store_count: %d\n",
+            DPRINTF(RubyTest, "Check %#x, State=Idle store_count: %d\n",
                     m_address, m_store_count);
         }
         DPRINTF(RubyTest, "Action callback return data now %d\n",
@@ -314,7 +314,7 @@
         // Perform load/check
         for (int byte_number=0; byte_number<CHECK_SIZE; byte_number++) {
if (uint8_t(m_value + byte_number) != data->getByte(byte_number)) { - panic("Action/check failure: proc: %d address: %s data: %s " + panic("Action/check failure: proc: %d address: %#x data: %s "
                       "byte_number: %d m_value+byte_number: %d byte: %d %s"
                       "Time: %d\n",
                       proc, address, data, byte_number,
@@ -329,7 +329,7 @@
         m_tester_ptr->incrementCheckCompletions();

         m_status = TesterStatus_Idle;
-        DPRINTF(RubyTest, "Check %s, State=Idle\n", m_address);
+        DPRINTF(RubyTest, "Check %#x, State=Idle\n", m_address);
         pickValue();

     } else {
@@ -349,7 +349,7 @@
assert(m_status == TesterStatus_Idle || m_status == TesterStatus_Ready);
     m_status = TesterStatus_Idle;
     m_address = address;
-    DPRINTF(RubyTest, "Check %s, State=Idle\n", m_address);
+    DPRINTF(RubyTest, "Check %#x, State=Idle\n", m_address);
     m_store_count = 0;
 }

@@ -367,7 +367,7 @@
assert(m_status == TesterStatus_Idle || m_status == TesterStatus_Ready);
     m_status = TesterStatus_Idle;
     m_initiatingNode = (random_mt.random(0, m_num_writers - 1));
-    DPRINTF(RubyTest, "Check %s, State=Idle, picked initiating node %d\n",
+    DPRINTF(RubyTest, "Check %#x, State=Idle, picked initiating node %d\n",
             m_address, m_initiatingNode);
     m_store_count = 0;
 }
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index 3f4e43a..e63f6fc 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -1400,7 +1400,7 @@
         code('''
       default:
         panic("Invalid transition\\n"
-              "%s time: %d addr: %s event: %s state: %s\\n",
+              "%s time: %d addr: %#x event: %s state: %s\\n",
               name(), curCycle(), addr, event, state);
     }


--
To view, visit https://gem5-review.googlesource.com/8941
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: I879264da58369faf7de49d1a28b2da1cb935ef0a
Gerrit-Change-Number: 8941
Gerrit-PatchSet: 3
Gerrit-Owner: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Bradford Beckmann <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to