Function coverage 分成兩種
1. Control-oriented :
偏向於不同信號線之間交互作用,因此大部分用來檢查protocol
使用Assertion來寫
property rule6_with_type(bit x, bit y);
##1 x |-> ##[2:10] y;
//antecedent |-> consequent
endproperty
##1 x |-> ##[2:10] y;
//antecedent |-> consequent
endproperty
cover property (rule6_with_type) $display (“enable rule6_with_type coverage”);
2. Data-oriented :
偏向於bus bits之間變化,因此除了可用來檢查資料變化方向,也可用來檢查FSM的state變化方向
使用covergroup來寫
bit [0:2] y;
covergroup cg;
cover_point_y : coverpoint y
{ bins a = {0,1};
bins b = {2,3};
bins c = {4,5};
bins d = {6,7}; }
endgroup
covergroup cg;
cover_point_y : coverpoint y
{ bins a = {0,1};
bins b = {2,3};
bins c = {4,5};
bins d = {6,7}; }
endgroup
沒有留言:
張貼留言