RE: [sv-bc] Bit/Part select of modport named argument

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Sun Feb 06 2011 - 02:31:30 PST

Mantis 3085 is "What is the type of a select of an array?"

11.5.1 says, "A bit-select or part-select of a scalar, or of a real variable or real parameter, shall be illegal."

Shalom

> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
> Brad Pierce
> Sent: Saturday, February 05, 2011 7:18 PM
> To: Steven Sharp
> Cc: Surya Pratik Saha; sv-bc@eda.org
> Subject: Re: [sv-bc] Bit/Part select of modport named argument
>
> So we could legally write i.j[0][0][0][0][0][0] and it would yield the
> same as i.j?
>
> -- Brad
>
> On Fri, Feb 4, 2011 at 9:24 PM, Steven Sharp <sharp@cadence.com> wrote:
> > How can you distinguish a scalar from a 1-bit vector in this
> situation?  I think the distinction disappears when used in an
> expression, and the self-determined type is the same.
> >
> >
> > -----Original Message-----
> > From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
> Brad Pierce
> > Sent: Friday, February 04, 2011 11:18 AM
> > To: Surya Pratik Saha
> > Cc: sv-bc@eda.org
> > Subject: Re: [sv-bc] Bit/Part select of modport named argument
> >
> > "The self-determined type of the port expression becomes the type for
> the port." Shouldn't you be able to use the name of the port in any way
> that's consistent with its type? In this case, it has a scalar type,
> and it doesn't make sense to be indexing into a scalar type.
> >
> > -- Brad
> >
> > On Fri, Feb 4, 2011 at 2:15 AM, Surya Pratik Saha
> <spsaha@cal.interrasystems.com> wrote:
> >> Hi,
> >> I have a design like:
> >> interface iface;
> >>    logic [2:0] x;
> >>    modport mport (input .j (x[1]));
> >> endinterface
> >>
> >> module top;
> >> iface i ();
> >> foo f (i.mport);
> >> endmodule
> >>
> >> module foo (iface.mport i);
> >>    initial begin
> >>        i.j[1] = 1; // Bit select of modport named argument
> >>    end
> >> endmodule
> >>
> >> Is bit/part select of modport named argument allowed? I am also not
> >> sure what is the meaning of that if it is allowed. Though some
> >> standard tools do not give any meaningful error.
> >>
> >> --
> >> Regards
> >> Surya
> >>
> >>
> >>
> >>
> >> --
> >> 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.
> >
> >
> >
> > --
> > 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.
>

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sun Feb 6 02:32:07 2011

This archive was generated by hypermail 2.1.8 : Sun Feb 06 2011 - 02:32:36 PST