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



Module Instance : tb.dut.u_readcmd.u_readbuffer

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
90.67 87.76 97.14 77.78 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
70.20 83.51 89.47 74.47 33.33


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
92.45 96.32 100.00 80.00 85.94 100.00 u_readcmd


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_sys2spi_clr 37.29 79.17 0.00 70.00 0.00

Line Coverage for Module : spid_readbuffer
Line No.TotalCoveredPercent
TOTAL494387.76
ALWAYS1056466.67
ALWAYS1306583.33
CONT_ASSIGN14011100.00
CONT_ASSIGN14111100.00
ALWAYS1476583.33
CONT_ASSIGN15611100.00
CONT_ASSIGN15911100.00
ALWAYS1638787.50
ALWAYS1776583.33
ALWAYS19655100.00
ALWAYS20588100.00

104 always_ff @(posedge sys_clk_i or negedge sys_rst_ni) begin 105 1/1 if (!sys_rst_ni) begin Tests: T1 T2 T3  106 1/1 sys_clr_req <= 1'b0; Tests: T1 T2 T3  107 1/1 end else if (sys_clr_i) begin Tests: T1 T2 T3  108 0/1 ==> sys_clr_req <= 1'b1; 109 1/1 end else if (sys_clr_ack) begin Tests: T1 T2 T3  110 0/1 ==> sys_clr_req <= 1'b0; 111 end MISSING_ELSE 112 end 113 114 prim_sync_reqack u_sys2spi_clr ( 115 .clk_src_i (sys_clk_i), 116 .rst_src_ni (sys_rst_ni), 117 .clk_dst_i (clk_i), 118 .rst_dst_ni (sys_rst_ni), 119 120 .req_chk_i (1'b1), 121 122 .src_req_i (sys_clr_req), 123 .src_ack_o (sys_clr_ack), 124 .dst_req_o (spi_clr), 125 .dst_ack_i (spi_clr) 126 ); 127 128 // Flip event handling 129 always_ff @(posedge clk_i or negedge sys_rst_ni) begin 130 1/1 if (!sys_rst_ni) begin Tests: T1 T2 T3  131 1/1 next_buffer_addr <= (32-SramBufferAw)'(1); // pointing to next buffer Tests: T1 T2 T3  132 1/1 end else if (spi_clr) begin Tests: T4 T5 T6  133 0/1 ==> next_buffer_addr <= (32-SramBufferAw)'(1); // pointing to next buffer 134 1/1 end else if (active && flip) begin Tests: T4 T5 T6  135 1/1 next_buffer_addr <= next_buffer_addr + 1'b 1; Tests: T12 T14 T45  136 end MISSING_ELSE 137 end 138 139 logic [31-SramBufferAw:0] current_buffer_idx; 140 1/1 assign current_buffer_idx = current_address_i[31:SramBufferAw]; Tests: T1 T2 T3  141 1/1 assign flip = current_buffer_idx == next_buffer_addr; Tests: T1 T2 T3  142 143 // make flip event single cycle pulse signal 144 // It will be synchronized into the bus clock domain using prim_pulse_sync 145 logic flip_q; 146 always_ff @(posedge clk_i or negedge sys_rst_ni) begin 147 1/1 if (!sys_rst_ni) begin Tests: T1 T2 T3  148 1/1 flip_q <= 1'b 0; Tests: T1 T2 T3  149 1/1 end else if (spi_clr) begin Tests: T4 T5 T6  150 0/1 ==> flip_q <= 1'b 0; 151 1/1 end else if (active) begin Tests: T4 T5 T6  152 1/1 flip_q <= flip; Tests: T12 T14 T45  153 end MISSING_ELSE 154 end 155 156 1/1 assign event_flip_o = active && flip && !flip_q; Tests: T1 T2 T3  157 158 // Watermark event: Threshold should not be 0 to enable the event 159 1/1 assign watermark_cross = (current_address_i[SramBufferAw-1:0] >= threshold_i) Tests: T1 T2 T3  160 && |threshold_i; 161 162 always_ff @(posedge clk_i or negedge sys_rst_ni) begin 163 1/1 if (!sys_rst_ni) begin Tests: T1 T2 T3  164 1/1 watermark_crossed <= 1'b 0; Tests: T1 T2 T3  165 1/1 end else if (spi_clr) begin Tests: T4 T5 T6  166 0/1 ==> watermark_crossed <= 1'b 0; 167 1/1 end else if (active && watermark_cross) begin Tests: T4 T5 T6  168 // When `watermark_cross` and `flip` both are 1, the watermark_crossed 169 // should remain 1. The event will be reported in this case. 170 1/1 watermark_crossed <= 1'b 1; Tests: T12 T14 T45  171 1/1 end else if (active && flip) begin Tests: T4 T5 T6  172 1/1 watermark_crossed <= 1'b 0; Tests: T12 T14 T45  173 end MISSING_ELSE 174 end 175 176 always_comb begin : watermark_event_logic 177 1/1 event_watermark_o = 1'b 0; Tests: T1 T2 T3  178 179 1/1 if (active && watermark_cross) begin Tests: T1 T2 T3  180 1/1 if (!watermark_crossed) begin Tests: T12 T14 T45  181 1/1 event_watermark_o = 1'b 1; Tests: T12 T14 T45  182 1/1 end else if (flip) begin Tests: T12 T14 T45  183 // if flip is set and previous watermark_crossed is set, the event 184 // should be reported also. This means the host issues the next buffer 185 // address pointing above the threshold. This scenario, flip event and 186 // watermark event both should be reported. 187 0/1 ==> event_watermark_o = 1'b 1; 188 end MISSING_ELSE 189 end MISSING_ELSE 190 end : watermark_event_logic 191 192 /////////////////// 193 // State Machine // 194 /////////////////// 195 always_ff @(posedge clk_i or negedge rst_ni) begin 196 2/2 if (!rst_ni) st_q <= StIdle; Tests: T1 T2 T3  | T1 T2 T3  197 1/1 else if (spi_mode_i != spi_device_pkg::FlashMode) begin Tests: T7 T8 T9  198 1/1 st_q <= StIdle; Tests: T7 T8 T9  199 end else begin 200 1/1 st_q <= st_d; Tests: T12 T14 T19  201 end 202 end 203 204 always_comb begin 205 1/1 st_d = st_q; Tests: T1 T2 T3  206 207 1/1 active = 1'b 0; Tests: T1 T2 T3  208 209 1/1 unique case (st_q) Tests: T1 T2 T3  210 StIdle: begin 211 1/1 if (start_i && (spi_mode_i == spi_device_pkg::FlashMode) Tests: T1 T2 T3  212 && !sfdp_hit_i && !(mailbox_en_i && mailbox_hit_i)) begin 213 1/1 st_d = StActive; Tests: T12 T14 T45  214 215 1/1 active = 1'b 1; // Assume address_update_i is high Tests: T12 T14 T45  216 end MISSING_ELSE 217 end 218 219 StActive: begin 220 // Deadend waiting CSb de-assertion 221 1/1 st_d = StActive; Tests: T12 T14 T45  222 223 1/1 active = address_update_i; Tests: T12 T14 T45  224 end 225 226 default: begin 227 st_d = StIdle;

