From: Ron Dreslinski Date: Tue, 10 Oct 2006 05:57:57 +0000 (-0400) Subject: Merge zizzer:/z/m5/Bitkeeper/newmem X-Git-Tag: m5_2.0_beta2~104^2~22^2~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a0472af008bd13d8a4850ef67b0ef08d37cfb8f8;p=gem5.git Merge zizzer:/z/m5/Bitkeeper/newmem into zazzer.eecs.umich.edu:/z/rdreslin/m5bk/newmemcleanest src/mem/packet.hh: Hand merge code --HG-- extra : convert_revision : d659418f24f4f4bf9867fec8573a5d227c0dfcea --- a0472af008bd13d8a4850ef67b0ef08d37cfb8f8 diff --cc src/mem/cache/base_cache.cc index c56f48eeb,c4d42c0a4..b0be1c530 --- a/src/mem/cache/base_cache.cc +++ b/src/mem/cache/base_cache.cc @@@ -104,9 -104,12 +104,11 @@@ BaseCache::CachePort::recvRetry( if (result) drainList.pop_front(); } + if (!result) return; } - - if (!isCpuSide) + else if (!isCpuSide) { + if (!cache->doMasterRequest()) return; pkt = cache->getPacket(); MSHR* mshr = (MSHR*)pkt->senderState; bool success = sendTiming(pkt); diff --cc src/mem/packet.hh index 4d57aee75,8d9f8ee60..426f14421 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@@ -58,6 -58,10 +58,8 @@@ typedef std::list PacketList #define NO_ALLOCATE 1 << 5 #define SNOOP_COMMIT 1 << 6 -//For statistics we need max number of commands, hard code it at + //for now. @todo fix later -#define NUM_MEM_CMDS 1 << 10 - ++#define NUM_MEM_CMDS 1 << 11 /** * A Packet is used to encapsulate a transfer between two objects in * the memory system (e.g., the L1 and L2 cache). (In contrast, a @@@ -173,12 -175,8 +175,12 @@@ class Packe NeedsResponse = 1 << 6, IsSWPrefetch = 1 << 7, IsHWPrefetch = 1 << 8, - HasData = 1 << 9 - IsUpgrade = 1 << 9 ++ IsUpgrade = 1 << 9, ++ HasData = 1 << 10 }; - +//For statistics we need max number of commands, hard code it at +//20 for now. @todo fix later +#define NUM_MEM_CMDS 1 << 10 public: /** List of all commands associated with a packet. */ @@@ -186,23 -184,20 +188,23 @@@ { InvalidCmd = 0, ReadReq = IsRead | IsRequest | NeedsResponse, - WriteReq = IsWrite | IsRequest | NeedsResponse, - WriteReqNoAck = IsWrite | IsRequest, - ReadResp = IsRead | IsResponse | NeedsResponse, + WriteReq = IsWrite | IsRequest | NeedsResponse | HasData, + WriteReqNoAck = IsWrite | IsRequest | HasData, + ReadResp = IsRead | IsResponse | NeedsResponse | HasData, WriteResp = IsWrite | IsResponse | NeedsResponse, - Writeback = IsWrite | IsRequest, + Writeback = IsWrite | IsRequest | HasData, SoftPFReq = IsRead | IsRequest | IsSWPrefetch | NeedsResponse, HardPFReq = IsRead | IsRequest | IsHWPrefetch | NeedsResponse, - SoftPFResp = IsRead | IsResponse | IsSWPrefetch | NeedsResponse, - HardPFResp = IsRead | IsResponse | IsHWPrefetch | NeedsResponse, + SoftPFResp = IsRead | IsResponse | IsSWPrefetch + | NeedsResponse | HasData, + HardPFResp = IsRead | IsResponse | IsHWPrefetch + | NeedsResponse | HasData, InvalidateReq = IsInvalidate | IsRequest, - WriteInvalidateReq = IsWrite | IsInvalidate | IsRequest, + WriteInvalidateReq = IsWrite | IsInvalidate | IsRequest | HasData, - UpgradeReq = IsInvalidate | IsRequest, + UpgradeReq = IsInvalidate | IsRequest | IsUpgrade, ReadExReq = IsRead | IsInvalidate | IsRequest | NeedsResponse, - ReadExResp = IsRead | IsInvalidate | IsResponse | NeedsResponse + ReadExResp = IsRead | IsInvalidate | IsResponse + | NeedsResponse | HasData }; /** Return the string name of the cmd field (for debugging and