Skip to content

ctrl: fix an oversized literal in the 1x1 block enable - #44

Open
alessiomangone wants to merge 1 commit into
pulp-platform:mainfrom
FondazioneChipsIT:amangone/ctrl-1x1-literal
Open

alessiomangone wants to merge 1 commit into
pulp-platform:mainfrom
FondazioneChipsIT:amangone/ctrl-1x1-literal

Conversation

@alessiomangone

Copy link
Copy Markdown

In 1x1 mode, neureka_ctrl.sv sets the 9-bit enable_block to 9'h0ffffffff (rtl/ctrl/neureka_ctrl.sv:957). This literal has more digits than 9 bits can hold.

  • QuestaSim truncates it to 9'h1ff and prints two warnings: vlog-2600 ("Redundant digits in numeric literal") and vlog-13562 ("Size of the numeric literal '0ffffffff' is bigger than the specified number of bits '9'").
  • Verilator 5.050 and 5.052 stop with an error: Too many digits for 9 bit number: '9'h0ffffffff'. Verilator master turns it into the WIDTHDIGITS warning (Warn instead of error in case of too wide literals verilator/verilator#8736), which still stops a build that does not use -Wno-fatal.

This PR writes 9'h1ff, the value QuestaSim already uses, so the behaviour does not change.

The same line is also on yt/hci-structs (#38), at rtl/ctrl/neureka_ctrl.sv:1044.

Testing

I checked the expression in a small module with Verilator 5.050, 5.052 and master, and with QuestaSim 2026.1_2. With the change, all of them accept it without errors or warnings.

I have also used this change as a local patch since August 2026, on SoCs with a PULP cluster that includes NEureka, on a crossbar and on a mesh. They build and simulate with QuestaSim 2026.1_2 and Verilator 5.050.

`9'h0ffffffff` has more digits than 9 bits can hold. QuestaSim
truncates it to `9'h1ff` with two warnings; Verilator 5.050 and 5.052
stop with an error. Write `9'h1ff` directly.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant