Supported syntax
lucisv targets Verilog-2001 and the common synthesizable SystemVerilog subset, plus the design-verification constructs most often encountered in real repositories. On the measured 820-file corpus, 99.3% of files parse; the remaining failures require cross-file macro expansion, hit a conditional-split outlier, or are not valid standalone inputs.
Design units and declarations
Section titled “Design units and declarations”- Modules, interfaces, programs, packages, classes, interface classes, generate regions, and nested classes.
- ANSI and non-ANSI ports, parameter ports, header imports,
timeunit,genvar, anddefparam. - Net and variable declarations, signing, packed and unpacked dimensions, net delays, and net drive strengths.
typedefaliases, enums, packed structs/unions, forward class declarations, anonymous aggregate types, and type parameters.- Virtual interfaces, parameterized class types, properties, methods, constructors, prototypes, and out-of-body method definitions.
- Functions and tasks in ANSI and legacy forms, DPI imports/exports, and package re-exports.
Procedural and concurrent code
Section titled “Procedural and concurrent code”assign,always,always_comb,always_ff,always_latch,initial, andfinal.- Blocks, conditionals, every
casekind, loops,foreach,fork/join*, waits, timing controls, events,force/release, and jump statements. - Immediate and concurrent assertions, sequences, properties,
expect,cover sequence, anddefault disable iff. Property and sequence expressions use their LRM precedence and participate in formatting and semantic tools. randomize() with,randcase, realrandsequenceproductions, statement-levellet, statement labels, array iterator methods, and omitted positional arguments.- Nonblocking
->>event triggers with optional timing and min:typ:max clocking skews. - Constraint blocks and randomization constraint bodies, including
soft,dist, implication,foreach, andsolve before. - Covergroups with coverpoints, bins, transitions, crosses,
with, andiffexpressions.
Instantiation and elaboration
Section titled “Instantiation and elaboration”- Module and gate instantiation, named and ordered connections,
.*, parameter overrides, instance arrays, and drive strengths. binddirectives at file, module, and generate scope, including indexed hierarchical targets and target-scope connection resolution.- Module-level generate
if,for, andcase, including elaboration system tasks. - Compiler directives and macros between list elements, including conditional branches inside ports, parameters, enums, overrides, and connections.
- Vendored/formal collateral:
specify/specparam, UDPprimitive/table,checker,config, library map entries,alias, andunion tagged. Block interiors that do not feed language tools are preserved as opaque source.
Expressions
Section titled “Expressions”- Full operator precedence, ternaries, concatenation and replication, slices, streaming concatenations with
with [range], constant-expression and packed-type cast bases, and assignment patterns. - Hierarchical and package-scoped names, named call arguments, array methods,
inside, and all supportednewforms. - Dynamic arrays, queues, associative arrays, empty literals, and
$-bound indexing. - Macro invocations in expression, statement, and item position; macro digits in based numbers.
Preserved rather than reformatted
Section titled “Preserved rather than reformatted”Some constructs are recognized structurally but emitted with their internal source layout intact: compiler directives, macro bodies, specify, UDP, checker and config blocks, and carefully recovered conditional-split declarations. Constraint, covergroup and SVA parsers also keep a byte-exact fallback for an unfamiliar body, so unsupported subgrammar does not block the surrounding file.
Not supported
Section titled “Not supported”Parser acceptance does not imply full elaboration or semantic navigation: generate-block-scoped hierarchical paths and DPI-export name binding remain gaps. lucisv also does not run a preprocessor, so a file that becomes valid only after cross-file macro expansion may not format as a standalone input.