Cond Coverage for Module : spid_readbuffer
TotalCoveredPercent
Conditions353497.14
Logical353497.14
Non-Logical00
Event00

 LINE       134
 EXPRESSION (active && flip)
             ---1--    --2-
-1--2-StatusTests
01CoveredT46,T47,T48
10CoveredT12,T14,T45
11CoveredT12,T14,T45

 LINE       141
 EXPRESSION (current_buffer_idx == next_buffer_addr)
            --------------------1-------------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT12,T14,T45

 LINE       156
 EXPRESSION (active && flip && ((!flip_q)))
             ---1--    --2-    -----3-----
-1--2--3-StatusTests
011CoveredT46,T47,T48
101CoveredT12,T14,T45
110Not Covered
111CoveredT12,T14,T45

 LINE       159
 EXPRESSION ((current_address_i[(spi_device_pkg::SramBufferAw - 1):0] >= threshold_i) && ((|threshold_i)))
             ------------------------------------1-----------------------------------    --------2-------
-1--2-StatusTests
01CoveredT7,T8,T9
10CoveredT1,T2,T3
11CoveredT7,T9,T12

 LINE       167
 EXPRESSION (active && watermark_cross)
             ---1--    -------2-------
-1--2-StatusTests
01CoveredT7,T9,T12
10CoveredT12,T14,T45
11CoveredT12,T14,T45

 LINE       171
 EXPRESSION (active && flip)
             ---1--    --2-
