Module Definition
dashboard | hierarchy | modlist | groups | tests | asserts



Module Instance : tb.dut.u_io_meas.u_meas

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.33 100.00 100.00 100.00 100.00 66.67


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
94.29 100.00 100.00 100.00 100.00 71.43


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
94.44 100.00 83.33 100.00 u_io_meas


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
ack_sync 100.00 100.00 100.00
gen_clk_timeout_chk.u_timeout_ref_to_clk 87.50 100.00 100.00 100.00 50.00
u_ref_meas_en_sync 100.00 100.00 100.00
u_sync_ref 100.00 100.00 100.00 100.00 100.00



Module Instance : tb.dut.u_io_div2_meas.u_meas

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.33 100.00 100.00 100.00 100.00 66.67


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
94.29 100.00 100.00 100.00 100.00 71.43


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
94.44 100.00 83.33 100.00 u_io_div2_meas


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
ack_sync 100.00 100.00 100.00
gen_clk_timeout_chk.u_timeout_ref_to_clk 87.50 100.00 100.00 100.00 50.00
u_ref_meas_en_sync 100.00 100.00 100.00
u_sync_ref 100.00 100.00 100.00 100.00 100.00



Module Instance : tb.dut.u_io_div4_meas.u_meas

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.33 100.00 100.00 100.00 100.00 66.67


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
94.29 100.00 100.00 100.00 100.00 71.43


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
94.44 100.00 83.33 100.00 u_io_div4_meas


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
ack_sync 100.00 100.00 100.00
gen_clk_timeout_chk.u_timeout_ref_to_clk 87.50 100.00 100.00 100.00 50.00
u_ref_meas_en_sync 100.00 100.00 100.00
u_sync_ref 100.00 100.00 100.00 100.00 100.00



Module Instance : tb.dut.u_main_meas.u_meas

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.33 100.00 100.00 100.00 100.00 66.67


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
94.29 100.00 100.00 100.00 100.00 71.43


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
94.44 100.00 83.33 100.00 u_main_meas


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
ack_sync 100.00 100.00 100.00
gen_clk_timeout_chk.u_timeout_ref_to_clk 87.50 100.00 100.00 100.00 50.00
u_ref_meas_en_sync 100.00 100.00 100.00
u_sync_ref 100.00 100.00 100.00 100.00 100.00



Module Instance : tb.dut.u_usb_meas.u_meas

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.33 100.00 100.00 100.00 100.00 66.67


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
94.29 100.00 100.00 100.00 100.00 71.43


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
94.44 100.00 83.33 100.00 u_usb_meas


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
ack_sync 100.00 100.00 100.00
gen_clk_timeout_chk.u_timeout_ref_to_clk 87.50 100.00 100.00 100.00 50.00
u_ref_meas_en_sync 100.00 100.00 100.00
u_sync_ref 100.00 100.00 100.00 100.00 100.00

Line Coverage for Module : prim_clock_meas
Line No.TotalCoveredPercent
TOTAL3232100.00
ALWAYS8833100.00
ALWAYS1001212100.00
CONT_ASSIGN16311100.00
ALWAYS1831313100.00
CONT_ASSIGN19911100.00
CONT_ASSIGN20011100.00
CONT_ASSIGN20111100.00

87 always_ff @(posedge clk_i or negedge rst_ni) begin 88 1/1 if (!rst_ni) begin Tests: T4 T5 T6  89 1/1 state_q <= StDisable; Tests: T4 T5 T6  90 end else begin 91 1/1 state_q <= state_d; Tests: T4 T5 T6  92 end 93 end 94 95 // The following fsm sequence ensures that even if the source 96 // side changes the enable too quickly, the measurement controls 97 // remain consistent. 98 logic cnt_en; 99 always_comb begin 100 1/1 state_d = state_q; Tests: T1 T2 T3  101 1/1 cnt_en = '0; Tests: T1 T2 T3  102 103 1/1 unique case (state_q) Tests: T1 T2 T3  104 105 StDisable: begin 106 1/1 if (en_i) begin Tests: T1 T2 T3  107 1/1 state_d = StEnabling; Tests: T1 T2 T3  108 end MISSING_ELSE 109 end 110 111 StEnabling: begin 112 1/1 if (en_ref_sync) begin Tests: T1 T2 T3  113 1/1 state_d = StEnable; Tests: T1 T3 T9  114 end MISSING_ELSE 115 end 116 117 StEnable: begin 118 1/1 cnt_en = 1'b1; Tests: T1 T3 T9  119 1/1 if (!en_i) begin Tests: T1 T3 T9  120 1/1 state_d = StDisabling; Tests: T1 T3 T9  121 end MISSING_ELSE 122 end 123 124 StDisabling: begin 125 1/1 if (!en_ref_sync) begin Tests: T1 T3 T9  126 1/1 state_d = StDisable; Tests: T1 T9 T40  127 end MISSING_ELSE 128 end 129 130 //VCS coverage off 131 // pragma coverage off 132 default:; 133 //VCS coverage on 134 // pragma coverage on 135 136 endcase // unique case (state_q) 137 end 138 139 ////////////////////////// 140 // Input Clock Logic 141 ////////////////////////// 142 143 logic valid_ref; 144 logic valid; 145 // The valid pulse causes the count to reset and start counting again 146 // for each reference cycle. 147 // The count obtained during the last reference cycle is used 148 // to measure how fast/slow the input clock is. 149 prim_pulse_sync u_sync_ref ( 150 .clk_src_i(clk_ref_i), 151 .rst_src_ni(rst_ref_ni), 152 .src_pulse_i(ref_en), 153 .clk_dst_i(clk_i), 154 .rst_dst_ni(rst_ni), 155 .dst_pulse_o(valid_ref) 156 ); 157 158 159 if (RefCnt == 1) begin : gen_degenerate_case 160 // if reference count is one, cnt_ref is always 0. 161 // So there is no need to maintain a counter, and 162 // valid just becomes valid_ref 163 1/1 assign valid = valid_ref; Tests: T1 T9 T40  164 end else begin : gen_normal_case 165 logic [RefCntWidth-1:0] cnt_ref; 166 assign valid = valid_ref & (int'(cnt_ref) == RefCnt - 1); 167 always_ff @(posedge clk_i or negedge rst_ni) begin 168 if (!rst_ni) begin 169 cnt_ref <= '0; 170 end else if (!cnt_en && |cnt_ref) begin 171 cnt_ref <= '0; 172 end else if (cnt_en && valid) begin 173 cnt_ref <= '0; 174 end else if (cnt_en && valid_ref) begin 175 cnt_ref <= cnt_ref + 1'b1; 176 end 177 end 178 end 179 180 logic cnt_ovfl; 181 logic [CntWidth-1:0] cnt; 182 always_ff @(posedge clk_i or negedge rst_ni) begin 183 1/1 if (!rst_ni) begin Tests: T4 T5 T6  184 1/1 cnt <= '0; Tests: T4 T5 T6  185 1/1 cnt_ovfl <= '0; Tests: T4 T5 T6  186 1/1 end else if (!cnt_en && |cnt) begin Tests: T4 T5 T6  187 1/1 cnt <= '0; Tests: T1 T3 T9  188 1/1 cnt_ovfl <= '0; Tests: T1 T3 T9  189 1/1 end else if (valid_o) begin Tests: T4 T5 T6  190 1/1 cnt <= '0; Tests: T1 T9 T40  191 1/1 cnt_ovfl <= '0; Tests: T1 T9 T40  192 1/1 end else if (cnt_ovfl) begin Tests: T4 T5 T6  193 1/1 cnt <= '{default: '1}; Tests: T9 T10 T11  194 1/1 end else if (cnt_en) begin Tests: T4 T5 T6  195 1/1 {cnt_ovfl, cnt} <= cnt + 1'b1; Tests: T1 T3 T9  196 end MISSING_ELSE 197 end 198 199 1/1 assign valid_o = valid & |cnt; Tests: T1 T3 T9  200 1/1 assign fast_o = valid_o & ((cnt > max_cnt) | cnt_ovfl); Tests: T1 T2 T3  201 1/1 assign slow_o = valid_o & (cnt < min_cnt); Tests: T1 T2 T3 

Cond Coverage for Module : prim_clock_meas
TotalCoveredPercent
Conditions1515100.00
Logical1515100.00
Non-Logical00
Event00

 LINE       186
 EXPRESSION (((!cnt_en)) && ((|cnt)))
             -----1-----    ----2---
-1--2-StatusTests
01CoveredT1,T9,T40
10CoveredT4,T5,T6
11CoveredT1,T3,T9

 LINE       199
 EXPRESSION (valid & ((|cnt)))
             --1--   ----2---
