[sv-ac] Two items for ease of assertion writing

From: Thomas Thatcher <thomas.thatcher@oracle.com>
Date: Mon Apr 12 2010 - 14:46:56 PDT

Hi Dmitry,

I have two question that my turn into enhancement
requests/clarifications if necessary.

1. Use of sampled values in action blocks: It appears that to get
meaningful messages in action blocks, you must explicitly $sample() all
variables that are used in the message, or you will get interesting results

for example
     assert property (@(posedge clk) req |-> req_id != 4'b0) else
         $display("Error, 0 is an invalid ID: req_id=%d", req_id);

If the sampled value is 0, but the signal changes to 1 in the same time
step, you'll get the following message:
     Error, 0 is an invalid ID: req_id=1

(I guess one approach would be to write the assertions inside a checker)

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.

I can enter Mantis items if either of these turns out to be more than
just a user education issue.

Thanks,

Tom

On 04/12/10 10:15, Korchemny, Dmitry wrote:
> Hi all,
>
>
>
> In the reminder I sent was written that the meeting would take place in
> two weeks. This is a copy-paste mistake. The meeting will take place
> *tomorrow*. The date in the invitation Date: 2010-04-13 Time: 16:00 UTC
> (09:00 PDT) is correct.
>
>
>
> Thanks,
>
> Dmitry
>
> ---------------------------------------------------------------------
> 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* <http://www.mailscanner.info/>, 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 Mon Apr 12 14:48:11 2010

This archive was generated by hypermail 2.1.8 : Mon Apr 12 2010 - 14:49:11 PDT