Deleted Added
sdiff udiff text old ( 10687:276da6265ab8 ) new ( 10905:a6ca6831e775 )
full compact
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 60 unchanged lines hidden (view full) ---

69 Stats::Formula data_misses;
70 Stats::Formula data_acv;
71 Stats::Formula data_accesses;
72
73
74 typedef std::multimap<Addr, int> PageTable;
75 PageTable lookupTable; // Quick lookup into page table
76
77 TlbEntry *table; // the Page Table
78 int size; // TLB Size
79 int nlu; // not last used entry (for replacement)
80
81 void nextnlu() { if (++nlu >= size) nlu = 0; }
82 TlbEntry *lookup(Addr vpn, uint8_t asn);
83
84 public:
85 typedef AlphaTLBParams Params;
86 TLB(const Params *p);
87 virtual ~TLB();
88
89 void takeOverFrom(BaseTLB *otlb) {}
90
91 virtual void regStats();
92
93 int getsize() const { return size; }
94
95 TlbEntry &index(bool advance = true);
96 void insert(Addr vaddr, TlbEntry &entry);
97
98 void flushAll();
99 void flushProcesses();
100 void flushAddr(Addr addr, uint8_t asn);
101

--- 11 unchanged lines hidden (view full) ---

113 // unimplemented bits must be all 0 or all 1
114 Addr unimplBits = vaddr & VAddrUnImplMask;
115 return unimplBits == 0 || unimplBits == VAddrUnImplMask;
116 }
117
118 static Fault checkCacheability(RequestPtr &req, bool itb = false);
119
120 // Checkpointing
121 virtual void serialize(std::ostream &os);
122 virtual void unserialize(Checkpoint *cp, const std::string &section);
123
124 // Most recently used page table entries
125 TlbEntry *EntryCache[3];
126 inline void
127 flushCache()
128 {
129 memset(EntryCache, 0, 3 * sizeof(TlbEntry*));
130 }

--- 27 unchanged lines hidden ---