-1--2-StatusTests
01CoveredT46,T47,T48
10CoveredT12,T14,T45
11CoveredT12,T14,T45

 LINE       179
 EXPRESSION (active && watermark_cross)
             ---1--    -------2-------
-1--2-StatusTests
01CoveredT7,T9,T12
10CoveredT12,T14,T45
11CoveredT12,T14,T45

 LINE       197
 EXPRESSION (spi_mode_i != FlashMode)
            ------------1------------
-1-StatusTests
0CoveredT12,T14,T19
1CoveredT7,T8,T9

 LINE       211
 EXPRESSION (start_i && (spi_mode_i == FlashMode) && ((!sfdp_hit_i)) && ( ! (mailbox_en_i && mailbox_hit_i) ))
             ---1---    ------------2------------    -------3-------    ------------------4------------------
-1--2--3--4-StatusTests
0111CoveredT1,T2,T3
1011CoveredT7,T9,T13
1101CoveredT32,T49,T50
1110CoveredT45,T32,T49
1111CoveredT12,T14,T45

 LINE       211
 SUB-EXPRESSION (spi_mode_i == FlashMode)
                ------------1------------
-1-StatusTests
0CoveredT7,T8,T9
1CoveredT1,T2,T3

 LINE       211
 SUB-EXPRESSION ( ! (mailbox_en_i && mailbox_hit_i) )
                    ---------------1---------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT13,T45,T30

 LINE       211
 SUB-EXPRESSION (mailbox_en_i && mailbox_hit_i)
                 ------1-----    ------2------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT7,T8,T11
11CoveredT13,T45,T30

Branch Coverage for Module : spid_readbuffer
Line No.TotalCoveredPercent
Branches 28 21 75.00
IF 105 4 2 50.00
IF 130 4 3 75.00
IF 147 4 3 75.00
IF 163 5 4 80.00
IF 179 4 3 75.00
IF 196 3 3 100.00
CASE 209 4 3 75.00


105 if (!sys_rst_ni) begin -1- 106 sys_clr_req <= 1'b0; ==> 107 end else if (sys_clr_i) begin -2- 108 sys_clr_req <= 1'b1; ==> 109 end else if (sys_clr_ack) begin -3- 110 sys_clr_req <= 1'b0; ==> 111 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Not Covered
0 0 1 Not Covered
0 0 0 Covered T1,T2,T3


130 if (!sys_rst_ni) begin -1- 131 next_buffer_addr <= (32-SramBufferAw)'(1); // pointing to next buffer ==> 132 end else if (spi_clr) begin -2- 133 next_buffer_addr <= (32-SramBufferAw)'(1); // pointing to next buffer ==> 134 end else if (active && flip) begin -3- 135 next_buffer_addr <= next_buffer_addr + 1'b 1; ==> 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Not Covered
0 0 1 Covered T12,T14,T45
0 0 0 Covered T4,T5,T6


147 if (!sys_rst_ni) begin -1- 148 flip_q <= 1'b 0; ==> 149 end else if (spi_clr) begin -2- 150 flip_q <= 1'b 0; ==> 151 end else if (active) begin -3- 152 flip_q <= flip; ==> 153 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Not Covered
0 0 1 Covered T12,T14,T45
0 0 0 Covered T4,T5,T6


163 if (!sys_rst_ni) begin -1- 164 watermark_crossed <= 1'b 0; ==> 165 end else if (spi_clr) begin -2- 166 watermark_crossed <= 1'b 0; ==> 167 end else if (active && watermark_cross) begin -3- 168 // When `watermark_cross` and `flip` both are 1, the watermark_crossed 169 // should remain 1. The event will be reported in this case. 170 watermark_crossed <= 1'b 1; ==> 171 end else if (active && flip) begin -4- 172 watermark_crossed <= 1'b 0; ==> 173 end MISSING_ELSE ==>

Branches:
-1--2--3--4-StatusTests
1 - - - Covered T1,T2,T3
0 1 - - Not Covered
0 0 1 - Covered T12,T14,T45
0 0 0 1 Covered T12,T14,T45
0 0 0 0 Covered T4,T5,T6


179 if (active && watermark_cross) begin -1- 180 if (!watermark_crossed) begin -2- 181 event_watermark_o = 1'b 1; ==> 182 end else if (flip) begin -3- 183 // if flip is set and previous watermark_crossed is set, the event 184 // should be reported also. This means the host issues the next buffer 185 // address pointing above the threshold. This scenario, flip event and 186 // watermark event both should be reported. 187 event_watermark_o = 1'b 1; ==> 188 end MISSING_ELSE ==> 189 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 1 - Covered T12,T14,T45
1 0 1 Not Covered
1 0 0 Covered T12,T14,T45
0 - - Covered T1,T2,T3


