Repository navigation
ctrl: fix an oversized literal in the 1x1 block enable - #44
Open
alessiomangone wants to merge 1 commit into
Open
alessiomangone wants to merge 1 commit into
alessiomangone wants to merge 1 commit into
Conversation
`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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In 1x1 mode,
neureka_ctrl.svsets the 9-bitenable_blockto9'h0ffffffff(rtl/ctrl/neureka_ctrl.sv:957). This literal has more digits than 9 bits can hold.9'h1ffand prints two warnings:vlog-2600("Redundant digits in numeric literal") andvlog-13562("Size of the numeric literal '0ffffffff' is bigger than the specified number of bits '9'").Too many digits for 9 bit number: '9'h0ffffffff'. Verilator master turns it into theWIDTHDIGITSwarning (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), atrtl/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.