%Warning-SELRANGE: sargantana_icache_checker.sv:79: Selection index out of range: 511:256 outside 255:0
%Warning-SELRANGE: sargantana_icache_checker.sv:95: Selection index out of range: 383:256 outside 255:0
%Warning-SELRANGE: sargantana_icache_checker.sv:96: Selection index out of range: 511:384 outside 255:0
Description
Summary:
sargantana_icache_checkerdeclaresparameter int unsigned WAY_WIDHT = 32*8(256), but theLINES_256 == 1'b1branch ofchunk_selindexesdata[511:256], which needs 512. With the module's own defaults that selection is out of range.In practice
sargantana_top_icache.sv:393passesWAY_WIDHTfrom the package (512 in the default configuration), andLINES_256defaults to1'b0, so the branch is unreachable as integrated today. But instantiating the checker withLINES_256 = 1'b1without also overridingWAY_WIDHTwould read out of range rather than failing at elaboration.Environment
mainbranch, Verilator 5.048. Lintingsargantana_icache_checker.svstandalone (module defaults) reports:Hypothesis / Comments
Would you prefer the default raised to
64*8so it matches the widest path the module supports, or is the intent thatLINES_256is only ever set together with an explicitWAY_WIDHT? In the latter case an elaboration-time assertion might be clearer than leaving it implicit. Happy to send a PR either way.