/*
- * 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
#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
/** 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.
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.
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