dashboard | hierarchy | modlist | groups | tests | asserts

Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_0_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
98.08 100.00 92.31 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.22 100.00 96.88 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
98.08 100.00 92.31 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.22 100.00 96.88 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_2_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.88 90.91 84.62 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
95.38 94.00 87.50 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 93.79 93.33 81.82 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_3_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.88 90.91 84.62 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
95.38 94.00 87.50 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 93.79 93.33 81.82 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_4_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
98.08 100.00 92.31 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.22 100.00 96.88 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
98.08 100.00 92.31 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.22 100.00 96.88 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_6_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
93.88 90.91 84.62 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
95.38 94.00 87.50 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 93.79 93.33 81.82 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
98.08 100.00 92.31 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.22 100.00 96.88 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_0_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
97.73 100.00 90.91 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.17 100.00 96.67 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_1_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
97.73 100.00 90.91 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.17 100.00 96.67 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_2_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
97.73 100.00 90.91 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.17 100.00 96.67 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_3_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
97.73 100.00 90.91 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.17 100.00 96.67 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_4_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
97.73 100.00 90.91 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.17 100.00 96.67 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_5_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
97.73 100.00 90.91 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.17 100.00 96.67 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_6_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
97.73 100.00 90.91 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.17 100.00 96.67 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_7_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
97.73 100.00 90.91 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.17 100.00 96.67 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_0_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
97.73 100.00 90.91 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.17 100.00 96.67 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00


Module Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_1_cdc

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
97.73 100.00 90.91 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
99.17 100.00 96.67 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
99.26 99.83 97.20 100.00 100.00 u_reg


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arb 100.00 100.00 100.00 100.00 100.00
u_src_to_dst_req 100.00 100.00 100.00 100.00 100.00

