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.24 99.72 97.23 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
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.24 99.72 97.23 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_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.24 99.72 97.23 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.24 99.72 97.23 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.24 99.72 97.23 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.24 99.72 97.23 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.24 99.72 97.23 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
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.24 99.72 97.23 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_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.24 99.72 97.23 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.24 99.72 97.23 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.24 99.72 97.23 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.24 99.72 97.23 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.24 99.72 97.23 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.24 99.72 97.23 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.24 99.72 97.23 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.24 99.72 97.23 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.24 99.72 97.23 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.24 99.72 97.23 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: T6 T26 T53  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: T6 T26 T53  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T6 T26 T53  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: T6 T26 T53  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: T6 T26 T53  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: T6 T26 T53  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T6 T26 T53  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: T6 T26 T53  135 1/1 txn_bits_q <= '0; Tests: T6 T26 T53  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: T6 T26 T53  156 1/1 assign dst_wd_o = src_q; Tests: T6 T26 T53  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: T6 T26 T53 

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
10CoveredT6,T26,T53

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT6,T26,T53
11CoveredT6,T26,T53

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT6,T26,T53
1-CoveredT6,T26,T53

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT6,T26,T53
11CoveredT6,T26,T53

 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 T6,T26,T53
0 0 1 Covered T6,T26,T53
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 T6,T26,T53
0 0 1 Covered T6,T26,T53
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 134674239 79358 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 206 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 79358 0 0
T6 43797 641 0 0
T26 38278 1800 0 0
T27 0 2003 0 0
T28 49683 0 0 0
T53 0 709 0 0
T59 15016 0 0 0
T60 15073 0 0 0
T63 23264 0 0 0
T70 0 812 0 0
T71 0 1907 0 0
T72 20508 0 0 0
T73 61337 0 0 0
T118 23961 0 0 0
T184 10243 0 0 0
T398 0 410 0 0
T399 0 291 0 0
T400 0 265 0 0
T403 0 242 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 206 0 0
T6 43797 2 0 0
T26 38278 4 0 0
T27 0 4 0 0
T28 49683 0 0 0
T53 0 2 0 0
T59 15016 0 0 0
T60 15073 0 0 0
T63 23264 0 0 0
T70 0 2 0 0
T71 0 5 0 0
T72 20508 0 0 0
T73 61337 0 0 0
T118 23961 0 0 0
T184 10243 0 0 0
T398 0 1 0 0
T399 0 1 0 0
T400 0 1 0 0
T403 0 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_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: T84 T85 T86  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: T163 T167 T83  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T163 T167 T83  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: T163 T167 T83  135 1/1 txn_bits_q <= '0; Tests: T163 T167 T83  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: T163 T167 T83 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_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
10CoveredT430,T431,T163

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT163,T167,T83
1-Not Covered

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 134674239 84826 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 218 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 84826 0 0
T398 53318 365 0 0
T399 66592 265 0 0
T400 44385 287 0 0
T403 67912 341 0 0
T424 87763 868 0 0
T425 70214 397 0 0
T426 86301 748 0 0
T427 46021 287 0 0
T428 58868 304 0 0
T429 52480 450 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 218 0 0
T398 53318 1 0 0
T399 66592 1 0 0
T400 44385 1 0 0
T403 67912 1 0 0
T424 87763 2 0 0
T425 70214 1 0 0
T426 86301 2 0 0
T427 46021 1 0 0
T428 58868 1 0 0
T429 52480 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T84 T85 T86  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: T163 T167 T83  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T163 T167 T83  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: T163 T167 T83  135 1/1 txn_bits_q <= '0; Tests: T163 T167 T83  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: T163 T167 T83 

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
10CoveredT163,T167,T83

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT163,T167,T83
1-Not Covered

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 134674239 71352 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 185 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 71352 0 0
T398 53318 383 0 0
T399 66592 322 0 0
T400 44385 289 0 0
T403 67912 313 0 0
T424 87763 762 0 0
T425 70214 481 0 0
T426 86301 805 0 0
T427 46021 307 0 0
T428 58868 271 0 0
T429 52480 442 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 185 0 0
T398 53318 1 0 0
T399 66592 1 0 0
T400 44385 1 0 0
T403 67912 1 0 0
T424 87763 2 0 0
T425 70214 1 0 0
T426 86301 2 0 0
T427 46021 1 0 0
T428 58868 1 0 0
T429 52480 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T84 T85 T86  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: T163 T167 T83  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T163 T167 T83  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: T163 T167 T83  135 1/1 txn_bits_q <= '0; Tests: T163 T167 T83  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: T163 T167 T83 

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
10CoveredT163,T432,T167

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT163,T167,T83
1-Not Covered

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 134674239 79097 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 206 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 79097 0 0
T398 53318 446 0 0
T399 66592 320 0 0
T400 44385 304 0 0
T403 67912 359 0 0
T424 87763 836 0 0
T425 70214 480 0 0
T426 86301 669 0 0
T427 46021 299 0 0
T428 58868 315 0 0
T429 52480 415 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 206 0 0
T398 53318 1 0 0
T399 66592 1 0 0
T400 44385 1 0 0
T403 67912 1 0 0
T424 87763 2 0 0
T425 70214 1 0 0
T426 86301 2 0 0
T427 46021 1 0 0
T428 58868 1 0 0
T429 52480 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T4 T64 T84  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: T4 T64 T163  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T4 T64 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: T4 T64 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: T4 T64 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: T4 T64 T163  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T4 T64 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: T4 T64 T163  135 1/1 txn_bits_q <= '0; Tests: T4 T64 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: T4 T64  156 1/1 assign dst_wd_o = src_q; Tests: T4 T64  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: T4 T64 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
10CoveredT4,T64,T163

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

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT4,T64,T163
1-CoveredT4,T64

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT4,T64,T163
11CoveredT4,T64,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 T4,T64,T163
0 0 1 Covered T4,T64,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 T4,T64,T163
0 0 1 Covered T4,T64,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 134674239 60957 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 161 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 60957 0 0
T4 22449 1116 0 0
T5 24138 0 0 0
T6 43797 0 0 0
T26 38278 0 0 0
T28 49683 0 0 0
T59 15016 0 0 0
T60 15073 0 0 0
T63 23264 0 0 0
T64 0 875 0 0
T101 23528 0 0 0
T118 23961 0 0 0
T398 0 409 0 0
T399 0 276 0 0
T400 0 257 0 0
T403 0 290 0 0
T424 0 855 0 0
T425 0 415 0 0
T426 0 643 0 0
T427 0 264 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 161 0 0
T4 22449 2 0 0
T5 24138 0 0 0
T6 43797 0 0 0
T26 38278 0 0 0
T28 49683 0 0 0
T59 15016 0 0 0
T60 15073 0 0 0
T63 23264 0 0 0
T64 0 2 0 0
T101 23528 0 0 0
T118 23961 0 0 0
T398 0 1 0 0
T399 0 1 0 0
T400 0 1 0 0
T403 0 1 0 0
T424 0 2 0 0
T425 0 1 0 0
T426 0 2 0 0
T427 0 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T65 T66 T67  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: T65 T66 T67  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T65 T66 T67  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: T65 T66 T67  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: T65 T66 T67  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: T65 T66 T67  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T65 T66 T67  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: T65 T66 T67  135 1/1 txn_bits_q <= '0; Tests: T65 T66 T67  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: T65 T66 T67  156 1/1 assign dst_wd_o = src_q; Tests: T65 T66 T67  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: T65 T66 T67 

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
10CoveredT65,T66,T67

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT65,T66,T67
11CoveredT65,T66,T67

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT65,T66,T67
1-CoveredT65,T66,T67

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT65,T66,T67
11CoveredT65,T66,T67

 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 T65,T66,T67
