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

Module : prim_sync_reqack
SCORELINECONDTOGGLEFSMBRANCHASSERT
87.50 100.00 50.00 100.00 100.00

Source File(s) :
/workspaces/repo/scratch/os_regression_2024_10_11/clkmgr-sim-vcs/default/sim-vcs/../src/lowrisc_prim_all_0.1/rtl/prim_sync_reqack.sv

Module self-instances :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
tb.dut.u_io_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout 87.50 100.00 100.00 100.00 50.00
tb.dut.u_io_div2_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout 87.50 100.00 100.00 100.00 50.00
tb.dut.u_io_div4_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout 87.50 100.00 100.00 100.00 50.00
tb.dut.u_main_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout 87.50 100.00 100.00 100.00 50.00
tb.dut.u_usb_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout 87.50 100.00 100.00 100.00 50.00
tb.dut.u_reg.u_io_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync 93.75 100.00 75.00 100.00 100.00
tb.dut.u_reg.u_io_div2_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync 93.75 100.00 75.00 100.00 100.00
tb.dut.u_reg.u_io_div4_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync 93.75 100.00 75.00 100.00 100.00
tb.dut.u_reg.u_main_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync 93.75 100.00 75.00 100.00 100.00
tb.dut.u_reg.u_usb_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync 93.75 100.00 75.00 100.00 100.00
tb.dut.u_io_meas.u_err_sync 93.75 100.00 75.00 100.00 100.00
tb.dut.u_io_div2_meas.u_err_sync 93.75 100.00 75.00 100.00 100.00
tb.dut.u_io_div4_meas.u_err_sync 93.75 100.00 75.00 100.00 100.00
tb.dut.u_main_meas.u_err_sync 93.75 100.00 75.00 100.00 100.00
tb.dut.u_usb_meas.u_err_sync 93.75 100.00 75.00 100.00 100.00



Module Instance : tb.dut.u_io_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
87.50 100.00 100.00 100.00 50.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
87.50 100.00 100.00 100.00 50.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
100.00 100.00 100.00 100.00 gen_clk_timeout_chk.u_timeout_ref_to_clk


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_io_div2_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
87.50 100.00 100.00 100.00 50.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
87.50 100.00 100.00 100.00 50.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
100.00 100.00 100.00 100.00 gen_clk_timeout_chk.u_timeout_ref_to_clk


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_io_div4_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
87.50 100.00 100.00 100.00 50.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
87.50 100.00 100.00 100.00 50.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
100.00 100.00 100.00 100.00 gen_clk_timeout_chk.u_timeout_ref_to_clk


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_main_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
87.50 100.00 100.00 100.00 50.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
87.50 100.00 100.00 100.00 50.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
100.00 100.00 100.00 100.00 gen_clk_timeout_chk.u_timeout_ref_to_clk


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_usb_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
87.50 100.00 100.00 100.00 50.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
87.50 100.00 100.00 100.00 50.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
100.00 100.00 100.00 100.00 gen_clk_timeout_chk.u_timeout_ref_to_clk


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_reg.u_io_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
73.61 90.00 76.19 78.26 50.00 u_arb


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_reg.u_io_div2_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
73.61 90.00 76.19 78.26 50.00 u_arb


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_reg.u_io_div4_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
79.17 94.00 85.71 86.96 50.00 u_arb


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_reg.u_main_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
73.61 90.00 76.19 78.26 50.00 u_arb


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_reg.u_usb_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
73.61 90.00 76.19 78.26 50.00 u_arb


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_io_meas.u_err_sync

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
94.44 100.00 83.33 100.00 u_io_meas


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_io_div2_meas.u_err_sync

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
94.44 100.00 83.33 100.00 u_io_div2_meas


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_io_div4_meas.u_err_sync

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
94.44 100.00 83.33 100.00 u_io_div4_meas


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_main_meas.u_err_sync

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
94.44 100.00 83.33 100.00 u_main_meas


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00



Module Instance : tb.dut.u_usb_meas.u_err_sync

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.75 100.00 75.00 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
94.44 100.00 83.33 100.00 u_usb_meas


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_nrz_hs_protocol.ack_sync 100.00 100.00 100.00
gen_nrz_hs_protocol.req_sync 100.00 100.00 100.00

Line Coverage for Module : prim_sync_reqack
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T4 T5 T6  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T4 T5 T6  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T4 T5 T6  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T4 T5 T6  223 1/1 src_ack_o = 1'b0; Tests: T4 T5 T6  224 225 1/1 unique case (src_fsm_cs) Tests: T4 T5 T6  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T4 T5 T6  230 1/1 src_ack_o = src_ack; Tests: T4 T5 T6  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T4 T5 T6  234 1/1 src_fsm_ns = ODD; Tests: T4 T5 T6  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T4 T5 T6  242 1/1 src_ack_o = ~src_ack; Tests: T4 T5 T6  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T4 T5 T6  246 1/1 src_fsm_ns = EVEN; Tests: T4 T5 T6  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T4 T5 T6  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T4 T5 T6  267 1/1 dst_ack_d = dst_ack_q; Tests: T4 T5 T6  268 269 1/1 unique case (dst_fsm_cs) Tests: T4 T5 T6  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T4 T5 T6  274 1/1 dst_ack_d = dst_ack_i; Tests: T4 T5 T6  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T4 T5 T6  278 1/1 dst_fsm_ns = ODD; Tests: T4 T5 T6  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T4 T5 T6  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T4 T5 T6  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T4 T5 T6  290 1/1 dst_fsm_ns = EVEN; Tests: T4 T5 T6  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Module : prim_sync_reqack
TotalCoveredPercent
Conditions6350.00
Logical6350.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Not Covered
10CoveredT4,T5,T6
11CoveredT4,T5,T6

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTests
01Not Covered
10Not Covered
11CoveredT4,T5,T6

Branch Coverage for Module : prim_sync_reqack
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T4,T5,T6
EVEN 0 - Covered T4,T5,T6
ODD - 1 Covered T4,T5,T6
ODD - 0 Covered T4,T5,T6


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T4,T5,T6
EVEN 0 - Covered T4,T5,T6
ODD - 1 Covered T4,T5,T6
ODD - 0 Covered T4,T5,T6


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


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




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 644516787 1243501 0 0
SyncReqAckHoldReq 510082621 63883 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 644516787 1243501 0 0
T3 15497 0 0 0
T4 929 19 0 0
T5 1166 25 0 0
T6 4837 105 0 0
T8 0 8 0 0
T9 0 12 0 0
T10 0 3 0 0
T12 0 11 0 0
T13 0 13 0 0
T14 0 10 0 0
T15 0 24 0 0
T24 1753 22 0 0
T25 1557 31 0 0
T26 5788 118 0 0
T27 3169 68 0 0
T28 4331 92 0 0
T29 1905 33 0 0
T30 2350 42 0 0
T31 83020 22 0 0
T32 0 3 0 0
T33 0 7 0 0
T34 0 8 0 0
T35 99988 0 0 0
T36 2116 0 0 0
T37 1878 0 0 0
T38 3550 0 0 0
T39 3840 0 0 0
T40 3930 0 0 0
T41 3352 0 0 0
T42 1388 0 0 0
T43 2156 0 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 510082621 63883 0 0
T1 15637 6 0 0
T2 0 6 0 0
T3 82594 13 0 0
T8 0 11 0 0
T9 0 15 0 0
T10 0 13 0 0
T11 0 17 0 0
T12 0 15 0 0
T13 0 17 0 0
T14 0 18 0 0
T15 0 48 0 0
T17 125449 22 0 0
T18 1639 0 0 0
T19 3679 0 0 0
T20 5618 0 0 0
T21 4469 0 0 0
T22 3835 0 0 0
T23 0 40 0 0
T31 297436 40 0 0
T32 0 10 0 0
T33 0 20 0 0
T34 0 15 0 0
T35 317686 0 0 0
T36 6471 0 0 0
T37 3224 0 0 0
T38 12689 0 0 0
T39 3543 0 0 0
T40 8408 0 0 0
T41 10904 0 0 0
T42 5077 0 0 0
T43 6848 0 0 0
T44 0 18 0 0
T45 0 38 0 0
T46 0 12 0 0
T47 0 13 0 0
T48 1261 0 0 0
T49 2895 0 0 0
T50 5177 0 0 0

