From 9c7d7fd782f70d99120ce6ac45a897606b52c878 Mon Sep 17 00:00:00 2001 From: Flavian Kaufmann Date: Mon, 13 May 2024 17:48:26 +0200 Subject: refactoring constants --- src/alu_b_src_mux.v | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/alu_b_src_mux.v') diff --git a/src/alu_b_src_mux.v b/src/alu_b_src_mux.v index 99dffab..615d312 100644 --- a/src/alu_b_src_mux.v +++ b/src/alu_b_src_mux.v @@ -7,12 +7,14 @@ module alu_b_src_mux ( output reg [31:0] alu_b ); +`include "include/consts.vh" + always @(*) begin case (alu_b_src) - 2'b00: alu_b <= src_rd2_buf; - 2'b01: alu_b <= src_imm; - 2'b10: alu_b <= 32'h4; - default: alu_b <= 32'b0; + ALU_B_SRC_RD2_BUF: alu_b <= src_rd2_buf; + ALU_B_SRC_IMM: alu_b <= src_imm; + ALU_B_SRC_4: alu_b <= 32'h4; + default: alu_b <= 32'b0; endcase end -- cgit v1.2.3