i've registered it as: http://www.verilog.org/mantis/view.php?id=5215 W dniu 2/9/2015 4:22 PM, Mark Strickland (mastrick) pisze: > Ah, thanks. I was focusing on the wrong part of your question. > Essentially your question is whether if the only constraints on a > variable are "discarded" soft constraints, that variable is considered > "unconstrained". It does seem like a sentence clarifying that would > be good. > > Mark > > From: Daniel Mlynek <danielm@aldec.com.pl <mailto:danielm@aldec.com.pl>> > Date: Monday, February 9, 2015 10:09 AM > To: Mark Strickland <mastrick@cisco.com <mailto:mastrick@cisco.com>> > Cc: "sv-ec@eda.org <mailto:sv-ec@eda.org>" <sv-ec@eda.org > <mailto:sv-ec@eda.org>> > Subject: Re: [sv-ec] soft constraints and .size randomization > > This is special case when is smth is random is decided basing on > constraints. > Array size is random when .size is used in constraints. > All other variables are randomized if they are declared as random or > used as argument to randomize method or function. > > > DANiel > > W dniu 2/9/2015 3:53 PM, Mark Strickland (mastrick) pisze: >> Daniel, >> >> I would think it would have to be "remain to be random but constrain >> on it should be removed". Do you see text in the LRM that could >> suggest soft constraints can control whether randomization happens? >> >> Mark >> >> From: Daniel Mlynek <danielm@aldec.com.pl <mailto:danielm@aldec.com.pl>> >> Date: Monday, February 9, 2015 6:52 AM >> To: "sv-ec@eda.org <mailto:sv-ec@eda.org>" <sv-ec@eda.org >> <mailto:sv-ec@eda.org>> >> Subject: [sv-ec] soft constraints and .size randomization >> >> See example: >> >> class D; >> rand bit[2:0] arr[]='{1,2}; >> rand int a=1,b=10; >> constraint con1 { soft arr.size < a && arr.size > b; } >> >> endclass >> >> D d = new; >> >> module top; >> initial repeat(10) begin >> //d.arr = new[5]; >> // d.con1.constraint_mode(0); d.con2.constraint_mode(0); >> assert(d.randomize() with {a<b;}) else >> $fatal("Randomization failed."); >> $display("%p",d.arr); >> end >> endmodule >> >> >> LRM is not clear what should happen in such case. >> "arr" size should not be randomized because soft constraints con1 is >> discarded by inline constraint. >> or >> "arr" size should remain to be random but constrain on it should be >> removed >> >> >> >> DANiel >> >> >> -- >> 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 Sun Feb 15 23:38:30 2015
This archive was generated by hypermail 2.1.8 : Sun Feb 15 2015 - 23:38:44 PST