I would prefer a new mantis as dist currently allows negative values. I agree with Daniel that distribution weights should be positive, however, I know legacy tests already exist with negative weights so the error may have to be optional.
Arturo
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Daniel Mlynek
Sent: Tuesday, September 06, 2011 6:40 AM
To: Bresticker, Shalom
Cc: sv-ec@eda.org
Subject: Re: [sv-ec] dist operator and negative value used as weight
This is similar but for dist LRM even do not say that weigth should be positive valuei it just say that in can by any integral expression
IMHO another mantis should be added.
Should I add new mantis?
Or better add a note to mantis 262?
DANiel
On 9/6/2011 3:16 PM, Bresticker, Shalom wrote:
See a related issue in Mantis 262.
Shalom
From: owner-sv-ec@eda.org<mailto:owner-sv-ec@eda.org> [mailto:owner-sv-ec@eda.org] On Behalf Of Daniel Mlynek
Sent: Tuesday, September 06, 2011 4:10 PM
To: sv-ec@eda.org<mailto:sv-ec@eda.org>
Subject: [sv-ec] dist operator and negative value used as weight
LRM defines only how should dist behave is 0 is used as weigth.
What should happen if wigth expression is negative?
IMHO it should be an error
module top;
int a;
bit b;
int arr[int];
initial begin
repeat (100)begin
b=std::randomize (a) with {
a dist {
1:=2,
5:=-1, //<<negative
10:=0,
100:=1
};
};
arr[a]++;
end
foreach (arr[i])
$display( i, arr[i]);
end
endmodule
There can be more complicated cases as weigth can be a variable or parameter.
DANiel
-- This message has been scanned for viruses and dangerous content by MailScanner<http://www.mailscanner.info/>, and is believed to be clean. --------------------------------------------------------------------- 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 Tue Sep 6 10:07:10 2011
This archive was generated by hypermail 2.1.8 : Tue Sep 06 2011 - 10:07:16 PDT