Go back
Module Instances:
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_0_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_2_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_3_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_4_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_6_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_0_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_1_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_2_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_3_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_4_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_5_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_6_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_7_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_0_cdc
tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_1_cdc
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_0_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T5 T27 T70  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T5 T27 T70  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T5 T27 T70  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T5 T27 T70  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T5 T27 T70  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T5 T27 T70  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T5 T27 T70  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T5 T27 T70  135 1/1 txn_bits_q <= '0; Tests: T5 T27 T70  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T5 T27 T70  156 1/1 assign dst_wd_o = src_q; Tests: T5 T27 T70  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T5 T27 T70 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_0_cdc
TotalCoveredPercent
Conditions131292.31
Logical131292.31
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT5,T27,T70

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT5,T27,T70
11CoveredT5,T27,T70

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT5,T27,T70
1-CoveredT5,T27,T70

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT5,T27,T70

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT5,T27,T70
11CoveredT5,T27,T70

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_0_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T5,T27,T70
0 0 1 Covered T5,T27,T70
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T5,T27,T70
0 0 1 Covered T5,T27,T70
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_0_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 103978 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 264 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 103978 0 0
T5 29901 1561 0 0
T6 22779 0 0 0
T7 25717 0 0 0
T8 26775 0 0 0
T27 0 709 0 0
T29 22796 0 0 0
T37 36755 0 0 0
T65 21823 0 0 0
T66 53867 0 0 0
T69 0 309 0 0
T70 0 767 0 0
T77 0 686 0 0
T78 0 2065 0 0
T79 0 2024 0 0
T119 18905 0 0 0
T120 23943 0 0 0
T406 0 376 0 0
T407 0 417 0 0
T432 0 814 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 264 0 0
T5 29901 4 0 0
T6 22779 0 0 0
T7 25717 0 0 0
T8 26775 0 0 0
T27 0 2 0 0
T29 22796 0 0 0
T37 36755 0 0 0
T65 21823 0 0 0
T66 53867 0 0 0
T69 0 1 0 0
T70 0 2 0 0
T77 0 2 0 0
T78 0 5 0 0
T79 0 5 0 0
T119 18905 0 0 0
T120 23943 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T432 0 2 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T24 T69 T91  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T24 T69 T163  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T24 T69 T163  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T24 T69 T163  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T24 T69 T163  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T24 T69 T163  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T24 T69 T163  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T24 T69 T163  135 1/1 txn_bits_q <= '0; Tests: T24 T69 T163  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T24  156 1/1 assign dst_wd_o = src_q; Tests: T24  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T24 T69 T163 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_cdc
TotalCoveredPercent
Conditions131292.31
Logical131292.31
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT24,T69,T435

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT24,T69,T163
11CoveredT24,T69,T163

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT24,T69,T163
1-CoveredT24

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT24,T69,T163

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT24,T69,T163
11CoveredT24,T69,T163

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T24,T69,T163
0 0 1 Covered T24,T69,T163
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T24,T69,T163
0 0 1 Covered T24,T69,T163
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 84831 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 218 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 84831 0 0
T9 42877 0 0 0
T10 62272 0 0 0
T13 36841 0 0 0
T24 37341 870 0 0
T28 50427 0 0 0
T31 82103 0 0 0
T32 14884 0 0 0
T56 50723 0 0 0
T69 0 305 0 0
T127 54020 0 0 0
T143 53802 0 0 0
T406 0 455 0 0
T407 0 381 0 0
T413 0 597 0 0
T419 0 317 0 0
T420 0 628 0 0
T432 0 804 0 0
T433 0 893 0 0
T434 0 596 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 218 0 0
T9 42877 0 0 0
T10 62272 0 0 0
T13 36841 0 0 0
T24 37341 2 0 0
T28 50427 0 0 0
T31 82103 0 0 0
T32 14884 0 0 0
T56 50723 0 0 0
T69 0 1 0 0
T127 54020 0 0 0
T143 53802 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_2_cdc
Line No.TotalCoveredPercent
TOTAL222090.91
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN155100.00
CONT_ASSIGN156100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T69 T91 T92  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T69 T163 T164  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T69 T163 T164  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T69 T163 T164  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T69 T163 T164  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T69 T163 T164  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T69 T163 T164  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T69 T163 T164  135 1/1 txn_bits_q <= '0; Tests: T69 T163 T164  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 0/1 ==> assign src_qs_o = src_q; 156 0/1 ==> assign dst_wd_o = src_q; 157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T69 T163 T164 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_2_cdc
TotalCoveredPercent
Conditions131184.62
Logical131184.62
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T163,T164

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT69,T163,T164
1-Not Covered

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_2_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_2_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 75954 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 194 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 75954 0 0
T69 287122 312 0 0
T227 276916 0 0 0
T406 0 414 0 0
T407 0 424 0 0
T413 0 677 0 0
T419 0 315 0 0
T420 0 558 0 0
T432 0 861 0 0
T433 0 895 0 0
T434 0 556 0 0
T436 0 759 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 194 0 0
T69 287122 1 0 0
T227 276916 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0
T436 0 2 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_3_cdc
Line No.TotalCoveredPercent
TOTAL222090.91
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN155100.00
CONT_ASSIGN156100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T69 T91 T92  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T69 T163 T164  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T69 T163 T164  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T69 T163 T164  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T69 T163 T164  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T69 T163 T164  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T69 T163 T164  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T69 T163 T164  135 1/1 txn_bits_q <= '0; Tests: T69 T163 T164  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 0/1 ==> assign src_qs_o = src_q; 156 0/1 ==> assign dst_wd_o = src_q; 157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T69 T163 T164 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_3_cdc
TotalCoveredPercent
Conditions131184.62
Logical131184.62
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T93,T445

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT69,T163,T164
1-Not Covered

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_3_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_3_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 89143 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 228 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 89143 0 0
T69 287122 273 0 0
T227 276916 0 0 0
T406 0 419 0 0
T407 0 425 0 0
T413 0 568 0 0
T419 0 319 0 0
T420 0 612 0 0
T432 0 745 0 0
T433 0 803 0 0
T434 0 631 0 0
T436 0 704 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 228 0 0
T69 287122 1 0 0
T227 276916 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0
T436 0 2 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_4_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T26 T69 T91  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T26 T69 T163  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T26 T69 T163  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T26 T69 T163  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T26 T69 T163  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T26 T69 T163  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T26 T69 T163  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T26 T69 T163  135 1/1 txn_bits_q <= '0; Tests: T26 T69 T163  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T26  156 1/1 assign dst_wd_o = src_q; Tests: T26  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T26 T69 T163 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_4_cdc
TotalCoveredPercent
Conditions131292.31
Logical131292.31
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT26,T69,T163

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT26,T69,T163
11CoveredT26,T69,T163

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT26,T69,T163
1-CoveredT26

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT26,T69,T163

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT26,T69,T163
11CoveredT26,T69,T163

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_4_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T26,T69,T163
0 0 1 Covered T26,T69,T163
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T26,T69,T163
0 0 1 Covered T26,T69,T163
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_4_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 88732 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 224 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 88732 0 0
T20 29495 0 0 0
T26 28613 1076 0 0
T69 0 283 0 0
T77 25211 0 0 0
T372 50329 0 0 0
T406 0 481 0 0
T407 0 386 0 0
T413 0 656 0 0
T419 0 260 0 0
T420 0 582 0 0
T432 0 797 0 0
T433 0 864 0 0
T434 0 668 0 0
T446 92710 0 0 0
T447 61788 0 0 0
T448 66689 0 0 0
T449 251090 0 0 0
T450 165748 0 0 0
T451 59363 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 224 0 0
T20 29495 0 0 0
T26 28613 2 0 0
T69 0 1 0 0
T77 25211 0 0 0
T372 50329 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0
T446 92710 0 0 0
T447 61788 0 0 0
T448 66689 0 0 0
T449 251090 0 0 0
T450 165748 0 0 0
T451 59363 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T71 T72 T73  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T71 T72 T73  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T71 T72 T73  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T71 T72 T73  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T71 T72 T73  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T71 T72 T73  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T71 T72 T73  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T71 T72 T73  135 1/1 txn_bits_q <= '0; Tests: T71 T72 T73  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T71 T72 T73  156 1/1 assign dst_wd_o = src_q; Tests: T71 T72 T73  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T71 T72 T73 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc
TotalCoveredPercent
Conditions131292.31
Logical131292.31
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT71,T72,T73

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT71,T72,T73
11CoveredT71,T72,T73

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT71,T72,T73
1-CoveredT71,T72,T73

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT71,T72,T73

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT71,T72,T73
11CoveredT71,T72,T73

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T71,T72,T73
0 0 1 Covered T71,T72,T73
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T71,T72,T73
0 0 1 Covered T71,T72,T73
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 94085 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 244 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 94085 0 0
T69 0 341 0 0
T71 46565 623 0 0
T72 0 638 0 0
T73 0 1450 0 0
T85 29856 0 0 0
T118 0 743 0 0
T122 0 1418 0 0
T192 49389 0 0 0
T202 19182 0 0 0
T203 20687 0 0 0
T324 18322 0 0 0
T325 39810 0 0 0
T450 0 876 0 0
T452 0 740 0 0
T453 0 749 0 0
T454 0 1420 0 0
T455 54225 0 0 0
T456 47603 0 0 0
T457 53796 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 244 0 0
T69 0 1 0 0
T71 46565 2 0 0
T72 0 2 0 0
T73 0 4 0 0
T85 29856 0 0 0
T118 0 2 0 0
T122 0 4 0 0
T192 49389 0 0 0
T202 19182 0 0 0
T203 20687 0 0 0
T324 18322 0 0 0
T325 39810 0 0 0
T450 0 2 0 0
T452 0 2 0 0
T453 0 2 0 0
T454 0 4 0 0
T455 54225 0 0 0
T456 47603 0 0 0
T457 53796 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_6_cdc
Line No.TotalCoveredPercent
TOTAL222090.91
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN155100.00
CONT_ASSIGN156100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T69 T91 T92  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T69 T163 T164  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T69 T163 T164  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T69 T163 T164  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T69 T163 T164  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T69 T163 T164  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T69 T163 T164  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T69 T163 T164  135 1/1 txn_bits_q <= '0; Tests: T69 T163 T164  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 0/1 ==> assign src_qs_o = src_q; 156 0/1 ==> assign dst_wd_o = src_q; 157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T69 T163 T164 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_6_cdc
TotalCoveredPercent
Conditions131184.62
Logical131184.62
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T163,T164

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT69,T163,T164
1-Not Covered

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_6_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_6_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 89090 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 229 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 89090 0 0
T69 287122 361 0 0
T227 276916 0 0 0
T406 0 429 0 0
T407 0 475 0 0
T413 0 525 0 0
T419 0 303 0 0
T420 0 693 0 0
T432 0 904 0 0
T433 0 751 0 0
T434 0 698 0 0
T436 0 643 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 229 0 0
T69 287122 1 0 0
T227 276916 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0
T436 0 2 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T25 T69 T91  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T25 T69 T163  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T25 T69 T163  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T25 T69 T163  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T25 T69 T163  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T25 T69 T163  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T25 T69 T163  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T25 T69 T163  135 1/1 txn_bits_q <= '0; Tests: T25 T69 T163  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T25  156 1/1 assign dst_wd_o = src_q; Tests: T25  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T25 T69 T163 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_cdc
TotalCoveredPercent
Conditions131292.31
Logical131292.31
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT25,T69,T458

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT25,T69,T163
11CoveredT25,T69,T163

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT25,T69,T163
1-CoveredT25

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT25,T69,T163

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT25,T69,T163
11CoveredT25,T69,T163

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T25,T69,T163
0 0 1 Covered T25,T69,T163
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T25,T69,T163
0 0 1 Covered T25,T69,T163
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 90622 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 229 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 90622 0 0
T25 26393 999 0 0
T39 24731 0 0 0
T45 23115 0 0 0
T49 30909 0 0 0
T60 50929 0 0 0
T69 0 360 0 0
T78 38117 0 0 0
T336 57960 0 0 0
T343 67691 0 0 0
T406 0 471 0 0
T407 0 395 0 0
T413 0 672 0 0
T419 0 327 0 0
T420 0 547 0 0
T432 0 814 0 0
T433 0 877 0 0
T434 0 569 0 0
T459 330361 0 0 0
T460 325818 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 229 0 0
T25 26393 2 0 0
T39 24731 0 0 0
T45 23115 0 0 0
T49 30909 0 0 0
T60 50929 0 0 0
T69 0 1 0 0
T78 38117 0 0 0
T336 57960 0 0 0
T343 67691 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0
T459 330361 0 0 0
T460 325818 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_0_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T5 T27 T70  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T5 T27 T70  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T5 T27 T70  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T5 T27 T70  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T5 T27 T70  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T5 T27 T70  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T5 T27 T70  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T5 T27 T70  135 1/1 txn_bits_q <= '0; Tests: T5 T27 T70  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T5 T78 T79  156 1/1 assign dst_wd_o = src_q; Tests: T5 T78 T79  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T5 T27 T70 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_0_cdc
TotalCoveredPercent
Conditions111090.91
Logical111090.91
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT5,T27,T70

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT5,T27,T70
11CoveredT5,T27,T70

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT5,T27,T70

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT5,T27,T70
11CoveredT5,T27,T70

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_0_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T5,T27,T70
0 0 1 Covered T5,T27,T70
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T5,T27,T70
0 0 1 Covered T5,T27,T70
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_0_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 93708 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 240 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 93708 0 0
T5 29901 671 0 0
T6 22779 0 0 0
T7 25717 0 0 0
T8 26775 0 0 0
T27 0 335 0 0
T29 22796 0 0 0
T37 36755 0 0 0
T65 21823 0 0 0
T66 53867 0 0 0
T69 0 348 0 0
T70 0 270 0 0
T77 0 311 0 0
T78 0 890 0 0
T79 0 726 0 0
T119 18905 0 0 0
T120 23943 0 0 0
T406 0 453 0 0
T407 0 457 0 0
T432 0 852 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 240 0 0
T5 29901 2 0 0
T6 22779 0 0 0
T7 25717 0 0 0
T8 26775 0 0 0
T27 0 1 0 0
T29 22796 0 0 0
T37 36755 0 0 0
T65 21823 0 0 0
T66 53867 0 0 0
T69 0 1 0 0
T70 0 1 0 0
T77 0 1 0 0
T78 0 2 0 0
T79 0 2 0 0
T119 18905 0 0 0
T120 23943 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T432 0 2 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_1_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T24 T69 T91  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T24 T69 T163  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T24 T69 T163  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T24 T69 T163  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T24 T69 T163  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T24 T69 T163  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T24 T69 T163  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T24 T69 T163  135 1/1 txn_bits_q <= '0; Tests: T24 T69 T163  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T69 T163 T164  156 1/1 assign dst_wd_o = src_q; Tests: T69 T163 T164  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T24 T69 T163 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_1_cdc
TotalCoveredPercent
Conditions111090.91
Logical111090.91
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT24,T69,T163

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT24,T69,T163
11CoveredT24,T69,T163

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT24,T69,T163

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT24,T69,T163
11CoveredT24,T69,T163

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_1_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T24,T69,T163
0 0 1 Covered T24,T69,T163
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T24,T69,T163
0 0 1 Covered T24,T69,T163
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_1_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 76257 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 197 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 76257 0 0
T9 42877 0 0 0
T10 62272 0 0 0
T13 36841 0 0 0
T24 37341 328 0 0
T28 50427 0 0 0
T31 82103 0 0 0
T32 14884 0 0 0
T56 50723 0 0 0
T69 0 356 0 0
T127 54020 0 0 0
T143 53802 0 0 0
T406 0 365 0 0
T407 0 375 0 0
T413 0 616 0 0
T419 0 257 0 0
T420 0 560 0 0
T432 0 919 0 0
T433 0 871 0 0
T434 0 612 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 197 0 0
T9 42877 0 0 0
T10 62272 0 0 0
T13 36841 0 0 0
T24 37341 1 0 0
T28 50427 0 0 0
T31 82103 0 0 0
T32 14884 0 0 0
T56 50723 0 0 0
T69 0 1 0 0
T127 54020 0 0 0
T143 53802 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_2_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T69 T91 T92  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T69 T163 T164  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T69 T163 T164  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T69 T163 T164  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T69 T163 T164  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T69 T163 T164  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T69 T163 T164  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T69 T163 T164  135 1/1 txn_bits_q <= '0; Tests: T69 T163 T164  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T69 T163 T164  156 1/1 assign dst_wd_o = src_q; Tests: T69 T163 T164  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T69 T163 T164 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_2_cdc
TotalCoveredPercent
Conditions111090.91
Logical111090.91
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T163,T164

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_2_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_2_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 85238 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 219 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 85238 0 0
T69 287122 257 0 0
T227 276916 0 0 0
T406 0 378 0 0
T407 0 431 0 0
T413 0 545 0 0
T419 0 247 0 0
T420 0 624 0 0
T432 0 931 0 0
T433 0 868 0 0
T434 0 664 0 0
T436 0 682 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 219 0 0
T69 287122 1 0 0
T227 276916 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0
T436 0 2 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_3_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T69 T91 T92  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T69 T163 T164  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T69 T163 T164  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T69 T163 T164  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T69 T163 T164  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T69 T163 T164  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T69 T163 T164  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T69 T163 T164  135 1/1 txn_bits_q <= '0; Tests: T69 T163 T164  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T69 T163 T164  156 1/1 assign dst_wd_o = src_q; Tests: T69 T163 T164  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T69 T163 T164 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_3_cdc
TotalCoveredPercent
Conditions111090.91
Logical111090.91
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T163,T164

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_3_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_3_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 84061 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 214 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 84061 0 0
T69 287122 307 0 0
T227 276916 0 0 0
T406 0 474 0 0
T407 0 411 0 0
T413 0 683 0 0
T419 0 343 0 0
T420 0 605 0 0
T432 0 839 0 0
T433 0 790 0 0
T434 0 568 0 0
T436 0 682 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 214 0 0
T69 287122 1 0 0
T227 276916 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0
T436 0 2 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_4_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T26 T69 T91  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T26 T69 T163  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T26 T69 T163  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T26 T69 T163  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T26 T69 T163  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T26 T69 T163  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T26 T69 T163  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T26 T69 T163  135 1/1 txn_bits_q <= '0; Tests: T26 T69 T163  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T26 T69 T163  156 1/1 assign dst_wd_o = src_q; Tests: T26 T69 T163  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T26 T69 T163 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_4_cdc
TotalCoveredPercent
Conditions111090.91
Logical111090.91
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT26,T69,T163

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT26,T69,T163
11CoveredT26,T69,T163

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT26,T69,T163

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT26,T69,T163
11CoveredT26,T69,T163

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_4_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T26,T69,T163
0 0 1 Covered T26,T69,T163
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T26,T69,T163
0 0 1 Covered T26,T69,T163
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_4_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 88457 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 227 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 88457 0 0
T20 29495 0 0 0
T26 28613 412 0 0
T69 0 250 0 0
T77 25211 0 0 0
T372 50329 0 0 0
T406 0 389 0 0
T407 0 440 0 0
T413 0 602 0 0
T419 0 322 0 0
T420 0 535 0 0
T432 0 780 0 0
T433 0 881 0 0
T434 0 575 0 0
T446 92710 0 0 0
T447 61788 0 0 0
T448 66689 0 0 0
T449 251090 0 0 0
T450 165748 0 0 0
T451 59363 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 227 0 0
T20 29495 0 0 0
T26 28613 1 0 0
T69 0 1 0 0
T77 25211 0 0 0
T372 50329 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0
T446 92710 0 0 0
T447 61788 0 0 0
T448 66689 0 0 0
T449 251090 0 0 0
T450 165748 0 0 0
T451 59363 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_5_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T71 T72 T73  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T71 T72 T73  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T71 T72 T73  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T71 T72 T73  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T71 T72 T73  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T71 T72 T73  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T71 T72 T73  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T71 T72 T73  135 1/1 txn_bits_q <= '0; Tests: T71 T72 T73  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T69 T163 T164  156 1/1 assign dst_wd_o = src_q; Tests: T69 T163 T164  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T71 T72 T73 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_5_cdc
TotalCoveredPercent
Conditions111090.91
Logical111090.91
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT71,T72,T73

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT71,T72,T73
11CoveredT71,T72,T73

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT71,T72,T73

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT71,T72,T73
11CoveredT71,T72,T73

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_5_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T71,T72,T73
0 0 1 Covered T71,T72,T73
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T71,T72,T73
0 0 1 Covered T71,T72,T73
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_5_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 101295 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 262 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 101295 0 0
T69 0 268 0 0
T71 46565 247 0 0
T72 0 262 0 0
T73 0 580 0 0
T85 29856 0 0 0
T118 0 248 0 0
T122 0 667 0 0
T192 49389 0 0 0
T202 19182 0 0 0
T203 20687 0 0 0
T324 18322 0 0 0
T325 39810 0 0 0
T450 0 380 0 0
T452 0 244 0 0
T453 0 375 0 0
T454 0 550 0 0
T455 54225 0 0 0
T456 47603 0 0 0
T457 53796 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 262 0 0
T69 0 1 0 0
T71 46565 1 0 0
T72 0 1 0 0
T73 0 2 0 0
T85 29856 0 0 0
T118 0 1 0 0
T122 0 2 0 0
T192 49389 0 0 0
T202 19182 0 0 0
T203 20687 0 0 0
T324 18322 0 0 0
T325 39810 0 0 0
T450 0 1 0 0
T452 0 1 0 0
T453 0 1 0 0
T454 0 2 0 0
T455 54225 0 0 0
T456 47603 0 0 0
T457 53796 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_6_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T69 T91 T92  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T69 T163 T164  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T69 T163 T164  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T69 T163 T164  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T69 T163 T164  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T69 T163 T164  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T69 T163 T164  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T69 T163 T164  135 1/1 txn_bits_q <= '0; Tests: T69 T163 T164  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T69 T163 T164  156 1/1 assign dst_wd_o = src_q; Tests: T69 T163 T164  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T69 T163 T164 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_6_cdc
TotalCoveredPercent
Conditions111090.91
Logical111090.91
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T163,T164

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_6_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_6_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 92882 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 237 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 92882 0 0
T69 287122 316 0 0
T227 276916 0 0 0
T406 0 371 0 0
T407 0 379 0 0
T413 0 502 0 0
T419 0 251 0 0
T420 0 575 0 0
T432 0 816 0 0
T433 0 929 0 0
T434 0 594 0 0
T436 0 726 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 237 0 0
T69 287122 1 0 0
T227 276916 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0
T436 0 2 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_7_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T25 T69 T91  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T25 T69 T163  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T25 T69 T163  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T25 T69 T163  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T25 T69 T163  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T25 T69 T163  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T25 T69 T163  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T25 T69 T163  135 1/1 txn_bits_q <= '0; Tests: T25 T69 T163  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T69 T163 T406  156 1/1 assign dst_wd_o = src_q; Tests: T69 T163 T406  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T25 T69 T163 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_7_cdc
TotalCoveredPercent
Conditions111090.91
Logical111090.91
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT25,T69,T163

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT25,T69,T163
11CoveredT25,T69,T163

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT25,T69,T163

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT25,T69,T163
11CoveredT25,T69,T163

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_7_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T25,T69,T163
0 0 1 Covered T25,T69,T163
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T25,T69,T163
0 0 1 Covered T25,T69,T163
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_7_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 94602 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 243 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 94602 0 0
T25 26393 456 0 0
T39 24731 0 0 0
T45 23115 0 0 0
T49 30909 0 0 0
T60 50929 0 0 0
T69 0 318 0 0
T78 38117 0 0 0
T336 57960 0 0 0
T343 67691 0 0 0
T406 0 397 0 0
T407 0 426 0 0
T413 0 570 0 0
T419 0 328 0 0
T420 0 498 0 0
T432 0 764 0 0
T433 0 923 0 0
T434 0 652 0 0
T459 330361 0 0 0
T460 325818 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 243 0 0
T25 26393 1 0 0
T39 24731 0 0 0
T45 23115 0 0 0
T49 30909 0 0 0
T60 50929 0 0 0
T69 0 1 0 0
T78 38117 0 0 0
T336 57960 0 0 0
T343 67691 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0
T459 330361 0 0 0
T460 325818 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_0_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T69 T91 T92  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T69 T163 T164  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T69 T163 T164  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T69 T163 T164  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T69 T163 T164  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T69 T163 T164  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T69 T163 T164  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T69 T163 T164  135 1/1 txn_bits_q <= '0; Tests: T69 T163 T164  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T69 T163 T164  156 1/1 assign dst_wd_o = src_q; Tests: T69 T163 T164  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T69 T163 T164 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_0_cdc
TotalCoveredPercent
Conditions111090.91
Logical111090.91
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T163,T461

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT69,T163,T164
11CoveredT69,T163,T164

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_0_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T69,T163,T164
0 0 1 Covered T69,T163,T164
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_0_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 103218 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 262 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 103218 0 0
T69 287122 299 0 0
T227 276916 0 0 0
T406 0 395 0 0
T407 0 369 0 0
T413 0 537 0 0
T419 0 355 0 0
T420 0 543 0 0
T432 0 846 0 0
T433 0 936 0 0
T434 0 634 0 0
T436 0 644 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 262 0 0
T69 287122 1 0 0
T227 276916 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0
T436 0 2 0 0
T437 22326 0 0 0
T438 23192 0 0 0
T439 21624 0 0 0
T440 434407 0 0 0
T441 26259 0 0 0
T442 267173 0 0 0
T443 23857 0 0 0
T444 41767 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_1_cdc
Line No.TotalCoveredPercent
TOTAL2222100.00
CONT_ASSIGN6511100.00
ALWAYS7166100.00
CONT_ASSIGN8511100.00
CONT_ASSIGN10911100.00
ALWAYS11599100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15611100.00
CONT_ASSIGN20011100.00