196 if (!rst_ni) st_q <= StIdle; -1- ==> 197 else if (spi_mode_i != spi_device_pkg::FlashMode) begin -2- 198 st_q <= StIdle; ==> 199 end else begin 200 st_q <= st_d; ==>

Branches:
-1--2-StatusTests
1 - Covered T1,T2,T3
0 1 Covered T7,T8,T9
0 0 Covered T12,T14,T19


209 unique case (st_q) -1- 210 StIdle: begin 211 if (start_i && (spi_mode_i == spi_device_pkg::FlashMode) -2- 212 && !sfdp_hit_i && !(mailbox_en_i && mailbox_hit_i)) begin 213 st_d = StActive; ==> 214 215 active = 1'b 1; // Assume address_update_i is high 216 end MISSING_ELSE ==> 217 end 218 219 StActive: begin 220 // Deadend waiting CSb de-assertion 221 st_d = StActive; ==> 222 223 active = address_update_i; 224 end 225 226 default: begin 227 st_d = StIdle; ==>

Branches:
-1--2-StatusTests
StIdle 1 Covered T12,T14,T45
StIdle 0 Covered T1,T2,T3
StActive - Covered T12,T14,T45
default - Not Covered


Assert Coverage for Module : spid_readbuffer
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 1 1 100.00 1 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 1 1 100.00 1 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
StartWithAddressUpdate_A 146533180 7993 0 0


StartWithAddressUpdate_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 146533180 7993 0 0
T7 31058 2 0 0
T8 10480 0 0 0
T9 8888 2 0 0
T10 109671 0 0 0
T11 14640 0 0 0
T12 5392 1 0 0
T13 93908 12 0 0
T14 16979 8 0 0
T26 1159 0 0 0
T27 3656 0 0 0
T30 0 3 0 0
T32 0 10 0 0
T45 0 5 0 0
T51 0 2 0 0
T52 0 8 0 0

Line Coverage for Instance : tb.dut.u_readcmd.u_readbuffer
Line No.TotalCoveredPercent
TOTAL494387.76
ALWAYS1056466.67
ALWAYS1306583.33
CONT_ASSIGN14011100.00
CONT_ASSIGN14111100.00
ALWAYS1476583.33
CONT_ASSIGN15611100.00
CONT_ASSIGN15911100.00
ALWAYS1638787.50
ALWAYS1776583.33
ALWAYS19655100.00
ALWAYS20588100.00

