Re: [sv-bc] how to access an interface parameter

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Wed Mar 29 2006 - 09:51:08 PST
Dave,

Is there a Mantis item for proposing this change in the BNF?

-- Brad

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
Rich, Dave
Sent: Wednesday, March 29, 2006 9:36 AM
To: pgraham@cadence.com; sv-bc@eda.org
Subject: RE: [sv-bc] how to access an interface parameter

Paul,

I don't agree with Brad's interpretation, and we discussed this a little
bit in this weeks sv-bc meeting. The reference to 'bus.' is not really a
hierarchical path; it is a port reference.

So I agree with you that a reference to a constant primary via an
interface port reference should also be considered a constant primary.

Dave


> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
Paul
> Graham
> Sent: Wednesday, March 29, 2006 8:29 AM
> To: sv-bc@eda.org
> Subject: Re: [sv-bc] how to access an interface paramter
> 
> > > I wonder if a reference to an interface parameter can be
> > > used in a constant expression.  For instance:
> > I don't think so.  See --
> >
> >     http://www.eda.org/sv-bc/hm/3348.html
> 
> So a hierarchical reference to an interface parameter is not
> considered to be a constant, but a roundabout reference
> through a type is constant:
> 
>     interface bustype();
> 	parameter DW = 8;
> 	typedef bit [DW-1:0] DW_type;
> 	...
> 
> 
>     module cpu(bustype.master bus);
>         parameter \bus.DW  = $bits(bus.DW_type);
> 	reg [\bus.DW -1:0] scratch;
> 	// reg [bus.DW-1:0] scratch;
> 	...
> 
> If you can get in through the back door you then might as
> well leave the front door open.  So I'd like to propose that
> a hierarchical reference to an interface parameter, where
> the prefix denotes an interface port or an interface
> instance label, be considered a constant primary.
> 
> Paul
Received on Wed Mar 29 09:51:15 2006

This archive was generated by hypermail 2.1.8 : Wed Mar 29 2006 - 09:51:20 PST