if (%(predicate_test)s)
{
if (fault == NoFault) {
- fault = xc->readBytes(EA, dataPtr, %(size)d, memAccessFlags);
+ fault = xc->readMem(EA, dataPtr, %(size)d, memAccessFlags);
%(memacc_code)s;
}
}
if (fault == NoFault) {
- fault = xc->writeBytes(dataPtr, %(size)d, EA,
- memAccessFlags, NULL);
+ fault = xc->writeMem(dataPtr, %(size)d, EA,
+ memAccessFlags, NULL);
}
if (fault == NoFault) {
}
if (fault == NoFault) {
- fault = xc->writeBytes(memUnion.bytes, %(size)d, EA,
- memAccessFlags, NULL);
+ fault = xc->writeMem(memUnion.bytes, %(size)d, EA,
+ memAccessFlags, NULL);
}
} else {
xc->setPredicate(false);
if (%(predicate_test)s)
{
if (fault == NoFault) {
- fault = xc->readBytes(EA, dataPtr, %(size)d, memAccessFlags);
+ fault = xc->readMem(EA, dataPtr, %(size)d, memAccessFlags);
}
} else {
xc->setPredicate(false);
readMemTiming(XC *xc, Trace::InstRecord *traceData, Addr addr,
MemT &mem, unsigned flags)
{
- return xc->readBytes(addr, (uint8_t *)&mem, sizeof(MemT), flags);
+ return xc->readMem(addr, (uint8_t *)&mem, sizeof(MemT), flags);
}
/// Extract the data returned from a timing mode read.
traceData->setData(mem);
}
mem = TheISA::htog(mem);
- return xc->writeBytes((uint8_t *)&mem, sizeof(MemT), addr, flags, res);
+ return xc->writeMem((uint8_t *)&mem, sizeof(MemT), addr, flags, res);
}
/// Write to memory in atomic mode.
readMemTiming(XC *xc, Trace::InstRecord *traceData, Addr addr,
uint64_t &mem, unsigned dataSize, unsigned flags)
{
- return xc->readBytes(addr, (uint8_t *)&mem, dataSize, flags);
+ return xc->readMem(addr, (uint8_t *)&mem, dataSize, flags);
}
static inline uint64_t
traceData->setData(mem);
}
mem = TheISA::htog(mem);
- return xc->writeBytes((uint8_t *)&mem, dataSize, addr, flags, res);
+ return xc->writeMem((uint8_t *)&mem, dataSize, addr, flags, res);
}
template <class XC>
cpu->demapPage(vaddr, asn);
}
- Fault readBytes(Addr addr, uint8_t *data, unsigned size, unsigned flags);
+ Fault readMem(Addr addr, uint8_t *data, unsigned size, unsigned flags);
- Fault writeBytes(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res);
+ Fault writeMem(uint8_t *data, unsigned size,
+ Addr addr, unsigned flags, uint64_t *res);
/** Splits a request in two if it crosses a dcache block. */
void splitRequest(RequestPtr req, RequestPtr &sreqLow,
template<class Impl>
Fault
-BaseDynInst<Impl>::readBytes(Addr addr, uint8_t *data,
- unsigned size, unsigned flags)
+BaseDynInst<Impl>::readMem(Addr addr, uint8_t *data,
+ unsigned size, unsigned flags)
{
reqMade = true;
Request *req = NULL;
template<class Impl>
Fault
-BaseDynInst<Impl>::writeBytes(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res)
+BaseDynInst<Impl>::writeMem(uint8_t *data, unsigned size,
+ Addr addr, unsigned flags, uint64_t *res)
{
if (traceData) {
traceData->setAddr(addr);
/** Returns a pointer to the ThreadContext. */
ThreadContext *tcBase();
- Fault readBytes(Addr addr, uint8_t *data, unsigned size, unsigned flags);
+ Fault readMem(Addr addr, uint8_t *data, unsigned size, unsigned flags);
- Fault writeBytes(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res);
+ Fault writeMem(uint8_t *data, unsigned size,
+ Addr addr, unsigned flags, uint64_t *res);
#if FULL_SYSTEM
/** Somewhat Alpha-specific function that handles returning from
}
Fault
-InOrderDynInst::readBytes(Addr addr, uint8_t *data,
- unsigned size, unsigned flags)
+InOrderDynInst::readMem(Addr addr, uint8_t *data,
+ unsigned size, unsigned flags)
{
return cpu->read(this, addr, data, size, flags);
}
Fault
-InOrderDynInst::writeBytes(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res)
+InOrderDynInst::writeMem(uint8_t *data, unsigned size,
+ Addr addr, unsigned flags, uint64_t *res)
{
return cpu->write(this, data, size, addr, flags, res);
}
//
////////////////////////////////////////////
- Fault readBytes(Addr addr, uint8_t *data, unsigned size, unsigned flags);
+ Fault readMem(Addr addr, uint8_t *data, unsigned size, unsigned flags);
- Fault writeBytes(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res);
+ Fault writeMem(uint8_t *data, unsigned size,
+ Addr addr, unsigned flags, uint64_t *res);
/** Initiates a memory access - Calculate Eff. Addr & Initiate Memory
* Access Only valid for memory operations.
Fault
-AtomicSimpleCPU::readBytes(Addr addr, uint8_t * data,
- unsigned size, unsigned flags)
+AtomicSimpleCPU::readMem(Addr addr, uint8_t * data,
+ unsigned size, unsigned flags)
{
// use the CPU's statically allocated read request and packet objects
Request *req = &data_read_req;
Fault
-AtomicSimpleCPU::writeBytes(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res)
+AtomicSimpleCPU::writeMem(uint8_t *data, unsigned size,
+ Addr addr, unsigned flags, uint64_t *res)
{
// use the CPU's statically allocated write request and packet objects
Request *req = &data_write_req;
virtual void activateContext(int thread_num, int delay);
virtual void suspendContext(int thread_num);
- Fault readBytes(Addr addr, uint8_t *data, unsigned size, unsigned flags);
+ Fault readMem(Addr addr, uint8_t *data, unsigned size, unsigned flags);
- Fault writeBytes(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res);
+ Fault writeMem(uint8_t *data, unsigned size,
+ Addr addr, unsigned flags, uint64_t *res);
/**
* Print state of address in memory system via PrintReq (for
}
Fault
-TimingSimpleCPU::readBytes(Addr addr, uint8_t *data,
- unsigned size, unsigned flags)
+TimingSimpleCPU::readMem(Addr addr, uint8_t *data,
+ unsigned size, unsigned flags)
{
Fault fault;
const int asid = 0;
}
Fault
-TimingSimpleCPU::writeBytes(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res)
+TimingSimpleCPU::writeMem(uint8_t *data, unsigned size,
+ Addr addr, unsigned flags, uint64_t *res)
{
uint8_t *newData = new uint8_t[size];
memcpy(newData, data, size);
virtual void activateContext(int thread_num, int delay);
virtual void suspendContext(int thread_num);
- Fault readBytes(Addr addr, uint8_t *data, unsigned size, unsigned flags);
+ Fault readMem(Addr addr, uint8_t *data, unsigned size, unsigned flags);
- Fault writeBytes(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res);
+ Fault writeMem(uint8_t *data, unsigned size,
+ Addr addr, unsigned flags, uint64_t *res);
void fetch();
void sendFetch(Fault fault, RequestPtr req, ThreadContext *tc);