[sv-ec] RE: soft constraint proposal

From: Ryan, Ray <Ray_Ryan@mentor.com>
Date: Mon Sep 26 2011 - 13:07:32 PDT

Arturo,

What do you mean by “the constraint solver does not fail”.

If the return status is false (0):

- There was a conflict (ie not all required constraints could be met)

- None of the random variables were changed by the randomize call.

Regards,
Ray

From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Arturo Salz
Sent: Monday, September 26, 2011 12:36 PM
To: Gran, Alex; 'sv-ec@eda.org'
Subject: [sv-ec] RE: soft constraint proposal

Alex,

As we discussed, you example includes a checker – a constraint on a state variable is a checker. And I believe that checkers are not susceptible to soft designation- soft constrains only affect random variables, otherwise the soft designation is just a comment. In your example, the call to randomize would indeed return false, but the constrain solver does not fail.

                Arturo

From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Gran, Alex
Sent: Monday, September 26, 2011 12:14 PM
To: 'sv-ec@eda.org'
Subject: [sv-ec] RE: soft constraint proposal

So here is an example of where a soft constraint cannot be met, but not because it conflicts with an another explicitly declared constraint.

So in this case, my understanding is that the soft constraint 'c2' will be discarded.



class my_class;

rand int x;
rand int y;

constraint c1 { soft x == 10;}
constraint c2 { soft y == 5;}

endclass

module test();

my_class my_class_handle = new();

initial begin
        if(my_class_handle.randomize(x)) //Only randomizing x therefore y is not considered a state variable
                $display("Randomize worked");
        else
                $display("Randomize failed");
end

endmodule

~Alex

From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Arturo Salz
Sent: Monday, September 26, 2011 1:19 AM
To: 'sv-ec@eda.org' (sv-ec@eda.org)
Subject: [sv-ec] soft constraint proposal

I have uploaded a new proposal for Mantis 2987. The new write-up incorporates all the feedback we’ve had, including the following:

- Makes soft a keyword.

- Uses the suggested “disable soft” instead of empty dist to reset soft constraints.

- Decouples the disable functionality from the soft-dist. Now the two features can be specified separately.

- Includes the BNF change from solve_before_primary to constraint_primary.

    Arturo




--
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<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 Sep 26 13:08:14 2011

This archive was generated by hypermail 2.1.8 : Mon Sep 26 2011 - 13:08:18 PDT