0 0 1 Covered T65,T66,T67
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 T65,T66,T67
0 0 1 Covered T65,T66,T67
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 134674239 85057 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 221 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 85057 0 0
T57 0 1096 0 0
T65 48757 738 0 0
T66 0 885 0 0
T67 0 1409 0 0
T80 41596 0 0 0
T117 0 856 0 0
T119 0 1389 0 0
T120 0 1671 0 0
T159 43873 0 0 0
T200 21515 0 0 0
T236 130665 0 0 0
T305 160412 0 0 0
T346 102631 0 0 0
T423 0 739 0 0
T433 0 856 0 0
T434 0 646 0 0
T435 70342 0 0 0
T436 282049 0 0 0
T437 70382 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 221 0 0
T57 0 2 0 0
T65 48757 2 0 0
T66 0 2 0 0
T67 0 4 0 0
T80 41596 0 0 0
T117 0 2 0 0
T119 0 4 0 0
T120 0 4 0 0
T159 43873 0 0 0
T200 21515 0 0 0
T236 130665 0 0 0
T305 160412 0 0 0
T346 102631 0 0 0
T423 0 2 0 0
T433 0 2 0 0
T434 0 2 0 0
T435 70342 0 0 0
T436 282049 0 0 0
T437 70382 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T84 T85 T86  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: T163 T167 T83  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T163 T167 T83  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: T163 T167 T83  135 1/1 txn_bits_q <= '0; Tests: T163 T167 T83  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: T163 T167 T83 

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
10CoveredT163,T432,T167

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT163,T167,T83
1-Not Covered

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 134674239 89265 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 230 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 89265 0 0
T398 53318 455 0 0
T399 66592 339 0 0
T400 44385 312 0 0
T403 67912 333 0 0
T424 87763 767 0 0
T425 70214 464 0 0
T426 86301 672 0 0
T427 46021 244 0 0
T428 58868 264 0 0
T429 52480 429 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 230 0 0
T398 53318 1 0 0
T399 66592 1 0 0
T400 44385 1 0 0
T403 67912 1 0 0
T424 87763 2 0 0
T425 70214 1 0 0
T426 86301 2 0 0
T427 46021 1 0 0
T428 58868 1 0 0
T429 52480 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 0 0

Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_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: T84 T85 T86  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: T163 T167 T83  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T163 T167 T83  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: T163 T167 T83  135 1/1 txn_bits_q <= '0; Tests: T163 T167 T83  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: T163 T167 T83 

Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_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
10CoveredT438,T163,T167

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
-1--2-StatusTests
0-CoveredT163,T167,T83
1-Not Covered

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 134674239 74990 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 197 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 74990 0 0
T398 53318 418 0 0
T399 66592 245 0 0
T400 44385 306 0 0
T403 67912 350 0 0
T424 87763 831 0 0
T425 70214 365 0 0
T426 86301 725 0 0
T427 46021 254 0 0
T428 58868 269 0 0
T429 52480 465 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 197 0 0
T398 53318 1 0 0
T399 66592 1 0 0
T400 44385 1 0 0
T403 67912 1 0 0
T424 87763 2 0 0
T425 70214 1 0 0
T426 86301 2 0 0
T427 46021 1 0 0
T428 58868 1 0 0
T429 52480 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T6 T26 T53  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: T6 T26 T53  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T6 T26 T53  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: T6 T26 T53  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: T6 T26 T53  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: T6 T26 T53  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T6 T26 T53  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: T6 T26 T53  135 1/1 txn_bits_q <= '0; Tests: T6 T26 T53  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 T27 T71  156 1/1 assign dst_wd_o = src_q; Tests: T26 T27 T71  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: T6 T26 T53 

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
10CoveredT6,T26,T53

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT6,T26,T53
11CoveredT6,T26,T53

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT6,T26,T53
11CoveredT6,T26,T53

 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 T6,T26,T53
