In reply to dave_59:
Thanks Dave , a final question
class Base #( SIZE1 = 10 ) ;
endclass
// Base#(()::SIZE1 below is at default 10 ( 4- state signed type )
class Subtype #( SIZE2 = 1 ) extends Base ;
endclass
Base #(10) b1 ; // 4 - state signed parameter
Using the 4 assignments ( via different specialization of Subtype ) in Original Code ,
I observe all assignments are successful , even though the type parameter
( of handle b1 and Object handles s1 to s4 ) are Not Matching Types !!
parameter int INTS = 10 ;
Subtype #( INTS ) s1 ; // 2 - state Signed parameter of Size 32 .
initial begin
s1 = new() ;
b1 = s1 ;
end
parameter int unsigned INTU = 10 ;
Subtype #( INTU ) s2 ; // 2 - state Unsigned parameter with range [31:0]
initial begin
s2 = new() ;
b1 = s2 ;
end
parameter bit signed [131:100] BIT = 10 ; // Range is different than 31:0 !!
Subtype #( BIT ) s3 ; // 2 - bit Signed parameter of Size 32
initial begin
s3 = new() ;
b1 = s3 ;
end
parameter bit signed [15:0] BIT = 10 ;
Subtype #( BIT ) s4 ; // 2 - bit Signed parameter of Size 16
initial begin
s4 = new() ;
b1 = s4 ;
end
[Q] What makes all the 4 assignments legal in this case ??