systemc: gem5_to_tlm: treat non-rw as ignorable command
authorEarl Ou <shunhsingou@google.com>
Tue, 4 Feb 2020 03:30:59 +0000 (11:30 +0800)
committerEarl Ou <shunhsingou@google.com>
Mon, 10 Feb 2020 02:44:41 +0000 (02:44 +0000)
Treat all kinds of non read/write requests in gem5_to_tlm bridge as ignorable
commands.

Change-Id: I5236e1b31f9a57470dc666d01cbe96249f48ed5d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25163
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/systemc/tlm_bridge/gem5_to_tlm.cc

index f6ea811bdb0f46e694b5a25fbca5380707b5f5af..8c11c9721e6a05232ff2a580c2f98a745c5bb77b 100644 (file)
@@ -105,13 +105,10 @@ packet2payload(PacketPtr packet)
         trans->set_command(tlm::TLM_IGNORE_COMMAND);
     } else if (packet->isRead()) {
         trans->set_command(tlm::TLM_READ_COMMAND);
-    } else if (packet->isInvalidate()) {
-        /* Do nothing */
-        trans->set_command(tlm::TLM_IGNORE_COMMAND);
     } else if (packet->isWrite()) {
         trans->set_command(tlm::TLM_WRITE_COMMAND);
     } else {
-        SC_REPORT_FATAL("Gem5ToTlmBridge", "No R/W packet");
+        trans->set_command(tlm::TLM_IGNORE_COMMAND);
     }
 
     // Attach the packet pointer to the TLM transaction to keep track.
@@ -284,10 +281,6 @@ Gem5ToTlmBridge<BITWIDTH>::recvTimingReq(PacketPtr packet)
     panic_if(packet->cacheResponding(),
              "Should not see packets where cache is responding");
 
-    panic_if(!(packet->isRead() || packet->isWrite()),
-             "Should only see read and writes at TLM memory\n");
-
-
     // We should never get a second request after noting that a retry is
     // required.
     sc_assert(!needToSendRequestRetry);