104 always_ff @(posedge sys_clk_i or negedge sys_rst_ni) begin 105 1/1 if (!sys_rst_ni) begin Tests: T1 T2 T3  106 1/1 sys_clr_req <= 1'b0; Tests: T1 T2 T3  107 1/1 end else if (sys_clr_i) begin Tests: T1 T2 T3  108 0/1 ==> sys_clr_req <= 1'b1; 109 1/1 end else if (sys_clr_ack) begin Tests: T1 T2 T3  110 0/1 ==> sys_clr_req <= 1'b0; 111 end MISSING_ELSE 112 end 113 114 prim_sync_reqack u_sys2spi_clr ( 115 .clk_src_i (sys_clk_i), 116 .rst_src_ni (sys_rst_ni), 117 .clk_dst_i (clk_i), 118 .rst_dst_ni (sys_rst_ni), 119 120 .req_chk_i (1'b1), 121 122 .src_req_i (sys_clr_req), 123 .src_ack_o (sys_clr_ack), 124 .dst_req_o (spi_clr), 125 .dst_ack_i (spi_clr) 126 ); 127 128 // Flip event handling 129 always_ff @(posedge clk_i or negedge sys_rst_ni) begin 130 1/1 if (!sys_rst_ni) begin Tests: T1 T2 T3  131 1/1 next_buffer_addr <= (32-SramBufferAw)'(1); // pointing to next buffer Tests: T1 T2 T3  132 1/1 end else if (spi_clr) begin Tests: T4 T5 T6  133 0/1 ==> next_buffer_addr <= (32-SramBufferAw)'(1); // pointing to next buffer 134 1/1 end else if (active && flip) begin Tests: T4 T5 T6  135 1/1 next_buffer_addr <= next_buffer_addr + 1'b 1; Tests: T12 T14 T45  136 end MISSING_ELSE 137 end 138 139 logic [31-SramBufferAw:0] current_buffer_idx; 140 1/1 assign current_buffer_idx = current_address_i[31:SramBufferAw]; Tests: T1 T2 T3  141 1/1 assign flip = current_buffer_idx == next_buffer_addr; Tests: T1 T2 T3  142 143 // make flip event single cycle pulse signal 144 // It will be synchronized into the bus clock domain using prim_pulse_sync 145 logic flip_q; 146 always_ff @(posedge clk_i or negedge sys_rst_ni) begin 147 1/1 if (!sys_rst_ni) begin Tests: T1 T2 T3  148 1/1 flip_q <= 1'b 0; Tests: T1 T2 T3  149 1/1 end else if (spi_clr) begin Tests: T4 T5 T6  150 0/1 ==> flip_q <= 1'b 0; 151 1/1 end else if (active) begin Tests: T4 T5 T6  152 1/1 flip_q <= flip; Tests: T12 T14 T45  153 end MISSING_ELSE 154 end 155 156 1/1 assign event_flip_o = active && flip && !flip_q; Tests: T1 T2 T3  157 158 // Watermark event: Threshold should not be 0 to enable the event 159 1/1 assign watermark_cross = (current_address_i[SramBufferAw-1:0] >= threshold_i) Tests: T1 T2 T3  160 && |threshold_i; 161 162 always_ff @(posedge clk_i or negedge sys_rst_ni) begin 163 1/1 if (!sys_rst_ni) begin Tests: T1 T2 T3  164 1/1 watermark_crossed <= 1'b 0; Tests: T1 T2 T3  165 1/1 end else if (spi_clr) begin Tests: T4 T5 T6  166 0/1 ==> watermark_crossed <= 1'b 0; 167 1/1 end else if (active && watermark_cross) begin Tests: T4 T5 T6  168 // When `watermark_cross` and `flip` both are 1, the watermark_crossed 169 // should remain 1. The event will be reported in this case. 170 1/1 watermark_crossed <= 1'b 1; Tests: T12 T14 T45  171 1/1 end else if (active && flip) begin Tests: T4 T5 T6  172 1/1 watermark_crossed <= 1'b 0; Tests: T12 T14 T45  173 end MISSING_ELSE 174 end 175 176 always_comb begin : watermark_event_logic 177 1/1 event_watermark_o = 1'b 0; Tests: T1 T2 T3  178 179 1/1 if (active && watermark_cross) begin Tests: T1 T2 T3  180 1/1 if (!watermark_crossed) begin Tests: T12 T14 T45  181 1/1 event_watermark_o = 1'b 1; Tests: T12 T14 T45  182 1/1 end else if (flip) begin Tests: T12 T14 T45  183 // if flip is set and previous watermark_crossed is set, the event 184 // should be reported also. This means the host issues the next buffer 185 // address pointing above the threshold. This scenario, flip event and 186 // watermark event both should be reported. 187 0/1 ==> event_watermark_o = 1'b 1; 188 end MISSING_ELSE 189 end MISSING_ELSE 190 end : watermark_event_logic 191 192 /////////////////// 193 // State Machine // 194 /////////////////// 195 always_ff @(posedge clk_i or negedge rst_ni) begin 196 2/2 if (!rst_ni) st_q <= StIdle; Tests: T1 T2 T3  | T1 T2 T3  197 1/1 else if (spi_mode_i != spi_device_pkg::FlashMode) begin Tests: T7 T8 T9  198 1/1 st_q <= StIdle; Tests: T7 T8 T9  199 end else begin 200 1/1 st_q <= st_d; Tests: T12 T14 T19  201 end 202 end 203 204 always_comb begin 205 1/1 st_d = st_q; Tests: T1 T2 T3  206 207 1/1 active = 1'b 0; Tests: T1 T2 T3  208 209 1/1 unique case (st_q) Tests: T1 T2 T3  210 StIdle: begin 211 1/1 if (start_i && (spi_mode_i == spi_device_pkg::FlashMode) Tests: T1 T2 T3  212 && !sfdp_hit_i && !(mailbox_en_i && mailbox_hit_i)) begin 213 1/1 st_d = StActive; Tests: T12 T14 T45  214 215 1/1 active = 1'b 1; // Assume address_update_i is high Tests: T12 T14 T45  216 end MISSING_ELSE 217 end 218 219 StActive: begin 220 // Deadend waiting CSb de-assertion 221 1/1 st_d = StActive; Tests: T12 T14 T45  222 223 1/1 active = address_update_i; Tests: T12 T14 T45  224 end 225 226 default: begin 227 st_d = StIdle; Exclude Annotation: VC_COV_UNR

