gem5  v20.1.0.0
gpu_tlb.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2015 Advanced Micro Devices, Inc.
3  * All rights reserved.
4  *
5  * For use for simulation and test purposes only
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright notice,
11  * this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright notice,
14  * this list of conditions and the following disclaimer in the documentation
15  * and/or other materials provided with the distribution.
16  *
17  * 3. Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived from this
19  * software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 #ifndef __GPU_TLB_HH__
35 #define __GPU_TLB_HH__
36 
37 #include <fstream>
38 #include <list>
39 #include <queue>
40 #include <string>
41 #include <vector>
42 
43 #include "arch/generic/tlb.hh"
44 #include "arch/x86/pagetable.hh"
46 #include "arch/x86/regs/segment.hh"
47 #include "base/callback.hh"
48 #include "base/logging.hh"
49 #include "base/statistics.hh"
51 #include "mem/port.hh"
52 #include "mem/request.hh"
53 #include "params/X86GPUTLB.hh"
54 #include "sim/clocked_object.hh"
55 #include "sim/sim_object.hh"
56 
57 class BaseTLB;
58 class Packet;
59 class ThreadContext;
60 
61 namespace X86ISA
62 {
63  class GpuTLB : public ClockedObject
64  {
65  protected:
66  friend class Walker;
67 
69 
70  uint32_t configAddress;
71 
72  public:
73  typedef X86GPUTLBParams Params;
74  GpuTLB(const Params *p);
75  ~GpuTLB();
76 
77  typedef enum BaseTLB::Mode Mode;
78 
80  {
81  public:
82  virtual ~Translation() { }
83 
88  virtual void markDelayed() = 0;
89 
95  virtual void finish(Fault fault, const RequestPtr &req,
96  ThreadContext *tc, Mode mode) = 0;
97  };
98 
99  void dumpAll();
100  TlbEntry *lookup(Addr va, bool update_lru=true);
101  void setConfigAddress(uint32_t addr);
102 
103  protected:
104  EntryList::iterator lookupIt(Addr va, bool update_lru=true);
106 
107  public:
108  Walker *getWalker();
109  void invalidateAll();
110  void invalidateNonGlobal();
111  void demapPage(Addr va, uint64_t asn);
112 
113  protected:
114  int size;
115  int assoc;
116  int numSets;
117 
121  bool FA;
123 
129 
134 
140 
142 
143  /*
144  * It's a per-set list. As long as we have not reached
145  * the full capacity of the given set, grab an entry from
146  * the freeList.
147  */
149 
158 
159  Fault translateInt(bool read, const RequestPtr &req,
160  ThreadContext *tc);
161 
162  Fault translate(const RequestPtr &req, ThreadContext *tc,
163  Translation *translation, Mode mode, bool &delayedResponse,
164  bool timing, int &latency);
165 
166  public:
167  // latencies for a TLB hit, miss and page fault
171 
172  // local_stats are as seen from the TLB
173  // without taking into account coalescing
178 
179  // global_stats are as seen from the
180  // CU's perspective taking into account
181  // all coalesced requests.
186 
187  // from the CU perspective (global)
189  // from the CU perspective (global)
192  // from the perspective of this TLB
194  // from the perspective of this TLB
196  // I take the avg. per page and then
197  // the avg. over all pages.
199 
200  void regStats() override;
201  void updatePageFootprint(Addr virt_page_addr);
202  void printAccessPattern();
203 
204 
206  Mode mode, int &latency);
207 
208  void translateTiming(const RequestPtr &req, ThreadContext *tc,
209  Translation *translation, Mode mode,
210  int &latency);
211 
214 
215  TlbEntry *insert(Addr vpn, TlbEntry &entry);
216 
217  // Checkpointing
218  virtual void serialize(CheckpointOut& cp) const override;
219  virtual void unserialize(CheckpointIn& cp) override;
220  void issueTranslation();
222  bool tlbLookup(const RequestPtr &req,
223  ThreadContext *tc, bool update_stats);
224 
226  PacketPtr pkt);
227 
229 
231  TlbEntry *tlb_entry, Mode mode);
232 
233  void updatePhysAddresses(Addr virt_page_addr, TlbEntry *tlb_entry,
234  Addr phys_page_addr);
235 
236  void issueTLBLookup(PacketPtr pkt);
237 
238  // CpuSidePort is the TLB Port closer to the CPU/CU side
239  class CpuSidePort : public ResponsePort
240  {
241  public:
242  CpuSidePort(const std::string &_name, GpuTLB * gpu_TLB,
243  PortID _index)
244  : ResponsePort(_name, gpu_TLB), tlb(gpu_TLB), index(_index) { }
245 
246  protected:
248  int index;
249 
250  virtual bool recvTimingReq(PacketPtr pkt);
251  virtual Tick recvAtomic(PacketPtr pkt) { return 0; }
252  virtual void recvFunctional(PacketPtr pkt);
253  virtual void recvRangeChange() { }
254  virtual void recvReqRetry();
255  virtual void recvRespRetry() { panic("recvRespRetry called"); }
256  virtual AddrRangeList getAddrRanges() const;
257  };
258 
266  class MemSidePort : public RequestPort
267  {
268  public:
269  MemSidePort(const std::string &_name, GpuTLB * gpu_TLB,
270  PortID _index)
271  : RequestPort(_name, gpu_TLB), tlb(gpu_TLB), index(_index) { }
272 
274 
275  protected:
277  int index;
278 
279  virtual bool recvTimingResp(PacketPtr pkt);
280  virtual Tick recvAtomic(PacketPtr pkt) { return 0; }
281  virtual void recvFunctional(PacketPtr pkt) { }
282  virtual void recvRangeChange() { }
283  virtual void recvReqRetry();
284  };
285 
286  // TLB ports on the cpu Side
288  // TLB ports on the memory side
290 
291  Port &getPort(const std::string &if_name,
292  PortID idx=InvalidPortID) override;
293 
311  {
312  // TLB mode, read or write
314  // Thread context associated with this req
316 
317  /*
318  * TLB entry to be populated and passed back and filled in
319  * previous TLBs. Equivalent to the data cache concept of
320  * "data return."
321  */
323  // Is this a TLB prefetch request?
324  bool prefetch;
325  // When was the req for this translation issued
326  uint64_t issueTime;
327  // Remember where this came from
329 
330  // keep track of #uncoalesced reqs per packet per TLB level;
331  // reqCnt per level >= reqCnt higher level
333  // TLB level this packet hit in; 0 if it hit in the page table
334  int hitLevel;
336 
338  bool _prefetch=false,
339  Packet::SenderState *_saved=nullptr)
340  : tlbMode(tlb_mode), tc(_tc), tlbEntry(nullptr),
341  prefetch(_prefetch), issueTime(0),
342  hitLevel(0),saved(_saved) { }
343  };
344 
345  // maximum number of permitted coalesced requests per cycle
347 
348  // Current number of outstandings coalesced requests.
349  // Should be <= maxCoalescedReqs
351 
359  void translationReturn(Addr virtPageAddr, tlbOutcome outcome,
360  PacketPtr pkt);
361 
362  class TLBEvent : public Event
363  {
364  private:
372 
373  public:
374  TLBEvent(GpuTLB *_tlb, Addr _addr, tlbOutcome outcome,
375  PacketPtr _pkt);
376 
377  void process();
378  const char *description() const;
379 
380  // updateOutcome updates the tlbOutcome of a TLBEvent
381  void updateOutcome(tlbOutcome _outcome);
383  };
384 
385  std::unordered_map<Addr, TLBEvent*> translationReturnEvent;
386 
387  // this FIFO queue keeps track of the virt. page addresses
388  // that are pending cleanup
389  std::queue<Addr> cleanupQueue;
390 
391  // the cleanupEvent is scheduled after a TLBEvent triggers in order to
392  // free memory and do the required clean-up
393  void cleanup();
394 
396 
402  struct AccessInfo
403  {
404  unsigned int lastTimeAccessed; // last access to this page
405  unsigned int accessesPerPage;
406  // need to divide it by accessesPerPage at the end
407  unsigned int totalReuseDistance;
408 
418  unsigned int sumDistance;
419  unsigned int meanDistance;
420  };
421 
422  typedef std::unordered_map<Addr, AccessInfo> AccessPatternTable;
424 
425  // Called at the end of simulation to dump page access stats.
426  void exitCallback();
427 
429  };
430 }
431 
432 #endif // __GPU_TLB_HH__
X86ISA::GpuTLB::MemSidePort::recvTimingResp
virtual bool recvTimingResp(PacketPtr pkt)
MemSidePort receives the packet back.
Definition: gpu_tlb.cc:1339
X86ISA::GpuTLB::localNumTLBAccesses
Stats::Scalar localNumTLBAccesses
Definition: gpu_tlb.hh:174
pagetable.hh
X86ISA::GpuTLB::cpuSidePort
std::vector< CpuSidePort * > cpuSidePort
Definition: gpu_tlb.hh:287
X86ISA::GpuTLB::localTLBMissRate
Stats::Formula localTLBMissRate
Definition: gpu_tlb.hh:177
X86ISA::GpuTLB::unserialize
virtual void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: gpu_tlb.cc:658
X86ISA::GpuTLB::cleanupQueue
std::queue< Addr > cleanupQueue
Definition: gpu_tlb.hh:389
X86ISA::GpuTLB::AccessInfo::localTLBAccesses
std::vector< unsigned int > localTLBAccesses
The field below will help us compute the access distance, that is the number of (coalesced) TLB acces...
Definition: gpu_tlb.hh:417
ResponsePort
A ResponsePort is a specialization of a port.
Definition: port.hh:265
X86ISA::GpuTLB::MemSidePort::recvRangeChange
virtual void recvRangeChange()
Called to receive an address range change from the peer response port.
Definition: gpu_tlb.hh:282
X86ISA::GpuTLB::translateTiming
void translateTiming(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, int &latency)
Definition: gpu_tlb.cc:632
X86ISA::GpuTLB::updatePhysAddresses
void updatePhysAddresses(Addr virt_page_addr, TlbEntry *tlb_entry, Addr phys_page_addr)
X86ISA::GpuTLB::globalNumTLBHits
Stats::Scalar globalNumTLBHits
Definition: gpu_tlb.hh:183
X86ISA::GpuTLB::Translation::~Translation
virtual ~Translation()
Definition: gpu_tlb.hh:82
X86ISA::GpuTLB::TranslationState::hitLevel
int hitLevel
Definition: gpu_tlb.hh:334
X86ISA::GpuTLB::dumpAll
void dumpAll()
X86ISA::GpuTLB::tlbOutcome
tlbOutcome
Definition: gpu_tlb.hh:221
InvalidPortID
const PortID InvalidPortID
Definition: types.hh:238
X86ISA::GpuTLB::issueTranslation
void issueTranslation()
X86ISA::GpuTLB::numSets
int numSets
Definition: gpu_tlb.hh:116
X86ISA::GpuTLB::MemSidePort
MemSidePort is the TLB Port closer to the memory side If this is a last level TLB then this port will...
Definition: gpu_tlb.hh:266
X86ISA::GpuTLB::demapPage
void demapPage(Addr va, uint64_t asn)
Definition: gpu_tlb.cc:266
X86ISA::TlbEntry
Definition: pagetable.hh:65
compute_unit.hh
tlb.hh
X86ISA::GpuTLB::AccessInfo
This hash map will use the virtual page address as a key and will keep track of total number of acces...
Definition: gpu_tlb.hh:402
BaseTLB::Mode
Mode
Definition: tlb.hh:57
X86ISA::GpuTLB::numUniquePages
Stats::Scalar numUniquePages
Definition: gpu_tlb.hh:191
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
X86ISA::GpuTLB::getWalker
Walker * getWalker()
Definition: gpu_tlb.cc:646
PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:237
X86ISA::GpuTLB::cleanupEvent
EventFunctionWrapper cleanupEvent
Definition: gpu_tlb.hh:395
pagetable_walker.hh
X86ISA::GpuTLB::localNumTLBMisses
Stats::Scalar localNumTLBMisses
Definition: gpu_tlb.hh:176
X86ISA::GpuTLB::CpuSidePort
Definition: gpu_tlb.hh:239
RequestPtr
std::shared_ptr< Request > RequestPtr
Definition: request.hh:82
X86ISA::GpuTLB::pagingProtectionChecks
void pagingProtectionChecks(ThreadContext *tc, PacketPtr pkt, TlbEntry *tlb_entry, Mode mode)
Do Paging protection checks.
Definition: gpu_tlb.cc:843
X86ISA::GpuTLB::TranslationState::prefetch
bool prefetch
Definition: gpu_tlb.hh:324
std::vector
STL vector class.
Definition: stl.hh:37
X86ISA::GpuTLB::assoc
int assoc
Definition: gpu_tlb.hh:115
X86ISA::GpuTLB::CpuSidePort::CpuSidePort
CpuSidePort(const std::string &_name, GpuTLB *gpu_TLB, PortID _index)
Definition: gpu_tlb.hh:242
X86ISA::GpuTLB::accessDistance
bool accessDistance
Print out accessDistance stats.
Definition: gpu_tlb.hh:139
X86ISA::GpuTLB::getPort
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Definition: gpu_tlb.cc:137
X86ISA::GpuTLB::Translation::markDelayed
virtual void markDelayed()=0
Signal that the translation has been delayed due to a hw page table walk.
X86ISA::GpuTLB::PAGE_WALK
@ PAGE_WALK
Definition: gpu_tlb.hh:221
X86ISA::GpuTLB::walker
Walker * walker
Definition: gpu_tlb.hh:105
X86ISA::GpuTLB::hitLatency
int hitLatency
Definition: gpu_tlb.hh:168
X86ISA::GpuTLB::TranslationState::saved
Packet::SenderState * saved
Definition: gpu_tlb.hh:335
X86ISA::GpuTLB::MemSidePort::index
int index
Definition: gpu_tlb.hh:277
request.hh
BaseTLB
Definition: tlb.hh:50
X86ISA::GpuTLB::missLatency1
int missLatency1
Definition: gpu_tlb.hh:169
X86ISA::GpuTLB::AccessInfo::accessesPerPage
unsigned int accessesPerPage
Definition: gpu_tlb.hh:405
X86ISA::GpuTLB::setMask
Addr setMask
Definition: gpu_tlb.hh:122
X86ISA::GpuTLB::localCycles
Stats::Scalar localCycles
Definition: gpu_tlb.hh:193
ClockedObject
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
Definition: clocked_object.hh:231
X86ISA::GpuTLB::insert
TlbEntry * insert(Addr vpn, TlbEntry &entry)
Definition: gpu_tlb.cc:159
X86ISA::GpuTLB::maxCoalescedReqs
int maxCoalescedReqs
Definition: gpu_tlb.hh:346
X86ISA::GpuTLB::exitEvent
EventFunctionWrapper exitEvent
Definition: gpu_tlb.hh:428
EventFunctionWrapper
Definition: eventq.hh:1101
X86ISA::GpuTLB::MemSidePort::retries
std::deque< PacketPtr > retries
Definition: gpu_tlb.hh:273
X86ISA::GpuTLB::CpuSidePort::getAddrRanges
virtual AddrRangeList getAddrRanges() const
Get a list of the non-overlapping address ranges the owner is responsible for.
Definition: gpu_tlb.cc:1325
X86ISA::GpuTLB::TranslationState::issueTime
uint64_t issueTime
Definition: gpu_tlb.hh:326
Stats::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2533
X86ISA::GpuTLB::globalNumTLBAccesses
Stats::Scalar globalNumTLBAccesses
Definition: gpu_tlb.hh:182
X86ISA::GpuTLB::TLBEvent::description
const char * description() const
Return a C string describing the event.
Definition: gpu_tlb.cc:1085
X86ISA::GpuTLB::translationReturnEvent
std::unordered_map< Addr, TLBEvent * > translationReturnEvent
Definition: gpu_tlb.hh:385
X86ISA::GpuTLB::TranslationState::tlbEntry
TlbEntry * tlbEntry
Definition: gpu_tlb.hh:322
X86ISA::GpuTLB::translate
Fault translate(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, bool &delayedResponse, bool timing, int &latency)
Definition: gpu_tlb.cc:419
X86ISA::GpuTLB::handleTranslationReturn
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.
Definition: gpu_tlb.cc:878
X86ISA::GpuTLB::missLatency2
int missLatency2
Definition: gpu_tlb.hh:170
cp
Definition: cprintf.cc:40
X86ISA::GpuTLB::TLBEvent::outcome
tlbOutcome outcome
outcome can be TLB_HIT, TLB_MISS, or PAGE_WALK
Definition: gpu_tlb.hh:370
X86ISA::GpuTLB::globalNumTLBMisses
Stats::Scalar globalNumTLBMisses
Definition: gpu_tlb.hh:184
X86ISA::GpuTLB::memSidePort
std::vector< MemSidePort * > memSidePort
Definition: gpu_tlb.hh:289
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
X86ISA::GpuTLB::CpuSidePort::recvReqRetry
virtual void recvReqRetry()
Definition: gpu_tlb.cc:1317
Packet::SenderState
A virtual base opaque structure used to hold state associated with the packet (e.g....
Definition: packet.hh:431
X86ISA::GpuTLB::MemSidePort::recvReqRetry
virtual void recvReqRetry()
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
Definition: gpu_tlb.cc:1358
X86ISA::GpuTLB::translateInt
Fault translateInt(bool read, const RequestPtr &req, ThreadContext *tc)
Definition: gpu_tlb.cc:301
Event
Definition: eventq.hh:246
X86ISA::GpuTLB::MemSidePort::recvFunctional
virtual void recvFunctional(PacketPtr pkt)
Definition: gpu_tlb.hh:281
X86ISA::GpuTLB::TLBEvent::process
void process()
Definition: gpu_tlb.cc:1079
sim_object.hh
X86ISA::GpuTLB::TranslationState::reqCnt
std::vector< int > reqCnt
Definition: gpu_tlb.hh:332
X86ISA::GpuTLB::FA
bool FA
true if this is a fully-associative TLB
Definition: gpu_tlb.hh:121
Fault
std::shared_ptr< FaultBase > Fault
Definition: types.hh:240
statistics.hh
X86ISA::GpuTLB::allocationPolicy
bool allocationPolicy
Allocation Policy: true if we always allocate on a hit, false otherwise.
Definition: gpu_tlb.hh:128
X86ISA::GpuTLB::avgReuseDistance
Stats::Scalar avgReuseDistance
Definition: gpu_tlb.hh:198
X86ISA::GpuTLB::regStats
void regStats() override
Callback to set stat parameters.
Definition: gpu_tlb.cc:663
X86ISA::GpuTLB::cleanup
void cleanup()
Definition: gpu_tlb.cc:1366
segment.hh
X86ISA::GpuTLB
Definition: gpu_tlb.hh:63
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
X86ISA::GpuTLB::EntryList
std::list< TlbEntry * > EntryList
Definition: gpu_tlb.hh:68
X86ISA::GpuTLB::AccessPatternTable
std::unordered_map< Addr, AccessInfo > AccessPatternTable
Definition: gpu_tlb.hh:422
ArmISA::mode
Bitfield< 4, 0 > mode
Definition: miscregs_types.hh:70
X86ISA::GpuTLB::invalidateAll
void invalidateAll()
Definition: gpu_tlb.cc:228
X86ISA::Walker
Definition: pagetable_walker.hh:56
port.hh
X86ISA::GpuTLB::AccessInfo::totalReuseDistance
unsigned int totalReuseDistance
Definition: gpu_tlb.hh:407
X86ISA::GpuTLB::lookupIt
EntryList::iterator lookupIt(Addr va, bool update_lru=true)
Definition: gpu_tlb.cc:185
X86ISA::GpuTLB::AccessInfo::lastTimeAccessed
unsigned int lastTimeAccessed
Definition: gpu_tlb.hh:404
X86ISA::GpuTLB::translateAtomic
Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode, int &latency)
Definition: gpu_tlb.cc:622
X86ISA::GpuTLB::MemSidePort::recvAtomic
virtual Tick recvAtomic(PacketPtr pkt)
Definition: gpu_tlb.hh:280
X86ISA::GpuTLB::MISS_RETURN
@ MISS_RETURN
Definition: gpu_tlb.hh:221
X86ISA::GpuTLB::CpuSidePort::recvTimingReq
virtual bool recvTimingReq(PacketPtr pkt)
recvTiming receives a coalesced timing request from a TLBCoalescer and it calls issueTLBLookup() It o...
Definition: gpu_tlb.cc:1109
X86ISA::GpuTLB::TLBEvent::pkt
PacketPtr pkt
Definition: gpu_tlb.hh:371
RequestPort
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Definition: port.hh:74
X86ISA::GpuTLB::entryList
std::vector< EntryList > entryList
An entryList per set is the equivalent of an LRU stack; it's used to guide replacement decisions.
Definition: gpu_tlb.hh:157
X86ISA::GpuTLB::~GpuTLB
~GpuTLB()
Definition: gpu_tlb.cc:130
X86ISA::GpuTLB::CpuSidePort::recvAtomic
virtual Tick recvAtomic(PacketPtr pkt)
Receive an atomic request packet from the peer.
Definition: gpu_tlb.hh:251
X86ISA::GpuTLB::localNumTLBHits
Stats::Scalar localNumTLBHits
Definition: gpu_tlb.hh:175
X86ISA::GpuTLB::setConfigAddress
void setConfigAddress(uint32_t addr)
Definition: gpu_tlb.cc:242
X86ISA
This is exposed globally, independent of the ISA.
Definition: acpi.hh:55
X86ISA::GpuTLB::TLB_HIT
@ TLB_HIT
Definition: gpu_tlb.hh:221
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
X86ISA::GpuTLB::tlbLookup
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.
Definition: gpu_tlb.cc:370
X86ISA::GpuTLB::exitCallback
void exitCallback()
Definition: gpu_tlb.cc:1425
X86ISA::GpuTLB::TLBEvent::virtPageAddr
Addr virtPageAddr
Definition: gpu_tlb.hh:366
X86ISA::GpuTLB::CpuSidePort::recvRespRetry
virtual void recvRespRetry()
Called by the peer if sendTimingResp was called on this protocol (causing recvTimingResp to be called...
Definition: gpu_tlb.hh:255
X86ISA::GpuTLB::AccessInfo::meanDistance
unsigned int meanDistance
Definition: gpu_tlb.hh:419
X86ISA::GpuTLB::TLBFootprint
AccessPatternTable TLBFootprint
Definition: gpu_tlb.hh:423
X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:79
X86ISA::GpuTLB::pageTableCycles
Stats::Scalar pageTableCycles
Definition: gpu_tlb.hh:190
X86ISA::GpuTLB::doMmuRegRead
Tick doMmuRegRead(ThreadContext *tc, Packet *pkt)
X86ISA::GpuTLB::TLBEvent::getTLBEventVaddr
Addr getTLBEventVaddr()
Definition: gpu_tlb.cc:1097
X86ISA::GpuTLB::TLBEvent
Definition: gpu_tlb.hh:362
X86ISA::p
Bitfield< 0 > p
Definition: pagetable.hh:151
X86ISA::GpuTLB::TLB_MISS
@ TLB_MISS
Definition: gpu_tlb.hh:221
X86ISA::GpuTLB::size
int size
Definition: gpu_tlb.hh:114
X86ISA::GpuTLB::hasMemSidePort
bool hasMemSidePort
if true, then this is not the last level TLB
Definition: gpu_tlb.hh:133
clocked_object.hh
Stats::Formula
A formula for statistics that is calculated when printed.
Definition: statistics.hh:3037
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
X86ISA::GpuTLB::handleFuncTranslationReturn
void handleFuncTranslationReturn(PacketPtr pkt, tlbOutcome outcome)
handleFuncTranslationReturn is called on a TLB hit, when a TLB miss returns or when a page fault retu...
Definition: gpu_tlb.cc:1132
std::deque
STL deque class.
Definition: stl.hh:44
X86ISA::GpuTLB::printAccessPattern
void printAccessPattern()
X86ISA::GpuTLB::CpuSidePort::tlb
GpuTLB * tlb
Definition: gpu_tlb.hh:247
X86ISA::GpuTLB::MemSidePort::MemSidePort
MemSidePort(const std::string &_name, GpuTLB *gpu_TLB, PortID _index)
Definition: gpu_tlb.hh:269
X86ISA::GpuTLB::Translation::finish
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...
X86ISA::GpuTLB::localLatency
Stats::Formula localLatency
Definition: gpu_tlb.hh:195
logging.hh
X86ISA::GpuTLB::freeList
std::vector< EntryList > freeList
Definition: gpu_tlb.hh:148
X86ISA::GpuTLB::issueTLBLookup
void issueTLBLookup(PacketPtr pkt)
Do the TLB lookup for this coalesced request and schedule another event <TLB access latency> cycles l...
Definition: gpu_tlb.cc:751
X86ISA::GpuTLB::TLBEvent::TLBEvent
TLBEvent(GpuTLB *_tlb, Addr _addr, tlbOutcome outcome, PacketPtr _pkt)
Definition: gpu_tlb.cc:831
X86ISA::GpuTLB::TranslationState::ports
std::vector< ResponsePort * > ports
Definition: gpu_tlb.hh:328
CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:63
X86ISA::GpuTLB::updatePageFootprint
void updatePageFootprint(Addr virt_page_addr)
Definition: gpu_tlb.cc:1390
X86ISA::GpuTLB::CpuSidePort::recvFunctional
virtual void recvFunctional(PacketPtr pkt)
Receive a functional request packet from the peer.
Definition: gpu_tlb.cc:1204
X86ISA::GpuTLB::doMmuRegWrite
Tick doMmuRegWrite(ThreadContext *tc, Packet *pkt)
std::list< TlbEntry * >
X86ISA::GpuTLB::accessCycles
Stats::Scalar accessCycles
Definition: gpu_tlb.hh:188
X86ISA::GpuTLB::Translation
Definition: gpu_tlb.hh:79
CheckpointIn
Definition: serialize.hh:67
X86ISA::GpuTLB::configAddress
uint32_t configAddress
Definition: gpu_tlb.hh:70
X86ISA::GpuTLB::outstandingReqs
int outstandingReqs
Definition: gpu_tlb.hh:350
X86ISA::GpuTLB::serialize
virtual void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: gpu_tlb.cc:653
X86ISA::GpuTLB::CpuSidePort::index
int index
Definition: gpu_tlb.hh:248
X86ISA::GpuTLB::TLBEvent::updateOutcome
void updateOutcome(tlbOutcome _outcome)
Definition: gpu_tlb.cc:1091
X86ISA::GpuTLB::translationReturn
void translationReturn(Addr virtPageAddr, tlbOutcome outcome, PacketPtr pkt)
A TLBEvent is scheduled after the TLB lookup and helps us take the appropriate actions: (e....
Definition: gpu_tlb.cc:965
X86ISA::GpuTLB::Mode
enum BaseTLB::Mode Mode
Definition: gpu_tlb.hh:77
X86ISA::GpuTLB::GpuTLB
GpuTLB(const Params *p)
Definition: gpu_tlb.cc:66
X86ISA::GpuTLB::lookup
TlbEntry * lookup(Addr va, bool update_lru=true)
Definition: gpu_tlb.cc:215
X86ISA::GpuTLB::TranslationState::TranslationState
TranslationState(Mode tlb_mode, ThreadContext *_tc, bool _prefetch=false, Packet::SenderState *_saved=nullptr)
Definition: gpu_tlb.hh:337
X86ISA::GpuTLB::TranslationState::tlbMode
Mode tlbMode
Definition: gpu_tlb.hh:313
X86ISA::GpuTLB::Params
X86GPUTLBParams Params
Definition: gpu_tlb.hh:73
callback.hh
ArmISA::va
Bitfield< 8 > va
Definition: miscregs_types.hh:272
X86ISA::GpuTLB::AccessInfo::sumDistance
unsigned int sumDistance
Definition: gpu_tlb.hh:418
X86ISA::GpuTLB::globalTLBMissRate
Stats::Formula globalTLBMissRate
Definition: gpu_tlb.hh:185
X86ISA::GpuTLB::CpuSidePort::recvRangeChange
virtual void recvRangeChange()
Definition: gpu_tlb.hh:253
X86ISA::GpuTLB::tlb
std::vector< TlbEntry > tlb
Definition: gpu_tlb.hh:141
X86ISA::GpuTLB::TranslationState::tc
ThreadContext * tc
Definition: gpu_tlb.hh:315
X86ISA::GpuTLB::invalidateNonGlobal
void invalidateNonGlobal()
Definition: gpu_tlb.cc:248
X86ISA::GpuTLB::MemSidePort::tlb
GpuTLB * tlb
Definition: gpu_tlb.hh:276
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
X86ISA::GpuTLB::TranslationState
TLB TranslationState: this currently is a somewhat bastardization of the usage of SenderState,...
Definition: gpu_tlb.hh:310
X86ISA::GpuTLB::TLBEvent::tlb
GpuTLB * tlb
Definition: gpu_tlb.hh:365

Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17