lint
This commit is contained in:
parent
af121fcb3e
commit
59863f43dc
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 ();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue