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/result_mux.v | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/result_mux.v') diff --git a/src/result_mux.v b/src/result_mux.v index 047a392..528913d 100644 --- a/src/result_mux.v +++ b/src/result_mux.v @@ -8,12 +8,14 @@ module result_mux ( output reg [31:0] result ); +`include "include/consts.vh" + always @(*) begin case (result_src) - 2'b00: result <= src_alu_result_buf; - 2'b01: result <= src_data_buf; - 2'b10: result <= src_alu_result; - default: result <= 32'b0; + RESULT_SRC_ALU_RESULT_BUF: result <= src_alu_result_buf; + RESULT_SRC_DATA_BUF: result <= src_data_buf; + RESULT_SRC_ALU_RESULT: result <= src_alu_result; + default: result <= 32'b0; endcase end -- cgit v1.2.3