tlb.hh (7694:de057cccee82) | tlb.hh (7697:05b1a077977b) |
---|---|
1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 74 unchanged lines hidden (view full) --- 83 MustBeOne = 0x80 84 }; 85 protected: 86 typedef std::multimap<Addr, int> PageTable; 87 PageTable lookupTable; // Quick lookup into page table 88 89 TlbEntry *table; // the Page Table 90 int size; // TLB Size | 1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 74 unchanged lines hidden (view full) --- 83 MustBeOne = 0x80 84 }; 85 protected: 86 typedef std::multimap<Addr, int> PageTable; 87 PageTable lookupTable; // Quick lookup into page table 88 89 TlbEntry *table; // the Page Table 90 int size; // TLB Size |
91 int nlu; // not last used entry (for replacement) | |
92 93 uint32_t _attr; // Memory attributes for last accessed TLB entry 94 95#if FULL_SYSTEM 96 TableWalker *tableWalker; 97#endif 98 | 91 92 uint32_t _attr; // Memory attributes for last accessed TLB entry 93 94#if FULL_SYSTEM 95 TableWalker *tableWalker; 96#endif 97 |
99 void nextnlu() { if (++nlu >= size) nlu = 0; } | |
100 /** Lookup an entry in the TLB 101 * @param vpn virtual address 102 * @param asn context id/address space id to use 103 * @param functional if the lookup should modify state 104 * @return pointer to TLB entrry if it exists 105 */ 106 TlbEntry *lookup(Addr vpn, uint8_t asn, bool functional = false); 107 --- 5 unchanged lines hidden (view full) --- 113 mutable Stats::Scalar write_hits; 114 mutable Stats::Scalar write_misses; 115 mutable Stats::Scalar write_acv; 116 mutable Stats::Scalar write_accesses; 117 Stats::Formula hits; 118 Stats::Formula misses; 119 Stats::Formula accesses; 120 | 98 /** Lookup an entry in the TLB 99 * @param vpn virtual address 100 * @param asn context id/address space id to use 101 * @param functional if the lookup should modify state 102 * @return pointer to TLB entrry if it exists 103 */ 104 TlbEntry *lookup(Addr vpn, uint8_t asn, bool functional = false); 105 --- 5 unchanged lines hidden (view full) --- 111 mutable Stats::Scalar write_hits; 112 mutable Stats::Scalar write_misses; 113 mutable Stats::Scalar write_acv; 114 mutable Stats::Scalar write_accesses; 115 Stats::Formula hits; 116 Stats::Formula misses; 117 Stats::Formula accesses; 118 |
119 int rangeMRU; //On lookup, only move entries ahead when outside rangeMRU |
|
121 122 public: 123 typedef ArmTLBParams Params; 124 TLB(const Params *p); 125 126 virtual ~TLB(); 127 int getsize() const { return size; } 128 --- 78 unchanged lines hidden --- | 120 121 public: 122 typedef ArmTLBParams Params; 123 TLB(const Params *p); 124 125 virtual ~TLB(); 126 int getsize() const { return size; } 127 --- 78 unchanged lines hidden --- |