Line Coverage for Instance : tb.dut.u_io_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T4 T5 T6  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T4 T5 T6  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T4 T5 T6  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T4 T5 T6  223 1/1 src_ack_o = 1'b0; Tests: T4 T5 T6  224 225 1/1 unique case (src_fsm_cs) Tests: T4 T5 T6  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T4 T5 T6  230 1/1 src_ack_o = src_ack; Tests: T4 T5 T6  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T4 T5 T6  234 1/1 src_fsm_ns = ODD; Tests: T4 T5 T6  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T4 T5 T6  242 1/1 src_ack_o = ~src_ack; Tests: T4 T5 T6  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T4 T5 T6  246 1/1 src_fsm_ns = EVEN; Tests: T4 T5 T6  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T4 T5 T6  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T4 T5 T6  267 1/1 dst_ack_d = dst_ack_q; Tests: T4 T5 T6  268 269 1/1 unique case (dst_fsm_cs) Tests: T4 T5 T6  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T4 T5 T6  274 1/1 dst_ack_d = dst_ack_i; Tests: T4 T5 T6  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T4 T5 T6  278 1/1 dst_fsm_ns = ODD; Tests: T4 T5 T6  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T4 T5 T6  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T4 T5 T6  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T4 T5 T6  290 1/1 dst_fsm_ns = EVEN; Tests: T4 T5 T6  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_io_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
TotalCoveredPercent
Conditions33100.00
Logical33100.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Unreachable
10CoveredT4,T5,T6
11CoveredT4,T5,T6

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT4,T5,T6

Branch Coverage for Instance : tb.dut.u_io_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T4,T5,T6
EVEN 0 - Covered T4,T5,T6
ODD - 1 Covered T4,T5,T6
ODD - 0 Covered T4,T5,T6


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T4,T5,T6
EVEN 0 - Covered T4,T5,T6
ODD - 1 Covered T4,T5,T6
ODD - 0 Covered T4,T5,T6


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


Assert Coverage for Instance : tb.dut.u_io_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 2 2 100.00 1 50.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 2 2 100.00 1 50.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 73575126 236677 0 0
SyncReqAckHoldReq 1100738 0 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 73575126 236677 0 0
T4 1291 19 0 0
T5 1675 25 0 0
T6 6474 105 0 0
T24 1421 22 0 0
T25 2025 31 0 0
T26 7429 118 0 0
T27 4264 68 0 0
T28 5827 92 0 0
T29 2326 34 0 0
T30 2753 42 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 1100738 0 0 0

Line Coverage for Instance : tb.dut.u_io_div2_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T4 T5 T6  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T4 T5 T6  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T4 T5 T6  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T4 T5 T6  223 1/1 src_ack_o = 1'b0; Tests: T4 T5 T6  224 225 1/1 unique case (src_fsm_cs) Tests: T4 T5 T6  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T4 T5 T6  230 1/1 src_ack_o = src_ack; Tests: T4 T5 T6  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T4 T5 T6  234 1/1 src_fsm_ns = ODD; Tests: T4 T5 T6  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T4 T5 T6  242 1/1 src_ack_o = ~src_ack; Tests: T4 T5 T6  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T4 T5 T6  246 1/1 src_fsm_ns = EVEN; Tests: T4 T5 T6  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T4 T5 T6  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T4 T5 T6  267 1/1 dst_ack_d = dst_ack_q; Tests: T4 T5 T6  268 269 1/1 unique case (dst_fsm_cs) Tests: T4 T5 T6  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T4 T5 T6  274 1/1 dst_ack_d = dst_ack_i; Tests: T4 T5 T6  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T4 T5 T6  278 1/1 dst_fsm_ns = ODD; Tests: T4 T5 T6  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T4 T5 T6  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T4 T5 T6  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T4 T5 T6  290 1/1 dst_fsm_ns = EVEN; Tests: T4 T5 T6  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_io_div2_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
TotalCoveredPercent
Conditions33100.00
Logical33100.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Unreachable
10CoveredT4,T5,T6
11CoveredT4,T5,T6

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT4,T5,T6

Branch Coverage for Instance : tb.dut.u_io_div2_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T4,T5,T6
EVEN 0 - Covered T4,T5,T6
ODD - 1 Covered T4,T5,T6
ODD - 0 Covered T4,T5,T6


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T4,T5,T6
EVEN 0 - Covered T4,T5,T6
ODD - 1 Covered T4,T5,T6
ODD - 0 Covered T4,T5,T6


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


Assert Coverage for Instance : tb.dut.u_io_div2_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 2 2 100.00 1 50.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 2 2 100.00 1 50.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 35938955 236567 0 0
SyncReqAckHoldReq 1100738 0 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 35938955 236567 0 0
T4 619 19 0 0
T5 777 25 0 0
T6 3225 105 0 0
T24 1169 22 0 0
T25 1038 31 0 0
T26 3859 118 0 0
T27 2113 68 0 0
T28 2887 92 0 0
T29 1270 33 0 0
T30 1568 42 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 1100738 0 0 0

Line Coverage for Instance : tb.dut.u_io_div4_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T4 T5 T6  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T4 T5 T6  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T4 T5 T6  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T4 T5 T6  223 1/1 src_ack_o = 1'b0; Tests: T4 T5 T6  224 225 1/1 unique case (src_fsm_cs) Tests: T4 T5 T6  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T4 T5 T6  230 1/1 src_ack_o = src_ack; Tests: T4 T5 T6  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T4 T5 T6  234 1/1 src_fsm_ns = ODD; Tests: T4 T5 T6  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T4 T5 T6  242 1/1 src_ack_o = ~src_ack; Tests: T4 T5 T6  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T4 T5 T6  246 1/1 src_fsm_ns = EVEN; Tests: T4 T5 T6  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T4 T5 T6  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T4 T5 T6  267 1/1 dst_ack_d = dst_ack_q; Tests: T4 T5 T6  268 269 1/1 unique case (dst_fsm_cs) Tests: T4 T5 T6  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T4 T5 T6  274 1/1 dst_ack_d = dst_ack_i; Tests: T4 T5 T6  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T4 T5 T6  278 1/1 dst_fsm_ns = ODD; Tests: T4 T5 T6  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T4 T5 T6  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T4 T5 T6  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T4 T5 T6  290 1/1 dst_fsm_ns = EVEN; Tests: T4 T5 T6  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_io_div4_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
TotalCoveredPercent
Conditions33100.00
Logical33100.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Unreachable
10CoveredT4,T5,T6
11CoveredT4,T5,T6

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT4,T5,T6

Branch Coverage for Instance : tb.dut.u_io_div4_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T4,T5,T6
EVEN 0 - Covered T4,T5,T6
ODD - 1 Covered T4,T5,T6
ODD - 0 Covered T4,T5,T6


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T4,T5,T6
EVEN 0 - Covered T4,T5,T6
ODD - 1 Covered T4,T5,T6
ODD - 0 Covered T4,T5,T6


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


Assert Coverage for Instance : tb.dut.u_io_div4_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 2 2 100.00 1 50.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 2 2 100.00 1 50.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 17969019 226708 0 0
SyncReqAckHoldReq 1100738 0 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 17969019 226708 0 0
T4 310 18 0 0
T5 389 23 0 0
T6 1612 100 0 0
T24 584 22 0 0
T25 519 29 0 0
T26 1929 113 0 0
T27 1056 64 0 0
T28 1444 87 0 0
T29 635 31 0 0
T30 782 41 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 1100738 0 0 0