-1--2-StatusTests
01CoveredT1,T3,T9
10CoveredT1,T9,T40
11CoveredT1,T9,T40

 LINE       200
 EXPRESSION (valid_o & ((cnt > max_cnt) | cnt_ovfl))
             ---1---   --------------2-------------
-1--2-StatusTests
01CoveredT9,T10,T11
10CoveredT1,T9,T40
11CoveredT9,T10,T11

 LINE       200
 SUB-EXPRESSION ((cnt > max_cnt) | cnt_ovfl)
                 -------1-------   ----2---
-1--2-StatusTests
00CoveredT4,T5,T6
01CoveredT9,T10,T11
10CoveredT9,T10,T11

 LINE       201
 EXPRESSION (valid_o & (cnt < min_cnt))
             ---1---   -------2-------
-1--2-StatusTests
01CoveredT4,T5,T6
10CoveredT1,T9,T40
11CoveredT10,T11,T12

FSM Coverage for Module : prim_clock_meas
Summary for FSM :: state_q
TotalCoveredPercent
States 4 4 100.00 (Not included in score)
Transitions 4 4 100.00
Sequences 0 0

State, Transition and Sequence Details for FSM :: state_q
statesLine No.CoveredTests
StDisable 126 Covered T4,T5,T6
StDisabling 120 Covered T1,T3,T9
StEnable 113 Covered T1,T3,T9
StEnabling 107 Covered T1,T2,T3


transitionsLine No.CoveredTests
StDisable->StEnabling 107 Covered T1,T2,T3
StDisabling->StDisable 126 Covered T1,T3,T9
StEnable->StDisabling 120 Covered T1,T3,T9
StEnabling->StEnable 113 Covered T1,T3,T9



Branch Coverage for Module : prim_clock_meas
Line No.TotalCoveredPercent
Branches 16 16 100.00
IF 88 2 2 100.00
CASE 103 8 8 100.00
IF 183 6 6 100.00


88 if (!rst_ni) begin -1- 89 state_q <= StDisable; ==> 90 end else begin 91 state_q <= state_d; ==>

Branches:
-1-StatusTests
1 Covered T4,T5,T6
0 Covered T4,T5,T6


103 unique case (state_q) -1- 104 105 StDisable: begin 106 if (en_i) begin -2- 107 state_d = StEnabling; ==> 108 end MISSING_ELSE ==> 109 end 110 111 StEnabling: begin 112 if (en_ref_sync) begin -3- 113 state_d = StEnable; ==> 114 end MISSING_ELSE ==> 115 end 116 117 StEnable: begin 118 cnt_en = 1'b1; 119 if (!en_i) begin -4- 120 state_d = StDisabling; ==> 121 end MISSING_ELSE ==> 122 end 123 124 StDisabling: begin 125 if (!en_ref_sync) begin -5- 126 state_d = StDisable; ==> 127 end MISSING_ELSE ==>

Branches:
-1--2--3--4--5-StatusTests
StDisable 1 - - - Covered T1,T2,T3
StDisable 0 - - - Covered T1,T2,T3
StEnabling - 1 - - Covered T1,T3,T9
StEnabling - 0 - - Covered T1,T2,T3
StEnable - - 1 - Covered T1,T3,T9
StEnable - - 0 - Covered T1,T9,T40
StDisabling - - - 1 Covered T1,T9,T40
StDisabling - - - 0 Covered T1,T3,T9


183 if (!rst_ni) begin -1- 184 cnt <= '0; ==> 185 cnt_ovfl <= '0; 186 end else if (!cnt_en && |cnt) begin -2- 187 cnt <= '0; ==> 188 cnt_ovfl <= '0; 189 end else if (valid_o) begin -3- 190 cnt <= '0; ==> 191 cnt_ovfl <= '0; 192 end else if (cnt_ovfl) begin -4- 193 cnt <= '{default: '1}; ==> 194 end else if (cnt_en) begin -5- 195 {cnt_ovfl, cnt} <= cnt + 1'b1; ==> 196 end MISSING_ELSE ==>

Branches:
-1--2--3--4--5-StatusTests
1 - - - - Covered T4,T5,T6
0 1 - - - Covered T1,T3,T9
0 0 1 - - Covered T1,T9,T40
0 0 0 1 - Covered T9,T10,T11
0 0 0 0 1 Covered T1,T3,T9
0 0 0 0 0 Covered T4,T5,T6


Assert Coverage for Module : prim_clock_meas
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 3 3 100.00 2 66.67
Cover properties 0 0 0
Cover sequences 0 0 0
Total 3 3 100.00 2 66.67




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
MaxWidth_A 238343155 0 0 0
RefCntVal_A 3790 3790 0 0
gen_timeout_assert.ClkRatios_A 3790 3790 0 0


MaxWidth_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 238343155 0 0 0

RefCntVal_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 3790 3790 0 0
T4 5 5 0 0
T5 5 5 0 0
T6 5 5 0 0
T29 5 5 0 0
T30 5 5 0 0
T31 5 5 0 0
T32 5 5 0 0
T33 5 5 0 0
T34 5 5 0 0
T35 5 5 0 0

gen_timeout_assert.ClkRatios_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 3790 3790 0 0
T4 5 5 0 0
T5 5 5 0 0
T6 5 5 0 0
T29 5 5 0 0
T30 5 5 0 0
T31 5 5 0 0
T32 5 5 0 0
T33 5 5 0 0
T34 5 5 0 0
T35 5 5 0 0

Line Coverage for Instance : tb.dut.u_io_meas.u_meas
Line No.TotalCoveredPercent
TOTAL3232100.00
ALWAYS8833100.00
ALWAYS1001212100.00
CONT_ASSIGN16311100.00
ALWAYS1831313100.00
CONT_ASSIGN19911100.00
CONT_ASSIGN20011100.00
CONT_ASSIGN20111100.00

87 always_ff @(posedge clk_i or negedge rst_ni) begin 88 1/1 if (!rst_ni) begin Tests: T4 T5 T6  89 1/1 state_q <= StDisable; Tests: T4 T5 T6  90 end else begin 91 1/1 state_q <= state_d; Tests: T4 T5 T6  92 end 93 end 94 95 // The following fsm sequence ensures that even if the source 96 // side changes the enable too quickly, the measurement controls 97 // remain consistent. 98 logic cnt_en; 99 always_comb begin 100 1/1 state_d = state_q; Tests: T1 T3 T9  101 1/1 cnt_en = '0; Tests: T1 T3 T9  102 103 1/1 unique case (state_q) Tests: T1 T3 T9  104 105 StDisable: begin 106 1/1 if (en_i) begin Tests: T1 T3 T9  107 1/1 state_d = StEnabling; Tests: T1 T3 T9  108 end MISSING_ELSE 109 end 110 111 StEnabling: begin 112 1/1 if (en_ref_sync) begin Tests: T1 T3 T9  113 1/1 state_d = StEnable; Tests: T1 T9 T40  114 end MISSING_ELSE 115 end 116 117 StEnable: begin 118 1/1 cnt_en = 1'b1; Tests: T1 T9 T40  119 1/1 if (!en_i) begin Tests: T1 T9 T40  120 1/1 state_d = StDisabling; Tests: T1 T9 T40  121 end MISSING_ELSE 122 end 123 124 StDisabling: begin 125 1/1 if (!en_ref_sync) begin Tests: T1 T9 T40  126 1/1 state_d = StDisable; Tests: T1 T9 T40  127 end MISSING_ELSE 128 end 129 130 //VCS coverage off 131 // pragma coverage off 132 default:; 133 //VCS coverage on 134 // pragma coverage on 135 136 endcase // unique case (state_q) 137 end 138 139 ////////////////////////// 140 // Input Clock Logic 141 ////////////////////////// 142 143 logic valid_ref; 144 logic valid; 145 // The valid pulse causes the count to reset and start counting again 146 // for each reference cycle. 147 // The count obtained during the last reference cycle is used 148 // to measure how fast/slow the input clock is. 149 prim_pulse_sync u_sync_ref ( 150 .clk_src_i(clk_ref_i), 151 .rst_src_ni(rst_ref_ni), 152 .src_pulse_i(ref_en), 153 .clk_dst_i(clk_i), 154 .rst_dst_ni(rst_ni), 155 .dst_pulse_o(valid_ref) 156 ); 157 158 159 if (RefCnt == 1) begin : gen_degenerate_case 160 // if reference count is one, cnt_ref is always 0. 161 // So there is no need to maintain a counter, and 162 // valid just becomes valid_ref 163 1/1 assign valid = valid_ref; Tests: T1 T9 T40  164 end else begin : gen_normal_case 165 logic [RefCntWidth-1:0] cnt_ref; 166 assign valid = valid_ref & (int'(cnt_ref) == RefCnt - 1); 167 always_ff @(posedge clk_i or negedge rst_ni) begin 168 if (!rst_ni) begin 169 cnt_ref <= '0; 170 end else if (!cnt_en && |cnt_ref) begin 171 cnt_ref <= '0; 172 end else if (cnt_en && valid) begin 173 cnt_ref <= '0; 174 end else if (cnt_en && valid_ref) begin 175 cnt_ref <= cnt_ref + 1'b1; 176 end 177 end 178 end 179 180 logic cnt_ovfl; 181 logic [CntWidth-1:0] cnt; 182 always_ff @(posedge clk_i or negedge rst_ni) begin 183 1/1 if (!rst_ni) begin Tests: T4 T5 T6  184 1/1 cnt <= '0; Tests: T4 T5 T6  185 1/1 cnt_ovfl <= '0; Tests: T4 T5 T6  186 1/1 end else if (!cnt_en && |cnt) begin Tests: T4 T5 T6  187 1/1 cnt <= '0; Tests: T1 T9 T40  188 1/1 cnt_ovfl <= '0; Tests: T1 T9 T40  189 1/1 end else if (valid_o) begin Tests: T4 T5 T6  190 1/1 cnt <= '0; Tests: T1 T9 T40  191 1/1 cnt_ovfl <= '0; Tests: T1 T9 T40  192 1/1 end else if (cnt_ovfl) begin Tests: T4 T5 T6  193 1/1 cnt <= '{default: '1}; Tests: T15 T17 T18  194 1/1 end else if (cnt_en) begin Tests: T4 T5 T6  195 1/1 {cnt_ovfl, cnt} <= cnt + 1'b1; Tests: T1 T9 T40  196 end MISSING_ELSE 197 end 198 199 1/1 assign valid_o = valid & |cnt; Tests: T1 T9 T40  200 1/1 assign fast_o = valid_o & ((cnt > max_cnt) | cnt_ovfl); Tests: T1 T2 T3  201 1/1 assign slow_o = valid_o & (cnt < min_cnt); Tests: T1 T2 T3 

