From 59863f43dc3d58595799fd59b4d2b5a2c534a9a4 Mon Sep 17 00:00:00 2001 From: Edmund Lam Date: Tue, 9 Jun 2026 13:46:58 -0400 Subject: [PATCH] lint --- src/V3Param.cpp | 6 +-- test_regress/t/t_class_lparam_nested_chain.v | 4 +- .../t/t_class_lparam_struct_member_chain.v | 42 +++++++++---------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/V3Param.cpp b/src/V3Param.cpp index e536de15e..fce43f780 100644 --- a/src/V3Param.cpp +++ b/src/V3Param.cpp @@ -2234,13 +2234,13 @@ public: // Walk every subtree reachable from `rootp` for deferred work V3LinkDot left behind // when `class#(...)::member` couldn't yet be resolved: - // (1) `AstDot` with a ClassOrPackageRef lhs — a `class::lparam` value Dot to + // (1) `AstDot` with a ClassOrPackageRef lhs - a `class::lparam` value Dot to // constify (e.g. `c8::b` in a pin expression). - // (2) `AstRefDType` with a typedefp — descend into the typedef's subDType + // (2) `AstRefDType` with a typedefp - descend into the typedef's subDType // to find buried Dots (typedef range like `logic [(CFG::w - 1):0]`) and // unresolved class-scoped struct-member RefDTypes (`CFG::input_meta_t` // as a struct member). - // (3) `AstVarRef` to a deferred lparam — descend into its valuep so the + // (3) `AstVarRef` to a deferred lparam - descend into its valuep so the // chain `pin -> lparam -> ... -> class::lparam Dot` reaches the Dot. // Discoveries of (2) and (3) feed back into the walk worklist; (1) and (2) // are also kept in lists for the resolution passes at the end. diff --git a/test_regress/t/t_class_lparam_nested_chain.v b/test_regress/t/t_class_lparam_nested_chain.v index 076f9abda..b9607b634 100644 --- a/test_regress/t/t_class_lparam_nested_chain.v +++ b/test_regress/t/t_class_lparam_nested_chain.v @@ -47,11 +47,11 @@ module t; typedef B#(5) BInst; typedef C#(2) CInst; - // (1) Standalone localparam — resolves via deferred-lparam path + // (1) Standalone localparam - resolves via deferred-lparam path localparam int two_level = BInst::width; // = A#(6)::v = 12 localparam int three_level = CInst::total; // = B#(6)::width = A#(7)::v = 14 - // (2) Cell pin uses the nested-class value directly — exercises the + // (2) Cell pin uses the nested-class value directly - exercises the // recursive Dot resolution inside resolveDotToTypedef Sub #(BInst::width) m_pin_direct (); Sub #(CInst::total) m_pin_deep (); diff --git a/test_regress/t/t_class_lparam_struct_member_chain.v b/test_regress/t/t_class_lparam_struct_member_chain.v index 7affc9a07..9c044821a 100644 --- a/test_regress/t/t_class_lparam_struct_member_chain.v +++ b/test_regress/t/t_class_lparam_struct_member_chain.v @@ -18,37 +18,37 @@ // verilog_format: on package pkg; - virtual class C #(parameter int W = 1); - typedef logic [W-1:0] data_t; - endclass + virtual class C #(parameter int W = 1); + typedef logic [W-1:0] data_t; + endclass endpackage module Sink #(parameter int BITS = 1) (); - logic [BITS-1:0] data; + logic [BITS-1:0] data; endmodule module Sub #(parameter int W = 8) (); - typedef pkg::C#(W) CFG; + typedef pkg::C#(W) CFG; - // Struct typedef whose member is a class-scope-resolved typedef from - // a parameterized-class typedef alias. Without the V3Param fix, the - // member's RefDType stays UNLINKED and the cell pin's $bits trips an - // internal error. - typedef struct packed { - CFG::data_t payload; - logic v; - } wrap_t; + // Struct typedef whose member is a class-scope-resolved typedef from + // a parameterized-class typedef alias. Without the V3Param fix, the + // member's RefDType stays UNLINKED and the cell pin's $bits trips an + // internal error. + typedef struct packed { + CFG::data_t payload; + logic v; + } wrap_t; - Sink #(.BITS($bits(wrap_t))) u_sink (); + Sink #(.BITS($bits(wrap_t))) u_sink (); endmodule module t; - Sub #(.W(8)) u (); + Sub #(.W(8)) u (); - initial begin - // $bits(wrap_t) = 8 (payload) + 1 (v) = 9 - `checkh($bits(u.u_sink.data), 32'd9); - $write("*-* All Finished *-*\n"); - $finish; - end + initial begin + // $bits(wrap_t) = 8 (payload) + 1 (v) = 9 + `checkh($bits(u.u_sink.data), 32'd9); + $write("*-* All Finished *-*\n"); + $finish; + end endmodule