RE: [sv-bc] setting parameters in configurations

From: Alsop, Thomas R <thomas.r.alsop_at_.....>
Date: Fri Sep 14 2007 - 10:34:57 PDT
Hi Don,

 

Two questions for you.  First, in your mantis proposal is there any
difference in the config where you use a localparam and parameter.  I'm
trying to understand why you are emphasizing the use of localparam in
this case. 

 

Localparam:

  config cfgl;

    localparam S = 24

    design rtlLib.top;

    instance top.a1 #(.W(S));

    instance top.a2 #(.W(S));

  endconfig

 

With cfg1 configuring module top.a1, the $display in adder will print:

PRINTS: Name = a1,  W=24,  D = 512

PRINTS: Name = a2,  W=24,  D = 512

 

Parameter:

 

  config cfgl;

    parameter S = 24

    design rtlLib.top;

    instance top.a1 #(.W(S));

    instance top.a2 #(.W(S));

  endconfig

 

With cfg1 configuring module top.a1, the $display in adder will print:

PRINTS: Name = a1,  W=24,  D = 512

PRINTS: Name = a2,  W=24,  D = 512

 

 

Second, you gave examples of explicit .name() default "reset" conditions
basically for overriding the instantiations back to their default values
but you didn't give an example of implicit .name.  What happens what I
do this for example?

 

  config cfgl;

    design rtlLib.top;

    instance top.a1 #(.NAME("A1"), .W(2), .D(16384) );

    instance top.a2 #(.NAME("A2"));

    instance top.a3 #(.NAME("A3"), .W(16), .D() );

    instance top.a4 #(.NAME, .W, .D );  <-- These are all implicit
.name.  What happens here? Is this the same as .name() or does it do
nothing?

  endconfig

 

 

 

-----Original Message-----
From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On
Behalf Of Don Mills
Sent: Thursday, September 13, 2007 5:52 PM
To: sv-bc@server.eda.org
Subject: [sv-bc] setting parameters in configurations

 

I have opened a mantis item on this subject #2037 and uploaded my first 

draft of the new section.  For those of you who have looked at my 

preliminary draft earlier today - you will find the uploaded draft to be


much more verbose.

 

-- 

==========================================================

Don Mills

mills@lcdm-eng.com

www.lcdm-eng.com

==========================================================

 

 

-- 

This message has been scanned for viruses and

dangerous content by MailScanner, and is

believed to be clean.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Sep 14 10:35:20 2007

This archive was generated by hypermail 2.1.8 : Fri Sep 14 2007 - 10:35:39 PDT