0 0 1 Covered T6,T26,T53
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 T6,T26,T53
0 0 1 Covered T6,T26,T53
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 134674239 78009 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 205 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 78009 0 0
T6 43797 265 0 0
T26 38278 615 0 0
T27 0 765 0 0
T28 49683 0 0 0
T53 0 334 0 0
T59 15016 0 0 0
T60 15073 0 0 0
T63 23264 0 0 0
T70 0 315 0 0
T71 0 728 0 0
T72 20508 0 0 0
T73 61337 0 0 0
T118 23961 0 0 0
T184 10243 0 0 0
T398 0 414 0 0
T399 0 272 0 0
T400 0 301 0 0
T403 0 334 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 205 0 0
T6 43797 1 0 0
T26 38278 2 0 0
T27 0 2 0 0
T28 49683 0 0 0
T53 0 1 0 0
T59 15016 0 0 0
T60 15073 0 0 0
T63 23264 0 0 0
T70 0 1 0 0
T71 0 2 0 0
T72 20508 0 0 0
T73 61337 0 0 0
T118 23961 0 0 0
T184 10243 0 0 0
T398 0 1 0 0
T399 0 1 0 0
T400 0 1 0 0
T403 0 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T84 T85 T86  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: T163 T167 T83  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T163 T167 T83  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: T163 T167 T83  135 1/1 txn_bits_q <= '0; Tests: T163 T167 T83  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: T163 T167 T83  156 1/1 assign dst_wd_o = src_q; Tests: T163 T167 T83  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: T163 T167 T83 

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
10CoveredT163,T167,T83

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT163,T167,T83
11CoveredT163,T167,T83

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 134674239 77133 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 202 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 77133 0 0
T398 53318 420 0 0
T399 66592 340 0 0
T400 44385 356 0 0
T403 67912 260 0 0
T424 87763 876 0 0
T425 70214 391 0 0
T426 86301 706 0 0
T427 46021 276 0 0
T428 58868 269 0 0
T429 52480 398 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 202 0 0
T398 53318 1 0 0
T399 66592 1 0 0
T400 44385 1 0 0
T403 67912 1 0 0
T424 87763 2 0 0
T425 70214 1 0 0
T426 86301 2 0 0
T427 46021 1 0 0
T428 58868 1 0 0
T429 52480 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T84 T85 T86  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: T163 T167 T83  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T163 T167 T83  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: T163 T167 T83  135 1/1 txn_bits_q <= '0; Tests: T163 T167 T83  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: T163 T167 T83  156 1/1 assign dst_wd_o = src_q; Tests: T163 T167 T83  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: T163 T167 T83 

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
10CoveredT163,T167,T83

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT163,T167,T83
11CoveredT163,T167,T83

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 134674239 87997 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 226 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 87997 0 0
T398 53318 375 0 0
T399 66592 320 0 0
T400 44385 297 0 0
T403 67912 329 0 0
T424 87763 808 0 0
T425 70214 404 0 0
T426 86301 711 0 0
T427 46021 291 0 0
T428 58868 315 0 0
T429 52480 398 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 226 0 0
T398 53318 1 0 0
T399 66592 1 0 0
T400 44385 1 0 0
T403 67912 1 0 0
T424 87763 2 0 0
T425 70214 1 0 0
T426 86301 2 0 0
T427 46021 1 0 0
T428 58868 1 0 0
T429 52480 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T84 T85 T86  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: T163 T167 T83  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T163 T167 T83  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: T163 T167 T83  135 1/1 txn_bits_q <= '0; Tests: T163 T167 T83  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: T163 T167 T83  156 1/1 assign dst_wd_o = src_q; Tests: T163 T167 T83  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: T163 T167 T83 

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
10CoveredT163,T167,T83

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT163,T167,T83
11CoveredT163,T167,T83

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 134674239 88658 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 229 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 88658 0 0
T398 53318 461 0 0
T399 66592 330 0 0
T400 44385 309 0 0
T403 67912 285 0 0
T424 87763 833 0 0
T425 70214 398 0 0
T426 86301 720 0 0
T427 46021 298 0 0
T428 58868 313 0 0
T429 52480 421 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 229 0 0
T398 53318 1 0 0
T399 66592 1 0 0
T400 44385 1 0 0
T403 67912 1 0 0
T424 87763 2 0 0
T425 70214 1 0 0
T426 86301 2 0 0
T427 46021 1 0 0
T428 58868 1 0 0
T429 52480 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T4 T64 T84  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: T4 T64 T163  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T4 T64 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: T4 T64 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: T4 T64 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: T4 T64 T163  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T4 T64 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: T4 T64 T163  135 1/1 txn_bits_q <= '0; Tests: T4 T64 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: T4 T64 T163  156 1/1 assign dst_wd_o = src_q; Tests: T4 T64 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: T4 T64 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
10CoveredT4,T64,T163

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

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT4,T64,T163
11CoveredT4,T64,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 T4,T64,T163
0 0 1 Covered T4,T64,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 T4,T64,T163
0 0 1 Covered T4,T64,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 134674239 78847 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 204 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 78847 0 0
T4 22449 453 0 0
T5 24138 0 0 0
T6 43797 0 0 0
T26 38278 0 0 0
T28 49683 0 0 0
T59 15016 0 0 0
T60 15073 0 0 0
T63 23264 0 0 0
T64 0 332 0 0
T101 23528 0 0 0
T118 23961 0 0 0
T398 0 423 0 0
T399 0 299 0 0
T400 0 337 0 0
T403 0 323 0 0
T424 0 825 0 0
T425 0 365 0 0
T426 0 715 0 0
T427 0 344 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 204 0 0
T4 22449 1 0 0
T5 24138 0 0 0
T6 43797 0 0 0
T26 38278 0 0 0
T28 49683 0 0 0
T59 15016 0 0 0
T60 15073 0 0 0
T63 23264 0 0 0
T64 0 1 0 0
T101 23528 0 0 0
T118 23961 0 0 0
T398 0 1 0 0
T399 0 1 0 0
T400 0 1 0 0
T403 0 1 0 0
T424 0 2 0 0
T425 0 1 0 0
T426 0 2 0 0
T427 0 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T65 T66 T67  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: T65 T66 T67  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T65 T66 T67  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: T65 T66 T67  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: T65 T66 T67  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: T65 T66 T67  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T65 T66 T67  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: T65 T66 T67  135 1/1 txn_bits_q <= '0; Tests: T65 T66 T67  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: T57 T163 T167  156 1/1 assign dst_wd_o = src_q; Tests: T57 T163 T167  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: T65 T66 T67 

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
10CoveredT65,T66,T67

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT65,T66,T67
11CoveredT65,T66,T67

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT65,T66,T67
11CoveredT65,T66,T67

 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 T65,T66,T67
