RE: [sv-bc] Parameter value assignment as context (8.13)

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Sun Sep 18 2005 - 03:58:09 PDT
Brad,

I would expect o1 to be equal to o3 as well.

In the 1364 ETF, we discussed parameter initializations, and I believe
the consensus was that they are evaluated in the same way as
assignments. I.e., "the bit size of the right-hand
side expression of an assignment depends on itself and the size of the
left-hand side."
(P1364-2005, sub-clause 5.4.1).

This was discussed in ETF #487.

But maybe you already know that, since you seem to have used the same
example which appears there...

Regards,
Shalom

>-----Original Message-----
>From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
Brad Pierce
>Sent: Saturday, September 17, 2005 1:46 AM
>To: sv-bc@eda.org
>Subject: [sv-bc] Parameter value assignment as context (8.13)
>
>According to 8.13, a parameter value assignment for a parameter with an
>explicit type declaration is an assignment-like context.  Does a range
>count as an "explicit type declaration"?  I'd say no.  For example, in
>the following module declaration, I'd say o2==o3, but o1!=o3.
>
>`define E 4'b1101 << 15
>module m (o1, o2, o3);
>output [31:0] o1;
>output [31:0] o2;
>output [31:0] o3;
>reg [31:0] o1;
>reg [31:0] o2;
>reg [31:0] o3;
>localparam [31:0] P = `E;
>localparam integer Q = `E;
>initial begin
>  o1 = P;
>  o2 = Q;
>  o3 = `E;
>  $display("|%b|%b|%b|", o1, o2, o3);
>end
>endmodule
>
>-- Brad
>
Received on Sun Sep 18 03:58:22 2005

This archive was generated by hypermail 2.1.8 : Sun Sep 18 2005 - 04:00:20 PDT