Cond Coverage for Instance : tb.dut.u_io_meas.u_meas
TotalCoveredPercent
Conditions1515100.00
Logical1515100.00
Non-Logical00
Event00

 LINE       186
 EXPRESSION (((!cnt_en)) && ((|cnt)))
             -----1-----    ----2---
-1--2-StatusTests
01CoveredT1,T9,T40
10CoveredT4,T5,T6
11CoveredT1,T9,T40

 LINE       199
 EXPRESSION (valid & ((|cnt)))
             --1--   ----2---
-1--2-StatusTests
01CoveredT1,T9,T40
10CoveredT1,T9,T40
11CoveredT1,T9,T40

 LINE       200
 EXPRESSION (valid_o & ((cnt > max_cnt) | cnt_ovfl))
             ---1---   --------------2-------------
-1--2-StatusTests
01CoveredT11,T12,T13
10CoveredT1,T9,T40
11CoveredT13,T15,T17

 LINE       200
 SUB-EXPRESSION ((cnt > max_cnt) | cnt_ovfl)
                 -------1-------   ----2---
-1--2-StatusTests
00CoveredT4,T5,T6
01CoveredT15,T17,T18
10CoveredT11,T12,T13

 LINE       201
 EXPRESSION (valid_o & (cnt < min_cnt))
             ---1---   -------2-------
-1--2-StatusTests
01CoveredT4,T5,T6
10CoveredT1,T9,T40
11CoveredT10,T17,T38

FSM Coverage for Instance : tb.dut.u_io_meas.u_meas
Summary for FSM :: state_q
TotalCoveredPercent
States 4 4 100.00 (Not included in score)
Transitions 4 4 100.00
Sequences 0 0

State, Transition and Sequence Details for FSM :: state_q
statesLine No.CoveredTests
StDisable 126 Covered T4,T5,T6
StDisabling 120 Covered T1,T9,T40
StEnable 113 Covered T1,T9,T40
StEnabling 107 Covered T1,T3,T9


transitionsLine No.CoveredTests
StDisable->StEnabling 107 Covered T1,T3,T9
StDisabling->StDisable 126 Covered T1,T9,T40
StEnable->StDisabling 120 Covered T1,T9,T40
StEnabling->StEnable 113 Covered T1,T9,T40



Branch Coverage for Instance : tb.dut.u_io_meas.u_meas
Line No.TotalCoveredPercent
Branches 16 16 100.00
IF 88 2 2 100.00
CASE 103 8 8 100.00
IF 183 6 6 100.00


88 if (!rst_ni) begin -1- 89 state_q <= StDisable; ==> 90 end else begin 91 state_q <= state_d; ==>

Branches:
-1-StatusTests
1 Covered T4,T5,T6
0 Covered T4,T5,T6


103 unique case (state_q) -1- 104 105 StDisable: begin 106 if (en_i) begin -2- 107 state_d = StEnabling; ==> 108 end MISSING_ELSE ==> 109 end 110 111 StEnabling: begin 112 if (en_ref_sync) begin -3- 113 state_d = StEnable; ==> 114 end MISSING_ELSE ==> 115 end 116 117 StEnable: begin 118 cnt_en = 1'b1; 119 if (!en_i) begin -4- 120 state_d = StDisabling; ==> 121 end MISSING_ELSE ==> 122 end 123 124 StDisabling: begin 125 if (!en_ref_sync) begin -5- 126 state_d = StDisable; ==> 127 end MISSING_ELSE ==>

Branches:
-1--2--3--4--5-StatusTests
StDisable 1 - - - Covered T1,T3,T9
StDisable 0 - - - Covered T1,T3,T9
StEnabling - 1 - - Covered T1,T9,T40
StEnabling - 0 - - Covered T1,T3,T9
StEnable - - 1 - Covered T1,T9,T40
StEnable - - 0 - Covered T1,T9,T40
StDisabling - - - 1 Covered T1,T9,T40
StDisabling - - - 0 Covered T1,T9,T40


183 if (!rst_ni) begin -1- 184 cnt <= '0; ==> 185 cnt_ovfl <= '0; 186 end else if (!cnt_en && |cnt) begin -2- 187 cnt <= '0; ==> 188 cnt_ovfl <= '0; 189 end else if (valid_o) begin -3- 190 cnt <= '0; ==> 191 cnt_ovfl <= '0; 192 end else if (cnt_ovfl) begin -4- 193 cnt <= '{default: '1}; ==> 194 end else if (cnt_en) begin -5- 195 {cnt_ovfl, cnt} <= cnt + 1'b1; ==> 196 end MISSING_ELSE ==>

Branches:
-1--2--3--4--5-StatusTests
1 - - - - Covered T4,T5,T6
0 1 - - - Covered T1,T9,T40
0 0 1 - - Covered T1,T9,T40
0 0 0 1 - Covered T15,T17,T18
0 0 0 0 1 Covered T1,T9,T40
0 0 0 0 0 Covered T4,T5,T6


Assert Coverage for Instance : tb.dut.u_io_meas.u_meas
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 3 3 100.00 2 66.67
Cover properties 0 0 0
Cover sequences 0 0 0
Total 3 3 100.00 2 66.67




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
MaxWidth_A 70722507 0 0 0
RefCntVal_A 758 758 0 0
gen_timeout_assert.ClkRatios_A 758 758 0 0


MaxWidth_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 70722507 0 0 0

RefCntVal_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 758 758 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T29 1 1 0 0
T30 1 1 0 0
T31 1 1 0 0
T32 1 1 0 0
T33 1 1 0 0
T34 1 1 0 0
T35 1 1 0 0

gen_timeout_assert.ClkRatios_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 758 758 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T29 1 1 0 0
T30 1 1 0 0
T31 1 1 0 0
T32 1 1 0 0
T33 1 1 0 0
T34 1 1 0 0
T35 1 1 0 0

Line Coverage for Instance : tb.dut.u_io_div2_meas.u_meas
Line No.TotalCoveredPercent
TOTAL3232100.00
ALWAYS8833100.00
ALWAYS1001212100.00
CONT_ASSIGN16311100.00
ALWAYS1831313100.00
CONT_ASSIGN19911100.00
CONT_ASSIGN20011100.00
CONT_ASSIGN20111100.00