64 65 1/1 assign src_req = src_we_i | src_re_i; Tests: T85 T121 T408  66 67 // busy indication back-pressures upstream if the register is accessed 68 // again. The busy indication is also used as a "commit" indication for 69 // resolving software and hardware write conflicts 70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 71 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  72 1/1 src_busy_q <= '0; Tests: T1 T2 T3  73 1/1 end else if (src_req) begin Tests: T1 T2 T3  74 1/1 src_busy_q <= 1'b1; Tests: T85 T121 T408  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T85 T121 T69  77 end MISSING_ELSE 78 end 79 80 // A src_ack should only be sent if there was a src_req. 81 // src_busy_q asserts whenever there is a src_req. By association, 82 // whenever src_ack is seen, then src_busy must be high. 83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni) 84 85 1/1 assign src_busy_o = src_busy_q; Tests: T85 T121 T408  86 87 // src_q acts as both the write holding register and the software read back 88 // register. 89 // When software performs a write, the write data is captured in src_q for 90 // CDC purposes. When not performing a write, the src_q reflects the most recent 91 // hardware value. For registers with no hardware access, this is simply the 92 // the value programmed by software (or in the case R1C, W1C etc) the value after 93 // the operation. For registers with hardware access, this reflects a potentially 94 // delayed version of the real value, as the software facing updates lag real 95 // time updates. 96 // 97 // To resolve software and hardware conflicts, the process is as follows: 98 // When software issues a write, this module asserts "busy". While busy, 99 // src_q does not take on destination value updates. Since the 100 // logic has committed to updating based on software command, there is an irreversible 101 // window from which hardware writes are ignored. Once the busy window completes, 102 // the cdc portion then begins sampling once more. 103 // 104 // This is consistent with prim_subreg_arb where during software / hardware conflicts, 105 // software is always prioritized. The main difference is the conflict resolution window 106 // is now larger instead of just one destination clock cycle. 107 108 logic busy; 109 1/1 assign busy = src_busy_q & !src_ack; Tests: T85 T121 T408  110 111 // This is the current destination value 112 logic [DataWidth-1:0] dst_qs; 113 logic src_update; 114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin 115 1/1 if (!rst_src_ni) begin Tests: T1 T2 T3  116 1/1 src_q <= ResetVal; Tests: T1 T2 T3  117 1/1 txn_bits_q <= '0; Tests: T1 T2 T3  118 1/1 end else if (src_req) begin Tests: T1 T2 T3  119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 1/1 src_q <= src_wd_i & BitMask; Tests: T85 T121 T408  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T85 T121 T408  125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin Tests: T1 T2 T3  126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 1/1 src_q <= dst_qs; Tests: T85 T121 T69  135 1/1 txn_bits_q <= '0; Tests: T85 T121 T69  136 end MISSING_ELSE 137 end 138 139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses 140 // (decoded from address) is busy. So this creates a situation in the current design where 141 // src_req_i and busy can never be high at the same time. 142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes 143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that 144 // condition cannot be met. 145 // Thus we add an assertion here to ensure the condition is always satisfied. 146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni) 147 148 // reserved bits are not used 149 logic unused_wd; 150 1/1 assign unused_wd = ^src_wd_i; Tests: T1 T2 T3  151 152 // src_q is always updated in the clk_src domain. 153 // when performing an update to the destination domain, it is guaranteed 154 // to not change by protocol. 155 1/1 assign src_qs_o = src_q; Tests: T85 T121 T408  156 1/1 assign dst_wd_o = src_q; Tests: T85 T121 T408  157 158 //////////////////////////// 159 // CDC handling 160 //////////////////////////// 161 162 logic dst_req_from_src; 163 logic dst_req; 164 165 166 // the software transaction is pulse synced across the domain. 167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates. 168 prim_pulse_sync u_src_to_dst_req ( 169 .clk_src_i, 170 .rst_src_ni, 171 .clk_dst_i, 172 .rst_dst_ni, 173 .src_pulse_i(src_req), 174 .dst_pulse_o(dst_req_from_src) 175 ); 176 177 prim_reg_cdc_arb #( 178 .DataWidth(DataWidth), 179 .ResetVal(ResetVal), 180 .DstWrReq(DstWrReq) 181 ) u_arb ( 182 .clk_src_i, 183 .rst_src_ni, 184 .clk_dst_i, 185 .rst_dst_ni, 186 .src_ack_o(src_ack), 187 .src_update_o(src_update), 188 .dst_req_i(dst_req_from_src), 189 .dst_req_o(dst_req), 190 .dst_update_i, 191 .dst_ds_i, 192 .dst_qs_i, 193 .dst_qs_o(dst_qs) 194 ); 195 196 197 // Each is valid only when destination request pulse is high; this is important in not propagating 198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is 199 // reset. 200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}}; Tests: T85 T121 T408 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_1_cdc
TotalCoveredPercent
Conditions111090.91
Logical111090.91
Non-Logical00
Event00

 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT85,T121,T408

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT85,T121,T69
11CoveredT85,T121,T408

 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01Unreachable