Cond Coverage for Instance : tb.dut.u_readcmd.u_readbuffer
TotalCoveredPercent
Conditions353497.14
Logical353497.14
Non-Logical00
Event00

 LINE       134
 EXPRESSION (active && flip)
             ---1--    --2-
-1--2-StatusTests
01CoveredT46,T47,T48
10CoveredT12,T14,T45
11CoveredT12,T14,T45

 LINE       141
 EXPRESSION (current_buffer_idx == next_buffer_addr)
            --------------------1-------------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT12,T14,T45

 LINE       156
 EXPRESSION (active && flip && ((!flip_q)))
             ---1--    --2-    -----3-----
-1--2--3-StatusTests
011CoveredT46,T47,T48
101CoveredT12,T14,T45
110Not Covered
111CoveredT12,T14,T45

 LINE       159
 EXPRESSION ((current_address_i[(spi_device_pkg::SramBufferAw - 1):0] >= threshold_i) && ((|threshold_i)))
             ------------------------------------1-----------------------------------    --------2-------
-1--2-StatusTests
01CoveredT7,T8,T9
10CoveredT1,T2,T3
11CoveredT7,T9,T12

 LINE       167
 EXPRESSION (active && watermark_cross)
             ---1--    -------2-------
-1--2-StatusTests
01CoveredT7,T9,T12
10CoveredT12,T14,T45
11CoveredT12,T14,T45

 LINE       171
 EXPRESSION (active && flip)
             ---1--    --2-
-1--2-StatusTests
01CoveredT46,T47,T48
10CoveredT12,T14,T45
11CoveredT12,T14,T45

 LINE       179
 EXPRESSION (active && watermark_cross)
             ---1--    -------2-------
-1--2-StatusTests
01CoveredT7,T9,T12
10CoveredT12,T14,T45
11CoveredT12,T14,T45

 LINE       197
 EXPRESSION (spi_mode_i != FlashMode)
            ------------1------------
-1-StatusTests
0CoveredT12,T14,T19
1CoveredT7,T8,T9

 LINE       211
 EXPRESSION (start_i && (spi_mode_i == FlashMode) && ((!sfdp_hit_i)) && ( ! (mailbox_en_i && mailbox_hit_i) ))
             ---1---    ------------2------------    -------3-------    ------------------4------------------
-1--2--3--4-StatusTests
0111CoveredT1,T2,T3
1011CoveredT7,T9,T13
1101CoveredT32,T49,T50
1110CoveredT45,T32,T49
1111CoveredT12,T14,T45

 LINE       211
 SUB-EXPRESSION (spi_mode_i == FlashMode)
                ------------1------------
-1-StatusTests
0CoveredT7,T8,T9
1CoveredT1,T2,T3

 LINE       211
 SUB-EXPRESSION ( ! (mailbox_en_i && mailbox_hit_i) )
                    ---------------1---------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT13,T45,T30

 LINE       211
 SUB-EXPRESSION (mailbox_en_i && mailbox_hit_i)
                 ------1-----    ------2------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT7,T8,T11
11CoveredT13,T45,T30

Branch Coverage for Instance : tb.dut.u_readcmd.u_readbuffer
Line No.TotalCoveredPercent
Branches 27 21 77.78
IF 105 4 2 50.00
IF 130 4 3 75.00
IF 147 4 3 75.00
IF 163 5 4 80.00
IF 179 4 3 75.00
IF 196 3 3 100.00
CASE 209 3 3 100.00


105 if (!sys_rst_ni) begin -1- 106 sys_clr_req <= 1'b0; ==> 107 end else if (sys_clr_i) begin -2- 108 sys_clr_req <= 1'b1; ==> 109 end else if (sys_clr_ack) begin -3- 110 sys_clr_req <= 1'b0; ==> 111 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Not Covered
0 0 1 Not Covered
0 0 0 Covered T1,T2,T3


