Merge zizzer:/z/m5/Bitkeeper/newmem
authorRon Dreslinski <rdreslin@umich.edu>
Tue, 10 Oct 2006 05:57:57 +0000 (01:57 -0400)
committerRon Dreslinski <rdreslin@umich.edu>
Tue, 10 Oct 2006 05:57:57 +0000 (01:57 -0400)
into  zazzer.eecs.umich.edu:/z/rdreslin/m5bk/newmemcleanest

src/mem/packet.hh:
    Hand merge code

--HG--
extra : convert_revision : d659418f24f4f4bf9867fec8573a5d227c0dfcea

1  2 
src/mem/cache/base_cache.cc
src/mem/packet.hh

index c56f48eeb8b5d2e01cd1dce39907f0b9ad9651a9,c4d42c0a4178777e14f8cb773238751980415a49..b0be1c53035c0878183561d6137cf47cdbe917ca
@@@ -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);
index 4d57aee75c4bdd91e09242cc7b53fc4991cc721a,8d9f8ee6060cc9df5844357dea9d41beed01924b..426f1442126b509ca1048812b32f5f13fc2638eb
@@@ -58,6 -58,10 +58,8 @@@ typedef std::list<PacketPtr> 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. */
      {
          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