Skip to content

Commit 26b419d

Browse files
Merge pull request #253 from Silabs-ArjanB/ArjanB_todofl
Added todos related to recent PRs
2 parents c52be10 + fe941ae commit 26b419d

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

rtl/cv32e40s_controller_fsm.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ module cv32e40s_controller_fsm import cv32e40s_pkg::*;
256256
// Todo: Use allow_dummy_instr to guarantee progress (ensure there are never two dummies in a row in any pipeline stage)
257257
assign ctrl_fsm_o.allow_dummy_instr = (!dcsr_i.step && // Valid in IF because it can only be written in debug mode
258258
!debug_mode_q) && // Valid in IF because pipeline is killed when entering and exiting debug
259-
first_op_if_i;
259+
first_op_if_i; // todo: unqualified use of first_op_if_i; also remove unneeded brackets above
260260

261261
// ID stage
262262

rtl/cv32e40s_if_stage.sv

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ module cv32e40s_if_stage import cv32e40s_pkg::*;
355355
assign instr_valid = (prefetch_valid || dummy_insert) && !ctrl_fsm_i.kill_if && !ctrl_fsm_i.halt_if;
356356

357357
// if_stage ready when killed, otherwise when not halted or if a dummy instruction is inserted.
358-
assign if_ready = ctrl_fsm_i.kill_if || (seq_ready && predec_ready && !dummy_insert && !ctrl_fsm_i.halt_if);
358+
assign if_ready = ctrl_fsm_i.kill_if || (seq_ready && predec_ready && !dummy_insert && !ctrl_fsm_i.halt_if);// todo: !dummy_insert should not be needed here if factored into seq_ready, predec_ready already as would be logical
359359

360360

361361

@@ -374,7 +374,7 @@ module cv32e40s_if_stage import cv32e40s_pkg::*;
374374
assign if_busy_o = prefetch_busy;
375375

376376
// Ensures one shift of lfsr0 for each instruction inserted in IF
377-
assign lfsr_shift_o = (if_valid_o && id_ready_i) && dummy_insert;
377+
assign lfsr_shift_o = if_valid_o && id_ready_i && dummy_insert;
378378

379379
assign ptr_in_if_o = prefetch_is_clic_ptr || prefetch_is_tbljmp_ptr;
380380

@@ -391,7 +391,8 @@ module cv32e40s_if_stage import cv32e40s_pkg::*;
391391
// todo: Factor CLIC pointers?
392392
assign last_op_o = trigger_match_i ? 1'b1 :
393393
tbljmp ? 1'b0 : // tbljmps are the first half
394-
dummy_insert ? 1'b1 : // Dummies are always single operation
394+
dummy_insert ? 1'b1 : // Dummies are always single operation // todo: also first_op_o = 1?
395+
// todo: provide list of IF 'submodules' and explanation on their relative priorities and exclusivity. Also ordering of tbljmp and dummy_insert is misleading here
395396
seq_valid ? seq_last : 1'b1; // Any other regular instructions are single operation.
396397

397398
// Flag first operation of a sequence.
@@ -512,12 +513,12 @@ module cv32e40s_if_stage import cv32e40s_pkg::*;
512513

513514
// Setting predec_ready to id_ready_i here instead of passing it through the predecoder.
514515
// Predecoder is purely combinatorial and is always ready for new inputs
515-
assign predec_ready = id_ready_i;
516+
assign predec_ready = id_ready_i; // todo: && !dummy_insert
516517

517518
// Dummies are allowed when first_op_o == 1
518519
// If the first operation of a sequence is ready, we allow dummies
519520
// but must not advance the sequencer.
520-
assign seq_pop = id_ready_i && !dummy_insert;
521+
assign seq_pop = id_ready_i && !dummy_insert; // todo: seq_pop not declared and name unclear. Rename to id_ready_no_dummy
521522

522523
// Do not signal valid to the sequencer in case of a trigger match.
523524
// No need for the sequencer to start a sequence, the instruction will cause

sva/cv32e40s_ex_stage_sva.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ endgenerate
143143

144144

145145
// Check that branch target remains constant while a branch instruction is in EX
146-
// Restricted check to only be valid when local instr_valid is true, as the branch target
146+
// Restricted check to only be valid when local instr_valid is true, as the branch target // todo: not agreed with using instr_valid here (it is much to broad/permissive); maybe data independent timing related CSR needs to be handled differently to make this assertion easier to reason about
147147
// will change when data independent timing is being enabled in WB. Eventually the branch will
148148
// then be killed. When data independing timing is enabled, the target may change from operand_c to pc_if.
149149
property p_bch_target_stable;

0 commit comments

Comments
 (0)