From c1786bfec884596a05ea249b47d56b0fb20da6a4 Mon Sep 17 00:00:00 2001 From: David Harris Date: Mon, 1 May 2023 08:14:19 -0700 Subject: [PATCH] IMMU exclude non word-sized accesses --- sim/coverage-exclusions-rv64gc.do | 7 +++++++ src/mmu/mmu.sv | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sim/coverage-exclusions-rv64gc.do b/sim/coverage-exclusions-rv64gc.do index 88116aa3..ff9faeb5 100644 --- a/sim/coverage-exclusions-rv64gc.do +++ b/sim/coverage-exclusions-rv64gc.do @@ -201,6 +201,13 @@ coverage exclude -scope /dut/core/ifu/immu/immu/tlb/tlb/tlbcontrol -linerange $l set line [GetLineNum ../src/mmu/tlb/tlbcontrol.sv "~CAMHit & TLBAccess"] coverage exclude -scope /dut/core/ifu/immu/immu/tlb/tlb/tlbcontrol -linerange $line-$line -item e 1 -fecexprrow 3 +# IMMU only makes word-sized accesses +set line [GetLineNum ../src/mmu/mmu.sv "exclusion-tag: immu-wordaccess"] +set line2 [expr $line + 6 ] +coverage exclude -scope /dut/core/ifu/immu/immu -linerange $line-$line2 -item e 1 -fecexprrow 4 +coverage exclude -scope /dut/core/ifu/immu/immu -linerange $line-$line2 -item b 1 +coverage exclude -scope /dut/core/ifu/immu/immu -linerange $line-$line2 -item s 1 + # Excluding reset and clear for impossible case in the wficountreg in privdec set line [GetLineNum ../src/generic/flop/floprc.sv "reset \\| clear"] coverage exclude -scope /dut/core/priv/priv/pmd/wfi/wficountreg -linerange $line-$line -item c 1 -feccondrow 2 diff --git a/src/mmu/mmu.sv b/src/mmu/mmu.sv index ccbbfaf7..380787e6 100644 --- a/src/mmu/mmu.sv +++ b/src/mmu/mmu.sv @@ -128,7 +128,7 @@ module mmu #(parameter TLB_ENTRIES = 8, IMMU = 0) ( assign StoreAmoAccessFaultM = (PMAStoreAmoAccessFaultM | PMPStoreAmoAccessFaultM) & ~TLBMiss; // Misaligned faults - always_comb + always_comb // exclusion-tag: immu-wordaccess case(Size[1:0]) 2'b00: DataMisalignedM = 0; // lb, sb, lbu 2'b01: DataMisalignedM = VAdr[0]; // lh, sh, lhu