Hi all,
I have 3 questions Q1: Does the "lookup" function search the vpn in both TLB and DRAM? file: src/arch/alpha/tlb.cc function: Fault TLB::translateData(RequestPtr req, ThreadContext *tc, bool write) code: // not a physical address: need to look up pte TlbEntry *entry = lookup(VAddr(req->getVaddr()).vpn(), asn); Q2: What is EntryCache? What is lookuptable? where does the lookuptable reside, in TLB or DRAM? // look up an entry in the TLB TlbEntry * TLB::lookup(Addr vpn, uint8_t asn) { // assume not found... TlbEntry *retval = NULL; if (EntryCache[0]) { if (vpn == EntryCache[0]->tag && (EntryCache[0]->asma || EntryCache[0]->asn == asn)) retval = EntryCache[0]; else if (EntryCache[1]) { if (vpn == EntryCache[1]->tag && (EntryCache[1]->asma || EntryCache[1]->asn == asn)) retval = EntryCache[1]; else if (EntryCache[2] && vpn == EntryCache[2]->tag && (EntryCache[2]->asma || EntryCache[2]->asn == asn)) retval = EntryCache[2]; } } if (retval == NULL) { PageTable::const_iterator i = lookupTable.find(vpn); if (i != lookupTable.end()) { while (i->first == vpn) { int index = i->second; TlbEntry *entry = &table[index]; assert(entry->valid); if (vpn == entry->tag && (entry->asma || entry->asn == asn)) { retval = updateCache(entry); break; } ++i; } } } Q3: if the entry is NULL, will this transition be deleted? If so, how this memory request will be dealt with in gem5? if (!entry) { // page fault if (write) { write_misses++; } else { read_misses++; } uint64_t flags = (write ? MM_STAT_WR_MASK : 0) | MM_STAT_DTB_MISS_MASK; return (req->getFlags() & AlphaRequestFlags::VPTE) ? (Fault)(std::make_shared<PDtbMissFault>(req->getVaddr(), req->getFlags(), flags)) : (Fault)(std::make_shared<NDtbMissFault>(req->getVaddr(), req->getFlags(), flags)); } Thank you very much. Yi
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users