Line Coverage for Instance : tb.dut.u_main_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T4 T5 T6  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T4 T5 T6  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T4 T5 T6  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T4 T5 T6  223 1/1 src_ack_o = 1'b0; Tests: T4 T5 T6  224 225 1/1 unique case (src_fsm_cs) Tests: T4 T5 T6  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T4 T5 T6  230 1/1 src_ack_o = src_ack; Tests: T4 T5 T6  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T4 T5 T6  234 1/1 src_fsm_ns = ODD; Tests: T4 T5 T6  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T4 T5 T6  242 1/1 src_ack_o = ~src_ack; Tests: T4 T5 T6  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T4 T5 T6  246 1/1 src_fsm_ns = EVEN; Tests: T4 T5 T6  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T4 T5 T6  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T4 T5 T6  267 1/1 dst_ack_d = dst_ack_q; Tests: T4 T5 T6  268 269 1/1 unique case (dst_fsm_cs) Tests: T4 T5 T6  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T4 T5 T6  274 1/1 dst_ack_d = dst_ack_i; Tests: T4 T5 T6  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T4 T5 T6  278 1/1 dst_fsm_ns = ODD; Tests: T4 T5 T6  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T4 T5 T6  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T4 T5 T6  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T4 T5 T6  290 1/1 dst_fsm_ns = EVEN; Tests: T4 T5 T6  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_main_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
TotalCoveredPercent
Conditions33100.00
Logical33100.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Unreachable
10CoveredT4,T5,T6
11CoveredT4,T5,T6

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT4,T5,T6

Branch Coverage for Instance : tb.dut.u_main_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T4,T5,T6
EVEN 0 - Covered T4,T5,T6
ODD - 1 Covered T4,T5,T6
ODD - 0 Covered T4,T5,T6


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T4,T5,T6
EVEN 0 - Covered T4,T5,T6
ODD - 1 Covered T4,T5,T6
ODD - 0 Covered T4,T5,T6


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


Assert Coverage for Instance : tb.dut.u_main_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 2 2 100.00 1 50.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 2 2 100.00 1 50.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 81423641 238480 0 0
SyncReqAckHoldReq 1100738 0 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 81423641 238480 0 0
T4 1338 19 0 0
T5 1745 25 0 0
T6 6744 105 0 0
T24 1480 22 0 0
T25 2109 31 0 0
T26 7739 118 0 0
T27 4443 68 0 0
T28 6070 92 0 0
T29 2424 34 0 0
T30 2868 42 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 1100738 0 0 0

Line Coverage for Instance : tb.dut.u_usb_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T4 T5 T6  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T4 T5 T6  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T4 T5 T6  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T4 T5 T6  223 1/1 src_ack_o = 1'b0; Tests: T4 T5 T6  224 225 1/1 unique case (src_fsm_cs) Tests: T4 T5 T6  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T4 T5 T6  230 1/1 src_ack_o = src_ack; Tests: T4 T5 T6  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T4 T5 T6  234 1/1 src_fsm_ns = ODD; Tests: T4 T5 T6  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T4 T5 T6  242 1/1 src_ack_o = ~src_ack; Tests: T4 T5 T6  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T4 T5 T6  246 1/1 src_fsm_ns = EVEN; Tests: T4 T5 T6  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T4 T5 T6  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T4 T5 T6  267 1/1 dst_ack_d = dst_ack_q; Tests: T4 T5 T6  268 269 1/1 unique case (dst_fsm_cs) Tests: T4 T5 T6  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T4 T5 T6  274 1/1 dst_ack_d = dst_ack_i; Tests: T4 T5 T6  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T4 T5 T6  278 1/1 dst_fsm_ns = ODD; Tests: T4 T5 T6  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T4 T5 T6  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T4 T5 T6  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T4 T5 T6  290 1/1 dst_fsm_ns = EVEN; Tests: T4 T5 T6  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_usb_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
TotalCoveredPercent
Conditions33100.00
Logical33100.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Unreachable
10CoveredT4,T5,T6
11CoveredT4,T5,T6

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT4,T5,T6

Branch Coverage for Instance : tb.dut.u_usb_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T4,T5,T6
EVEN 0 - Covered T4,T5,T6
ODD - 1 Covered T4,T5,T6
ODD - 0 Covered T4,T5,T6


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T4,T5,T6
EVEN 0 - Covered T4,T5,T6
ODD - 1 Covered T4,T5,T6
ODD - 0 Covered T4,T5,T6


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


Assert Coverage for Instance : tb.dut.u_usb_meas.u_meas.gen_clk_timeout_chk.u_timeout_ref_to_clk.u_ref_timeout
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 2 2 100.00 1 50.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 2 2 100.00 1 50.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 39061206 238430 0 0
SyncReqAckHoldReq 1100738 0 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 39061206 238430 0 0
T4 605 17 0 0
T5 838 25 0 0
T6 3237 105 0 0
T24 710 22 0 0
T25 1012 31 0 0
T26 3714 118 0 0
T27 2132 68 0 0
T28 2914 92 0 0
T29 1163 34 0 0
T30 1376 42 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 1100738 0 0 0

Line Coverage for Instance : tb.dut.u_reg.u_io_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T1 T2 T3  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T1 T2 T3  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T1 T2 T3  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T1 T2 T3  223 1/1 src_ack_o = 1'b0; Tests: T1 T2 T3  224 225 1/1 unique case (src_fsm_cs) Tests: T1 T2 T3  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T1 T2 T3  230 1/1 src_ack_o = src_ack; Tests: T1 T2 T3  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T1 T2 T3  234 1/1 src_fsm_ns = ODD; Tests: T1 T2 T3  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T1 T2 T3  242 1/1 src_ack_o = ~src_ack; Tests: T1 T2 T3  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T1 T2 T3  246 1/1 src_fsm_ns = EVEN; Tests: T1 T2 T3  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T1 T2 T3  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T1 T2 T3  267 1/1 dst_ack_d = dst_ack_q; Tests: T1 T2 T3  268 269 1/1 unique case (dst_fsm_cs) Tests: T1 T2 T3  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T1 T2 T3  274 1/1 dst_ack_d = dst_ack_i; Tests: T1 T2 T3  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T1 T2 T3  278 1/1 dst_fsm_ns = ODD; Tests: T1 T2 T3  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T1 T2 T3  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T1 T2 T3  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T1 T2 T3  290 1/1 dst_fsm_ns = EVEN; Tests: T1 T2 T3  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_reg.u_io_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
TotalCoveredPercent
Conditions4375.00
Logical4375.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Not Covered
10CoveredT1,T2,T3
11CoveredT1,T2,T3

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT1,T2,T3

Branch Coverage for Instance : tb.dut.u_reg.u_io_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

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


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

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


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


Assert Coverage for Instance : tb.dut.u_reg.u_io_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 2 2 100.00 2 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 2 2 100.00 2 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 40123261 12098 0 0
SyncReqAckHoldReq 76223430 11565 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 40123261 12098 0 0
T1 24855 7 0 0
T2 26431 6 0 0
T3 15497 12 0 0
T16 13985 0 0 0
T17 25675 22 0 0
T18 1151 0 0 0
T19 1797 0 0 0
T20 1114 0 0 0
T21 2931 0 0 0
T22 2629 0 0 0
T23 0 40 0 0
T44 0 18 0 0
T45 0 38 0 0
T46 0 12 0 0
T51 0 24 0 0
T52 0 20 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 76223430 11565 0 0
T1 31395 6 0 0
T2 26431 6 0 0
T3 55098 10 0 0
T16 13425 0 0 0
T17 83650 22 0 0
T18 1105 0 0 0
T19 2465 0 0 0
T20 3776 0 0 0
T21 2931 0 0 0
T22 2601 0 0 0
T23 0 40 0 0
T44 0 18 0 0
T45 0 38 0 0
T46 0 12 0 0
T51 0 24 0 0
T52 0 20 0 0

