TLB::~TLB()
{
- if (table)
- delete [] table;
+ delete [] table;
}
// look up an entry in the TLB
accesses = read_accesses + write_accesses;
}
-Fault
-TLB::translateInst(const RequestPtr &req, ThreadContext *tc)
-{
- if (FullSystem)
- panic("translateInst not implemented in MIPS.\n");
-
- Process * p = tc->getProcessPtr();
-
- Fault fault = p->pTable->translate(req);
- if (fault != NoFault)
- return fault;
-
- return NoFault;
-}
-
-Fault
-TLB::translateData(const RequestPtr &req, ThreadContext *tc, bool write)
-{
- if (FullSystem)
- panic("translateData not implemented in MIPS.\n");
-
- Process * p = tc->getProcessPtr();
-
- Fault fault = p->pTable->translate(req);
- if (fault != NoFault)
- return fault;
-
- return NoFault;
-}
-
Fault
TLB::translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode)
{
- if (mode == Execute)
- return translateInst(req, tc);
- else
- return translateData(req, tc, mode == Write);
+ panic_if(FullSystem, "translateAtomic not implemented in full system.");
+ return tc->getProcessPtr()->pTable->translate(req);
}
void
translation->finish(translateAtomic(req, tc, mode), req, tc, mode);
}
+Fault
+TLB::translateFunctional(const RequestPtr &req, ThreadContext *tc, Mode mode)
+{
+ panic_if(FullSystem, "translateAtomic not implemented in full system.");
+ return tc->getProcessPtr()->pTable->translate(req);
+}
+
Fault
TLB::finalizePhysical(const RequestPtr &req,
ThreadContext *tc, Mode mode) const
void translateTiming(
const RequestPtr &req, ThreadContext *tc,
Translation *translation, Mode mode) override;
+ Fault translateFunctional(
+ const RequestPtr &req, ThreadContext *tc, Mode mode) override;
Fault finalizePhysical(
const RequestPtr &req,
ThreadContext *tc, Mode mode) const override;
-
- private:
- Fault translateInst(const RequestPtr &req, ThreadContext *tc);
- Fault translateData(const RequestPtr &req, ThreadContext *tc, bool write);
};
}