0 0 1 Covered T65,T66,T67
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 T65,T66,T67
0 0 1 Covered T65,T66,T67
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 134674239 78433 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 205 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 78433 0 0
T57 0 434 0 0
T65 48757 361 0 0
T66 0 389 0 0
T67 0 541 0 0
T80 41596 0 0 0
T117 0 480 0 0
T119 0 641 0 0
T120 0 803 0 0
T159 43873 0 0 0
T200 21515 0 0 0
T236 130665 0 0 0
T305 160412 0 0 0
T346 102631 0 0 0
T423 0 242 0 0
T433 0 480 0 0
T434 0 271 0 0
T435 70342 0 0 0
T436 282049 0 0 0
T437 70382 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 205 0 0
T57 0 1 0 0
T65 48757 1 0 0
T66 0 1 0 0
T67 0 2 0 0
T80 41596 0 0 0
T117 0 1 0 0
T119 0 2 0 0
T120 0 2 0 0
T159 43873 0 0 0
T200 21515 0 0 0
T236 130665 0 0 0
T305 160412 0 0 0
T346 102631 0 0 0
T423 0 1 0 0
T433 0 1 0 0
T434 0 1 0 0
T435 70342 0 0 0
T436 282049 0 0 0
T437 70382 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T84 T85 T86  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: T163 T167 T83  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T163 T167 T83  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: T163 T167 T83  135 1/1 txn_bits_q <= '0; Tests: T163 T167 T83  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: T163 T83 T398  156 1/1 assign dst_wd_o = src_q; Tests: T163 T83 T398  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: T163 T167 T83 

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
10CoveredT163,T167,T83

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT163,T167,T83
11CoveredT163,T167,T83

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 134674239 71165 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 186 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 71165 0 0
T398 53318 378 0 0
T399 66592 269 0 0
T400 44385 270 0 0
T403 67912 331 0 0
T424 87763 905 0 0
T425 70214 402 0 0
T426 86301 703 0 0
T427 46021 290 0 0
T428 58868 317 0 0
T429 52480 434 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 186 0 0
T398 53318 1 0 0
T399 66592 1 0 0
T400 44385 1 0 0
T403 67912 1 0 0
T424 87763 2 0 0
T425 70214 1 0 0
T426 86301 2 0 0
T427 46021 1 0 0
T428 58868 1 0 0
T429 52480 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T84 T85 T86  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: T163 T167 T83  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T163 T167 T83  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: T163 T167 T83  135 1/1 txn_bits_q <= '0; Tests: T163 T167 T83  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: T163 T167 T83  156 1/1 assign dst_wd_o = src_q; Tests: T163 T167 T83  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: T163 T167 T83 

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
10CoveredT163,T167,T439

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT163,T167,T83
11CoveredT163,T167,T83

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 134674239 75485 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 195 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 75485 0 0
T398 53318 473 0 0
T399 66592 272 0 0
T400 44385 352 0 0
T403 67912 322 0 0
T424 87763 878 0 0
T425 70214 427 0 0
T426 86301 730 0 0
T427 46021 248 0 0
T428 58868 290 0 0
T429 52480 383 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 195 0 0
T398 53318 1 0 0
T399 66592 1 0 0
T400 44385 1 0 0
T403 67912 1 0 0
T424 87763 2 0 0
T425 70214 1 0 0
T426 86301 2 0 0
T427 46021 1 0 0
T428 58868 1 0 0
T429 52480 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T84 T85 T86  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: T163 T167 T83  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  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: T163 T167 T83  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T163 T167 T83  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: T163 T167 T83  135 1/1 txn_bits_q <= '0; Tests: T163 T167 T83  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: T163 T167 T83  156 1/1 assign dst_wd_o = src_q; Tests: T163 T167 T83  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: T163 T167 T83 

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
10CoveredT163,T167,T83

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT163,T167,T83
11CoveredT163,T167,T83

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT163,T167,T83
11CoveredT163,T167,T83

 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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 T163,T167,T83
