From 1b46c175fcab7af3c24bf11e32118cb7c2257b2f Mon Sep 17 00:00:00 2001 From: Abdul Mutaal Ahmad Date: Fri, 15 Apr 2016 09:55:26 -0500 Subject: [PATCH] misc: Bugfix in TLM memInhibit Command memInhibitAsserted() has been removed from packet.hh. This change has been reflected in TLM based SystemC memory. This patch also adds a number of panics asserting the SystemC memory only sees requests it expects. Committed by Jason Lowe-Power --- util/tlm/sc_port.cc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/util/tlm/sc_port.cc b/util/tlm/sc_port.cc index 04efce87b..ab94f73ca 100644 --- a/util/tlm/sc_port.cc +++ b/util/tlm/sc_port.cc @@ -91,6 +91,13 @@ sc_transactor::recvAtomic(PacketPtr packet) CAUGHT_UP; SC_REPORT_INFO("transactor", "recvAtomic hasn't been tested much"); + 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"); + + sc_core::sc_time delay = sc_core::SC_ZERO_TIME; @@ -172,15 +179,17 @@ sc_transactor::recvTimingReq(PacketPtr packet) { CAUGHT_UP; + 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); - // simply drop inhibited packets and clean evictions - if (packet->memInhibitAsserted() || - packet->cmd == MemCmd::CleanEvict) - return true; - /* Remember if a request comes in while we're blocked so that a retry * can be sent to gem5 */ if (blockingRequest) {