87 always_ff @(posedge clk_i or negedge rst_ni) begin 88 1/1 if (!rst_ni) begin Tests: T4 T5 T6  89 1/1 state_q <= StDisable; Tests: T4 T5 T6  90 end else begin 91 1/1 state_q <= state_d; Tests: T4 T5 T6  92 end 93 end 94 95 // The following fsm sequence ensures that even if the source 96 // side changes the enable too quickly, the measurement controls 97 // remain consistent. 98 logic cnt_en; 99 always_comb begin 100 1/1 state_d = state_q; Tests: T1 T2 T3  101 1/1 cnt_en = '0; Tests: T1 T2 T3  102 103 1/1 unique case (state_q) Tests: T1 T2 T3  104 105 StDisable: begin 106 1/1 if (en_i) begin Tests: T1 T2 T3  107 1/1 state_d = StEnabling; Tests: T1 T2 T3  108 end MISSING_ELSE 109 end 110 111 StEnabling: begin 112 1/1 if (en_ref_sync) begin Tests: T1 T2 T3  113 1/1 state_d = StEnable; Tests: T1 T9 T40  114 end MISSING_ELSE 115 end 116 117 StEnable: begin 118 1/1 cnt_en = 1'b1; Tests: T1 T9 T40  119 1/1 if (!en_i) begin Tests: T1 T9 T40  120 1/1 state_d = StDisabling; Tests: T1 T9 T40  121 end MISSING_ELSE 122 end 123 124 StDisabling: begin 125 1/1 if (!en_ref_sync) begin Tests: T1 T9 T40  126 1/1 state_d = StDisable; Tests: T1 T9 T40  127 end MISSING_ELSE 128 end 129 130 //VCS coverage off 131 // pragma coverage off 132 default:; 133 //VCS coverage on 134 // pragma coverage on 135 136 endcase // unique case (state_q) 137 end 138 139 ////////////////////////// 140 // Input Clock Logic 141 ////////////////////////// 142 143 logic valid_ref; 144 logic valid; 145 // The valid pulse causes the count to reset and start counting again 146 // for each reference cycle. 147 // The count obtained during the last reference cycle is used 148 // to measure how fast/slow the input clock is. 149 prim_pulse_sync u_sync_ref ( 150 .clk_src_i(clk_ref_i), 151 .rst_src_ni(rst_ref_ni), 152 .src_pulse_i(ref_en), 153 .clk_dst_i(clk_i), 154 .rst_dst_ni(rst_ni), 155 .dst_pulse_o(valid_ref) 156 ); 157 158 159 if (RefCnt == 1) begin : gen_degenerate_case 160 // if reference count is one, cnt_ref is always 0. 161 // So there is no need to maintain a counter, and 162 // valid just becomes valid_ref 163 1/1 assign valid = valid_ref; Tests: T1 T9 T40  164 end else begin : gen_normal_case 165 logic [RefCntWidth-1:0] cnt_ref; 166 assign valid = valid_ref & (int'(cnt_ref) == RefCnt - 1); 167 always_ff @(posedge clk_i or negedge rst_ni) begin 168 if (!rst_ni) begin 169 cnt_ref <= '0; 170 end else if (!cnt_en && |cnt_ref) begin 171 cnt_ref <= '0; 172 end else if (cnt_en && valid) begin 173 cnt_ref <= '0; 174 end else if (cnt_en && valid_ref) begin 175 cnt_ref <= cnt_ref + 1'b1; 176 end 177 end 178 end 179 180 logic cnt_ovfl; 181 logic [CntWidth-1:0] cnt; 182 always_ff @(posedge clk_i or negedge rst_ni) begin 183 1/1 if (!rst_ni) begin Tests: T4 T5 T6  184 1/1 cnt <= '0; Tests: T4 T5 T6  185 1/1 cnt_ovfl <= '0; Tests: T4 T5 T6  186 1/1 end else if (!cnt_en && |cnt) begin Tests: T4 T5 T6  187 1/1 cnt <= '0; Tests: T1 T9 T40  188 1/1 cnt_ovfl <= '0; Tests: T1 T9 T40  189 1/1 end else if (valid_o) begin Tests: T4 T5 T6  190 1/1 cnt <= '0; Tests: T1 T9 T40  191 1/1 cnt_ovfl <= '0; Tests: T1 T9 T40  192 1/1 end else if (cnt_ovfl) begin Tests: T4 T5 T6  193 1/1 cnt <= '{default: '1}; Tests: T9 T15 T17  194 1/1 end else if (cnt_en) begin Tests: T4 T5 T6  195 1/1 {cnt_ovfl, cnt} <= cnt + 1'b1; Tests: T1 T9 T40  196 end MISSING_ELSE 197 end 198 199 1/1 assign valid_o = valid & |cnt; Tests: T1 T9 T40  200 1/1 assign fast_o = valid_o & ((cnt > max_cnt) | cnt_ovfl); Tests: T1 T2 T3  201 1/1 assign slow_o = valid_o & (cnt < min_cnt); Tests: T1 T2 T3 

Cond Coverage for Instance : tb.dut.u_io_div2_meas.u_meas
TotalCoveredPercent
Conditions1515100.00
Logical1515100.00
Non-Logical00
Event00

 LINE       186
 EXPRESSION (((!cnt_en)) && ((|cnt)))
             -----1-----    ----2---
-1--2-StatusTests
01CoveredT1,T9,T40
10CoveredT4,T5,T6
11CoveredT1,T9,T40

 LINE       199
 EXPRESSION (valid & ((|cnt)))
             --1--   ----2---
-1--2-StatusTests
01CoveredT1,T9,T40
10CoveredT1,T9,T40
11CoveredT1,T9,T40

 LINE       200
 EXPRESSION (valid_o & ((cnt > max_cnt) | cnt_ovfl))
             ---1---   --------------2-------------
-1--2-StatusTests
01CoveredT9,T10,T15
10CoveredT1,T9,T40
11CoveredT9,T10,T15

 LINE       200
 SUB-EXPRESSION ((cnt > max_cnt) | cnt_ovfl)
                 -------1-------   ----2---
-1--2-StatusTests
00CoveredT4,T5,T6
01CoveredT9,T15,T17
10CoveredT9,T10,T15

 LINE       201
 EXPRESSION (valid_o & (cnt < min_cnt))
             ---1---   -------2-------
-1--2-StatusTests
01CoveredT4,T5,T6
10CoveredT1,T9,T40
11CoveredT12,T18,T36

FSM Coverage for Instance : tb.dut.u_io_div2_meas.u_meas
Summary for FSM :: state_q
TotalCoveredPercent
States 4 4 100.00 (Not included in score)
Transitions 4 4 100.00
Sequences 0 0

State, Transition and Sequence Details for FSM :: state_q
statesLine No.CoveredTests
StDisable 126 Covered T4,T5,T6
StDisabling 120 Covered T1,T9,T40
StEnable 113 Covered T1,T9,T40
StEnabling 107 Covered T1,T2,T3


transitionsLine No.CoveredTests
StDisable->StEnabling 107 Covered T1,T2,T3
StDisabling->StDisable 126 Covered T1,T9,T40
StEnable->StDisabling 120 Covered T1,T9,T40
StEnabling->StEnable 113 Covered T1,T9,T40



Branch Coverage for Instance : tb.dut.u_io_div2_meas.u_meas
Line No.TotalCoveredPercent
Branches 16 16 100.00
IF 88 2 2 100.00
CASE 103 8 8 100.00
IF 183 6 6 100.00


88 if (!rst_ni) begin -1- 89 state_q <= StDisable; ==> 90 end else begin 91 state_q <= state_d; ==>

Branches:
-1-StatusTests
1 Covered T4,T5,T6
0 Covered T4,T5,T6


103 unique case (state_q) -1- 104 105 StDisable: begin 106 if (en_i) begin -2- 107 state_d = StEnabling; ==> 108 end MISSING_ELSE ==> 109 end 110 111 StEnabling: begin 112 if (en_ref_sync) begin -3- 113 state_d = StEnable; ==> 114 end MISSING_ELSE ==> 115 end 116 117 StEnable: begin 118 cnt_en = 1'b1; 119 if (!en_i) begin -4- 120 state_d = StDisabling; ==> 121 end MISSING_ELSE ==> 122 end 123 124 StDisabling: begin 125 if (!en_ref_sync) begin -5- 126 state_d = StDisable; ==> 127 end MISSING_ELSE ==>

Branches:
-1--2--3--4--5-StatusTests
StDisable 1 - - - Covered T1,T2,T3
StDisable 0 - - - Covered T1,T2,T3
StEnabling - 1 - - Covered T1,T9,T40
StEnabling - 0 - - Covered T1,T2,T3
StEnable - - 1 - Covered T1,T9,T40
StEnable - - 0 - Covered T1,T9,T40
StDisabling - - - 1 Covered T1,T9,T40
StDisabling - - - 0 Covered T1,T9,T40


183 if (!rst_ni) begin -1- 184 cnt <= '0; ==> 185 cnt_ovfl <= '0; 186 end else if (!cnt_en && |cnt) begin -2- 187 cnt <= '0; ==> 188 cnt_ovfl <= '0; 189 end else if (valid_o) begin -3- 190 cnt <= '0; ==> 191 cnt_ovfl <= '0; 192 end else if (cnt_ovfl) begin -4- 193 cnt <= '{default: '1}; ==> 194 end else if (cnt_en) begin -5- 195 {cnt_ovfl, cnt} <= cnt + 1'b1; ==> 196 end MISSING_ELSE ==>

