From: Dennis Marsa (drm@xilinx.com)
Date: Tue Jul 02 2002 - 13:00:56 PDT
Precedence: bulk
Steven Sharp wrote:
>
> Precedence: bulk
>
> >Are there any VPI experts here?? I have the following
> >potential VPI related item for the errata list.
>
> I'm not a VPI expert, but I have discussed it with one
> (and I stayed at a Holiday Inn last night).
>
> >Indexed part-selects (+: and -:) do not seem to have
> >a representation in VPI.
> >
> >Can anyone else confirm this, or point out for me how
> >they are represented?
> >
> >Is the vpiConstantSelect property of vpiPartSelect objects
> >relevant? That is,
> >
> > vpiConstantSelect == false ==> indexed part-select
> > vpiConstantSelect == true ==> regular part-select
>
> Apparently this is the case.
Actually, this doesn't seem sufficient when the base expression
is actually constant, i.e.
reg [31:0] vector;
vector[31-:8] // both base and width are constant, thus vpiConstantSelect == true,
// but this is not a regular part-select
> >But, how does one distinguish +: from -:?
>
> Well, it shouldn't have mattered the way I thought it was supposed to work,
> but somebody added extra flexibility that causes problems. I thought
> that the base expression was always supposed to be the left index, since
> it appears at the left position. Then the direction would be determined
> by the direction of the declaration, and the choice of +: or -: would have
> to be consistent with that.
That makes sense to me.
> However, it looks like the spec allows the
> base to be either the left or right index, based on the direction of the
> select versus the direction of the declaration. So now you can't tell what
> is going on from VPI unless you can determine the direction of the select.
>
> Sigh.
>
> So we need to either eliminate this extra flexibility (which isn't really
> needed), or add another attribute to part selects in VPI.
Given the counterexample above, it would seem a new property (properties??)
of part selects is needed at the very least to determine whether a part select
is an index part select, and which type of indexed part-select.
Or, alternatively, entirely new VPI objects to represent +: and -: could be
defined.
Dennis Marsa
Xilinx, Inc.
This archive was generated by hypermail 2.1.4
: Thu Oct 10 2002 - 09:24:26 PDT
and
sponsored by Boyd Technology, Inc.