From d06042d7b1d8d8f425167759c835afccbccb5b5b Mon Sep 17 00:00:00 2001 From: Andreas Traber Date: Wed, 30 Mar 2016 13:27:06 +0200 Subject: [PATCH] Fix some synthesis warnings --- alu.sv | 4 ++++ exc_controller.sv | 2 +- if_stage.sv | 12 ++---------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/alu.sv b/alu.sv index 7ed2873c..5d345245 100644 --- a/alu.sv +++ b/alu.sv @@ -90,6 +90,7 @@ module riscv_alu // // ////////////////////////////////////////////////////////////////////////////////////////// + logic adder_op_b_negate; logic [31:0] adder_op_a, adder_op_b; logic [35:0] adder_in_a, adder_in_b; logic [31:0] adder_result; @@ -185,6 +186,9 @@ module riscv_alu //////////////////////////////////////// logic shift_left; // should we shift left + logic shift_use_round; + logic shift_arithmetic; + logic [31:0] shift_amt_left; // amount of shift, if to the left logic [31:0] shift_amt; // amount of shift, to the right logic [31:0] shift_amt_int; // amount of shift, used for the actual shifters diff --git a/exc_controller.sv b/exc_controller.sv index 22f940e0..e2f3518b 100644 --- a/exc_controller.sv +++ b/exc_controller.sv @@ -109,7 +109,7 @@ module riscv_exc_controller begin if (irq_i[i]) begin cause_int[5] = 1'b1; - cause_int[4:0] = i; + cause_int[4:0] = $unsigned(i); end end end diff --git a/if_stage.sv b/if_stage.sv index 22f32563..11159090 100644 --- a/if_stage.sv +++ b/if_stage.sv @@ -128,11 +128,7 @@ module riscv_if_stage `EXC_PC_IRQ: exc_pc = { boot_addr_i[31:8], 1'b0, exc_vec_pc_mux_i[4:0], 2'b0 }; // TODO: Add case for EXC_PC_STORE as soon as it differs from load - default: begin - // synopsys translate_off - $display("%t: Illegal exc pc_mux value (%0d)!", $time, exc_pc_mux_i); - // synopsys translate_on - end + default:; endcase end @@ -149,11 +145,7 @@ module riscv_if_stage `PC_ERET: fetch_addr_n = exception_pc_reg_i; // PC is restored when returning from IRQ/exception `PC_DBG_NPC: fetch_addr_n = dbg_npc_i; // PC is taken from debug unit - default: begin - // synopsys translate_off - $display("%t: Illegal pc_mux_sel value (%0d)!", $time, pc_mux_i); - // synopsys translate_on - end + default:; endcase end