(pte.D0 << 2) | (pte.V0 <<1) | pte.G),
((pte.PFN1 <<6) | (pte.C1 << 3) |
(pte.D1 << 2) | (pte.V1 <<1) | pte.G));
- if (table[Index].V0 == true || table[Index].V1 == true) {
+ if (table[Index].V0 || table[Index].V1) {
// Previous entry is valid
PageTable::iterator i = lookupTable.find(table[Index].VPN);
lookupTable.erase(i);
} else {
// Update TLB
- if (table[Index].V0 == true || table[Index].V1 == true) {
+ if (table[Index].V0 || table[Index].V1) {
// Previous entry is valid
PageTable::iterator i = lookupTable.find(table[Index].VPN);
for (int x = 0; x < size; x++) {
if (tlb[x].range.contextId == context_id &&
tlb[x].range.partitionId == partition_id) {
- if (tlb[x].valid == true) {
+ if (tlb[x].valid) {
freeList.push_front(&tlb[x]);
}
tlb[x].valid = false;
lookupTable.clear();
for (int x = 0; x < size; x++) {
- if (tlb[x].valid == true)
+ if (tlb[x].valid)
freeList.push_back(&tlb[x]);
tlb[x].valid = false;
tlb[x].used = false;
Walker::WalkerState::startWalk()
{
Fault fault = NoFault;
- assert(started == false);
+ assert(!started);
started = true;
setupWalk(req->getVaddr());
if (timing) {
Walker::WalkerState::startFunctional(Addr &addr, unsigned &logBytes)
{
Fault fault = NoFault;
- assert(started == false);
+ assert(!started);
started = true;
setupWalk(addr);
} else if (Str[i] == ' ' || Str[i] == '\n') {
if (Number == 0)
return;
- if (Flag == false) {
+ if (!Flag) {
*A = Number;
Number = 0;
Flag = true;
i++;
}
- if (Flag != true) {
+ if (!Flag) {
*A = 0;
*D = 0;
} else {
}
}
- if (match == true)
+ if (match)
return true;
}
outs << Enums::OpClassStrings[inst->opClass()] << " : ";
}
- if (Debug::ExecResult && predicate == false) {
+ if (Debug::ExecResult && !predicate) {
outs << "Predicated False";
}
// Clear if Non-Speculative
if (inst->staticInst &&
inst->seqNum == nonSpecSeqNum[tid] &&
- nonSpecInstActive[tid] == true) {
+ nonSpecInstActive[tid]) {
nonSpecInstActive[tid] = false;
}
PipelineStage::removeStalls(ThreadID tid)
{
for (int st_num = 0; st_num < NumStages; st_num++) {
- if (stalls[tid].stage[st_num] == true) {
+ if (stalls[tid].stage[st_num]) {
DPRINTF(InOrderStage, "Removing stall from stage %i.\n",
st_num);
stalls[tid].stage[st_num] = false;
}
- if (toPrevStages->stageBlock[st_num][tid] == true) {
+ if (toPrevStages->stageBlock[st_num][tid]) {
DPRINTF(InOrderStage, "Removing pending block from stage %i.\n",
st_num);
toPrevStages->stageBlock[st_num][tid] = false;
}
- if (fromNextStages->stageBlock[st_num][tid] == true) {
+ if (fromNextStages->stageBlock[st_num][tid]) {
DPRINTF(InOrderStage, "Removing pending block from stage %i.\n",
st_num);
fromNextStages->stageBlock[st_num][tid] = false;
// If there is a non-speculative instruction
// in the pipeline then stall instructions here
// ---
- if (*nonSpecInstActive[tid] == true && seq_num > *nonSpecSeqNum[tid]) {
+ if (*nonSpecInstActive[tid] && seq_num > *nonSpecSeqNum[tid]) {
DPRINTF(InOrderUseDef, "[tid:%i]: [sn:%i] cannot execute because"
"there is non-speculative instruction [sn:%i] has not "
"graduated.\n", tid, seq_num, *nonSpecSeqNum[tid]);
// Not sure which one takes priority. I think if we have
// both, that's a bad sign.
- if (trapSquash[tid] == true) {
+ if (trapSquash[tid]) {
assert(!tcSquash[tid]);
squashFromTrap(tid);
- } else if (tcSquash[tid] == true) {
+ } else if (tcSquash[tid]) {
assert(commitStatus[tid] != TrapPending);
squashFromTC(tid);
} else if (commitStatus[tid] == SquashAfterPending) {
// then use one older sequence number.
InstSeqNum squashed_inst = fromIEW->squashedSeqNum[tid];
- if (fromIEW->includeSquashInst[tid] == true) {
+ if (fromIEW->includeSquashInst[tid]) {
squashed_inst--;
}
assert(isDrained());
assert(retryPkt == NULL);
assert(retryTid == InvalidThreadID);
- assert(cacheBlocked == false);
- assert(interruptPending == false);
+ assert(!cacheBlocked);
+ assert(!interruptPending);
for (ThreadID i = 0; i < numThreads; ++i) {
assert(!memReq[i]);
DPRINTF(IEW, "[tid:%i]: Squashing from a specific instruction, PC: %s "
"[sn:%i].\n", tid, inst->pcState(), inst->seqNum);
- if (toCommit->squash[tid] == false ||
+ if (!toCommit->squash[tid] ||
inst->seqNum < toCommit->squashedSeqNum[tid]) {
toCommit->squash[tid] = true;
toCommit->squashedSeqNum[tid] = inst->seqNum;
// case the memory violator should take precedence over the branch
// misprediction because it requires the violator itself to be included in
// the squash.
- if (toCommit->squash[tid] == false ||
+ if (!toCommit->squash[tid] ||
inst->seqNum <= toCommit->squashedSeqNum[tid]) {
toCommit->squash[tid] = true;
{
DPRINTF(IEW, "[tid:%i]: Memory blocked, squashing load and younger insts, "
"PC: %s [sn:%i].\n", tid, inst->pcState(), inst->seqNum);
- if (toCommit->squash[tid] == false ||
+ if (!toCommit->squash[tid] ||
inst->seqNum < toCommit->squashedSeqNum[tid]) {
toCommit->squash[tid] = true;
}
// If the store had a fault then it may not have a mem req
- if (fault != NoFault || inst->readPredicate() == false ||
+ if (fault != NoFault || !inst->readPredicate() ||
!inst->isStoreConditional()) {
// If the instruction faulted, then we need to send it along
// to commit without the instruction completing.
// will be replaced and we will lose it.
if (inst->getFault() == NoFault) {
inst->execute();
- if (inst->readPredicate() == false)
+ if (!inst->readPredicate())
inst->forwardOldRegs();
}
// it be added to the dependency graph.
if (src_reg >= numPhysRegs) {
continue;
- } else if (regScoreboard[src_reg] == false) {
+ } else if (!regScoreboard[src_reg]) {
DPRINTF(IQ, "Instruction PC %s has src reg %i that "
"is being added to the dependency chain.\n",
new_inst->pcState(), src_reg);
// If the instruction faulted or predicated false, then we need to send it
// along to commit without the instruction completing.
- if (load_fault != NoFault || inst->readPredicate() == false) {
+ if (load_fault != NoFault || !inst->readPredicate()) {
// Send this instruction to commit, also make sure iew stage
// realizes there is activity.
// Mark it as executed unless it is an uncached load that
// needs to hit the head of commit.
- if (inst->readPredicate() == false)
+ if (!inst->readPredicate())
inst->forwardOldRegs();
DPRINTF(LSQUnit, "Load [sn:%lli] not executed from %s\n",
inst->seqNum,
store_fault == NoFault)
return store_fault;
- if (store_inst->readPredicate() == false)
+ if (!store_inst->readPredicate())
store_inst->forwardOldRegs();
if (storeQueue[store_idx].size == 0) {
store_inst->pcState(), store_inst->seqNum);
return store_fault;
- } else if (store_inst->readPredicate() == false) {
+ } else if (!store_inst->readPredicate()) {
DPRINTF(LSQUnit, "Store [sn:%lli] not executed from predication\n",
store_inst->seqNum);
return store_fault;
if (threadEntries[tid] != 0) {
InstIt head_thread = instList[tid].begin();
- assert((*head_thread)->isInROB()==true);
+ assert((*head_thread)->isInROB());
return *head_thread;
} else {
// it be added to the dependency graph.
if (src_reg >= numPhysRegs) {
continue;
- } else if (regScoreboard[src_reg] == false) {
+ } else if (!regScoreboard[src_reg]) {
DPRINTF(IQ, "Instruction PC %#x has src reg %i that "
"is being added to the dependency chain.\n",
new_inst->readPC(), src_reg);
} else if (is_valid(cache_entry)) {
return cache_entry.CacheState;
} else {
- if ((persistentTable.isLocked(addr) == true) && (persistentTable.findSmallest(addr) != machineID)) {
+ if (persistentTable.isLocked(addr) && (persistentTable.findSmallest(addr) != machineID)) {
// Not in cache, in persistent table, but this processor isn't highest priority
return State:I_L;
} else {
assert(is_valid(tbe));
if (tbe.WentPersistent) {
- // assert(starving == true);
+ // assert(starving);
outstandingRequests := outstandingRequests - 1;
enqueue(persistentNetwork_out, PersistentMsg, l1_request_latency) {
out_msg.Addr := address;
// Update average latency
if (tbe.IssueCount <= 1) {
- if (tbe.ExternalResponse == true) {
+ if (tbe.ExternalResponse) {
updateAverageLatencyEstimate(curCycle() - tbe.IssueTime);
}
}
State getState(Entry cache_entry, Address addr) {
if (is_valid(cache_entry)) {
return cache_entry.CacheState;
- } else if (persistentTable.isLocked(addr) == true) {
+ } else if (persistentTable.isLocked(addr)) {
return State:I_L;
} else {
return State:NP;
bool exclusiveExists(Address addr) {
if (localDirectory.isTagPresent(addr)) {
- if (localDirectory[addr].exclusive == true) {
+ if (localDirectory[addr].exclusive) {
return true;
}
else {
}
void clearExclusiveBitIfExists(Address addr) {
- if (localDirectory.isTagPresent(addr) == true) {
+ if (localDirectory.isTagPresent(addr)) {
localDirectory[addr].exclusive := false;
}
}
action(j_forwardTransientRequestToLocalSharers, "j", desc="Forward external transient request to local sharers") {
peek(requestNetwork_in, RequestMsg) {
- if (filtering_enabled == true && in_msg.RetryNum == 0 && sharersExist(in_msg.Addr) == false) {
+ if (filtering_enabled && in_msg.RetryNum == 0 && sharersExist(in_msg.Addr) == false) {
//profile_filter_action(1);
DPRINTF(RubySlicc, "filtered message, Retry Num: %d\n",
in_msg.RetryNum);
action(s_deallocateTBE, "s", desc="Deallocate TBE") {
if (tbe.WentPersistent) {
- assert(starving == true);
+ assert(starving);
enqueue(persistentNetwork_out, PersistentMsg, 1) {
out_msg.Addr := address;
Tick current_time = m_sender->clockEdge();
Tick arrival_time = 0;
- if (!RubySystem::getRandomization() || (m_randomization == false)) {
+ if (!RubySystem::getRandomization() || !m_randomization) {
// No randomization
arrival_time = current_time + delta * m_sender->clockPeriod();
} else {
const NetDest&
getInternalDestination() const
{
- if (m_internal_dest_valid == false)
+ if (!m_internal_dest_valid)
return getDestination();
return m_internal_dest;
NetDest&
getInternalDestination()
{
- if (m_internal_dest_valid == false) {
+ if (!m_internal_dest_valid) {
m_internal_dest = getDestination();
m_internal_dest_valid = true;
}
void
DMASequencer::issueNext()
{
- assert(m_is_busy == true);
+ assert(m_is_busy);
active_request.bytes_completed = active_request.bytes_issued;
if (active_request.len == active_request.bytes_completed) {
//
void
DMASequencer::dataCallback(const DataBlock & dblk)
{
- assert(m_is_busy == true);
+ assert(m_is_busy);
int len = active_request.bytes_issued - active_request.bytes_completed;
int offset = 0;
if (active_request.bytes_completed == 0)
offset = active_request.start_paddr & m_data_block_mask;
- assert(active_request.write == false);
+ assert(!active_request.write);
if (active_request.data != NULL) {
memcpy(&active_request.data[active_request.bytes_completed],
dblk.getData(offset, len), len);
if self.pairs.has_key("block_on"):
address_field = self.pairs['block_on']
code('''
- if ( (m_is_blocking == true) &&
- (m_block_map.count(in_msg_ptr->m_$address_field) == 1) ) {
- if (m_block_map[in_msg_ptr->m_$address_field] != &$qcode) {
+ if (m_is_blocking &&
+ (m_block_map.count(in_msg_ptr->m_$address_field) == 1) &&
+ (m_block_map[in_msg_ptr->m_$address_field] != &$qcode)) {
$qcode.delayHead();
continue;
- }
}
''')