0 0 1 Covered T163,T167,T83
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 134674239 79307 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 207 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 79307 0 0
T398 53318 455 0 0
T399 66592 348 0 0
T400 44385 334 0 0
T403 67912 310 0 0
T424 87763 886 0 0
T425 70214 467 0 0
T426 86301 723 0 0
T427 46021 278 0 0
T428 58868 304 0 0
T429 52480 447 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 207 0 0
T398 53318 1 0 0
T399 66592 1 0 0
T400 44385 1 0 0
T403 67912 1 0 0
T424 87763 2 0 0
T425 70214 1 0 0
T426 86301 2 0 0
T427 46021 1 0 0
T428 58868 1 0 0
T429 52480 1 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 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: T79 T401 T402  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: T79 T401 T402  75 1/1 end else if (src_ack) begin Tests: T1 T2 T3  76 1/1 src_busy_q <= 1'b0; Tests: T79 T163 T167  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: T79 T401 T402  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: T79 T401 T402  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: T79 T401 T402  124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i}; Tests: T79 T401 T402  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: T79 T163 T167  135 1/1 txn_bits_q <= '0; Tests: T79 T163 T167  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: T79 T401 T402  156 1/1 assign dst_wd_o = src_q; Tests: T79 T401 T402  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: T79 T401 T402 

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
10CoveredT79,T401,T402

 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT79,T163,T167