Line Coverage for Instance : tb.dut.u_reg.u_io_div2_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T1 T2 T3  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T1 T2 T3  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T1 T2 T3  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T1 T2 T3  223 1/1 src_ack_o = 1'b0; Tests: T1 T2 T3  224 225 1/1 unique case (src_fsm_cs) Tests: T1 T2 T3  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T1 T2 T3  230 1/1 src_ack_o = src_ack; Tests: T1 T2 T3  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T1 T2 T3  234 1/1 src_fsm_ns = ODD; Tests: T1 T2 T3  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T1 T2 T3  242 1/1 src_ack_o = ~src_ack; Tests: T1 T2 T3  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T1 T2 T3  246 1/1 src_fsm_ns = EVEN; Tests: T1 T2 T3  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T1 T2 T3  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T1 T2 T3  267 1/1 dst_ack_d = dst_ack_q; Tests: T1 T2 T3  268 269 1/1 unique case (dst_fsm_cs) Tests: T1 T2 T3  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T1 T2 T3  274 1/1 dst_ack_d = dst_ack_i; Tests: T1 T2 T3  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T1 T2 T3  278 1/1 dst_fsm_ns = ODD; Tests: T1 T2 T3  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T1 T2 T3  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T1 T2 T3  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T1 T2 T3  290 1/1 dst_fsm_ns = EVEN; Tests: T1 T2 T3  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_reg.u_io_div2_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
TotalCoveredPercent
Conditions4375.00
Logical4375.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Not Covered
10CoveredT1,T2,T3
11CoveredT1,T2,T3

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT1,T2,T3

Branch Coverage for Instance : tb.dut.u_reg.u_io_div2_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

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


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

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


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


Assert Coverage for Instance : tb.dut.u_reg.u_io_div2_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 2 2 100.00 2 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 2 2 100.00 2 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 40123261 12098 0 0
SyncReqAckHoldReq 37213486 11564 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 40123261 12098 0 0
T1 24855 7 0 0
T2 26431 6 0 0
T3 15497 12 0 0
T16 13985 0 0 0
T17 25675 22 0 0
T18 1151 0 0 0
T19 1797 0 0 0
T20 1114 0 0 0
T21 2931 0 0 0
T22 2629 0 0 0
T23 0 40 0 0
T44 0 18 0 0
T45 0 38 0 0
T46 0 12 0 0
T51 0 24 0 0
T52 0 20 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 37213486 11564 0 0
T1 15637 6 0 0
T2 6945 6 0 0
T3 27496 10 0 0
T16 4875 0 0 0
T17 41799 22 0 0
T18 534 0 0 0
T19 1214 0 0 0
T20 1842 0 0 0
T21 1538 0 0 0
T22 1234 0 0 0
T23 0 40 0 0
T44 0 18 0 0
T45 0 38 0 0
T46 0 12 0 0
T51 0 24 0 0
T52 0 20 0 0

Line Coverage for Instance : tb.dut.u_reg.u_io_div4_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T1 T2 T3  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T1 T2 T3  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T1 T2 T3  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T1 T2 T3  223 1/1 src_ack_o = 1'b0; Tests: T1 T2 T3  224 225 1/1 unique case (src_fsm_cs) Tests: T1 T2 T3  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T1 T2 T3  230 1/1 src_ack_o = src_ack; Tests: T1 T2 T3  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T1 T2 T3  234 1/1 src_fsm_ns = ODD; Tests: T1 T2 T3  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T1 T2 T3  242 1/1 src_ack_o = ~src_ack; Tests: T1 T2 T3  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T1 T2 T3  246 1/1 src_fsm_ns = EVEN; Tests: T1 T2 T3  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T1 T2 T3  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T1 T2 T3  267 1/1 dst_ack_d = dst_ack_q; Tests: T1 T2 T3  268 269 1/1 unique case (dst_fsm_cs) Tests: T1 T2 T3  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T1 T2 T3  274 1/1 dst_ack_d = dst_ack_i; Tests: T1 T2 T3  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T1 T2 T3  278 1/1 dst_fsm_ns = ODD; Tests: T1 T2 T3  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T1 T2 T3  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T1 T2 T3  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T1 T2 T3  290 1/1 dst_fsm_ns = EVEN; Tests: T1 T2 T3  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_reg.u_io_div4_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
TotalCoveredPercent
Conditions4375.00
Logical4375.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Not Covered
10CoveredT1,T2,T3
11CoveredT1,T2,T3

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT1,T2,T3

Branch Coverage for Instance : tb.dut.u_reg.u_io_div4_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

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


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

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


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


Assert Coverage for Instance : tb.dut.u_reg.u_io_div4_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 2 2 100.00 2 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 2 2 100.00 2 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 40123261 12098 0 0
SyncReqAckHoldReq 18606276 11546 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 40123261 12098 0 0
T1 24855 7 0 0
T2 26431 6 0 0
T3 15497 12 0 0
T16 13985 0 0 0
T17 25675 22 0 0
T18 1151 0 0 0
T19 1797 0 0 0
T20 1114 0 0 0
T21 2931 0 0 0
T22 2629 0 0 0
T23 0 40 0 0
T44 0 18 0 0
T45 0 38 0 0
T46 0 12 0 0
T51 0 24 0 0
T52 0 20 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 18606276 11546 0 0
T1 7819 6 0 0
T2 3473 5 0 0
T3 13748 10 0 0
T16 2442 0 0 0
T17 20900 22 0 0
T18 267 0 0 0
T19 607 0 0 0
T20 921 0 0 0
T21 768 0 0 0
T22 617 0 0 0
T23 0 40 0 0
T44 0 18 0 0
T45 0 38 0 0
T46 0 12 0 0
T51 0 24 0 0
T52 0 20 0 0

Line Coverage for Instance : tb.dut.u_reg.u_main_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T1 T2 T3  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T1 T2 T3  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T1 T2 T3  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T1 T2 T3  223 1/1 src_ack_o = 1'b0; Tests: T1 T2 T3  224 225 1/1 unique case (src_fsm_cs) Tests: T1 T2 T3  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T1 T2 T3  230 1/1 src_ack_o = src_ack; Tests: T1 T2 T3  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T1 T2 T3  234 1/1 src_fsm_ns = ODD; Tests: T1 T2 T3  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T1 T2 T3  242 1/1 src_ack_o = ~src_ack; Tests: T1 T2 T3  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T1 T2 T3  246 1/1 src_fsm_ns = EVEN; Tests: T1 T2 T3  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T1 T2 T3  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T1 T2 T3  267 1/1 dst_ack_d = dst_ack_q; Tests: T1 T2 T3  268 269 1/1 unique case (dst_fsm_cs) Tests: T1 T2 T3  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T1 T2 T3  274 1/1 dst_ack_d = dst_ack_i; Tests: T1 T2 T3  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T1 T2 T3  278 1/1 dst_fsm_ns = ODD; Tests: T1 T2 T3  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T1 T2 T3  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T1 T2 T3  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T1 T2 T3  290 1/1 dst_fsm_ns = EVEN; Tests: T1 T2 T3  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_reg.u_main_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
TotalCoveredPercent
Conditions4375.00
Logical4375.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Not Covered
10CoveredT1,T2,T3
11CoveredT1,T2,T3

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT1,T2,T3

Branch Coverage for Instance : tb.dut.u_reg.u_main_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

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


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

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


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


