summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rv2insn.sv4
-rw-r--r--src/sched.sv4
2 files changed, 5 insertions, 3 deletions
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);