Hi Brad:
I don't think that the return type of $past is explicitly defined.
However, my guess is that in
{$past(e)}
the return type of $past(e) should be the self-determined type of e. If
that is a packed type, then shouldn't the select be legal?
J.H.
-----Original Message-----
From: Brad Pierce [mailto:Brad.Pierce@synopsys.com]
Sent: Tuesday, April 13, 2010 3:22 PM
To: Rich, Dave; Surrendra Dudani; Havlicek John-R8AAAU; Korchemny,
Dmitry; Thomas Thatcher
Cc: sv-ac@eda.org
Subject: RE: [sv-ac] RE: Two items for ease of assertion writing
> {$past(txn_valid)}[txn_id]
That only works when the function return type is packed.
-- Brad
-----Original Message-----
From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of
Rich, Dave
Sent: Tuesday, April 13, 2010 10:43 AM
To: Surrendra Dudani; Havlicek John-R8AAAU; Korchemny, Dmitry; Thomas
Thatcher
Cc: sv-ac@eda.org
Subject: RE: [sv-ac] RE: Two items for ease of assertion writing
Actually, there's new syntax in the 1800-2009 LRM that allows selects on
a concatenation expression, so the syntax would be
{$past(txn_valid)}[txn_id]
Dave
> -----Original Message-----
> From: Surrendra Dudani [mailto:Surrendra.Dudani@synopsys.com]
> Sent: Tuesday, April 13, 2010 10:20 AM
> To: 'Havlicek John-R8AAAU'; Rich, Dave; Korchemny, Dmitry; Thomas
> Thatcher
> Cc: sv-ac@eda.org
> Subject: RE: [sv-ac] RE: Two items for ease of assertion writing
>
> Hi John,
> I'm not sure you can perform part-select on a function return value as
> $past(txn_valid)[txn_id]
> You probably have to assign first to a temporary array, and then
select.
> Surrendra
>
> -----Original Message-----
> From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of
> Havlicek John-R8AAAU
> Sent: Tuesday, April 13, 2010 1:06 PM
> To: Rich, Dave; Korchemny, Dmitry; Thomas Thatcher
> Cc: sv-ac@eda.org
> Subject: RE: [sv-ac] RE: Two items for ease of assertion writing
>
> Hi Dave:
>
> I don't think nesting of sampled value functions is expressly
forbidden.
> I think that the semantics is well defined. One should check
carefully,
> but I think that
>
> $past($past(e))
>
> is equivalent to
>
> $past(e, 2)
>
> In your example, I think
>
> $past(A && $past(B))
>
> should be equivalent to
>
> $past(A) && $past(B,2)
>
> In Tom's example,
>
> $past(txn_valid[txn_id])
>
> does not index with the current value of txn_id -- instead the past
> value of the indexed expression txn_valid[txn_id] is what you get. If
> you want the current value of txn_id to index into the past value of
> txn_valid, then you would want to write something like
>
> $past(txn_valid)[txn_id]
>
> This looks reasonable to me.
>
> J.H.
>
> -----Original Message-----
> From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of
> Rich, Dave
> Sent: Tuesday, April 13, 2010 11:50 AM
> To: Korchemny, Dmitry; Thomas Thatcher
> Cc: sv-ac@eda.org
> Subject: RE: [sv-ac] RE: Two items for ease of assertion writing
>
> > 2. Is there a way to index an array enclosed by $past() using the
> > current sampled value of a variable?
> >
> > for example
> > txn_valid(txn_id) && $past(txn_valid[txn_id])
> > ^want to index with the
> > current sampled value
> > of txn_id
> >
> > The only way I have figured out to make this work is to explicitly
> > create a delayed version of txn_valid and use that instead of the
> > $past() function.
> >
> > Another option I thought of just now would be to extend the
$stable()
> > system function to take an optional parameter for number of cycles.
> >
> >
> > [Korchemny, Dmitry] If I understand your question correctly, you can
> > write it as:
> > txn_valid(txn_id) && $past(txn_valid[$sampled(txn_id)])
> >
> > I can enter Mantis items if either of these turns out to be more
than
> > just a user education issue.
> >
>
> [DR] This raises some serious issues regarding the nesting of sampled
> value functions. Can they be nested? If so, does the sampling nest as
> well. i.e.
>
> $past(A && $past(B))
>
> Are A and B both 1 cycle in the past or is B 2 cycles in the past?
>
> Dave
>
>
> --
> 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.Received on Tue Apr 13 13:57:28 2010
This archive was generated by hypermail 2.1.8 : Tue Apr 13 2010 - 13:57:33 PDT