Commentary: Changes update

This commit is contained in:
Wilson Snyder 2026-04-04 14:37:16 -04:00
parent 4b6bc1ff83
commit 94f3e16a6c
2 changed files with 17 additions and 6 deletions

View File

@ -74,6 +74,7 @@ Verilator 5.047 devel
* Fix typedef scope resolution for parameterized class aliases (#5977) (#7319). [Nick Brereton]
* Fix lambda coroutines (#6106) (#7135). [Nick Brereton]
* Fix super constructor calls with local variables (#6214) (#6933). [Igor Zaworski, Antmicro Ltd.]
* Fix parameter default comparison when value contains type cast (#6281) (#7369) (#6281). [Yilou Wang]
* Fix `local::` false error in randomize() with on parameterized class (#6680) (#7293). [Yilou Wang]
* Fix false recursive definition error (#6769) (#7118). [Alex Zhou]
* Fix port assignment to large arrays (#6904).

View File

@ -12,35 +12,45 @@
// Original #6281 reproducer: parameter passed via localparam variable
// vs. literal constant should resolve to the same specialization.
// Fixed by ParameterizedHierBlocks::areSame fallback (landed earlier).
class ClsIntDefault #(parameter int P = 32);
class ClsIntDefault #(
parameter int P = 32
);
function int get_p;
return P;
endfunction
endclass
// Parameter with byte cast default value
class ClsByteCast #(parameter byte P = byte'(8));
class ClsByteCast #(
parameter byte P = byte'(8)
);
function byte get_p;
return P;
endfunction
endclass
// Parameter with int cast default value
class ClsIntCast #(parameter int P = int'(42));
class ClsIntCast #(
parameter int P = int'(42)
);
function int get_p;
return P;
endfunction
endclass
// Parameter with signed cast default value
class ClsSignedCast #(parameter int P = int'(-5));
class ClsSignedCast #(
parameter int P = int'(-5)
);
function int get_p;
return P;
endfunction
endclass
// Module with cast default (cell array test)
module sub #(parameter byte P = byte'(8));
module sub #(
parameter byte P = byte'(8)
);
initial begin
`checkd(P, 8);
end
@ -49,7 +59,7 @@ endmodule
module t;
// Original #6281 case: localparam variable vs. literal constant
localparam int WIDTH = 32;
ClsIntDefault #(32) orig_a;
ClsIntDefault #(32) orig_a;
ClsIntDefault #(WIDTH) orig_b;
// Byte cast default: #() and #(8) should be same type