Go to the documentation of this file.
57 #ifndef __MEM_PORT_PROXY_HH__
58 #define __MEM_PORT_PROXY_HH__
96 panic(
"Port proxies should never receive snoops.");
118 void *
p,
int size)
const;
124 const void *
p,
int size)
const;
130 uint8_t
v,
int size)
const;
180 fatal(
"readBlob(%#x, ...) failed",
addr);
190 fatal(
"writeBlob(%#x, ...) failed",
addr);
200 fatal(
"memsetBlob(%#x, ...) failed",
addr);
206 template <
typename T>
212 template <
typename T>
219 template <
typename T>
220 T
read(
Addr address, ByteOrder guest_byte_order)
const;
226 template <
typename T>
227 void write(
Addr address, T
data, ByteOrder guest_byte_order)
const;
242 fatal(
"writeString(%#x, ...) failed",
addr);
258 fatal(
"readString(%#x, ...) failed",
addr);
275 fatal(
"readString(%#x, ...) failed",
addr);
280 template <
typename T>
289 template <
typename T>
296 template <
typename T>
305 template <
typename T>
313 #endif // __MEM_PORT_PROXY_HH__
virtual bool tryReadBlob(Addr addr, void *p, int size) const
Methods to override in base classes.
#define fatal(...)
This implements a cprintf based fatal() function.
const unsigned int _cacheLineSize
Granularity of any transactions issued through this proxy.
void writeBlobPhys(Addr addr, Request::Flags flags, const void *p, int size) const
Write size bytes from p to physical address.
void sendFunctional(PacketPtr pkt) const
Send a functional request packet, where the data is instantly updated everywhere in the memory system...
virtual bool tryWriteBlob(Addr addr, const void *p, int size) const
Write size bytes from p to address.
void writeBlob(Addr addr, const void *p, int size) const
Same as tryWriteBlob, but insists on success.
void readString(char *str, Addr addr, size_t maxlen) const
Same as tryReadString, but insists on success.
void recvFunctionalSnoop(PacketPtr pkt) override
Receive a functional snoop request packet from the peer.
void memsetBlobPhys(Addr addr, Request::Flags flags, uint8_t v, int size) const
Fill size bytes starting at physical addr with byte value val.
void readString(std::string &str, Addr addr) const
Same as tryReadString, but insists on success.
void writeString(Addr addr, const char *str) const
Same as tryWriteString, but insists on success.
T htog(T value, ByteOrder guest_byte_order)
bool tryWriteString(Addr addr, const char *str) const
Write the string str into guest memory at address addr.
std::function< void(PacketPtr pkt)> SendFunctionalFunc
virtual bool tryMemsetBlob(Addr addr, uint8_t val, int size) const
Fill size bytes starting at addr with byte value val.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
void readBlobPhys(Addr addr, Request::Flags flags, void *p, int size) const
Fixed functionality for use in base classes.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
This object is a proxy for a port or other object which implements the functional response protocol,...
T read(Addr address) const
Read sizeof(T) bytes from address and return as object T.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
SendFunctionalFunc sendFunctional
T gtoh(T value, ByteOrder guest_byte_order)
PortProxy(SendFunctionalFunc func, unsigned int cacheLineSize)
PortProxy(const RequestPort &port, unsigned int cacheLineSize)
void memsetBlob(Addr addr, uint8_t v, int size) const
Same as tryMemsetBlob, but insists on success.
void readBlob(Addr addr, void *p, int size) const
Higher level interfaces based on the above.
bool tryReadString(std::string &str, Addr addr) const
Reads the string at guest address addr into the std::string str.
void write(Addr address, const T &data) const
Write object T to address.
#define panic(...)
This implements a cprintf based panic() function.
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17