from m5.params import *
class ArmTLB(SimObject):
- abstract = True
type = 'ArmTLB'
cxx_class = 'ArmISA::TLB'
- size = Param.Int("TLB size")
-
-class ArmDTB(ArmTLB):
- type = 'ArmDTB'
- cxx_class = 'ArmISA::DTB'
- size = 64
-
-class ArmITB(ArmTLB):
- type = 'ArmITB'
- cxx_class = 'ArmISA::ITB'
- size = 64
-
-class ArmUTB(ArmTLB):
- type = 'ArmUTB'
- cxx_class = 'ArmISA::UTB'
- size = 64
-
+ size = Param.Int(64, "TLB size")
#include <string>
#include <vector>
+#include "arch/arm/faults.hh"
#include "arch/arm/pagetable.hh"
#include "arch/arm/tlb.hh"
-#include "arch/arm/faults.hh"
#include "arch/arm/utility.hh"
#include "base/inifile.hh"
#include "base/str.hh"
#include "base/trace.hh"
#include "cpu/thread_context.hh"
-#include "sim/process.hh"
#include "mem/page_table.hh"
-#include "params/ArmDTB.hh"
-#include "params/ArmITB.hh"
#include "params/ArmTLB.hh"
-#include "params/ArmUTB.hh"
+#include "sim/process.hh"
using namespace std;
}
Fault
-ITB::translateAtomic(RequestPtr req, ThreadContext *tc)
+TLB::translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode)
{
#if !FULL_SYSTEM
Process * p = tc->getProcessPtr();
return NoFault;
#else
- fatal("ITB translate not yet implemented\n");
+ fatal("translate atomic not yet implemented\n");
#endif
}
void
-ITB::translateTiming(RequestPtr req, ThreadContext *tc,
- Translation *translation)
+TLB::translateTiming(RequestPtr req, ThreadContext *tc,
+ Translation *translation, Mode mode)
{
assert(translation);
- translation->finish(translateAtomic(req, tc), req, tc, false);
-}
-
-
-Fault
-DTB::translateAtomic(RequestPtr req, ThreadContext *tc, bool write)
-{
-#if !FULL_SYSTEM
- Process * p = tc->getProcessPtr();
-
- Fault fault = p->pTable->translate(req);
- if(fault != NoFault)
- return fault;
-
- return NoFault;
-#else
- fatal("DTB translate not yet implemented\n");
-#endif
+ translation->finish(translateAtomic(req, tc, mode), req, tc, mode);
}
-void
-DTB::translateTiming(RequestPtr req, ThreadContext *tc,
- Translation *translation, bool write)
-{
- assert(translation);
- translation->finish(translateAtomic(req, tc, write), req, tc, write);
-}
-
-///////////////////////////////////////////////////////////////////////
-//
-// Arm ITB
-//
-ITB::ITB(const Params *p)
- : TLB(p)
-{}
-
-
-///////////////////////////////////////////////////////////////////////
-//
-// Arm DTB
-//
-DTB::DTB(const Params *p)
- : TLB(p)
-{}
-
-///////////////////////////////////////////////////////////////////////
-//
-// Arm UTB
-//
-UTB::UTB(const Params *p)
- : ITB(p), DTB(p)
-{}
-
ArmISA::PTE &
TLB::index(bool advance)
{
return *pte;
}
-ArmISA::ITB *
-ArmITBParams::create()
-{
- return new ArmISA::ITB(this);
-}
-
-ArmISA::DTB *
-ArmDTBParams::create()
-{
- return new ArmISA::DTB(this);
-}
-
-ArmISA::UTB *
-ArmUTBParams::create()
+ArmISA::TLB *
+ArmTLBParams::create()
{
- return new ArmISA::UTB(this);
+ return new ArmISA::TLB(this);
}
#include "arch/arm/pagetable.hh"
#include "base/statistics.hh"
#include "mem/request.hh"
-#include "params/ArmDTB.hh"
-#include "params/ArmITB.hh"
+#include "params/ArmTLB.hh"
#include "sim/faults.hh"
#include "sim/tlb.hh"
static Fault checkCacheability(RequestPtr &req);
+ Fault translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode);
+ void translateTiming(RequestPtr req, ThreadContext *tc,
+ Translation *translation, Mode mode);
+
// Checkpointing
void serialize(std::ostream &os);
void unserialize(Checkpoint *cp, const std::string §ion);
void regStats();
};
-class ITB : public TLB
-{
- public:
- typedef ArmTLBParams Params;
- ITB(const Params *p);
-
- Fault translateAtomic(RequestPtr req, ThreadContext *tc);
- void translateTiming(RequestPtr req, ThreadContext *tc,
- Translation *translation);
-};
-
-class DTB : public TLB
-{
- public:
- typedef ArmTLBParams Params;
- DTB(const Params *p);
-
- Fault translateAtomic(RequestPtr req, ThreadContext *tc, bool write);
- void translateTiming(RequestPtr req, ThreadContext *tc,
- Translation *translation, bool write);
-};
-
-class UTB : public ITB, public DTB
-{
- public:
- typedef ArmTLBParams Params;
- UTB(const Params *p);
-
-};
-
-}
+/* namespace ArmISA */ }
#endif // __ARCH_ARM_TLB_HH__
if build_env['FULL_SYSTEM']:
from MipsInterrupts import MipsInterrupts
elif build_env['TARGET_ISA'] == 'arm':
- from ArmTLB import ArmDTB
+ from ArmTLB import ArmTLB
if build_env['FULL_SYSTEM']:
from ArmInterrupts import ArmInterrupts
MipsInterrupts(), "Interrupt Controller")
elif build_env['TARGET_ISA'] == 'arm':
UnifiedTLB = Param.Bool(True, "Is this a Unified TLB?")
- dtb = Param.ArmTLB(ArmDTB(), "Data TLB")
- itb = Param.ArmTLB(ArmITB(), "Instruction TLB")
+ dtb = Param.ArmTLB(ArmTLB(), "Data TLB")
+ itb = Param.ArmTLB(ArmTLB(), "Instruction TLB")
if build_env['FULL_SYSTEM']:
interrupts = Param.ArmInterrupts(
ArmInterrupts(), "Interrupt Controller")