10CoveredT85,T121,T69

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT85,T121,T408
11CoveredT85,T121,T69

 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
-1--2-StatusTests
01CoveredT1,T2,T3
10Unreachable
11Unreachable

Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_1_cdc
Line No.TotalCoveredPercent
Branches 8 8 100.00
IF 71 4 4 100.00
IF 115 4 4 100.00


71 if (!rst_src_ni) begin -1- 72 src_busy_q <= '0; ==> 73 end else if (src_req) begin -2- 74 src_busy_q <= 1'b1; ==> 75 end else if (src_ack) begin -3- 76 src_busy_q <= 1'b0; ==> 77 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T85,T121,T408
0 0 1 Covered T85,T121,T69
0 0 0 Covered T1,T2,T3


115 if (!rst_src_ni) begin -1- 116 src_q <= ResetVal; ==> 117 txn_bits_q <= '0; 118 end else if (src_req) begin -2- 119 // See assertion below 120 // At the beginning of a software initiated transaction, the following 121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot 122 // change for the duration of the synchronization operation. 123 src_q <= src_wd_i & BitMask; ==> 124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; 125 end else if (src_busy_q && src_ack || src_update && !busy) begin -3- 126 // sample data whenever a busy transaction finishes OR 127 // when an update pulse is seen. 128 // TODO: We should add a cover group to test different sync timings 129 // between src_ack and src_update. ie. there can be 3 scenarios: 130 // 1. update one cycle before ack 131 // 2. ack one cycle before update 132 // 3. update / ack on the same cycle 133 // During all 3 cases the read data should be correct 134 src_q <= dst_qs; ==> 135 txn_bits_q <= '0; 136 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T85,T121,T408
0 0 1 Covered T85,T121,T69
0 0 0 Covered T1,T2,T3


Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_1_cdc
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
BusySrcReqChk_A 152001107 85108 0 0
DstReqKnown_A 1782168 1557773 0 0
SrcAckBusyChk_A 152001107 217 0 0
SrcBusyKnown_A 152001107 151197511 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 85108 0 0
T15 277042 0 0 0
T69 0 275 0 0
T85 29856 402 0 0
T86 52053 0 0 0
T121 0 272 0 0
T141 138324 0 0 0
T159 42237 0 0 0
T190 303240 0 0 0
T203 20687 0 0 0
T239 140196 0 0 0
T324 18322 0 0 0
T325 39810 0 0 0
T406 0 434 0 0
T407 0 381 0 0
T408 0 362 0 0
T419 0 346 0 0
T420 0 641 0 0
T432 0 832 0 0
T433 0 792 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1782168 1557773 0 0
T1 409 235 0 0
T2 483 311 0 0
T3 628 454 0 0
T4 394 222 0 0
T5 469 298 0 0
T6 383 209 0 0
T8 542 369 0 0
T65 428 254 0 0
T103 352 179 0 0
T104 370 197 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 217 0 0
T15 277042 0 0 0
T69 0 1 0 0
T85 29856 1 0 0
T86 52053 0 0 0
T121 0 1 0 0
T141 138324 0 0 0
T159 42237 0 0 0
T190 303240 0 0 0
T203 20687 0 0 0
T239 140196 0 0 0
T324 18322 0 0 0
T325 39810 0 0 0
T406 0 1 0 0
T407 0 1 0 0
T413 0 2 0 0
T419 0 1 0 0
T420 0 2 0 0
T432 0 2 0 0
T433 0 2 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 152001107 151197511 0 0
T1 10816 10498 0 0
T2 27516 27060 0 0
T3 48005 47484 0 0
T4 20143 19641 0 0
T5 29901 29440 0 0
T6 22779 22089 0 0
T8 26775 26501 0 0
T65 21823 21369 0 0
T103 18569 17989 0 0
T104 15153 14735 0 0

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