Re: Unsized array declarations using .name / .* and interfaces


Subject: Re: Unsized array declarations using .name / .* and interfaces
From: Kevin Cameron x3251 (dkc@galaxy.nsc.com)
Date: Mon Apr 08 2002 - 14:02:27 PDT


> From owner-vlog-pp@eda.org Mon Apr 8 11:52:14 2002
> X-Sender: cliffc@mail.sunburst-design.com
> To: vlog-pp@eda.org
> From: "Clifford E. Cummings" <cliffc@sunburst-design.com>
> Subject: Unsized array declarations using .name / .* and interfaces
>
> At 11:08 AM 4/8/02 -0700, Kevin Cameron x3251 wrote:
> >Couple of suggestions:
> >
> > 1. Add 'local' for declarations to exclude an object from .* or cross-module
> > connection.
>
> Clarification question. Add local to where?

Something like:

   module foo (input x)

     local reg [4:0] bar;
     local wire y;
   
     sbmdl s1 (.*); // can't connect to bar or y.

I didn't have a specific syntax in mind, I would just like to be able to
block inappropriate connection. I think it would help make compilation
more efficient too.

> > 2. Allow unsized array declarations for input/output in modules which will
> > be used with .* (maybe use angle brackets '<>' around default
> > dimensions).
>
> I potentially like this idea but I think this is too much for draft 3.0
> (this would be a big change). Is there any wording in the current proposal
> that would inhibit adding this capability if we were to revisit this for
> Draft 3.1?

If you have arrays dependent on parameters then you can't tell what the
size is until elaboration time anyway, so I don't think it would be that
difficult to implement. Since it guarantees an exact match it's probably
going to be more efficient in compilation/simulation (it's almost
pass-by-reference) and less error prone. Syntactically it would only
be a minor change too:

  module (output x);

  // Old style

       reg [7:0] x;

  // New

       reg [<7>:0] x; // get $left from parent if using .*
                      // backward compatible

  // or...

       reg [<>:<>] x; // get $left & $right from parent - module cannot be top

I think it could go in 3.0.

Kev.

> >Kev.
>
>
> Regards - Cliff
>
>
> //*****************************************************************//
> // Cliff Cummings Phone: 503-641-8446 //
> // Sunburst Design, Inc. FAX: 503-641-8486 //
> // 14314 SW Allen Blvd. E-mail: cliffc@sunburst-design.com //
> // PMB 501 Web: www.sunburst-design.com //
> // Beaverton, OR 97005 //
> // //
> // Expert Verilog, Synthesis and Verification Training //
> //*****************************************************************//



This archive was generated by hypermail 2b28 : Mon Apr 08 2002 - 14:05:06 PDT