From 5c138fe263d3d0908b242df7727e3543c82367e8 Mon Sep 17 00:00:00 2001 From: Peter Rugg Date: Wed, 1 Apr 2020 12:46:55 +0100 Subject: [PATCH] Fix overly strict derivability check --- CHERICC_Fat.bsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHERICC_Fat.bsv b/CHERICC_Fat.bsv index b38edad..cbcdab5 100644 --- a/CHERICC_Fat.bsv +++ b/CHERICC_Fat.bsv @@ -1079,7 +1079,7 @@ instance CHERICap #(CapReg, OTypeW, FlagsW, CapAddressW, CapW, TSub#(MW, 3)); function Bool isDerivable (CapReg cap); return cap.bounds.exp <= resetExp && !(cap.bounds.exp == resetExp && ((truncateLSB(cap.bounds.topBits) != 1'b0) || (truncateLSB(cap.bounds.baseBits) != 2'b0))) - && !(cap.bounds.exp == resetExp-1 && (truncateLSB(cap.bounds.baseBits) != 2'b0)) + && !(cap.bounds.exp == resetExp-1 && (truncateLSB(cap.bounds.baseBits) != 1'b0)) && (cap.reserved == 0); endfunction