130 if (!sys_rst_ni) begin -1- 131 next_buffer_addr <= (32-SramBufferAw)'(1); // pointing to next buffer ==> 132 end else if (spi_clr) begin -2- 133 next_buffer_addr <= (32-SramBufferAw)'(1); // pointing to next buffer ==> 134 end else if (active && flip) begin -3- 135 next_buffer_addr <= next_buffer_addr + 1'b 1; ==> 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Not Covered
0 0 1 Covered T12,T14,T45
0 0 0 Covered T4,T5,T6


147 if (!sys_rst_ni) begin -1- 148 flip_q <= 1'b 0; ==> 149 end else if (spi_clr) begin -2- 150 flip_q <= 1'b 0; ==> 151 end else if (active) begin -3- 152 flip_q <= flip; ==> 153 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Not Covered
0 0 1 Covered T12,T14,T45
0 0 0 Covered T4,T5,T6


163 if (!sys_rst_ni) begin -1- 164 watermark_crossed <= 1'b 0; ==> 165 end else if (spi_clr) begin -2- 166 watermark_crossed <= 1'b 0; ==> 167 end else if (active && watermark_cross) begin -3- 168 // When `watermark_cross` and `flip` both are 1, the watermark_crossed 169 // should remain 1. The event will be reported in this case. 170 watermark_crossed <= 1'b 1; ==> 171 end else if (active && flip) begin -4- 172 watermark_crossed <= 1'b 0; ==> 173 end MISSING_ELSE ==>

Branches:
-1--2--3--4-StatusTests
1 - - - Covered T1,T2,T3
0 1 - - Not Covered
0 0 1 - Covered T12,T14,T45
0 0 0 1 Covered T12,T14,T45
0 0 0 0 Covered T4,T5,T6


179 if (active && watermark_cross) begin -1- 180 if (!watermark_crossed) begin -2- 181 event_watermark_o = 1'b 1; ==> 182 end else if (flip) begin -3- 183 // if flip is set and previous watermark_crossed is set, the event 184 // should be reported also. This means the host issues the next buffer 185 // address pointing above the threshold. This scenario, flip event and 186 // watermark event both should be reported. 187 event_watermark_o = 1'b 1; ==> 188 end MISSING_ELSE ==> 189 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 1 - Covered T12,T14,T45
1 0 1 Not Covered
1 0 0 Covered T12,T14,T45
0 - - Covered T1,T2,T3


196 if (!rst_ni) st_q <= StIdle; -1- ==> 197 else if (spi_mode_i != spi_device_pkg::FlashMode) begin -2- 198 st_q <= StIdle; ==> 199 end else begin 200 st_q <= st_d; ==>

Branches:
-1--2-StatusTests
1 - Covered T1,T2,T3
0 1 Covered T7,T8,T9
0 0 Covered T12,T14,T19


209 unique case (st_q) -1- 210 StIdle: begin 211 if (start_i && (spi_mode_i == spi_device_pkg::FlashMode) -2- 212 && !sfdp_hit_i && !(mailbox_en_i && mailbox_hit_i)) begin 213 st_d = StActive; ==> 214 215 active = 1'b 1; // Assume address_update_i is high 216 end MISSING_ELSE ==> 217 end 218 219 StActive: begin 220 // Deadend waiting CSb de-assertion 221 st_d = StActive; ==> 222 223 active = address_update_i; 224 end 225 226 default: begin 227 st_d = StIdle; ==> (Excluded) Exclude Annotation: VC_COV_UNR

Branches:
-1--2-StatusTestsExclude Annotation
StIdle 1 Covered T12,T14,T45
StIdle 0 Covered T1,T2,T3
StActive - Covered T12,T14,T45
default - Excluded VC_COV_UNR


Assert Coverage for Instance : tb.dut.u_readcmd.u_readbuffer
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 1 1 100.00 1 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 1 1 100.00 1 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
StartWithAddressUpdate_A 146533180 7993 0 0


StartWithAddressUpdate_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 146533180 7993 0 0
T7 31058 2 0 0
T8 10480 0 0 0
T9 8888 2 0 0
T10 109671 0 0 0
T11 14640 0 0 0
T12 5392 1 0 0
T13 93908 12 0 0
T14 16979 8 0 0
T26 1159 0 0 0
T27 3656 0 0 0
T30 0 3 0 0
T32 0 10 0 0
T45 0 5 0 0
T51 0 2 0 0
T52 0 8 0 0

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