From 9ed3dc3312896814674273d8c112da0dc2cb08ee Mon Sep 17 00:00:00 2001 From: "(Tim) Efthimis Kritikos" Date: Fri, 24 Feb 2023 12:27:29 +0000 Subject: [PATCH] Fixed bug introduced in a previous commit about fixing ADD --- system/decoder.v | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/system/decoder.v b/system/decoder.v index faef720..0094364 100644 --- a/system/decoder.v +++ b/system/decoder.v @@ -100,15 +100,10 @@ always @( CIR or SIMPLE_MICRO or seq_addr_input ) begin reg_read_port2_addr={Wbit,3'b000}; reg_write_addr={Wbit,3'b000}; ALU_1OP=`ALU_OP_ADD; - case({Sbit,Wbit}) - 2'b00,2'b11: - next_state=`PROC_DE_LOAD_8_PARAM; - 2'b01: - next_state=`PROC_DE_LOAD_16_PARAM; - default:begin - `invalid_instruction - end - endcase + if(Wbit) + next_state=`PROC_DE_LOAD_16_PARAM; + else + next_state=`PROC_DE_LOAD_8_PARAM; end 11'b1000_00xx_101, /* SUB */ 11'b1000_00xx_000 : /* ADD */ begin