diff options
author | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2024-05-13 17:48:26 +0200 |
---|---|---|
committer | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2024-05-13 17:48:26 +0200 |
commit | 9c7d7fd782f70d99120ce6ac45a897606b52c878 (patch) | |
tree | a6f36fed8ec3e42e08d51afee500190af8194df4 /src/result_mux.v | |
parent | 05366e24d8b3cfca4b856b1b3740d535cbdf7dd7 (diff) | |
download | riscv_cpu-9c7d7fd782f70d99120ce6ac45a897606b52c878.tar.gz riscv_cpu-9c7d7fd782f70d99120ce6ac45a897606b52c878.zip |
refactoring constants
Diffstat (limited to 'src/result_mux.v')
-rw-r--r-- | src/result_mux.v | 10 |
1 files changed, 6 insertions, 4 deletions
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 |