Branches:
-1--2--3--4--5-StatusTests
1 - - - - Covered T4,T5,T6
0 1 - - - Covered T1,T9,T40
0 0 1 - - Covered T1,T9,T40
0 0 0 1 - Covered T9,T15,T17
0 0 0 0 1 Covered T1,T9,T40
0 0 0 0 0 Covered T4,T5,T6


Assert Coverage for Instance : tb.dut.u_io_div2_meas.u_meas
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 3 3 100.00 2 66.67
Cover properties 0 0 0
Cover sequences 0 0 0
Total 3 3 100.00 2 66.67




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
MaxWidth_A 34481633 0 0 0
RefCntVal_A 758 758 0 0
gen_timeout_assert.ClkRatios_A 758 758 0 0


MaxWidth_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 34481633 0 0 0

RefCntVal_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 758 758 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T29 1 1 0 0
T30 1 1 0 0
T31 1 1 0 0
T32 1 1 0 0
T33 1 1 0 0
T34 1 1 0 0
T35 1 1 0 0

gen_timeout_assert.ClkRatios_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 758 758 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T29 1 1 0 0
T30 1 1 0 0
T31 1 1 0 0
T32 1 1 0 0
T33 1 1 0 0
T34 1 1 0 0
T35 1 1 0 0

Line Coverage for Instance : tb.dut.u_io_div4_meas.u_meas
Line No.TotalCoveredPercent
TOTAL3232100.00
ALWAYS8833100.00
ALWAYS1001212100.00
CONT_ASSIGN16311100.00
ALWAYS1831313100.00
CONT_ASSIGN19911100.00
CONT_ASSIGN20011100.00
CONT_ASSIGN20111100.00

87 always_ff @(posedge clk_i or negedge rst_ni) begin 88 1/1 if (!rst_ni) begin Tests: T4 T5 T6  89 1/1 state_q <= StDisable; Tests: T4 T5 T6  90 end else begin 91 1/1 state_q <= state_d; Tests: T4 T5 T6  92 end 93 end 94 95 // The following fsm sequence ensures that even if the source 96 // side changes the enable too quickly, the measurement controls 97 // remain consistent. 98 logic cnt_en; 99 always_comb begin 100 1/1 state_d = state_q; Tests: T1 T2 T3  101 1/1 cnt_en = '0; Tests: T1 T2 T3  102 103 1/1 unique case (state_q) Tests: T1 T2 T3  104 105 StDisable: begin 106 1/1 if (en_i) begin Tests: T1 T2 T3  107 1/1 state_d = StEnabling; Tests: T1 T2 T3  108 end MISSING_ELSE 109 end 110 111 StEnabling: begin 112 1/1 if (en_ref_sync) begin Tests: T1 T2 T3  113 1/1 state_d = StEnable; Tests: T1 T3 T9  114 end MISSING_ELSE 115 end 116 117 StEnable: begin 118 1/1 cnt_en = 1'b1; Tests: T1 T3 T9  119 1/1 if (!en_i) begin Tests: T1 T3 T9  120 1/1 state_d = StDisabling; Tests: T1 T3 T9  121 end MISSING_ELSE 122 end 123 124 StDisabling: begin 125 1/1 if (!en_ref_sync) begin Tests: T1 T3 T9  126 1/1 state_d = StDisable; Tests: T1 T9 T40  127 end MISSING_ELSE 128 end 129 130 //VCS coverage off 131 // pragma coverage off 132 default:; 133 //VCS coverage on 134 // pragma coverage on 135 136 endcase // unique case (state_q) 137 end 138 139 ////////////////////////// 140 // Input Clock Logic 141 ////////////////////////// 142 143 logic valid_ref; 144 logic valid; 145 // The valid pulse causes the count to reset and start counting again 146 // for each reference cycle. 147 // The count obtained during the last reference cycle is used 148 // to measure how fast/slow the input clock is. 149 prim_pulse_sync u_sync_ref ( 150 .clk_src_i(clk_ref_i), 151 .rst_src_ni(rst_ref_ni), 152 .src_pulse_i(ref_en), 153 .clk_dst_i(clk_i), 154 .rst_dst_ni(rst_ni), 155 .dst_pulse_o(valid_ref) 156 ); 157 158 159 if (RefCnt == 1) begin : gen_degenerate_case 160 // if reference count is one, cnt_ref is always 0. 161 // So there is no need to maintain a counter, and 162 // valid just becomes valid_ref 163 1/1 assign valid = valid_ref; Tests: T1 T9 T40  164 end else begin : gen_normal_case 165 logic [RefCntWidth-1:0] cnt_ref; 166 assign valid = valid_ref & (int'(cnt_ref) == RefCnt - 1); 167 always_ff @(posedge clk_i or negedge rst_ni) begin 168 if (!rst_ni) begin 169 cnt_ref <= '0; 170 end else if (!cnt_en && |cnt_ref) begin 171 cnt_ref <= '0; 172 end else if (cnt_en && valid) begin 173 cnt_ref <= '0; 174 end else if (cnt_en && valid_ref) begin 175 cnt_ref <= cnt_ref + 1'b1; 176 end 177 end 178 end 179 180 logic cnt_ovfl; 181 logic [CntWidth-1:0] cnt; 182 always_ff @(posedge clk_i or negedge rst_ni) begin 183 1/1 if (!rst_ni) begin Tests: T4 T5 T6  184 1/1 cnt <= '0; Tests: T4 T5 T6  185 1/1 cnt_ovfl <= '0; Tests: T4 T5 T6  186 1/1 end else if (!cnt_en && |cnt) begin Tests: T4 T5 T6  187 1/1 cnt <= '0; Tests: T1 T3 T9  188 1/1 cnt_ovfl <= '0; Tests: T1 T3 T9  189 1/1 end else if (valid_o) begin Tests: T4 T5 T6  190 1/1 cnt <= '0; Tests: T1 T9 T40  191 1/1 cnt_ovfl <= '0; Tests: T1 T9 T40  192 1/1 end else if (cnt_ovfl) begin Tests: T4 T5 T6  193 1/1 cnt <= '{default: '1}; Tests: T11 T13 T17  194 1/1 end else if (cnt_en) begin Tests: T4 T5 T6  195 1/1 {cnt_ovfl, cnt} <= cnt + 1'b1; Tests: T1 T3 T9  196 end MISSING_ELSE 197 end 198 199 1/1 assign valid_o = valid & |cnt; Tests: T1 T3 T9  200 1/1 assign fast_o = valid_o & ((cnt > max_cnt) | cnt_ovfl); Tests: T1 T2 T3  201 1/1 assign slow_o = valid_o & (cnt < min_cnt); Tests: T1 T2 T3 

Cond Coverage for Instance : tb.dut.u_io_div4_meas.u_meas
TotalCoveredPercent
Conditions1515100.00
Logical1515100.00
Non-Logical00
Event00

 LINE       186
 EXPRESSION (((!cnt_en)) && ((|cnt)))
             -----1-----    ----2---
-1--2-StatusTests
01CoveredT1,T9,T40
10CoveredT4,T5,T6
11CoveredT1,T3,T9

 LINE       199
 EXPRESSION (valid & ((|cnt)))
             --1--   ----2---
-1--2-StatusTests
01CoveredT1,T3,T9
10CoveredT1,T9,T40
11CoveredT1,T9,T40

 LINE       200
 EXPRESSION (valid_o & ((cnt > max_cnt) | cnt_ovfl))
             ---1---   --------------2-------------
-1--2-StatusTests
01CoveredT9,T11,T13
10CoveredT1,T9,T40
11CoveredT11,T13,T14

 LINE       200
 SUB-EXPRESSION ((cnt > max_cnt) | cnt_ovfl)
                 -------1-------   ----2---
-1--2-StatusTests
00CoveredT4,T5,T6
01CoveredT11,T13,T17
10CoveredT9,T11,T13

 LINE       201
 EXPRESSION (valid_o & (cnt < min_cnt))
             ---1---   -------2-------
-1--2-StatusTests
01CoveredT4,T5,T6
10CoveredT1,T9,T40
11CoveredT11,T13,T14

FSM Coverage for Instance : tb.dut.u_io_div4_meas.u_meas
Summary for FSM :: state_q
TotalCoveredPercent
States 4 4 100.00 (Not included in score)
Transitions 4 4 100.00
Sequences 0 0

State, Transition and Sequence Details for FSM :: state_q
statesLine No.CoveredTests
StDisable 126 Covered T4,T5,T6
StDisabling 120 Covered T1,T3,T9
StEnable 113 Covered T1,T3,T9
StEnabling 107 Covered T1,T2,T3