Assert Coverage for Instance : tb.dut.u_reg.u_main_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 2 2 100.00 2 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 2 2 100.00 2 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 40123261 12098 0 0
SyncReqAckHoldReq 84182409 11565 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 40123261 12098 0 0
T1 24855 7 0 0
T2 26431 6 0 0
T3 15497 12 0 0
T16 13985 0 0 0
T17 25675 22 0 0
T18 1151 0 0 0
T19 1797 0 0 0
T20 1114 0 0 0
T21 2931 0 0 0
T22 2629 0 0 0
T23 0 40 0 0
T44 0 18 0 0
T45 0 38 0 0
T46 0 12 0 0
T51 0 24 0 0
T52 0 20 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 84182409 11565 0 0
T1 32705 6 0 0
T2 27534 6 0 0
T3 57396 10 0 0
T16 13985 0 0 0
T17 129139 22 0 0
T18 1151 0 0 0
T19 2568 0 0 0
T20 3830 0 0 0
T21 3053 0 0 0
T22 2710 0 0 0
T23 0 40 0 0
T44 0 18 0 0
T45 0 38 0 0
T46 0 12 0 0
T51 0 24 0 0
T52 0 20 0 0

Line Coverage for Instance : tb.dut.u_reg.u_usb_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T1 T2 T3  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T1 T2 T3  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T1 T2 T3  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T1 T2 T3  223 1/1 src_ack_o = 1'b0; Tests: T1 T2 T3  224 225 1/1 unique case (src_fsm_cs) Tests: T1 T2 T3  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T1 T2 T3  230 1/1 src_ack_o = src_ack; Tests: T1 T2 T3  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T1 T2 T3  234 1/1 src_fsm_ns = ODD; Tests: T1 T2 T3  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T1 T2 T3  242 1/1 src_ack_o = ~src_ack; Tests: T1 T2 T3  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T1 T2 T3  246 1/1 src_fsm_ns = EVEN; Tests: T1 T3 T17  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T1 T2 T3  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T1 T2 T3  267 1/1 dst_ack_d = dst_ack_q; Tests: T1 T2 T3  268 269 1/1 unique case (dst_fsm_cs) Tests: T1 T2 T3  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T1 T2 T3  274 1/1 dst_ack_d = dst_ack_i; Tests: T1 T2 T3  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T1 T2 T3  278 1/1 dst_fsm_ns = ODD; Tests: T1 T2 T3  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T1 T2 T3  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T1 T2 T3  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T1 T2 T3  290 1/1 dst_fsm_ns = EVEN; Tests: T1 T3 T17  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_reg.u_usb_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
TotalCoveredPercent
Conditions4375.00
Logical4375.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Not Covered
10CoveredT1,T2,T3
11CoveredT1,T2,T3

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT1,T2,T3

Branch Coverage for Instance : tb.dut.u_reg.u_usb_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T1,T2,T3
EVEN 0 - Covered T1,T2,T3
ODD - 1 Covered T1,T3,T17
ODD - 0 Covered T1,T2,T3


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T1,T2,T3
EVEN 0 - Covered T1,T2,T3
ODD - 1 Covered T1,T3,T17
ODD - 0 Covered T1,T2,T3


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


Assert Coverage for Instance : tb.dut.u_reg.u_usb_meas_ctrl_en_cdc.u_arb.gen_wr_req.u_dst_update_sync
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 2 2 100.00 2 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 2 2 100.00 2 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 40123261 11689 0 0
SyncReqAckHoldReq 40385383 11085 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 40123261 11689 0 0
T1 24855 7 0 0
T2 26431 3 0 0
T3 15497 12 0 0
T16 13985 0 0 0
T17 25675 22 0 0
T18 1151 0 0 0
T19 1797 0 0 0
T20 1114 0 0 0
T21 2931 0 0 0
T22 2629 0 0 0
T23 0 20 0 0
T44 0 9 0 0
T45 0 38 0 0
T46 0 6 0 0
T51 0 14 0 0
T52 0 10 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 40385383 11085 0 0
T1 15698 6 0 0
T2 13216 0 0 0
T3 27550 10 0 0
T16 6713 0 0 0
T17 59107 22 0 0
T18 553 0 0 0
T19 1233 0 0 0
T20 1917 0 0 0
T21 1465 0 0 0
T22 1300 0 0 0
T23 0 20 0 0
T44 0 9 0 0
T45 0 38 0 0
T46 0 6 0 0
T51 0 12 0 0
T52 0 10 0 0
T53 0 34 0 0

Line Coverage for Instance : tb.dut.u_io_meas.u_err_sync
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T3 T31 T9  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T3 T31 T9  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T3 T31 T9  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T3 T31 T9  223 1/1 src_ack_o = 1'b0; Tests: T3 T31 T9  224 225 1/1 unique case (src_fsm_cs) Tests: T3 T31 T9  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T3 T31 T9  230 1/1 src_ack_o = src_ack; Tests: T3 T31 T9  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T3 T31 T9  234 1/1 src_fsm_ns = ODD; Tests: T3 T31 T9  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T3 T31 T9  242 1/1 src_ack_o = ~src_ack; Tests: T3 T31 T9  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T3 T31 T9  246 1/1 src_fsm_ns = EVEN; Tests: T3 T31 T9  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T3 T31 T9  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T3 T31 T9  267 1/1 dst_ack_d = dst_ack_q; Tests: T3 T31 T9  268 269 1/1 unique case (dst_fsm_cs) Tests: T3 T31 T9  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T3 T31 T9  274 1/1 dst_ack_d = dst_ack_i; Tests: T3 T31 T9  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T3 T31 T9  278 1/1 dst_fsm_ns = ODD; Tests: T3 T31 T9  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T3 T31 T9  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T3 T31 T9  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T3 T31 T9  290 1/1 dst_fsm_ns = EVEN; Tests: T3 T31 T9  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_io_meas.u_err_sync
TotalCoveredPercent
Conditions4375.00
Logical4375.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Not Covered
10CoveredT3,T31,T9
11CoveredT3,T31,T9

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT3,T31,T9

Branch Coverage for Instance : tb.dut.u_io_meas.u_err_sync
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T3,T31,T9
EVEN 0 - Covered T3,T31,T9
ODD - 1 Covered T3,T31,T9
ODD - 0 Covered T3,T31,T9


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T3,T31,T9
EVEN 0 - Covered T3,T31,T9
ODD - 1 Covered T3,T31,T9
ODD - 0 Covered T3,T31,T9


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


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




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 39186507 1281 0 0
SyncReqAckHoldReq 73575126 1281 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 39186507 1281 0 0
T3 15497 3 0 0
T9 0 3 0 0
T10 0 4 0 0
T11 0 4 0 0
T12 0 4 0 0
T14 0 5 0 0
T15 0 10 0 0
T17 25675 0 0 0
T18 1151 0 0 0
T19 1797 0 0 0
T20 1114 0 0 0
T21 2931 0 0 0
T22 2629 0 0 0
T31 0 10 0 0
T32 0 4 0 0
T33 0 7 0 0
T48 1301 0 0 0
T49 2986 0 0 0
T50 1293 0 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 73575126 1281 0 0
T3 55098 3 0 0
T9 0 3 0 0
T10 0 4 0 0
T11 0 4 0 0
T12 0 4 0 0
T14 0 5 0 0
T15 0 10 0 0
T17 83650 0 0 0
T18 1105 0 0 0
T19 2465 0 0 0
T20 3776 0 0 0
T21 2931 0 0 0
T22 2601 0 0 0
T31 0 10 0 0
T32 0 4 0 0
T33 0 7 0 0
T48 1261 0 0 0
T49 2895 0 0 0
T50 5177 0 0 0

