-
v0.60.0
Stablereleased this
2026-10-08 01:18:14 -07:00 | 55 commits to master since this releaseRename and references through a generate block label
TODO §65.1, topo §2.9 row 43 (MCP-14). (
docs/features/generate-label-rename.)renameof a block label rewrites every path through it. Renaming
g_laneinfor (…) begin : g_laneused to rewrite the label alone,
leavingg_lane[0].lane_q(andu_x.g_lane[1].sigin another file)
naming a block that no longer existed, with no warning. The label, its
closingend : g_lane, and every path segment naming the block — bare,
indexed (g[0].x,g[i].x), nested (g_a.g_b[2].x), behind an instance
path from another file — are now one reference set, renamed all or
nothing; a spelling inside macro text or a string is a warning. A name
declared inside a block is likewise renamed through such a path. Named
procedural blocks:begin : lbl,end : lblanddisable lbl;(and the
lbl: begin … end : lblform) are one set.find_references(LSPtextDocument/references,lucisv-mcp find refs) lists the declaration, the closing label and every segment, same
file and cross-file, with the declaring file open or closed.lucisv-mcp renameno longer refuses ablock-kind declaration.- Resolution changes every consumer sees: a
forgenerate block's label is a
name of the enclosing module (its genvar is not);generate … endgenerate
is not a scope;blk.xandarr[0].field(a packed struct array) resolve
their tails; an unnamedgenblk1still names nothing. The index cache
format moves to 21, so a 0.59.0 cache is rebuilt once. - A rename says so when a path it cannot resolve spells the name: a
hierarchical path segment in any file of the rename's set that resolved to
no declaration (tb.dut.gen_x[0].q, rooted at a top module) is left
unchanged and warned about with its lines, for every kind of declaration;
and renaming a member one arm of a generateif/casedeclares warns
about the same-named member of the arm sharing its label. duplicate-declarationnow also reports a block label beside a net,
variable, parameter or instance of the same name, and such a label is no
longer counted as a read of the net.- Rename and port warnings name a file by its path whenever another file of
the set shares its base name (twopwrmgr_if.svare two findable lines,
root-relative inlucisv-mcp), and a line a path warning names is not
repeated underunresolved:. Same-named members are warned about through
every enclosing same-label generate arm (g.h.x), and an escaped name's
unresolved paths are found too. - Rename warnings and mentions are about the renamed declaration. For a
member of a module or interface (a net, variable, port, parameter, block,
…), a bare spelling of its name in a macro argument, a`definebody, an
unstructured assertion, a comment or a string is reported only where it can
mean it: in the declaration's home set — the declaring file,
everything it`includes, whatever includes it (transitively), and the
files the rename edits. In code, a spelling in the declaring file is
reported after a scope lookup finds the declaration there (an instantiating
module's own same-named signal is not); one in an included fragment always;
a`definebody when the macro is invoked from the home set (through
other macros too —ASSERT_DEFAULT_CLK'sclk_i); a macro argument inside
abindinto the declaring module; and a bare use in the plain code of an
included fragment (prim_util_memload.svh'smem) is named as a use the
rename could not edit. Reported wherever they are written: a dotted
spelling (.state_q, a possible hierarchical path); a bare macro argument
the macro carries to the declaration — after a.(`CONN(state_q)
building.state_q(state_q),`FORCE(state_q)building
force u_m.state_q), into abindinto the declaring module, or into a
macro lucisv has no definition of; and the body of a macro that expands to
such abind. Not reported: a body whose spellings are only its own
parameter named like the declaration (unless the body also spells the name
after a., or a default argument spells it), and a backtick inside a
string. Any doubt means no scoping: a module, interface, package or
package member, a declaration outside a module, or one whose home set holds
an include lucisv cannot resolve (a macro-built name, a file outside the
project such asuvm_macros.svh) is reported everywhere as before. On
opentitan thestate_qrename's answer went from 274 lines (61 kB, 230
macro warnings, 229 about other modules) to about 72 lines (12 kB),
hmac_core.StIdle's from 48 lines to 3. duplicate-declarationalso reports a block label beside a port, genvar,
typedef, function or task, and two named procedural blocks of one label in
one scope.lucisv-mcp renamewith many warnings is fast again: rooting the warning
paths was quadratic per warning (astate_qrename on opentitan: 125 s →
3.3 s). Naming the files in warnings no longer scans the whole set once per
file either: the engine's part of that rename went from 2.9 s to 2.2 s.- A use in a file that includes the declaring file (or that it includes) is
no longer reported as "left unchanged" when the rename did rewrite it —
renaming a module whose instantiation sits in a file included beside it
said so wrongly.
Downloads