From fb1a629e07d1beab5ebef6e520e29776c1a02109 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Wed, 27 Oct 2021 15:44:23 +0100 Subject: [PATCH] Decode: Fix capability width mode-dependent LR/SC All of St, Amo, Lr and Sc use the normal 3-bit encoding for the width; rather than add Lr and Sc to the list, switch it just to exclude Ld as the special case that's handled by the other half of the expression. Previously LR.C and SC.C were decoded as LR.BU and SC.BU. --- src_Core/RISCY_OOO/procs/lib/Decode.bsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src_Core/RISCY_OOO/procs/lib/Decode.bsv b/src_Core/RISCY_OOO/procs/lib/Decode.bsv index c20349a..8287ad4 100755 --- a/src_Core/RISCY_OOO/procs/lib/Decode.bsv +++ b/src_Core/RISCY_OOO/procs/lib/Decode.bsv @@ -92,7 +92,7 @@ function Maybe#(MemInst) decodeMemInst(Instruction inst, Bool cap_mode); illegalInst = True; end - Bool capWidth = ((mem_func == St || mem_func == Amo) && funct3 == f3_SQ) + Bool capWidth = (mem_func != Ld && funct3 == f3_SQ) || (opcode == opcMiscMem && funct3 == f3_LQ); if (capWidth && amo_func != None && amo_func != Swap) begin