transitionsLine No.CoveredTests
StDisable->StEnabling 107 Covered T1,T2,T3
StDisabling->StDisable 126 Covered T1,T3,T9
StEnable->StDisabling 120 Covered T1,T3,T9
StEnabling->StEnable 113 Covered T1,T3,T9



Branch Coverage for Instance : tb.dut.u_io_div4_meas.u_meas
Line No.TotalCoveredPercent
Branches 16 16 100.00
IF 88 2 2 100.00
CASE 103 8 8 100.00
IF 183 6 6 100.00


88 if (!rst_ni) begin -1- 89 state_q <= StDisable; ==> 90 end else begin 91 state_q <= state_d; ==>

Branches:
-1-StatusTests
1 Covered T4,T5,T6
0 Covered T4,T5,T6


103 unique case (state_q) -1- 104 105 StDisable: begin 106 if (en_i) begin -2- 107 state_d = StEnabling; ==> 108 end MISSING_ELSE ==> 109 end 110 111 StEnabling: begin 112 if (en_ref_sync) begin -3- 113 state_d = StEnable; ==> 114 end MISSING_ELSE ==> 115 end 116 117 StEnable: begin 118 cnt_en = 1'b1; 119 if (!en_i) begin -4- 120 state_d = StDisabling; ==> 121 end MISSING_ELSE ==> 122 end 123 124 StDisabling: begin 125 if (!en_ref_sync) begin -5- 126 state_d = StDisable; ==> 127 end MISSING_ELSE ==>

Branches:
-1--2--3--4--5-StatusTests
StDisable 1 - - - Covered T1,T2,T3
StDisable 0 - - - Covered T1,T2,T3
StEnabling - 1 - - Covered T1,T3,T9
StEnabling - 0 - - Covered T1,T2,T3
StEnable - - 1 - Covered T1,T3,T9
StEnable - - 0 - Covered T1,T9,T40
StDisabling - - - 1 Covered T1,T9,T40
StDisabling - - - 0 Covered T1,T3,T9


183 if (!rst_ni) begin -1- 184 cnt <= '0; ==> 185 cnt_ovfl <= '0; 186 end else if (!cnt_en && |cnt) begin -2- 187 cnt <= '0; ==> 188 cnt_ovfl <= '0; 189 end else if (valid_o) begin -3- 190 cnt <= '0; ==> 191 cnt_ovfl <= '0; 192 end else if (cnt_ovfl) begin -4- 193 cnt <= '{default: '1}; ==> 194 end else if (cnt_en) begin -5- 195 {cnt_ovfl, cnt} <= cnt + 1'b1; ==> 196 end MISSING_ELSE ==>

Branches:
-1--2--3--4--5-StatusTests
1 - - - - Covered T4,T5,T6
0 1 - - - Covered T1,T3,T9
0 0 1 - - Covered T1,T9,T40
0 0 0 1 - Covered T11,T13,T17
0 0 0 0 1 Covered T1,T3,T9
0 0 0 0 0 Covered T4,T5,T6


Assert Coverage for Instance : tb.dut.u_io_div4_meas.u_meas
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 3 3 100.00 2 66.67
Cover properties 0 0 0
Cover sequences 0 0 0
Total 3 3 100.00 2 66.67




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
MaxWidth_A 17240419 0 0 0
RefCntVal_A 758 758 0 0
gen_timeout_assert.ClkRatios_A 758 758 0 0


MaxWidth_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 17240419 0 0 0

RefCntVal_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 758 758 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T29 1 1 0 0
T30 1 1 0 0
T31 1 1 0 0
T32 1 1 0 0
T33 1 1 0 0
T34 1 1 0 0
T35 1 1 0 0

gen_timeout_assert.ClkRatios_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 758 758 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T29 1 1 0 0
T30 1 1 0 0
T31 1 1 0 0
T32 1 1 0 0
T33 1 1 0 0
T34 1 1 0 0
T35 1 1 0 0

Line Coverage for Instance : tb.dut.u_main_meas.u_meas
Line No.TotalCoveredPercent
TOTAL3232100.00
ALWAYS8833100.00
ALWAYS1001212100.00
CONT_ASSIGN16311100.00
ALWAYS1831313100.00
CONT_ASSIGN19911100.00
CONT_ASSIGN20011100.00
CONT_ASSIGN20111100.00

87 always_ff @(posedge clk_i or negedge rst_ni) begin 88 1/1 if (!rst_ni) begin Tests: T4 T5 T6  89 1/1 state_q <= StDisable; Tests: T4 T5 T6  90 end else begin 91 1/1 state_q <= state_d; Tests: T4 T5 T6  92 end 93 end 94 95 // The following fsm sequence ensures that even if the source 96 // side changes the enable too quickly, the measurement controls 97 // remain consistent. 98 logic cnt_en; 99 always_comb begin 100 1/1 state_d = state_q; Tests: T1 T3 T9  101 1/1 cnt_en = '0; Tests: T1 T3 T9  102 103 1/1 unique case (state_q) Tests: T1 T3 T9  104 105 StDisable: begin 106 1/1 if (en_i) begin Tests: T1 T3 T9  107 1/1 state_d = StEnabling; Tests: T1 T3 T9  108 end MISSING_ELSE 109 end 110 111 StEnabling: begin 112 1/1 if (en_ref_sync) begin Tests: T1 T3 T9  113 1/1 state_d = StEnable; Tests: T1 T9 T40  114 end MISSING_ELSE 115 end 116 117 StEnable: begin 118 1/1 cnt_en = 1'b1; Tests: T1 T9 T40  119 1/1 if (!en_i) begin Tests: T1 T9 T40  120 1/1 state_d = StDisabling; Tests: T1 T9 T40  121 end MISSING_ELSE 122 end 123 124 StDisabling: begin 125 1/1 if (!en_ref_sync) begin Tests: T1 T9 T40  126 1/1 state_d = StDisable; Tests: T1 T9 T40  127 end MISSING_ELSE 128 end 129 130 //VCS coverage off 131 // pragma coverage off 132 default:; 133 //VCS coverage on 134 // pragma coverage on 135 136 endcase // unique case (state_q) 137 end 138 139 ////////////////////////// 140 // Input Clock Logic 141 ////////////////////////// 142 143 logic valid_ref; 144 logic valid; 145 // The valid pulse causes the count to reset and start counting again 146 // for each reference cycle. 147 // The count obtained during the last reference cycle is used 148 // to measure how fast/slow the input clock is. 149 prim_pulse_sync u_sync_ref ( 150 .clk_src_i(clk_ref_i), 151 .rst_src_ni(rst_ref_ni), 152 .src_pulse_i(ref_en), 153 .clk_dst_i(clk_i), 154 .rst_dst_ni(rst_ni), 155 .dst_pulse_o(valid_ref) 156 ); 157 158 159 if (RefCnt == 1) begin : gen_degenerate_case 160 // if reference count is one, cnt_ref is always 0. 161 // So there is no need to maintain a counter, and 162 // valid just becomes valid_ref 163 1/1 assign valid = valid_ref; Tests: T1 T9 T40  164 end else begin : gen_normal_case 165 logic [RefCntWidth-1:0] cnt_ref; 166 assign valid = valid_ref & (int'(cnt_ref) == RefCnt - 1); 167 always_ff @(posedge clk_i or negedge rst_ni) begin 168 if (!rst_ni) begin 169 cnt_ref <= '0; 170 end else if (!cnt_en && |cnt_ref) begin 171 cnt_ref <= '0; 172 end else if (cnt_en && valid) begin 173 cnt_ref <= '0; 174 end else if (cnt_en && valid_ref) begin 175 cnt_ref <= cnt_ref + 1'b1; 176 end 177 end 178 end 179 180 logic cnt_ovfl; 181 logic [CntWidth-1:0] cnt; 182 always_ff @(posedge clk_i or negedge rst_ni) begin 183 1/1 if (!rst_ni) begin Tests: T4 T5 T6  184 1/1 cnt <= '0; Tests: T4 T5 T6  185 1/1 cnt_ovfl <= '0; Tests: T4 T5 T6  186 1/1 end else if (!cnt_en && |cnt) begin Tests: T4 T5 T6  187 1/1 cnt <= '0; Tests: T1 T9 T40  188 1/1 cnt_ovfl <= '0; Tests: T1 T9 T40  189 1/1 end else if (valid_o) begin Tests: T4 T5 T6  190 1/1 cnt <= '0; Tests: T1 T9 T40  191 1/1 cnt_ovfl <= '0; Tests: T1 T9 T40  192 1/1 end else if (cnt_ovfl) begin Tests: T4 T5 T6  193 1/1 cnt <= '{default: '1}; Tests: T10 T13 T15  194 1/1 end else if (cnt_en) begin Tests: T4 T5 T6  195 1/1 {cnt_ovfl, cnt} <= cnt + 1'b1; Tests: T1 T9 T40  196 end MISSING_ELSE 197 end 198 199 1/1 assign valid_o = valid & |cnt; Tests: T1 T9 T40  200 1/1 assign fast_o = valid_o & ((cnt > max_cnt) | cnt_ovfl); Tests: T1 T2 T3  201 1/1 assign slow_o = valid_o & (cnt < min_cnt); Tests: T1 T2 T3 

