From b7678edeb8ac8d7b95719988c9bdaf52b734c212 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 22 Jul 2026 20:56:11 +0300 Subject: fix some verilator 5.048 warnings --- src/rv2insn.sv | 4 +++- src/sched.sv | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/rv2insn.sv b/src/rv2insn.sv index c5c355b..aeb7a8d 100644 --- a/src/rv2insn.sv +++ b/src/rv2insn.sv @@ -94,7 +94,9 @@ function automatic stages_out_t stages(int i, xlen_t pc, endfunction always_comb begin - stages_out_t out = stages(0, pc_i, rv_i, '0, alu_counter_r); + stages_out_t out; + + out = stages(0, pc_i, rv_i, '0, alu_counter_r); alu_counter = out.alu_counter; que_o = out.que; end diff --git a/src/sched.sv b/src/sched.sv index 4165dc8..e39a237 100644 --- a/src/sched.sv +++ b/src/sched.sv @@ -122,7 +122,7 @@ function automatic slot_t maybe_populate( return slot; endfunction -function automatic void schedule(insn_t[QUE_DEPTH-1:0] que, slot_t[SLOT_COUNT-1:0] slots); +task automatic schedule(insn_t[QUE_DEPTH-1:0] que, slot_t[SLOT_COUNT-1:0] slots); bit[SLOT_COUNT-1:0] possible[QUE_DEPTH]; bit[SLOT_COUNT-1:0] selected[QUE_DEPTH]; bit[$clog2(QUE_DEPTH)-1:0] shift; @@ -146,7 +146,7 @@ function automatic void schedule(insn_t[QUE_DEPTH-1:0] que, slot_t[SLOT_COUNT-1: /* should que be shifted somewhere else, I wonder? */ shift_o = shift; que_o = que_i >> (shift * $bits(insn_t)); -endfunction +endtask always_comb begin schedule(que_i, slots_i); -- cgit v1.3