}
Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags,
- const std::vector<bool>& byteEnable = std::vector<bool>());
+ const std::vector<bool>& byte_enable = std::vector<bool>());
Fault writeMem(uint8_t *data, unsigned size, Addr addr,
Request::Flags flags, uint64_t *res,
- const std::vector<bool>& byteEnable = std::vector<bool>());
+ const std::vector<bool>& byte_enable = std::vector<bool>());
Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags,
AtomicOpFunctorPtr amo_op);
Fault
BaseDynInst<Impl>::initiateMemRead(Addr addr, unsigned size,
Request::Flags flags,
- const std::vector<bool>& byteEnable)
+ const std::vector<bool>& byte_enable)
{
- assert(byteEnable.empty() || byteEnable.size() == size);
+ assert(byte_enable.empty() || byte_enable.size() == size);
return cpu->pushRequest(
dynamic_cast<typename DynInstPtr::PtrType>(this),
/* ld */ true, nullptr, size, addr, flags, nullptr, nullptr,
- byteEnable);
+ byte_enable);
}
template<class Impl>
Fault
BaseDynInst<Impl>::writeMem(uint8_t *data, unsigned size, Addr addr,
Request::Flags flags, uint64_t *res,
- const std::vector<bool>& byteEnable)
+ const std::vector<bool>& byte_enable)
{
- assert(byteEnable.empty() || byteEnable.size() == size);
+ assert(byte_enable.empty() || byte_enable.size() == size);
return cpu->pushRequest(
dynamic_cast<typename DynInstPtr::PtrType>(this),
- /* st */ false, data, size, addr, flags, res, nullptr, byteEnable);
+ /* st */ false, data, size, addr, flags, res, nullptr,
+ byte_enable);
}
template<class Impl>
Fault
CheckerCPU::readMem(Addr addr, uint8_t *data, unsigned size,
Request::Flags flags,
- const std::vector<bool>& byteEnable)
+ const std::vector<bool>& byte_enable)
{
- assert(byteEnable.empty() || byteEnable.size() == size);
+ assert(byte_enable.empty() || byte_enable.size() == size);
Fault fault = NoFault;
bool checked_flags = false;
// Need to account for multiple accesses like the Atomic and TimingSimple
while (1) {
RequestPtr mem_req = genMemFragmentRequest(frag_addr, size, flags,
- byteEnable, frag_size,
+ byte_enable, frag_size,
size_left);
predicate = (mem_req != nullptr);
Fault
CheckerCPU::writeMem(uint8_t *data, unsigned size,
Addr addr, Request::Flags flags, uint64_t *res,
- const std::vector<bool>& byteEnable)
+ const std::vector<bool>& byte_enable)
{
- assert(byteEnable.empty() || byteEnable.size() == size);
+ assert(byte_enable.empty() || byte_enable.size() == size);
Fault fault = NoFault;
bool checked_flags = false;
// Need to account for a multiple access like Atomic and Timing CPUs
while (1) {
RequestPtr mem_req = genMemFragmentRequest(frag_addr, size, flags,
- byteEnable, frag_size,
+ byte_enable, frag_size,
size_left);
predicate = (mem_req != nullptr);
Fault readMem(Addr addr, uint8_t *data, unsigned size,
Request::Flags flags,
- const std::vector<bool>& byteEnable = std::vector<bool>())
+ const std::vector<bool>& byte_enable = std::vector<bool>())
override;
Fault writeMem(uint8_t *data, unsigned size, Addr addr,
Request::Flags flags, uint64_t *res,
- const std::vector<bool>& byteEnable = std::vector<bool>())
+ const std::vector<bool>& byte_enable = std::vector<bool>())
override;
Fault amoMem(Addr addr, uint8_t* data, unsigned size,
*/
virtual Fault readMem(Addr addr, uint8_t *data, unsigned int size,
Request::Flags flags,
- const std::vector<bool>& byteEnable = std::vector<bool>())
+ const std::vector<bool>& byte_enable = std::vector<bool>())
{
panic("ExecContext::readMem() should be overridden\n");
}
*/
virtual Fault initiateMemRead(Addr addr, unsigned int size,
Request::Flags flags,
- const std::vector<bool>& byteEnable = std::vector<bool>())
+ const std::vector<bool>& byte_enable = std::vector<bool>())
{
panic("ExecContext::initiateMemRead() should be overridden\n");
}
*/
virtual Fault writeMem(uint8_t *data, unsigned int size, Addr addr,
Request::Flags flags, uint64_t *res,
- const std::vector<bool>& byteEnable =
+ const std::vector<bool>& byte_enable =
std::vector<bool>()) = 0;
/**
Fault
initiateMemRead(Addr addr, unsigned int size,
Request::Flags flags,
- const std::vector<bool>& byteEnable = std::vector<bool>())
- override
+ const std::vector<bool>& byte_enable =
+ std::vector<bool>()) override
{
- assert(byteEnable.empty() || byteEnable.size() == size);
+ assert(byte_enable.empty() || byte_enable.size() == size);
return execute.getLSQ().pushRequest(inst, true /* load */, nullptr,
- size, addr, flags, nullptr, nullptr, byteEnable);
+ size, addr, flags, nullptr, nullptr, byte_enable);
}
Fault
writeMem(uint8_t *data, unsigned int size, Addr addr,
Request::Flags flags, uint64_t *res,
- const std::vector<bool>& byteEnable = std::vector<bool>())
+ const std::vector<bool>& byte_enable = std::vector<bool>())
override
{
- assert(byteEnable.empty() || byteEnable.size() == size);
+ assert(byte_enable.empty() || byte_enable.size() == size);
return execute.getLSQ().pushRequest(inst, false /* store */, data,
- size, addr, flags, res, nullptr, byteEnable);
+ size, addr, flags, res, nullptr, byte_enable);
}
Fault
ThreadContext *thread = port.cpu.getContext(
inst->id.threadId);
- const auto &byteEnable = request->getByteEnable();
- if (byteEnable.size() == 0 ||
- isAnyActiveElement(byteEnable.cbegin(), byteEnable.cend())) {
+ const auto &byte_enable = request->getByteEnable();
+ if (byte_enable.size() == 0 ||
+ isAnyActiveElement(byte_enable.cbegin(), byte_enable.cend())) {
port.numAccessesInDTLB++;
setState(LSQ::LSQRequest::InTranslation);
LSQ::pushRequest(MinorDynInstPtr inst, bool isLoad, uint8_t *data,
unsigned int size, Addr addr, Request::Flags flags,
uint64_t *res, AtomicOpFunctorPtr amo_op,
- const std::vector<bool>& byteEnable)
+ const std::vector<bool>& byte_enable)
{
assert(inst->translationFault == NoFault || inst->inLSQ);
addr, size, flags, cpu.dataMasterId(),
/* I've no idea why we need the PC, but give it */
inst->pc.instAddr(), std::move(amo_op));
- request->request->setByteEnable(byteEnable);
+ request->request->setByteEnable(byte_enable);
requests.push(request);
inst->inLSQ = true;
Fault pushRequest(MinorDynInstPtr inst, bool isLoad, uint8_t *data,
unsigned int size, Addr addr, Request::Flags flags,
uint64_t *res, AtomicOpFunctorPtr amo_op,
- const std::vector<bool>& byteEnable =
+ const std::vector<bool>& byte_enable =
std::vector<bool>());
/** Push a predicate failed-representing request into the queues just
Fault pushRequest(const DynInstPtr& inst, bool isLoad, uint8_t *data,
unsigned int size, Addr addr, Request::Flags flags,
uint64_t *res, AtomicOpFunctorPtr amo_op = nullptr,
- const std::vector<bool>& byteEnable =
+ const std::vector<bool>& byte_enable =
std::vector<bool>())
{
return iew.ldstQueue.pushRequest(inst, isLoad, data, size, addr,
- flags, res, std::move(amo_op), byteEnable);
+ flags, res, std::move(amo_op), byte_enable);
}
/** CPU read function, forwards read to LSQ. */
*/
void
addRequest(Addr addr, unsigned size,
- const std::vector<bool>& byteEnable)
+ const std::vector<bool>& byte_enable)
{
- if (byteEnable.empty() ||
- isAnyActiveElement(byteEnable.begin(), byteEnable.end())) {
+ if (byte_enable.empty() ||
+ isAnyActiveElement(byte_enable.begin(), byte_enable.end())) {
auto request = std::make_shared<Request>(_inst->getASID(),
addr, size, _flags, _inst->masterId(),
_inst->instAddr(), _inst->contextId(),
std::move(_amo_op));
- if (!byteEnable.empty()) {
- request->setByteEnable(byteEnable);
+ if (!byte_enable.empty()) {
+ request->setByteEnable(byte_enable);
}
_requests.push_back(request);
}
Fault pushRequest(const DynInstPtr& inst, bool isLoad, uint8_t *data,
unsigned int size, Addr addr, Request::Flags flags,
uint64_t *res, AtomicOpFunctorPtr amo_op,
- const std::vector<bool>& byteEnable);
+ const std::vector<bool>& byte_enable);
/** The CPU pointer. */
O3CPU *cpu;
LSQ<Impl>::pushRequest(const DynInstPtr& inst, bool isLoad, uint8_t *data,
unsigned int size, Addr addr, Request::Flags flags,
uint64_t *res, AtomicOpFunctorPtr amo_op,
- const std::vector<bool>& byteEnable)
+ const std::vector<bool>& byte_enable)
{
// This comming request can be either load, store or atomic.
// Atomic request has a corresponding pointer to its atomic memory
size, flags, data, res, std::move(amo_op));
}
assert(req);
- if (!byteEnable.empty()) {
- req->_byteEnable = byteEnable;
+ if (!byte_enable.empty()) {
+ req->_byteEnable = byte_enable;
}
inst->setRequest();
req->taskId(cpu->taskId());
Fault
AtomicSimpleCPU::readMem(Addr addr, uint8_t * data, unsigned size,
Request::Flags flags,
- const std::vector<bool>& byteEnable)
+ const std::vector<bool>& byte_enable)
{
SimpleExecContext& t_info = *threadInfo[curThread];
SimpleThread* thread = t_info.thread;
while (1) {
predicate = genMemFragmentRequest(req, frag_addr, size, flags,
- byteEnable, frag_size, size_left);
+ byte_enable, frag_size, size_left);
// translate to physical address
if (predicate) {
Fault
AtomicSimpleCPU::writeMem(uint8_t *data, unsigned size, Addr addr,
Request::Flags flags, uint64_t *res,
- const std::vector<bool>& byteEnable)
+ const std::vector<bool>& byte_enable)
{
SimpleExecContext& t_info = *threadInfo[curThread];
SimpleThread* thread = t_info.thread;
while (1) {
predicate = genMemFragmentRequest(req, frag_addr, size, flags,
- byteEnable, frag_size, size_left);
+ byte_enable, frag_size, size_left);
// translate to physical address
if (predicate)
if (fault != NoFault || size_left == 0)
{
if (req->isLockedRMW() && fault == NoFault) {
- assert(byteEnable.empty());
+ assert(byte_enable.empty());
locked = false;
}
Fault readMem(Addr addr, uint8_t *data, unsigned size,
Request::Flags flags,
- const std::vector<bool>& byteEnable = std::vector<bool>())
+ const std::vector<bool>& byte_enable = std::vector<bool>())
override;
Fault writeMem(uint8_t *data, unsigned size,
Addr addr, Request::Flags flags, uint64_t *res,
- const std::vector<bool>& byteEnable = std::vector<bool>())
+ const std::vector<bool>& byte_enable = std::vector<bool>())
override;
Fault amoMem(Addr addr, uint8_t* data, unsigned size,
virtual Fault readMem(Addr addr, uint8_t* data, unsigned size,
Request::Flags flags,
- const std::vector<bool>& byteEnable =
+ const std::vector<bool>& byte_enable =
std::vector<bool>())
{ panic("readMem() is not implemented\n"); }
virtual Fault initiateMemRead(Addr addr, unsigned size,
Request::Flags flags,
- const std::vector<bool>& byteEnable =
+ const std::vector<bool>& byte_enable =
std::vector<bool>())
{ panic("initiateMemRead() is not implemented\n"); }
virtual Fault writeMem(uint8_t* data, unsigned size, Addr addr,
Request::Flags flags, uint64_t* res,
- const std::vector<bool>& byteEnable =
+ const std::vector<bool>& byte_enable =
std::vector<bool>())
{ panic("writeMem() is not implemented\n"); }
Fault
readMem(Addr addr, uint8_t *data, unsigned int size,
Request::Flags flags,
- const std::vector<bool>& byteEnable = std::vector<bool>())
+ const std::vector<bool>& byte_enable = std::vector<bool>())
override
{
- assert(byteEnable.empty() || byteEnable.size() == size);
- return cpu->readMem(addr, data, size, flags, byteEnable);
+ assert(byte_enable.empty() || byte_enable.size() == size);
+ return cpu->readMem(addr, data, size, flags, byte_enable);
}
Fault
initiateMemRead(Addr addr, unsigned int size,
Request::Flags flags,
- const std::vector<bool>& byteEnable = std::vector<bool>())
+ const std::vector<bool>& byte_enable = std::vector<bool>())
override
{
- assert(byteEnable.empty() || byteEnable.size() == size);
- return cpu->initiateMemRead(addr, size, flags, byteEnable);
+ assert(byte_enable.empty() || byte_enable.size() == size);
+ return cpu->initiateMemRead(addr, size, flags, byte_enable);
}
Fault
writeMem(uint8_t *data, unsigned int size, Addr addr,
Request::Flags flags, uint64_t *res,
- const std::vector<bool>& byteEnable = std::vector<bool>())
+ const std::vector<bool>& byte_enable = std::vector<bool>())
override
{
- assert(byteEnable.empty() || byteEnable.size() == size);
- return cpu->writeMem(data, size, addr, flags, res, byteEnable);
+ assert(byte_enable.empty() || byte_enable.size() == size);
+ return cpu->writeMem(data, size, addr, flags, res, byte_enable);
}
Fault amoMem(Addr addr, uint8_t *data, unsigned int size,
Fault
TimingSimpleCPU::initiateMemRead(Addr addr, unsigned size,
Request::Flags flags,
- const std::vector<bool>& byteEnable)
+ const std::vector<bool>& byte_enable)
{
SimpleExecContext &t_info = *threadInfo[curThread];
SimpleThread* thread = t_info.thread;
RequestPtr req = std::make_shared<Request>(
asid, addr, size, flags, dataMasterId(), pc,
thread->contextId());
- if (!byteEnable.empty()) {
- req->setByteEnable(byteEnable);
+ if (!byte_enable.empty()) {
+ req->setByteEnable(byte_enable);
}
req->taskId(taskId());
Fault
TimingSimpleCPU::writeMem(uint8_t *data, unsigned size,
Addr addr, Request::Flags flags, uint64_t *res,
- const std::vector<bool>& byteEnable)
+ const std::vector<bool>& byte_enable)
{
SimpleExecContext &t_info = *threadInfo[curThread];
SimpleThread* thread = t_info.thread;
RequestPtr req = std::make_shared<Request>(
asid, addr, size, flags, dataMasterId(), pc,
thread->contextId());
- if (!byteEnable.empty()) {
- req->setByteEnable(byteEnable);
+ if (!byte_enable.empty()) {
+ req->setByteEnable(byte_enable);
}
req->taskId(taskId());
Fault initiateMemRead(Addr addr, unsigned size,
Request::Flags flags,
- const std::vector<bool>& byteEnable =std::vector<bool>())
+ const std::vector<bool>& byte_enable =std::vector<bool>())
override;
Fault writeMem(uint8_t *data, unsigned size,
Addr addr, Request::Flags flags, uint64_t *res,
- const std::vector<bool>& byteEnable = std::vector<bool>())
+ const std::vector<bool>& byte_enable = std::vector<bool>())
override;
Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags,