52PortProxy::PortProxy(
const RequestPort &port,
unsigned int cache_line_size) :
59 void *p,
int size)
const
64 auto req = std::make_shared<Request>(
65 gen.addr(), gen.size(),
flags, Request::funcRequestorId);
67 Packet pkt(req, MemCmd::ReadReq);
70 p =
static_cast<uint8_t *
>(p) + gen.size();
76 const void *p,
int size)
const
81 auto req = std::make_shared<Request>(
82 gen.addr(), gen.size(),
flags, Request::funcRequestorId);
84 Packet pkt(req, MemCmd::WriteReq);
87 p =
static_cast<const uint8_t *
>(p) + gen.size();
93 uint8_t v,
int size)
const
96 uint8_t *buf =
new uint8_t[size];
98 std::memset(buf, v, size);
99 PortProxy::writeBlobPhys(
addr,
flags, buf, size);
105PortProxy::tryWriteString(
Addr addr,
const char *str)
const
108 if (!tryWriteBlob(
addr++, str, 1))
115PortProxy::tryReadString(std::string &str,
Addr addr)
const
119 if (!tryReadBlob(
addr++, &
c, 1))
128PortProxy::tryReadString(
char *str,
Addr addr,
size_t maxlen)
const
132 if (!tryReadBlob(
addr++, str, 1))
Declaration and inline definition of ChunkGenerator object.
This class takes an arbitrary memory region (address/length pair) and generates a series of appropria...
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void dataStatic(T *p)
Set the data pointer to the following value that should not be freed.
void dataStaticConst(const T *p)
Set the data pointer to the following value that should not be freed.
This object is a proxy for a port or other object which implements the functional response protocol,...
PortProxy(SendFunctionalFunc func, unsigned int cache_line_size)
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
ThreadContext is the external interface to all thread state for anything outside of the CPU.
bool done() const
Are we done? That is, did the last call to next() advance past the end of the region?
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
PortProxy Object Declaration.