From 88751cccba36a417a5e05ff404c5b73f1601b0bc Mon Sep 17 00:00:00 2001 From: Peter Rugg Date: Wed, 14 Apr 2021 14:55:57 +0100 Subject: [PATCH] Remove hardcoded field encodings for cap loads and stores --- src_Core/RISCY_OOO/procs/lib/Decode.bsv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src_Core/RISCY_OOO/procs/lib/Decode.bsv b/src_Core/RISCY_OOO/procs/lib/Decode.bsv index 401af3d..e2302c1 100755 --- a/src_Core/RISCY_OOO/procs/lib/Decode.bsv +++ b/src_Core/RISCY_OOO/procs/lib/Decode.bsv @@ -92,8 +92,8 @@ function Maybe#(MemInst) decodeMemInst(Instruction inst, Bool cap_mode); illegalInst = True; end - Bool capWidth = ((mem_func == St || mem_func == Amo) && funct3 == 3'b100) - || (opcode == opcMiscMem && funct3 == 3'b010); + Bool capWidth = ((mem_func == St || mem_func == Amo) && funct3 == f3_SQ) + || (opcode == opcMiscMem && funct3 == f3_LQ); if (capWidth && amo_func != None && amo_func != Swap) begin illegalInst = True; // Don't support atomic cap arithmetic