11CoveredT79,T401,T402

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

 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
-1--2-StatusTests
01Not Covered
10CoveredT79,T401,T402
11CoveredT79,T163,T167

 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 T79,T401,T402
0 0 1 Covered T79,T163,T167
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 T79,T401,T402
0 0 1 Covered T79,T163,T167
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 134674239 81279 0 0
DstReqKnown_A 1631218 1409612 0 0
SrcAckBusyChk_A 134674239 210 0 0
SrcBusyKnown_A 134674239 133878317 0 0


BusySrcReqChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 81279 0 0
T65 48757 0 0 0
T79 33192 392 0 0
T80 41596 0 0 0
T159 43873 0 0 0
T236 130665 0 0 0
T346 102631 0 0 0
T398 0 440 0 0
T399 0 276 0 0
T400 0 297 0 0
T401 0 327 0 0
T402 0 364 0 0
T403 0 325 0 0
T424 0 865 0 0
T425 0 376 0 0
T426 0 675 0 0
T435 70342 0 0 0
T436 282049 0 0 0
T437 70382 0 0 0
T440 45578 0 0 0

DstReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 1631218 1409612 0 0
T1 385 211 0 0
T2 439 267 0 0
T3 347 173 0 0
T4 535 361 0 0
T7 400 226 0 0
T25 405 231 0 0
T46 400 228 0 0
T99 426 254 0 0
T100 314 140 0 0
T101 462 288 0 0

SrcAckBusyChk_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 210 0 0
T65 48757 0 0 0
T79 33192 1 0 0
T80 41596 0 0 0
T159 43873 0 0 0
T236 130665 0 0 0
T346 102631 0 0 0
T398 0 1 0 0
T399 0 1 0 0
T400 0 1 0 0
T403 0 1 0 0
T424 0 2 0 0
T425 0 1 0 0
T426 0 2 0 0
T427 0 1 0 0
T428 0 1 0 0
T435 70342 0 0 0
T436 282049 0 0 0
T437 70382 0 0 0
T440 45578 0 0 0

SrcBusyKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 134674239 133878317 0 0
T1 22688 22016 0 0
T2 24102 23625 0 0
T3 14689 14148 0 0
T4 22449 22090 0 0
T7 22940 22339 0 0
T25 25024 24333 0 0
T46 16516 16104 0 0
T99 16620 16255 0 0
T100 11040 10497 0 0
T101 23528 23110 0 0

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