Go to the documentation of this file.
34 #ifndef __GPU_TLB_HH__
35 #define __GPU_TLB_HH__
53 #include "params/X86GPUTLB.hh"
164 bool timing,
int &latency);
234 Addr phys_page_addr);
338 bool _prefetch=
false,
432 #endif // __GPU_TLB_HH__
virtual bool recvTimingResp(PacketPtr pkt)
MemSidePort receives the packet back.
Stats::Scalar localNumTLBAccesses
std::vector< CpuSidePort * > cpuSidePort
Stats::Formula localTLBMissRate
virtual void unserialize(CheckpointIn &cp) override
Unserialize an object.
std::queue< Addr > cleanupQueue
std::vector< unsigned int > localTLBAccesses
The field below will help us compute the access distance, that is the number of (coalesced) TLB acces...
A ResponsePort is a specialization of a port.
virtual void recvRangeChange()
Called to receive an address range change from the peer response port.
void translateTiming(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, int &latency)
void updatePhysAddresses(Addr virt_page_addr, TlbEntry *tlb_entry, Addr phys_page_addr)
Stats::Scalar globalNumTLBHits
const PortID InvalidPortID
MemSidePort is the TLB Port closer to the memory side If this is a last level TLB then this port will...
void demapPage(Addr va, uint64_t asn)
This hash map will use the virtual page address as a key and will keep track of total number of acces...
Stats::Scalar numUniquePages
uint64_t Tick
Tick count type.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
EventFunctionWrapper cleanupEvent
Stats::Scalar localNumTLBMisses
std::shared_ptr< Request > RequestPtr
void pagingProtectionChecks(ThreadContext *tc, PacketPtr pkt, TlbEntry *tlb_entry, Mode mode)
Do Paging protection checks.
CpuSidePort(const std::string &_name, GpuTLB *gpu_TLB, PortID _index)
bool accessDistance
Print out accessDistance stats.
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
virtual void markDelayed()=0
Signal that the translation has been delayed due to a hw page table walk.
Packet::SenderState * saved
unsigned int accessesPerPage
Stats::Scalar localCycles
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
TlbEntry * insert(Addr vpn, TlbEntry &entry)
EventFunctionWrapper exitEvent
std::deque< PacketPtr > retries
virtual AddrRangeList getAddrRanges() const
Get a list of the non-overlapping address ranges the owner is responsible for.
This is a simple scalar statistic, like a counter.
Stats::Scalar globalNumTLBAccesses
const char * description() const
Return a C string describing the event.
std::unordered_map< Addr, TLBEvent * > translationReturnEvent
Fault translate(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, bool &delayedResponse, bool timing, int &latency)
void handleTranslationReturn(Addr addr, tlbOutcome outcome, PacketPtr pkt)
handleTranslationReturn is called on a TLB hit, when a TLB miss returns or when a page fault returns.
tlbOutcome outcome
outcome can be TLB_HIT, TLB_MISS, or PAGE_WALK
Stats::Scalar globalNumTLBMisses
std::vector< MemSidePort * > memSidePort
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual void recvReqRetry()
A virtual base opaque structure used to hold state associated with the packet (e.g....
virtual void recvReqRetry()
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
Fault translateInt(bool read, const RequestPtr &req, ThreadContext *tc)
virtual void recvFunctional(PacketPtr pkt)
std::vector< int > reqCnt
bool FA
true if this is a fully-associative TLB
std::shared_ptr< FaultBase > Fault
bool allocationPolicy
Allocation Policy: true if we always allocate on a hit, false otherwise.
Stats::Scalar avgReuseDistance
void regStats() override
Callback to set stat parameters.
Ports are used to interface objects to each other.
std::list< TlbEntry * > EntryList
std::unordered_map< Addr, AccessInfo > AccessPatternTable
unsigned int totalReuseDistance
EntryList::iterator lookupIt(Addr va, bool update_lru=true)
unsigned int lastTimeAccessed
Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode, int &latency)
virtual Tick recvAtomic(PacketPtr pkt)
virtual bool recvTimingReq(PacketPtr pkt)
recvTiming receives a coalesced timing request from a TLBCoalescer and it calls issueTLBLookup() It o...
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
std::vector< EntryList > entryList
An entryList per set is the equivalent of an LRU stack; it's used to guide replacement decisions.
virtual Tick recvAtomic(PacketPtr pkt)
Receive an atomic request packet from the peer.
Stats::Scalar localNumTLBHits
void setConfigAddress(uint32_t addr)
This is exposed globally, independent of the ISA.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool tlbLookup(const RequestPtr &req, ThreadContext *tc, bool update_stats)
TLB_lookup will only perform a TLB lookup returning true on a TLB hit and false on a TLB miss.
virtual void recvRespRetry()
Called by the peer if sendTimingResp was called on this protocol (causing recvTimingResp to be called...
unsigned int meanDistance
AccessPatternTable TLBFootprint
Stats::Scalar pageTableCycles
Tick doMmuRegRead(ThreadContext *tc, Packet *pkt)
bool hasMemSidePort
if true, then this is not the last level TLB
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void handleFuncTranslationReturn(PacketPtr pkt, tlbOutcome outcome)
handleFuncTranslationReturn is called on a TLB hit, when a TLB miss returns or when a page fault retu...
void printAccessPattern()
MemSidePort(const std::string &_name, GpuTLB *gpu_TLB, PortID _index)
virtual void finish(Fault fault, const RequestPtr &req, ThreadContext *tc, Mode mode)=0
The memory for this object may be dynamically allocated, and it may be responsible for cleaning itsle...
Stats::Formula localLatency
std::vector< EntryList > freeList
void issueTLBLookup(PacketPtr pkt)
Do the TLB lookup for this coalesced request and schedule another event <TLB access latency> cycles l...
TLBEvent(GpuTLB *_tlb, Addr _addr, tlbOutcome outcome, PacketPtr _pkt)
std::vector< ResponsePort * > ports
std::ostream CheckpointOut
void updatePageFootprint(Addr virt_page_addr)
virtual void recvFunctional(PacketPtr pkt)
Receive a functional request packet from the peer.
Tick doMmuRegWrite(ThreadContext *tc, Packet *pkt)
Stats::Scalar accessCycles
virtual void serialize(CheckpointOut &cp) const override
Serialize an object.
void updateOutcome(tlbOutcome _outcome)
void translationReturn(Addr virtPageAddr, tlbOutcome outcome, PacketPtr pkt)
A TLBEvent is scheduled after the TLB lookup and helps us take the appropriate actions: (e....
TlbEntry * lookup(Addr va, bool update_lru=true)
TranslationState(Mode tlb_mode, ThreadContext *_tc, bool _prefetch=false, Packet::SenderState *_saved=nullptr)
Stats::Formula globalTLBMissRate
virtual void recvRangeChange()
std::vector< TlbEntry > tlb
void invalidateNonGlobal()
#define panic(...)
This implements a cprintf based panic() function.
TLB TranslationState: this currently is a somewhat bastardization of the usage of SenderState,...
Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17