mem: Do not include snoop-filter latency in crossbar occupancy
[gem5.git] / src / mem / port_proxy.hh
index 4600cd40713e53b17383572f5f497a3f62810da7..e9ddeecbf536ccb1c47df44b13a2568cc6f3f5ad 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2012 ARM Limited
+ * Copyright (c) 2011-2013 ARM Limited
  * All rights reserved
  *
  * The license below extends only to copyright in the software and shall
@@ -60,7 +60,7 @@
 #define __MEM_PORT_PROXY_HH__
 
 #include "config/the_isa.hh"
-#if THE_ISA != NO_ISA
+#if THE_ISA != NULL_ISA
     #include "arch/isa_traits.hh"
 #endif
 
@@ -88,23 +88,23 @@ class PortProxy
     /** The actual physical port used by this proxy. */
     MasterPort &_port;
 
-    void blobHelper(Addr addr, uint8_t *p, int size, MemCmd cmd) const;
+    /** Granularity of any transactions issued through this proxy. */
+    const unsigned int _cacheLineSize;
 
   public:
-    PortProxy(MasterPort &port) : _port(port) { }
+    PortProxy(MasterPort &port, unsigned int cacheLineSize) :
+        _port(port), _cacheLineSize(cacheLineSize) { }
     virtual ~PortProxy() { }
 
     /**
      * Read size bytes memory at address and store in p.
      */
-    virtual void readBlob(Addr addr, uint8_t* p, int size) const
-    { blobHelper(addr, p, size, MemCmd::ReadReq); }
+    virtual void readBlob(Addr addr, uint8_t* p, int size) const;
 
     /**
      * Write size bytes from p to address.
      */
-    virtual void writeBlob(Addr addr, uint8_t* p, int size) const
-    { blobHelper(addr, p, size, MemCmd::WriteReq); }
+    virtual void writeBlob(Addr addr, const uint8_t* p, int size) const;
 
     /**
      * Fill size bytes starting at addr with byte value val.
@@ -123,7 +123,7 @@ class PortProxy
     template <typename T>
     void write(Addr address, T data) const;
 
-#if THE_ISA != NO_ISA
+#if THE_ISA != NULL_ISA
     /**
      * Read sizeof(T) bytes from address and return as object T.
      * Performs Guest to Host endianness transform.
@@ -157,7 +157,7 @@ PortProxy::write(Addr address, T data) const
     writeBlob(address, (uint8_t*)&data, sizeof(T));
 }
 
-#if THE_ISA != NO_ISA
+#if THE_ISA != NULL_ISA
 template <typename T>
 T
 PortProxy::readGtoH(Addr address) const