Sending this for Surya:
Hi,
I have a query on unsized parameter value propagation with more than 32 bits value. Please consider the following case, where there are two parameter declarations, one has no range or type specification overridden by unsized based number. Other one is overridden by the previous parameter.
module top;
A #(36, 'b010001110111011101110111011101110111) iA();
initial begin
$display(" parameter values :: iA.p_a %b , iA.iB.p_b %b ", iA.p_a, iA.iB.p_b);
end
endmodule
module A;
parameter w = 2;
parameter p_a = 'b00100;
reg [w:0] a;
B #(w, p_a) iB();
endmodule
module B;
parameter w = 5;
parameter [(w-1) : 0] p_b = 'b001;
reg [w:0] a;
endmodule
I know, in the context insensitive places, the unsized expression width becomes same as integer (32), otherwise it should take the size of the context. With that respect, the $display value should print '010001110111011101110111011101110111' for both. But one standard simulator truncates the 'iA.p_a' value to 32 bit and then prints. Though other two shows the result as I understood. What should be the expected result.
Regards
Surya
Received on Thu Jun 21 15:10:05 2012
This archive was generated by hypermail 2.1.8 : Thu Jun 21 2012 - 15:10:22 PDT