From ee78aabc489622b4dec86ba43293329d3385c307 Mon Sep 17 00:00:00 2001 From: un-lock-able Date: Fri, 12 Jul 2024 00:02:09 +0800 Subject: [PATCH] Add ori --- PipelineProcessor.srcs/sources_1/new/ControlUnit.v | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/PipelineProcessor.srcs/sources_1/new/ControlUnit.v b/PipelineProcessor.srcs/sources_1/new/ControlUnit.v index 6f32ea6..1cb34fb 100644 --- a/PipelineProcessor.srcs/sources_1/new/ControlUnit.v +++ b/PipelineProcessor.srcs/sources_1/new/ControlUnit.v @@ -39,8 +39,8 @@ module ControlUnit ( assign memory_write = (opcode == 6'h2b) ? 1 : 0; - assign ALU_function = (opcode == 6'h0 && funct == 6'h24) ? 5'b00000: - (opcode == 6'h0 && funct == 6'h25) ? 5'b00001: + assign ALU_function = ((opcode == 6'h0 && funct == 6'h24) || opcode == 6'hc) ? 5'b00000: + ((opcode == 6'h0 && funct == 6'h25) || opcode == 6'hd) ? 5'b00001: (opcode == 6'h0 && (funct == 6'h22 || funct == 6'h23)) ? 5'b00110: (opcode == 6'ha || (opcode == 6'h0 && funct == 6'h2a)) ? 5'b00111: (opcode == 6'hb || (opcode == 6'h0 && funct == 56'h2b)) ? 5'b01000: @@ -71,6 +71,5 @@ module ControlUnit ( (funct == 6'h0 || funct == 6'h2 || funct == 6'h3))) ? 0 : 1; - assign extendop = (opcode == 6'hf) ? 2'b10: - (opcode == 6'hc) ? 2'b01:2'b00; + assign extendop = (opcode == 6'hf) ? 2'b10 : (opcode == 6'hc) ? 2'b01 : 2'b00; endmodule