Cond Coverage for Instance : tb.dut.u_main_meas.u_meas
TotalCoveredPercent
Conditions1515100.00
Logical1515100.00
Non-Logical00
Event00

 LINE       186
 EXPRESSION (((!cnt_en)) && ((|cnt)))
             -----1-----    ----2---
-1--2-StatusTests
01CoveredT1,T9,T40
10CoveredT4,T5,T6
11CoveredT1,T9,T40

 LINE       199
 EXPRESSION (valid & ((|cnt)))
             --1--   ----2---
-1--2-StatusTests
01CoveredT1,T9,T40
10CoveredT1,T9,T40
11CoveredT1,T9,T40

 LINE       200
 EXPRESSION (valid_o & ((cnt > max_cnt) | cnt_ovfl))
             ---1---   --------------2-------------
-1--2-StatusTests
01CoveredT10,T13,T14
10CoveredT1,T9,T40
11CoveredT10,T13,T14

 LINE       200
 SUB-EXPRESSION ((cnt > max_cnt) | cnt_ovfl)
                 -------1-------   ----2---
-1--2-StatusTests
00CoveredT4,T5,T6
01CoveredT10,T13,T15
10CoveredT10,T13,T14

 LINE       201
 EXPRESSION (valid_o & (cnt < min_cnt))
             ---1---   -------2-------
-1--2-StatusTests
01CoveredT4,T5,T6
10CoveredT1,T9,T40
11CoveredT13,T15,T17

FSM Coverage for Instance : tb.dut.u_main_meas.u_meas
Summary for FSM :: state_q
TotalCoveredPercent
States 4 4 100.00 (Not included in score)
Transitions 4 4 100.00
Sequences 0 0

State, Transition and Sequence Details for FSM :: state_q
statesLine No.CoveredTests
StDisable 126 Covered T4,T5,T6
StDisabling 120 Covered T1,T9,T40
StEnable 113 Covered T1,T9,T40
StEnabling 107 Covered T1,T3,T9


transitionsLine No.CoveredTests
StDisable->StEnabling 107 Covered T1,T3,T9
StDisabling->StDisable 126 Covered T1,T9,T40
StEnable->StDisabling 120 Covered T1,T9,T40
StEnabling->StEnable 113 Covered T1,T9,T40



Branch Coverage for Instance : tb.dut.u_main_meas.u_meas
Line No.TotalCoveredPercent
Branches 16 16 100.00
IF 88 2 2 100.00
CASE 103 8 8 100.00
IF 183 6 6 100.00


88 if (!rst_ni) begin -1- 89 state_q <= StDisable; ==> 90 end else begin 91 state_q <= state_d; ==>

Branches:
-1-StatusTests
1 Covered T4,T5,T6
0 Covered T4,T5,T6


103 unique case (state_q) -1- 104 105 StDisable: begin 106 if (en_i) begin -2- 107 state_d = StEnabling; ==> 108 end MISSING_ELSE ==> 109 end 110 111 StEnabling: begin 112 if (en_ref_sync) begin -3- 113 state_d = StEnable; ==> 114 end MISSING_ELSE ==> 115 end 116 117 StEnable: begin 118 cnt_en = 1'b1; 119 if (!en_i) begin -4- 120 state_d = StDisabling; ==> 121 end MISSING_ELSE ==> 122 end 123 124 StDisabling: begin 125 if (!en_ref_sync) begin -5- 126 state_d = StDisable; ==> 127 end MISSING_ELSE ==>

Branches:
-1--2--3--4--5-StatusTests
StDisable 1 - - - Covered T1,T3,T9
StDisable 0 - - - Covered T1,T3,T9
StEnabling - 1 - - Covered T1,T9,T40
StEnabling - 0 - - Covered T1,T3,T9
StEnable - - 1 - Covered T1,T9,T40
StEnable - - 0 - Covered T1,T9,T40
StDisabling - - - 1 Covered T1,T9,T40
StDisabling - - - 0 Covered T1,T9,T40


183 if (!rst_ni) begin -1- 184 cnt <= '0; ==> 185 cnt_ovfl <= '0; 186 end else if (!cnt_en && |cnt) begin -2- 187 cnt <= '0; ==> 188 cnt_ovfl <= '0; 189 end else if (valid_o) begin -3- 190 cnt <= '0; ==> 191 cnt_ovfl <= '0; 192 end else if (cnt_ovfl) begin -4- 193 cnt <= '{default: '1}; ==> 194 end else if (cnt_en) begin -5- 195 {cnt_ovfl, cnt} <= cnt + 1'b1; ==> 196 end MISSING_ELSE ==>

Branches:
-1--2--3--4--5-StatusTests
1 - - - - Covered T4,T5,T6
0 1 - - - Covered T1,T9,T40
0 0 1 - - Covered T1,T9,T40
0 0 0 1 - Covered T10,T13,T15
0 0 0 0 1 Covered T1,T9,T40
0 0 0 0 0 Covered T4,T5,T6


Assert Coverage for Instance : tb.dut.u_main_meas.u_meas
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 3 3 100.00 2 66.67
Cover properties 0 0 0
Cover sequences 0 0 0
Total 3 3 100.00 2 66.67




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
MaxWidth_A 78319349 0 0 0
RefCntVal_A 758 758 0 0
gen_timeout_assert.ClkRatios_A 758 758 0 0


MaxWidth_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 78319349 0 0 0

RefCntVal_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 758 758 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T29 1 1 0 0
T30 1 1 0 0
T31 1 1 0 0
T32 1 1 0 0
T33 1 1 0 0
T34 1 1 0 0
T35 1 1 0 0

gen_timeout_assert.ClkRatios_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 758 758 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T29 1 1 0 0
T30 1 1 0 0
T31 1 1 0 0
T32 1 1 0 0
T33 1 1 0 0
T34 1 1 0 0
T35 1 1 0 0

Line Coverage for Instance : tb.dut.u_usb_meas.u_meas
Line No.TotalCoveredPercent
TOTAL3232100.00
ALWAYS8833100.00
ALWAYS1001212100.00
CONT_ASSIGN16311100.00
ALWAYS1831313100.00
CONT_ASSIGN19911100.00
CONT_ASSIGN20011100.00
CONT_ASSIGN20111100.00