Line Coverage for Instance : tb.dut.u_io_div2_meas.u_err_sync
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T31 T8 T9  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T31 T8 T9  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T31 T8 T9  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T31 T8 T9  223 1/1 src_ack_o = 1'b0; Tests: T31 T8 T9  224 225 1/1 unique case (src_fsm_cs) Tests: T31 T8 T9  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T31 T8 T9  230 1/1 src_ack_o = src_ack; Tests: T31 T8 T9  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T31 T8 T9  234 1/1 src_fsm_ns = ODD; Tests: T31 T8 T9  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T31 T8 T9  242 1/1 src_ack_o = ~src_ack; Tests: T31 T8 T9  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T31 T8 T9  246 1/1 src_fsm_ns = EVEN; Tests: T31 T8 T9  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T31 T8 T9  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T31 T8 T9  267 1/1 dst_ack_d = dst_ack_q; Tests: T31 T8 T9  268 269 1/1 unique case (dst_fsm_cs) Tests: T31 T8 T9  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T31 T8 T9  274 1/1 dst_ack_d = dst_ack_i; Tests: T31 T8 T9  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T31 T8 T9  278 1/1 dst_fsm_ns = ODD; Tests: T31 T8 T9  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T31 T8 T9  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T31 T8 T9  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T31 T8 T9  290 1/1 dst_fsm_ns = EVEN; Tests: T31 T8 T9  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_io_div2_meas.u_err_sync
TotalCoveredPercent
Conditions4375.00
Logical4375.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Not Covered
10CoveredT31,T8,T9
11CoveredT31,T8,T9

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT31,T8,T9

Branch Coverage for Instance : tb.dut.u_io_div2_meas.u_err_sync
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T31,T8,T9
EVEN 0 - Covered T31,T8,T9
ODD - 1 Covered T31,T8,T9
ODD - 0 Covered T31,T8,T9


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T31,T8,T9
EVEN 0 - Covered T31,T8,T9
ODD - 1 Covered T31,T8,T9
ODD - 0 Covered T31,T8,T9


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


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




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 39186507 1256 0 0
SyncReqAckHoldReq 35938955 1256 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 39186507 1256 0 0
T8 0 4 0 0
T9 0 4 0 0
T12 0 11 0 0
T13 0 3 0 0
T14 0 10 0 0
T15 0 7 0 0
T31 41510 18 0 0
T32 0 3 0 0
T33 0 4 0 0
T34 0 4 0 0
T35 49994 0 0 0
T36 1058 0 0 0
T37 939 0 0 0
T38 1775 0 0 0
T39 1920 0 0 0
T40 1965 0 0 0
T41 1676 0 0 0
T42 694 0 0 0
T43 1078 0 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 35938955 1256 0 0
T8 0 4 0 0
T9 0 4 0 0
T12 0 11 0 0
T13 0 3 0 0
T14 0 10 0 0
T15 0 7 0 0
T31 82981 18 0 0
T32 0 3 0 0
T33 0 4 0 0
T34 0 4 0 0
T35 76915 0 0 0
T36 1769 0 0 0
T37 872 0 0 0
T38 3526 0 0 0
T39 1029 0 0 0
T40 2933 0 0 0
T41 3131 0 0 0
T42 1415 0 0 0
T43 1904 0 0 0

Line Coverage for Instance : tb.dut.u_io_div4_meas.u_err_sync
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T31 T8 T9  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T31 T8 T9  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T31 T8 T9  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T31 T8 T9  223 1/1 src_ack_o = 1'b0; Tests: T31 T8 T9  224 225 1/1 unique case (src_fsm_cs) Tests: T31 T8 T9  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T31 T8 T9  230 1/1 src_ack_o = src_ack; Tests: T31 T8 T9  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T31 T8 T9  234 1/1 src_fsm_ns = ODD; Tests: T31 T8 T9  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T31 T8 T9  242 1/1 src_ack_o = ~src_ack; Tests: T31 T8 T9  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T31 T8 T9  246 1/1 src_fsm_ns = EVEN; Tests: T31 T8 T9  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T31 T8 T9  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T31 T8 T9  267 1/1 dst_ack_d = dst_ack_q; Tests: T31 T8 T9  268 269 1/1 unique case (dst_fsm_cs) Tests: T31 T8 T9  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T31 T8 T9  274 1/1 dst_ack_d = dst_ack_i; Tests: T31 T8 T9  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T31 T8 T9  278 1/1 dst_fsm_ns = ODD; Tests: T31 T8 T9  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T31 T8 T9  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T31 T8 T9  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T31 T8 T9  290 1/1 dst_fsm_ns = EVEN; Tests: T31 T8 T9  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_io_div4_meas.u_err_sync
TotalCoveredPercent
Conditions4375.00
Logical4375.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Not Covered
10CoveredT31,T8,T9
11CoveredT31,T8,T9

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT31,T8,T9

Branch Coverage for Instance : tb.dut.u_io_div4_meas.u_err_sync
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T31,T8,T9
EVEN 0 - Covered T31,T8,T9
ODD - 1 Covered T31,T8,T9
ODD - 0 Covered T31,T8,T9


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T31,T8,T9
EVEN 0 - Covered T31,T8,T9
ODD - 1 Covered T31,T8,T9
ODD - 0 Covered T31,T8,T9


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


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




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 39186507 1409 0 0
SyncReqAckHoldReq 17969019 1409 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 39186507 1409 0 0
T8 0 4 0 0
T9 0 8 0 0
T10 0 3 0 0
T11 0 10 0 0
T13 0 10 0 0
T15 0 17 0 0
T31 41510 4 0 0
T33 0 3 0 0
T34 0 4 0 0
T35 49994 0 0 0
T36 1058 0 0 0
T37 939 0 0 0
T38 1775 0 0 0
T39 1920 0 0 0
T40 1965 0 0 0
T41 1676 0 0 0
T42 694 0 0 0
T43 1078 0 0 0
T47 0 13 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 17969019 1409 0 0
T8 0 4 0 0
T9 0 8 0 0
T10 0 3 0 0
T11 0 10 0 0
T13 0 10 0 0
T15 0 17 0 0
T31 41490 4 0 0
T33 0 3 0 0
T34 0 4 0 0
T35 38458 0 0 0
T36 884 0 0 0
T37 436 0 0 0
T38 1763 0 0 0
T39 513 0 0 0
T40 1465 0 0 0
T41 1565 0 0 0
T42 708 0 0 0
T43 952 0 0 0
T47 0 13 0 0

Line Coverage for Instance : tb.dut.u_main_meas.u_err_sync
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T31 T8 T10  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T31 T8 T10  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T31 T8 T10  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T31 T8 T10  223 1/1 src_ack_o = 1'b0; Tests: T31 T8 T10  224 225 1/1 unique case (src_fsm_cs) Tests: T31 T8 T10  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T31 T8 T10  230 1/1 src_ack_o = src_ack; Tests: T31 T8 T10  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T31 T8 T10  234 1/1 src_fsm_ns = ODD; Tests: T31 T8 T10  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T31 T8 T10  242 1/1 src_ack_o = ~src_ack; Tests: T31 T8 T10  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T31 T8 T10  246 1/1 src_fsm_ns = EVEN; Tests: T31 T8 T10  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T31 T8 T10  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T31 T8 T10  267 1/1 dst_ack_d = dst_ack_q; Tests: T31 T8 T10  268 269 1/1 unique case (dst_fsm_cs) Tests: T31 T8 T10  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T31 T8 T10  274 1/1 dst_ack_d = dst_ack_i; Tests: T31 T8 T10  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T31 T8 T10  278 1/1 dst_fsm_ns = ODD; Tests: T31 T8 T10  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T31 T8 T10  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T31 T8 T10  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T31 T8 T10  290 1/1 dst_fsm_ns = EVEN; Tests: T31 T8 T10  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_main_meas.u_err_sync
TotalCoveredPercent
Conditions4375.00
Logical4375.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Not Covered
10CoveredT31,T8,T10
11CoveredT31,T8,T10

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT31,T8,T10

