memReq->cmd = Read;
memReq->completionEvent = NULL;
memReq->time = curTick;
- memReq->flags &= ~INST_READ;
+ memReq->flags &= ~INST_FETCH;
MemAccessResult result = dcacheInterface->access(memReq);
// Ugly hack to get an event scheduled *only* if the access is
// memcpy(memReq->data,(uint8_t *)&data,memReq->size);
memReq->completionEvent = NULL;
memReq->time = curTick;
- memReq->flags &= ~INST_READ;
+ memReq->flags &= ~INST_FETCH;
MemAccessResult result = dcacheInterface->access(memReq);
// Ugly hack to get an event scheduled *only* if the access is
req->time = curTick;
assert(!req->data);
req->data = new uint8_t[64];
- req->flags &= ~INST_READ;
+ req->flags &= ~INST_FETCH;
Fault fault = cpu->read(req, data);
memcpy(req->data, &data, sizeof(T));
memcpy(req->data,(uint8_t *)&data,req->size);
req->completionEvent = NULL;
req->time = curTick;
- req->flags &= ~INST_READ;
+ req->flags &= ~INST_FETCH;
MemAccessResult result = dcacheInterface->access(req);
// Ugly hack to get an event scheduled *only* if the access is
#include "cpu/static_inst.hh"
#include "cpu/thread_context.hh"
#include "mem/packet.hh"
+#include "mem/request.hh"
#include "sim/byteswap.hh"
#include "sim/debug.hh"
#include "sim/host.hh"
memReq->dest = dest_addr;
memReq->size = 64;
memReq->time = curTick;
- memReq->flags &= ~INST_READ;
+ memReq->flags &= ~INST_FETCH;
dcacheInterface->access(memReq);
}
}
#endif
Addr fetchPC = (threadPC & PCMask) + fetchOffset;
- req->setVirt(0, fetchPC, sizeof(MachInst), 0, threadPC);
+ req->setVirt(0, fetchPC, sizeof(MachInst), Request::INST_FETCH, threadPC);
}
break;
case ITXCode:
tmp_req->cmd = Read;
- tmp_req->flags |= INST_READ;
+ tmp_req->flags |= INST_FETCH;
break;
default:
fatal("Unknown ITX type");
while (nextReq && curTick >= nextCycle) {
assert(nextReq->thread_num < 4 && "Not enough threads");
- if (nextReq->isInstRead() && icacheInterface) {
+ if (nextReq->isInstFetch() && icacheInterface) {
if (icacheInterface->isBlocked())
break;
Tick
BasePrefetcher::notify(PacketPtr &pkt, Tick time)
{
- if (!pkt->req->isUncacheable() && !(pkt->req->isInstRead() && onlyData)) {
+ if (!pkt->req->isUncacheable() && !(pkt->req->isInstFetch() && onlyData)) {
// Calculate the blk address
Addr blk_addr = pkt->getAddr() & ~(Addr)(blkSize-1);
static const FlagsType EVICT_NEXT = 0x00020000;
/** The request should ignore unaligned access faults */
static const FlagsType NO_ALIGN_FAULT = 0x00040000;
- /** The request was an instruction read. */
- static const FlagsType INST_READ = 0x00080000;
+ /** The request was an instruction fetch. */
+ static const FlagsType INST_FETCH = 0x00080000;
/** This request is for a memory swap. */
static const FlagsType MEM_SWAP = 0x00100000;
static const FlagsType MEM_SWAP_COND = 0x00200000;
/** These flags are *not* cleared when a Request object is reused
(assigned a new address). */
- static const FlagsType STICKY_FLAGS = INST_READ;
+ static const FlagsType STICKY_FLAGS = INST_FETCH;
private:
typedef uint8_t PrivateFlagsType;
/** Accessor Function to Check Cacheability. */
bool isUncacheable() const { return flags.isSet(UNCACHEABLE); }
- bool isInstRead() const { return flags.isSet(INST_READ); }
+ bool isInstFetch() const { return flags.isSet(INST_FETCH); }
bool isLLSC() const { return flags.isSet(LLSC); }
bool isLocked() const { return flags.isSet(LOCKED); }
bool isSwap() const { return flags.isSet(MEM_SWAP|MEM_SWAP_COND); }