From 80add6415cfc410ffaebe5b4b4ced4883ae01075 Mon Sep 17 00:00:00 2001 From: TomW Date: Mon, 9 Mar 2015 20:31:17 +0000 Subject: [PATCH] Added TLB miss penalties. --- src/mem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mem.c b/src/mem.c index 39ec7d4..b4b62eb 100644 --- a/src/mem.c +++ b/src/mem.c @@ -767,6 +767,8 @@ void addreadlookup(uint32_t virt, uint32_t phys) readlookupp[readlnext]=mmu_perm; readlookup[readlnext++]=virt>>12; readlnext&=(cachesize-1); + + cycles -= 9; } void addwritelookup(uint32_t virt, uint32_t phys) @@ -817,6 +819,8 @@ void addwritelookup(uint32_t virt, uint32_t phys) writelookupp[writelnext] = mmu_perm; writelookup[writelnext++] = virt >> 12; writelnext &= (cachesize - 1); + + cycles -= 9; } #undef printf