diff --git a/core/mmu_unify/cva6_shared_tlb.sv b/core/mmu_unify/cva6_shared_tlb.sv index 6bd34a0d0e..b39031c7b9 100644 --- a/core/mmu_unify/cva6_shared_tlb.sv +++ b/core/mmu_unify/cva6_shared_tlb.sv @@ -153,7 +153,7 @@ module cva6_shared_tlb //identify page_match for all TLB Entries for (x = 0; x < PT_LEVELS; x++) begin - assign page_match[i][x] = x == 0 ? 1 :shared_tag_rd[i].is_page[PT_LEVELS-1-x]; + assign page_match[i][x] = x == 0 ? 1 : shared_tag_rd[i].is_page[PT_LEVELS-1-x]; assign vpn_match[i][x] = vpn_q[x] == shared_tag_rd[i].vpn[x]; assign level_match[i][x] = &vpn_match[i][PT_LEVELS-1:x] & page_match[i][x]; end @@ -162,11 +162,11 @@ module cva6_shared_tlb genvar w; generate - for (w = 0; w < PT_LEVELS; w++) begin - assign vpn_d[w] = (enable_translation_i & itlb_access_i & ~itlb_hit_i & ~dtlb_access_i) ? // - itlb_vaddr_i[12+((VPN_LEN/PT_LEVELS)*(w+1))-1:12+((VPN_LEN/PT_LEVELS)*w)] : // - ((en_ld_st_translation_i & dtlb_access_i & ~dtlb_hit_i) ? // - dtlb_vaddr_i[12+((VPN_LEN/PT_LEVELS)*(w+1))-1:12+((VPN_LEN/PT_LEVELS)*w)] : vpn_q[w]); + for (w = 0; w < PT_LEVELS; w++) begin + assign vpn_d[w] = (enable_translation_i & itlb_access_i & ~itlb_hit_i & ~dtlb_access_i) ? // + itlb_vaddr_i[12+((VPN_LEN/PT_LEVELS)*(w+1))-1:12+((VPN_LEN/PT_LEVELS)*w)] : // + ((en_ld_st_translation_i & dtlb_access_i & ~dtlb_hit_i) ? // + dtlb_vaddr_i[12+((VPN_LEN/PT_LEVELS)*(w+1))-1:12+((VPN_LEN/PT_LEVELS)*w)] : vpn_q[w]); end endgenerate diff --git a/core/mmu_unify/cva6_tlb.sv b/core/mmu_unify/cva6_tlb.sv index 61bbc4754c..bc1adba896 100644 --- a/core/mmu_unify/cva6_tlb.sv +++ b/core/mmu_unify/cva6_tlb.sv @@ -244,6 +244,7 @@ module cva6_tlb en &= ~plru_tree_q[idx_base+(i>>shift)]; end end + replace_en[i] = en; end end