87 always_ff @(posedge clk_i or negedge rst_ni) begin 88 1/1 if (!rst_ni) begin Tests: T4 T5 T6  89 1/1 state_q <= StDisable; Tests: T4 T5 T6  90 end else begin 91 1/1 state_q <= state_d; Tests: T4 T5 T6  92 end 93 end 94 95 // The following fsm sequence ensures that even if the source 96 // side changes the enable too quickly, the measurement controls 97 // remain consistent. 98 logic cnt_en; 99 always_comb begin 100 1/1 state_d = state_q; Tests: T1 T3 T9  101 1/1 cnt_en = '0; Tests: T1 T3 T9  102 103 1/1 unique case (state_q) Tests: T1 T3 T9  104 105 StDisable: begin 106 1/1 if (en_i) begin Tests: T1 T3 T9  107 1/1 state_d = StEnabling; Tests: T1 T3 T9  108 end MISSING_ELSE 109 end 110 111 StEnabling: begin 112 1/1 if (en_ref_sync) begin Tests: T1 T3 T9  113 1/1 state_d = StEnable; Tests: T1 T9 T40  114 end MISSING_ELSE 115 end 116 117 StEnable: begin 118 1/1 cnt_en = 1'b1; Tests: T1 T9 T40  119 1/1 if (!en_i) begin Tests: T1 T9 T40  120 1/1 state_d = StDisabling; Tests: T1 T9 T40  121 end MISSING_ELSE 122 end 123 124 StDisabling: begin 125 1/1 if (!en_ref_sync) begin Tests: T1 T9 T40  126 1/1 state_d = StDisable; Tests: T1 T9 T40  127 end MISSING_ELSE 128 end 129 130 //VCS coverage off 131 // pragma coverage off 132 default:; 133 //VCS coverage on 134 // pragma coverage on 135 136 endcase // unique case (state_q) 137 end 138 139 ////////////////////////// 140 // Input Clock Logic 141 ////////////////////////// 142 143 logic valid_ref; 144 logic valid; 145 // The valid pulse causes the count to reset and start counting again 146 // for each reference cycle. 147 // The count obtained during the last reference cycle is used 148 // to measure how fast/slow the input clock is. 149 prim_pulse_sync u_sync_ref ( 150 .clk_src_i(clk_ref_i), 151 .rst_src_ni(rst_ref_ni), 152 .src_pulse_i(ref_en), 153 .clk_dst_i(clk_i), 154 .rst_dst_ni(rst_ni), 155 .dst_pulse_o(valid_ref) 156 ); 157 158 159 if (RefCnt == 1) begin : gen_degenerate_case 160 // if reference count is one, cnt_ref is always 0. 161 // So there is no need to maintain a counter, and 162 // valid just becomes valid_ref 163 1/1 assign valid = valid_ref; Tests: T1 T9 T40  164 end else begin : gen_normal_case 165 logic [RefCntWidth-1:0] cnt_ref; 166 assign valid = valid_ref & (int'(cnt_ref) == RefCnt - 1); 167 always_ff @(posedge clk_i or negedge rst_ni) begin 168 if (!rst_ni) begin 169 cnt_ref <= '0; 170 end else if (!cnt_en && |cnt_ref) begin 171 cnt_ref <= '0; 172 end else if (cnt_en && valid) begin 173 cnt_ref <= '0; 174 end else if (cnt_en && valid_ref) begin 175 cnt_ref <= cnt_ref + 1'b1; 176 end 177 end 178 end 179 180 logic cnt_ovfl; 181 logic [CntWidth-1:0] cnt; 182 always_ff @(posedge clk_i or negedge rst_ni) begin 183 1/1 if (!rst_ni) begin Tests: T4 T5 T6  184 1/1 cnt <= '0; Tests: T4 T5 T6  185 1/1 cnt_ovfl <= '0; Tests: T4 T5 T6  186 1/1 end else if (!cnt_en && |cnt) begin Tests: T4 T5 T6  187 1/1 cnt <= '0; Tests: T1 T9 T40  188 1/1 cnt_ovfl <= '0; Tests: T1 T9 T40  189 1/1 end else if (valid_o) begin Tests: T4 T5 T6  190 1/1 cnt <= '0; Tests: T1 T9 T40  191 1/1 cnt_ovfl <= '0; Tests: T1 T9 T40  192 1/1 end else if (cnt_ovfl) begin Tests: T4 T5 T6  193 1/1 cnt <= '{default: '1}; Tests: T10 T12 T13  194 1/1 end else if (cnt_en) begin Tests: T4 T5 T6  195 1/1 {cnt_ovfl, cnt} <= cnt + 1'b1; Tests: T1 T9 T40  196 end MISSING_ELSE 197 end 198 199 1/1 assign valid_o = valid & |cnt; Tests: T1 T9 T40  200 1/1 assign fast_o = valid_o & ((cnt > max_cnt) | cnt_ovfl); Tests: T1 T2 T3  201 1/1 assign slow_o = valid_o & (cnt < min_cnt); Tests: T1 T2 T3 

Cond Coverage for Instance : tb.dut.u_usb_meas.u_meas
TotalCoveredPercent
Conditions1515100.00
Logical1515100.00
Non-Logical00
Event00

 LINE       186
 EXPRESSION (((!cnt_en)) && ((|cnt)))
             -----1-----    ----2---
-1--2-StatusTests
01CoveredT1,T9,T40
10CoveredT4,T5,T6
11CoveredT1,T9,T40

 LINE       199
 EXPRESSION (valid & ((|cnt)))
             --1--   ----2---
-1--2-StatusTests
01CoveredT1,T9,T40
10CoveredT1,T9,T40
11CoveredT1,T9,T40

 LINE       200
 EXPRESSION (valid_o & ((cnt > max_cnt) | cnt_ovfl))
             ---1---   --------------2-------------
-1--2-StatusTests
01CoveredT9,T10,T12
10CoveredT1,T9,T40
11CoveredT10,T12,T13

 LINE       200
 SUB-EXPRESSION ((cnt > max_cnt) | cnt_ovfl)
                 -------1-------   ----2---
-1--2-StatusTests
00CoveredT4,T5,T6
01CoveredT10,T12,T13
10CoveredT9,T10,T12

 LINE       201
 EXPRESSION (valid_o & (cnt < min_cnt))
             ---1---   -------2-------
-1--2-StatusTests
01CoveredT4,T5,T6
10CoveredT1,T9,T40
11CoveredT12,T13,T15

FSM Coverage for Instance : tb.dut.u_usb_meas.u_meas
Summary for FSM :: state_q
TotalCoveredPercent
States 4 4 100.00 (Not included in score)
Transitions 4 4 100.00
Sequences 0 0

State, Transition and Sequence Details for FSM :: state_q
statesLine No.CoveredTests
StDisable 126 Covered T4,T5,T6
StDisabling 120 Covered T1,T9,T40
StEnable 113 Covered T1,T9,T40
StEnabling 107 Covered T1,T3,T9


transitionsLine No.CoveredTests
StDisable->StEnabling 107 Covered T1,T3,T9
StDisabling->StDisable 126 Covered T1,T9,T40
StEnable->StDisabling 120 Covered T1,T9,T40
StEnabling->StEnable 113 Covered T1,T9,T40



Branch Coverage for Instance : tb.dut.u_usb_meas.u_meas
Line No.TotalCoveredPercent
Branches 16 16 100.00
IF 88 2 2 100.00
CASE 103 8 8 100.00
IF 183 6 6 100.00


88 if (!rst_ni) begin -1- 89 state_q <= StDisable; ==> 90 end else begin 91 state_q <= state_d; ==>

Branches:
-1-StatusTests
1 Covered T4,T5,T6
0 Covered T4,T5,T6


103 unique case (state_q) -1- 104 105 StDisable: begin 106 if (en_i) begin -2- 107 state_d = StEnabling; ==> 108 end MISSING_ELSE ==> 109 end 110 111 StEnabling: begin 112 if (en_ref_sync) begin -3- 113 state_d = StEnable; ==> 114 end MISSING_ELSE ==> 115 end 116 117 StEnable: begin 118 cnt_en = 1'b1; 119 if (!en_i) begin -4- 120 state_d = StDisabling; ==> 121 end MISSING_ELSE ==> 122 end 123 124 StDisabling: begin 125 if (!en_ref_sync) begin -5- 126 state_d = StDisable; ==> 127 end MISSING_ELSE ==>

Branches:
-1--2--3--4--5-StatusTests
StDisable 1 - - - Covered T1,T3,T9
StDisable 0 - - - Covered T1,T3,T9
StEnabling - 1 - - Covered T1,T9,T40
StEnabling - 0 - - Covered T1,T3,T9
StEnable - - 1 - Covered T1,T9,T40
StEnable - - 0 - Covered T1,T9,T40
StDisabling - - - 1 Covered T1,T9,T40
StDisabling - - - 0 Covered T1,T9,T40


183 if (!rst_ni) begin -1- 184 cnt <= '0; ==> 185 cnt_ovfl <= '0; 186 end else if (!cnt_en && |cnt) begin -2- 187 cnt <= '0; ==> 188 cnt_ovfl <= '0; 189 end else if (valid_o) begin -3- 190 cnt <= '0; ==> 191 cnt_ovfl <= '0; 192 end else if (cnt_ovfl) begin -4- 193 cnt <= '{default: '1}; ==> 194 end else if (cnt_en) begin -5- 195 {cnt_ovfl, cnt} <= cnt + 1'b1; ==> 196 end MISSING_ELSE ==>

Branches:
-1--2--3--4--5-StatusTests
1 - - - - Covered T4,T5,T6
0 1 - - - Covered T1,T9,T40
0 0 1 - - Covered T1,T9,T40
0 0 0 1 - Covered T10,T12,T13
0 0 0 0 1 Covered T1,T9,T40
0 0 0 0 0 Covered T4,T5,T6


Assert Coverage for Instance : tb.dut.u_usb_meas.u_meas
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 3 3 100.00 2 66.67
Cover properties 0 0 0
Cover sequences 0 0 0
Total 3 3 100.00 2 66.67




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
MaxWidth_A 37579247 0 0 0
RefCntVal_A 758 758 0 0
gen_timeout_assert.ClkRatios_A 758 758 0 0


MaxWidth_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 37579247 0 0 0

RefCntVal_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 758 758 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T29 1 1 0 0
T30 1 1 0 0
T31 1 1 0 0
T32 1 1 0 0
T33 1 1 0 0
T34 1 1 0 0
T35 1 1 0 0

gen_timeout_assert.ClkRatios_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 758 758 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T29 1 1 0 0
T30 1 1 0 0
T31 1 1 0 0
T32 1 1 0 0
T33 1 1 0 0
T34 1 1 0 0
T35 1 1 0 0

0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%