Re: [sv-bc] FW: Manti 1345, 1711: unique if/case

From: Steven Sharp <sharp_at_.....>
Date: Mon Nov 19 2007 - 12:13:29 PST
>From: Gordon Vreugdenhil <gordonv@model.com>

>Someone could easily have duplicates due to edge case
>parameterization, etc. that is never actually reachable in a
>particular configuration of the circuit.

>> And I will ask again, is optimization of a uniqueness violation really
>> important?
>
>It can be.  I'd rather not get into details, but choices in this
>area can impact simulator performance even for evaluation
>sequences that don't go through the failure branch.

So we are only talking about the cases that do not go through the
failure branch.  After all, if they did, the user would have to fix
the code so that the violation didn't occur, so the situation would
go away, and the optimization becomes irrelevant after that.  That
means that the performance of the failure branch is unimportant.  So
you can just add the evaluation of any side-effecting case item
expressions to the failure branch, with minimal impact.

As I understand it, you want to make the effective transformation:

>>>     unique case (expr)
>>>         1   : ... /* action 1 */
>>>         i++ : ...
>>>         1   : ... /* action 2 */
>>>

into

>>>     case (expr)
>>>         1   :  /* warn */ /* action 1 */
>>>         i++ : ...

But you can just transform that into

>>>     case (expr)
>>>         1   :  i++ /* warn */ /* action 1 */
>>>         i++ : ...

Again, the efficiency of having to add the execution of i++ to the
first case item is unimportant unless the case item actually executes.
And in that case, the efficiency only matters for the short time until
the user fixes their bug.  It is a rare case that then becomes
nonexistent.

Steven Sharp
sharp@cadence.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Nov 19 12:14:03 2007

This archive was generated by hypermail 2.1.8 : Mon Nov 19 2007 - 12:14:19 PST