Thre are some ambiguites in LRM according to constrain_mode and inheritance:
1. LRM do not specifies if constraints_mode function is virtual or not.
2. LRM do not specifies if constraint_mode should turn-off constraints in
whole class hierarchy or only in certain constraint
Example:
virtual class A;
rand int x,y;
constraint c3 { x==50; }
function void post_randomize;
$display(x);
endfunction
endclass
class B extends A;
constraint c3 { x==5; }
endclass
module top;
B b = new;
A a;
initial begin
a=b;
a.randomize();//it should randomize 5
a.c3.constraint_mode(0);
//there are 3 possibilities which one is correct
//B::c3 be turned off and A::c3 be valid
//B::c3 and A::c3 be turned off?
//A::c3 turned off B::c3 valid
a.randomize();
a.c3.constraint_mode(1);
b.randomize();
b.c3.constraint_mode(0);
//there are 2 possibilities which one is correct
//B::c3 be turned off and A::c3 be valid
//B::c3 and A::c3 be turned off?
b.randomize();
end
endmodule
Are above known issues?
DANiel
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Fri Apr 16 00:12:33 2010
This archive was generated by hypermail 2.1.8 : Fri Apr 16 2010 - 00:12:48 PDT