Branch Coverage for Instance : tb.dut.u_main_meas.u_err_sync
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T31,T8,T10
EVEN 0 - Covered T31,T8,T10
ODD - 1 Covered T31,T8,T10
ODD - 0 Covered T31,T8,T10


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T31,T8,T10
EVEN 0 - Covered T31,T8,T10
ODD - 1 Covered T31,T8,T10
ODD - 0 Covered T31,T8,T10


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


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




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 39186507 1283 0 0
SyncReqAckHoldReq 81423641 1283 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 39186507 1283 0 0
T8 0 3 0 0
T10 0 6 0 0
T11 0 3 0 0
T13 0 4 0 0
T14 0 3 0 0
T15 0 14 0 0
T31 41510 8 0 0
T32 0 3 0 0
T33 0 6 0 0
T34 0 7 0 0
T35 49994 0 0 0
T36 1058 0 0 0
T37 939 0 0 0
T38 1775 0 0 0
T39 1920 0 0 0
T40 1965 0 0 0
T41 1676 0 0 0
T42 694 0 0 0
T43 1078 0 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 81423641 1283 0 0
T8 0 3 0 0
T10 0 6 0 0
T11 0 3 0 0
T13 0 4 0 0
T14 0 3 0 0
T15 0 14 0 0
T31 172965 8 0 0
T32 0 3 0 0
T33 0 6 0 0
T34 0 7 0 0
T35 202313 0 0 0
T36 3818 0 0 0
T37 1916 0 0 0
T38 7400 0 0 0
T39 2001 0 0 0
T40 4010 0 0 0
T41 6208 0 0 0
T42 2954 0 0 0
T43 3992 0 0 0

Line Coverage for Instance : tb.dut.u_usb_meas.u_err_sync
Line No.TotalCoveredPercent
TOTAL3636100.00
CONT_ASSIGN5500
CONT_ASSIGN19411100.00
CONT_ASSIGN19511100.00
ALWAYS2191212100.00
ALWAYS2631212100.00
ALWAYS30755100.00
ALWAYS31655100.00
CONT_ASSIGN33500
ALWAYS33900

54 logic unused_req_chk; 55 unreachable assign unused_req_chk = req_chk_i; 56 57 if (EnRzHs) begin : gen_rz_hs_protocol 58 ////////////////// 59 // RZ protocol // 60 ////////////////// 61 62 // Types 63 typedef enum logic { 64 LoSt, HiSt 65 } rz_fsm_e; 66 67 // Signals 68 rz_fsm_e src_fsm_d, src_fsm_q; 69 rz_fsm_e dst_fsm_d, dst_fsm_q; 70 logic src_ack, dst_ack; 71 logic src_req, dst_req; 72 73 // REQ-side FSM (SRC domain) 74 always_comb begin : src_fsm 75 src_fsm_d = src_fsm_q; 76 src_ack_o = 1'b0; 77 src_req = 1'b0; 78 79 unique case (src_fsm_q) 80 LoSt: begin 81 // Wait for the ack to go back to zero before starting 82 // a new transaction. 83 if (!src_ack && src_req_i) begin 84 src_fsm_d = HiSt; 85 end 86 end 87 HiSt: begin 88 src_req = 1'b1; 89 // Forward the acknowledgement. 90 src_ack_o = src_ack; 91 // If request drops out, we go back to LoSt. 92 // If DST side asserts ack, we also go back to LoSt. 93 if (!src_req_i || src_ack) begin 94 src_fsm_d = LoSt; 95 end 96 end 97 //VCS coverage off 98 // pragma coverage off 99 default: ; 100 //VCS coverage on 101 // pragma coverage on 102 endcase 103 end 104 105 // Move ACK over to SRC domain. 106 prim_flop_2sync #( 107 .Width(1) 108 ) ack_sync ( 109 .clk_i (clk_src_i), 110 .rst_ni (rst_src_ni), 111 .d_i (dst_ack), 112 .q_o (src_ack) 113 ); 114 115 // Registers 116 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 117 if (!rst_src_ni) begin 118 src_fsm_q <= LoSt; 119 end else begin 120 src_fsm_q <= src_fsm_d; 121 end 122 end 123 124 // ACK-side FSM (DST domain) 125 always_comb begin : dst_fsm 126 dst_fsm_d = dst_fsm_q; 127 dst_req_o = 1'b0; 128 dst_ack = 1'b0; 129 130 unique case (dst_fsm_q) 131 LoSt: begin 132 if (dst_req) begin 133 // Forward the request. 134 dst_req_o = 1'b1; 135 // Wait for the request and acknowledge to be asserted 136 // before responding to the SRC side. 137 if (dst_ack_i) begin 138 dst_fsm_d = HiSt; 139 end 140 end 141 end 142 HiSt: begin 143 dst_ack = 1'b1; 144 // Wait for the request to drop back to zero. 145 if (!dst_req) begin 146 dst_fsm_d = LoSt; 147 end 148 end 149 //VCS coverage off 150 // pragma coverage off 151 default: ; 152 //VCS coverage on 153 // pragma coverage on 154 endcase 155 end 156 157 // Move REQ over to DST domain. 158 prim_flop_2sync #( 159 .Width(1) 160 ) req_sync ( 161 .clk_i (clk_dst_i), 162 .rst_ni (rst_dst_ni), 163 .d_i (src_req), 164 .q_o (dst_req) 165 ); 166 167 // Registers 168 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 169 if (!rst_dst_ni) begin 170 dst_fsm_q <= LoSt; 171 end else begin 172 dst_fsm_q <= dst_fsm_d; 173 end 174 end 175 176 end else begin : gen_nrz_hs_protocol 177 ////////////////// 178 // NRZ protocol // 179 ////////////////// 180 181 // Types 182 typedef enum logic { 183 EVEN, ODD 184 } sync_reqack_fsm_e; 185 186 // Signals 187 sync_reqack_fsm_e src_fsm_ns, src_fsm_cs; 188 sync_reqack_fsm_e dst_fsm_ns, dst_fsm_cs; 189 190 logic src_req_d, src_req_q, src_ack; 191 logic dst_ack_d, dst_ack_q, dst_req; 192 logic src_handshake, dst_handshake; 193 194 1/1 assign src_handshake = src_req_i & src_ack_o; Tests: T1 T31 T8  195 1/1 assign dst_handshake = dst_req_o & dst_ack_i; Tests: T1 T31 T8  196 197 // Move REQ over to DST domain. 198 prim_flop_2sync #( 199 .Width(1) 200 ) req_sync ( 201 .clk_i (clk_dst_i), 202 .rst_ni (rst_dst_ni), 203 .d_i (src_req_q), 204 .q_o (dst_req) 205 ); 206 207 // Move ACK over to SRC domain. 208 prim_flop_2sync #( 209 .Width(1) 210 ) ack_sync ( 211 .clk_i (clk_src_i), 212 .rst_ni (rst_src_ni), 213 .d_i (dst_ack_q), 214 .q_o (src_ack) 215 ); 216 217 // REQ-side FSM (SRC domain) 218 always_comb begin : src_fsm 219 1/1 src_fsm_ns = src_fsm_cs; Tests: T1 T31 T8  220 221 // By default, we keep the internal REQ value and don't ACK. 222 1/1 src_req_d = src_req_q; Tests: T1 T31 T8  223 1/1 src_ack_o = 1'b0; Tests: T1 T31 T8  224 225 1/1 unique case (src_fsm_cs) Tests: T1 T31 T8  226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 1/1 src_req_d = src_req_i; Tests: T1 T31 T8  230 1/1 src_ack_o = src_ack; Tests: T1 T31 T8  231 232 // The handshake is done for exactly 1 clock cycle. 233 1/1 if (src_handshake) begin Tests: T1 T31 T8  234 1/1 src_fsm_ns = ODD; Tests: T1 T31 T8  235 end MISSING_ELSE 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 1/1 src_req_d = ~src_req_i; Tests: T1 T31 T8  242 1/1 src_ack_o = ~src_ack; Tests: T1 T31 T8  243 244 // The handshake is done for exactly 1 clock cycle. 245 1/1 if (src_handshake) begin Tests: T1 T31 T8  246 1/1 src_fsm_ns = EVEN; Tests: T1 T31 T8  247 end MISSING_ELSE 248 end 249 250 //VCS coverage off 251 // pragma coverage off 252 253 default: ; 254 255 //VCS coverage on 256 // pragma coverage on 257 258 endcase 259 end 260 261 // ACK-side FSM (DST domain) 262 always_comb begin : dst_fsm 263 1/1 dst_fsm_ns = dst_fsm_cs; Tests: T1 T31 T8  264 265 // By default, we don't REQ and keep the internal ACK. 266 1/1 dst_req_o = 1'b0; Tests: T1 T31 T8  267 1/1 dst_ack_d = dst_ack_q; Tests: T1 T31 T8  268 269 1/1 unique case (dst_fsm_cs) Tests: T1 T31 T8  270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 1/1 dst_req_o = dst_req; Tests: T1 T31 T8  274 1/1 dst_ack_d = dst_ack_i; Tests: T1 T31 T8  275 276 // The handshake is done for exactly 1 clock cycle. 277 1/1 if (dst_handshake) begin Tests: T1 T31 T8  278 1/1 dst_fsm_ns = ODD; Tests: T1 T31 T8  279 end MISSING_ELSE 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 1/1 dst_req_o = ~dst_req; Tests: T1 T31 T8  286 1/1 dst_ack_d = ~dst_ack_i; Tests: T1 T31 T8  287 288 // The handshake is done for exactly 1 clock cycle. 289 1/1 if (dst_handshake) begin Tests: T1 T31 T8  290 1/1 dst_fsm_ns = EVEN; Tests: T1 T31 T8  291 end MISSING_ELSE 292 end 293 294 //VCS coverage off 295 // pragma coverage off 296 297 default: ; 298 299 //VCS coverage on 300 // pragma coverage on 301 302 endcase 303 end 304 305 // Registers 306 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 307 1/1 if (!rst_src_ni) begin Tests: T4 T5 T6  308 1/1 src_fsm_cs <= EVEN; Tests: T4 T5 T6  309 1/1 src_req_q <= 1'b0; Tests: T4 T5 T6  310 end else begin 311 1/1 src_fsm_cs <= src_fsm_ns; Tests: T4 T5 T6  312 1/1 src_req_q <= src_req_d; Tests: T4 T5 T6  313 end 314 end 315 always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin 316 1/1 if (!rst_dst_ni) begin Tests: T4 T5 T6  317 1/1 dst_fsm_cs <= EVEN; Tests: T4 T5 T6  318 1/1 dst_ack_q <= 1'b0; Tests: T4 T5 T6  319 end else begin 320 1/1 dst_fsm_cs <= dst_fsm_ns; Tests: T4 T5 T6  321 1/1 dst_ack_q <= dst_ack_d; Tests: T4 T5 T6  322 end 323 end 324 end 325 326 //////////////// 327 // Assertions // 328 //////////////// 329 330 `ifdef INC_ASSERT 331 //VCS coverage off 332 // pragma coverage off 333 334 logic effective_rst_n; 335 unreachable assign effective_rst_n = rst_src_ni && rst_dst_ni; 336 337 logic chk_flag; 338 always_ff @(posedge clk_src_i or negedge effective_rst_n) begin 339 unreachable if (!effective_rst_n) begin 340 unreachable chk_flag <= '0; 341 unreachable end else if (src_req_i && !chk_flag) begin 342 unreachable chk_flag <= 1'b1; 343 end ==> MISSING_ELSE

