Skip to content

Commit

Permalink
triggers: refactor: move access_info to where it is used in mmu_t::tr…
Browse files Browse the repository at this point in the history
…anslate()
  • Loading branch information
YenHaoChen committed Sep 13, 2023
1 parent 2128daa commit 807baa7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions riscv/mmu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ reg_t mmu_t::translate(mem_access_info_t access_info, reg_t len)

tlb_entry_t mmu_t::fetch_slow_path(reg_t vaddr)
{
auto access_info = generate_access_info(vaddr, FETCH, {false, false, false});

tlb_entry_t result;
reg_t vpn = vaddr >> PGSHIFT;
if (unlikely(tlb_insn_tag[vpn % TLB_ENTRIES] != (vpn | TLB_CHECK_TRIGGERS))) {
auto access_info = generate_access_info(vaddr, FETCH, {false, false, false});
reg_t paddr = translate(access_info, sizeof(fetch_temp));
if (auto host_addr = sim->addr_to_mem(paddr)) {
result = refill_tlb(vaddr, paddr, host_addr, FETCH);
Expand Down

0 comments on commit 807baa7

Please sign in to comment.