Skip to content

Commit

Permalink
Marking instruction length as unused in IF stage
Browse files Browse the repository at this point in the history
This fixes an unused lint error in Verilator
  • Loading branch information
marnovandermaas committed Feb 20, 2024
1 parent c0f41ff commit ca2ebd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rtl/ibex_if_stage.sv
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,11 @@ module ibex_if_stage import ibex_pkg::*; import cheri_pkg::*; #(

// let's only check this in pure-cap mode. otherwise jalr/ret gives so much headache
// pre-calculate headroom to improve memory read timing
logic [2:0] instr_len;
logic [2:0] unused_instr_len;
logic [32:0] instr_hdrm;
logic hdrm_ge4, hdrm_ge2, hdrm_ok;

assign instr_len = (fetch_valid & ~fetch_err & instr_is_compressed) ? 2 : 4;
assign unused_instr_len = (fetch_valid & ~fetch_err & instr_is_compressed) ? 2 : 4;
assign instr_hdrm = pcc_cap_i.top33 - if_instr_addr;
assign hdrm_ge4 = (instr_hdrm >= 4);
assign hdrm_ge2 = (instr_hdrm >= 2);
Expand Down

0 comments on commit ca2ebd0

Please sign in to comment.