Cond Coverage for Instance : tb.dut.u_usb_meas.u_err_sync
TotalCoveredPercent
Conditions4375.00
Logical4375.00
Non-Logical00
Event00

 LINE       194
 EXPRESSION (src_req_i & src_ack_o)
             ----1----   ----2----
-1--2-StatusTests
01Not Covered
10CoveredT1,T31,T8
11CoveredT1,T31,T8

 LINE       195
 EXPRESSION (dst_req_o & dst_ack_i)
             ----1----   ----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT1,T31,T8

Branch Coverage for Instance : tb.dut.u_usb_meas.u_err_sync
Line No.TotalCoveredPercent
Branches 12 12 100.00
CASE 225 4 4 100.00
CASE 269 4 4 100.00
IF 307 2 2 100.00
IF 316 2 2 100.00


225 unique case (src_fsm_cs) -1- 226 227 EVEN: begin 228 // Simply forward REQ and ACK. 229 src_req_d = src_req_i; 230 src_ack_o = src_ack; 231 232 // The handshake is done for exactly 1 clock cycle. 233 if (src_handshake) begin -2- 234 src_fsm_ns = ODD; ==> 235 end MISSING_ELSE ==> 236 end 237 238 ODD: begin 239 // Internal REQ and ACK have inverted meaning now. If src_req_i is high again, this 240 // signals a new transaction. 241 src_req_d = ~src_req_i; 242 src_ack_o = ~src_ack; 243 244 // The handshake is done for exactly 1 clock cycle. 245 if (src_handshake) begin -3- 246 src_fsm_ns = EVEN; ==> 247 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T1,T31,T8
EVEN 0 - Covered T1,T31,T8
ODD - 1 Covered T1,T31,T8
ODD - 0 Covered T1,T31,T8


269 unique case (dst_fsm_cs) -1- 270 271 EVEN: begin 272 // Simply forward REQ and ACK. 273 dst_req_o = dst_req; 274 dst_ack_d = dst_ack_i; 275 276 // The handshake is done for exactly 1 clock cycle. 277 if (dst_handshake) begin -2- 278 dst_fsm_ns = ODD; ==> 279 end MISSING_ELSE ==> 280 end 281 282 ODD: begin 283 // Internal REQ and ACK have inverted meaning now. If dst_req goes low, this signals a new 284 // transaction. 285 dst_req_o = ~dst_req; 286 dst_ack_d = ~dst_ack_i; 287 288 // The handshake is done for exactly 1 clock cycle. 289 if (dst_handshake) begin -3- 290 dst_fsm_ns = EVEN; ==> 291 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
EVEN 1 - Covered T1,T31,T8
EVEN 0 - Covered T1,T31,T8
ODD - 1 Covered T1,T31,T8
ODD - 0 Covered T1,T31,T8


307 if (!rst_src_ni) begin -1- 308 src_fsm_cs <= EVEN; ==> 309 src_req_q <= 1'b0; 310 end else begin 311 src_fsm_cs <= src_fsm_ns; ==>

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


316 if (!rst_dst_ni) begin -1- 317 dst_fsm_cs <= EVEN; ==> 318 dst_ack_q <= 1'b0; 319 end else begin 320 dst_fsm_cs <= dst_fsm_ns; ==>

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


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




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
SyncReqAckAckNeedsReq 39186507 1329 0 0
SyncReqAckHoldReq 39061206 1329 0 0


SyncReqAckAckNeedsReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 39186507 1329 0 0
T1 24855 3 0 0
T2 26431 0 0 0
T3 15497 0 0 0
T8 0 3 0 0
T9 0 6 0 0
T10 0 7 0 0
T11 0 3 0 0
T13 0 4 0 0
T14 0 8 0 0
T15 0 20 0 0
T16 13985 0 0 0
T17 25675 0 0 0
T18 1151 0 0 0
T19 1797 0 0 0
T20 1114 0 0 0
T21 2931 0 0 0
T22 2629 0 0 0
T31 0 15 0 0
T32 0 8 0 0

SyncReqAckHoldReq
NameAttemptsReal SuccessesFailuresIncomplete
Total 39061206 1329 0 0
T1 15698 3 0 0
T2 13216 0 0 0
T3 27550 0 0 0
T8 0 3 0 0
T9 0 6 0 0
T10 0 7 0 0
T11 0 3 0 0
T13 0 4 0 0
T14 0 8 0 0
T15 0 20 0 0
T16 6713 0 0 0
T17 59107 0 0 0
T18 553 0 0 0
T19 1233 0 0 0
T20 1917 0 0 0
T21 1465 0 0 0
T22 1300 0 0 0
T31 0 15 0 0
T32 0 8 0 0

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