Re: [sv-bc] Defparam on member of parameter struct

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Tue Nov 08 2005 - 12:25:33 PST
When the function is `included, then the following rewriting doesn't
work.

-- Brad

>>module foo;
>>   function fun;
>>      input in;
>>      parameter p = 3;
>>      $display("In fun, p = ", p);
>>   endfunction // fun
>>   integer      i;
>>   initial i = fun(1'b0);
>>endmodule // foo
>
>Easily modified to avoid the defparam as follows:
>
>module top;
>   foo #(.p(5)) f();
>endmodule
>
>module foo #(parameter p = 3);
>   integer i;
>
>   initial i = fun(1'b0);
>
>   function fun;
>      input in;
>      $display("In fun, p = %0d", p);
>   endfunction
>endmodule
Received on Tue Nov 8 12:25:42 2005

This archive was generated by hypermail 2.1.8 : Tue Nov 08 2005 - 12:26:00 PST