ci: Lint the testbenches too and clear what that exposes - #192
Merged
DanielKellerM merged 4 commits intoAug 17, 2026
Conversation
DanielKellerM
force-pushed
the
ci/lint-testdir
branch
2 times, most recently
from
August 13, 2026 13:01
b350dd8 to
ecdaebc
Compare
DanielKellerM
force-pushed
the
ci/lint-testdir
branch
from
August 13, 2026 13:44
92ffe56 to
535c18e
Compare
The style gate walked src/ only, so test/ had never been linted and had accumulated 209 violations. Extend the tree-scoped gate to the testbenches and fix what it reports. The backpressure flag needed a paired change: verible rejects a bare $test$plusargs, and switching to $value$plusargs without also passing a value would have left backpressure deasserted and turned the second transpose stimulus into a copy of the first.
DanielKellerM
force-pushed
the
ci/lint-testdir
branch
from
August 17, 2026 10:16
535c18e to
647629f
Compare
Eighty-four blocks across the files this branch touches. Fifty-nine are rewritten as one line, eleven joined where they already fitted, and six deleted outright: a disabled replay branch and five commented-out $display calls are dead code, not comments to shorten. Two are kept. The desc64 "Copied from frontend" blocks are a register bit-field table, and a reader needs it at that spot; collapsing it would lose the map rather than the prose. The pretty-print format string kept twenty-four padding spaces per element when it was rewritten as a concatenation, so the change satisfied the linter while preserving what made it ugly. The padding sat before a newline, so dropping it leaves the rendered output identical.
The waiver reason is one line; the commit that added it owns the rest.
The tree lint reaches test/ now and this case has no default. The eight arms already cover e % 8, so the default is unreachable; it returns a sentinel that would fail the byte-exact compare rather than a value that could pass.
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.
Stacked on #186 (which added the tree-scoped gate over
src/); merge after it.The style gate only ever walked
src/, sotest/had never been linted and had accumulated 209 violations. This extends the gate to the testbenches and fixes what it reports, leaving the tree at zero.The one change that is not cosmetic
tb_idma_otf_transpose.svused$test$plusargs("BP"), which verible rejects. Swapping to$value$plusargsalone would have been a silent regression:idma.mkpassed+BPwith no value, so the parse would have failed,backpressurewould have stayed 0, and the backpressured transpose stimulus would have become a byte-identical rerun of the first - verible quiet, suite green, one stimulus gone.So the makefile and the testbench change together (
+BP=1plus$value$plusargs("BP=%d", ...)). Verified on the same binary:and the two suite runs still differ (
otf_transposeBP=0 vsotf_transpose_bpBP=1), so the second stimulus is genuinely live.Other classes
Line length, trailing whitespace, tabs, explicit parameter and task-parameter types, constraint and parameter naming, unpacked dimension ordering. The task-lifetime changes in
test/include/tb_tasks.svhare the ones with real semantics: those tasks contain no time control, so static storage is currently safe andautomaticis identical, but it removes the hazard the day someone adds a@(posedge clk)to a memory task - that file backs all eight generated backend testbenches, andinit_memandcompare_memalready run from differentinitialblocks.Renaming
constraint irqtoirq_calso removes a name collision with the module-levellogic irqin both desc64 testbenches.One waiver, named and justified
interface-name-styleontest/idma_intf.sv:IDMA_DV/IDMA_ND_DVare the exported verification API and are instantiated by name by downstream verification this repo's CI cannot see, so renaming them here would break it silently. No rule is disabled globally and no directory is excluded except the vendored files undertest/future/, which are named explicitly.Verified
make idma_lint_svoversrc/andtest/: 0 violationsmake idma_verify_all: rc=0, 24 elaboration OK, 21 sim PASS, 0 failures, 218 srw_axi,r_obi_w_axiandrw_obiall pass with their own per-variant configurations, gated on the transcript rather than the exit code