Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_0_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T7 T16 T64 
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:       T7 T16 T64 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T7 T16 T64 
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:       T7 T16 T64 
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:       T7 T16 T64 
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:       T7 T16 T64 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T7 T16 T64 
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:       T7 T16 T64 
135        1/1                txn_bits_q <= '0;
           Tests:       T7 T16 T64 
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:       T7 T16 T71 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T7 T16 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:       T7 T16 T64 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_0_cdc
 | Total | Covered | Percent | 
| Conditions | 13 | 12 | 92.31 | 
| Logical | 13 | 12 | 92.31 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T7,T16,T64 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T7,T16,T64 | 
| 1 | 1 | Covered | T7,T16,T64 | 
 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
| -1- | -2- | Status | Tests |                       
| 0 | - | Covered | T7,T16,T64 | 
| 1 | - | Covered | T7,T16,T71 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T7,T16,T64 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T7,T16,T64 | 
| 1 | 1 | Covered | T7,T16,T64 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_0_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T7,T16,T64 | 
| 0 | 
0 | 
1 | 
Covered | 
T7,T16,T64 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T7,T16,T64 | 
| 0 | 
0 | 
1 | 
Covered | 
T7,T16,T64 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
135119 | 
0 | 
0 | 
| T7 | 
44303 | 
916 | 
0 | 
0 | 
| T11 | 
44406 | 
0 | 
0 | 
0 | 
| T12 | 
21882 | 
0 | 
0 | 
0 | 
| T16 | 
31607 | 
2070 | 
0 | 
0 | 
| T31 | 
52068 | 
0 | 
0 | 
0 | 
| T32 | 
55659 | 
0 | 
0 | 
0 | 
| T48 | 
62291 | 
0 | 
0 | 
0 | 
| T49 | 
58031 | 
0 | 
0 | 
0 | 
| T50 | 
65231 | 
0 | 
0 | 
0 | 
| T64 | 
0 | 
344 | 
0 | 
0 | 
| T65 | 
0 | 
395 | 
0 | 
0 | 
| T66 | 
0 | 
1831 | 
0 | 
0 | 
| T67 | 
0 | 
2021 | 
0 | 
0 | 
| T71 | 
0 | 
760 | 
0 | 
0 | 
| T72 | 
0 | 
612 | 
0 | 
0 | 
| T126 | 
58557 | 
0 | 
0 | 
0 | 
| T408 | 
0 | 
402 | 
0 | 
0 | 
| T409 | 
0 | 
440 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
340 | 
0 | 
0 | 
| T7 | 
44303 | 
2 | 
0 | 
0 | 
| T11 | 
44406 | 
0 | 
0 | 
0 | 
| T12 | 
21882 | 
0 | 
0 | 
0 | 
| T16 | 
31607 | 
5 | 
0 | 
0 | 
| T31 | 
52068 | 
0 | 
0 | 
0 | 
| T32 | 
55659 | 
0 | 
0 | 
0 | 
| T48 | 
62291 | 
0 | 
0 | 
0 | 
| T49 | 
58031 | 
0 | 
0 | 
0 | 
| T50 | 
65231 | 
0 | 
0 | 
0 | 
| T64 | 
0 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T66 | 
0 | 
5 | 
0 | 
0 | 
| T67 | 
0 | 
5 | 
0 | 
0 | 
| T71 | 
0 | 
2 | 
0 | 
0 | 
| T72 | 
0 | 
2 | 
0 | 
0 | 
| T126 | 
58557 | 
0 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 20 | 90.91 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 0 | 0.00 | 
| CONT_ASSIGN | 156 | 1 | 0 | 0.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T64 T65 T102 
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:       T64 T65 T176 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
135        1/1                txn_bits_q <= '0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_cdc
 | Total | Covered | Percent | 
| Conditions | 13 | 11 | 84.62 | 
| Logical | 13 | 11 | 84.62 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T104 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
| -1- | -2- | Status | Tests |                       
| 0 | - | Covered | T64,T65,T176 | 
| 1 | - | Not Covered |  | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
119333 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
287 | 
0 | 
0 | 
| T65 | 
0 | 
440 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
710 | 
0 | 
0 | 
| T184 | 
0 | 
257 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
647 | 
0 | 
0 | 
| T408 | 
0 | 
471 | 
0 | 
0 | 
| T409 | 
0 | 
404 | 
0 | 
0 | 
| T424 | 
0 | 
707 | 
0 | 
0 | 
| T433 | 
0 | 
471 | 
0 | 
0 | 
| T434 | 
0 | 
314 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
296 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
2 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
| T434 | 
0 | 
1 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_2_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T27 T64 T65 
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:       T27 T64 T65 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T27 T64 T65 
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:       T27 T64 T65 
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:       T27 T64 T65 
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:       T27 T64 T65 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T27 T64 T65 
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:       T27 T64 T65 
135        1/1                txn_bits_q <= '0;
           Tests:       T27 T64 T65 
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:       T27 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T27 
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:       T27 T64 T65 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_2_cdc
 | Total | Covered | Percent | 
| Conditions | 13 | 12 | 92.31 | 
| Logical | 13 | 12 | 92.31 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T27,T64,T65 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T27,T64,T65 | 
| 1 | 1 | Covered | T27,T64,T65 | 
 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
| -1- | -2- | Status | Tests |                       
| 0 | - | Covered | T27,T64,T65 | 
| 1 | - | Covered | T27 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T27,T64,T65 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T27,T64,T65 | 
| 1 | 1 | Covered | T27,T64,T65 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_2_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T27,T64,T65 | 
| 0 | 
0 | 
1 | 
Covered | 
T27,T64,T65 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T27,T64,T65 | 
| 0 | 
0 | 
1 | 
Covered | 
T27,T64,T65 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
113664 | 
0 | 
0 | 
| T7 | 
44303 | 
0 | 
0 | 
0 | 
| T10 | 
35768 | 
0 | 
0 | 
0 | 
| T11 | 
44406 | 
0 | 
0 | 
0 | 
| T27 | 
38517 | 
1058 | 
0 | 
0 | 
| T31 | 
52068 | 
0 | 
0 | 
0 | 
| T32 | 
55659 | 
0 | 
0 | 
0 | 
| T48 | 
62291 | 
0 | 
0 | 
0 | 
| T49 | 
58031 | 
0 | 
0 | 
0 | 
| T50 | 
65231 | 
0 | 
0 | 
0 | 
| T64 | 
0 | 
323 | 
0 | 
0 | 
| T65 | 
0 | 
453 | 
0 | 
0 | 
| T126 | 
58557 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
684 | 
0 | 
0 | 
| T184 | 
0 | 
250 | 
0 | 
0 | 
| T404 | 
0 | 
3801 | 
0 | 
0 | 
| T408 | 
0 | 
424 | 
0 | 
0 | 
| T409 | 
0 | 
375 | 
0 | 
0 | 
| T424 | 
0 | 
671 | 
0 | 
0 | 
| T433 | 
0 | 
460 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
287 | 
0 | 
0 | 
| T7 | 
44303 | 
0 | 
0 | 
0 | 
| T10 | 
35768 | 
0 | 
0 | 
0 | 
| T11 | 
44406 | 
0 | 
0 | 
0 | 
| T27 | 
38517 | 
2 | 
0 | 
0 | 
| T31 | 
52068 | 
0 | 
0 | 
0 | 
| T32 | 
55659 | 
0 | 
0 | 
0 | 
| T48 | 
62291 | 
0 | 
0 | 
0 | 
| T49 | 
58031 | 
0 | 
0 | 
0 | 
| T50 | 
65231 | 
0 | 
0 | 
0 | 
| T64 | 
0 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T126 | 
58557 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T404 | 
0 | 
9 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_3_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 20 | 90.91 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 0 | 0.00 | 
| CONT_ASSIGN | 156 | 1 | 0 | 0.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T64 T65 T102 
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:       T64 T65 T176 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
135        1/1                txn_bits_q <= '0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_3_cdc
 | Total | Covered | Percent | 
| Conditions | 13 | 11 | 84.62 | 
| Logical | 13 | 11 | 84.62 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
| -1- | -2- | Status | Tests |                       
| 0 | - | Covered | T64,T65,T176 | 
| 1 | - | Not Covered |  | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_3_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
132609 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
350 | 
0 | 
0 | 
| T65 | 
0 | 
459 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
650 | 
0 | 
0 | 
| T184 | 
0 | 
328 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
4243 | 
0 | 
0 | 
| T408 | 
0 | 
363 | 
0 | 
0 | 
| T409 | 
0 | 
369 | 
0 | 
0 | 
| T424 | 
0 | 
739 | 
0 | 
0 | 
| T433 | 
0 | 
455 | 
0 | 
0 | 
| T434 | 
0 | 
264 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
333 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
10 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
| T434 | 
0 | 
1 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_4_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T64 T29 T65 
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:       T64 T29 T65 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T64 T29 T65 
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:       T64 T29 T65 
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:       T64 T29 T65 
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:       T64 T29 T65 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T64 T29 T65 
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:       T64 T29 T65 
135        1/1                txn_bits_q <= '0;
           Tests:       T64 T29 T65 
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:       T29 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T29 
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:       T64 T29 T65 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_4_cdc
 | Total | Covered | Percent | 
| Conditions | 13 | 12 | 92.31 | 
| Logical | 13 | 12 | 92.31 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T29,T65 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T64,T29,T65 | 
| 1 | 1 | Covered | T64,T29,T65 | 
 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
| -1- | -2- | Status | Tests |                       
| 0 | - | Covered | T64,T29,T65 | 
| 1 | - | Covered | T29 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T29,T65 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T64,T29,T65 | 
| 1 | 1 | Covered | T64,T29,T65 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_4_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T29,T65 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T29,T65 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T29,T65 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T29,T65 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
121818 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T29 | 
0 | 
1030 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
247 | 
0 | 
0 | 
| T65 | 
0 | 
397 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
735 | 
0 | 
0 | 
| T184 | 
0 | 
265 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T408 | 
0 | 
479 | 
0 | 
0 | 
| T409 | 
0 | 
465 | 
0 | 
0 | 
| T424 | 
0 | 
710 | 
0 | 
0 | 
| T433 | 
0 | 
401 | 
0 | 
0 | 
| T434 | 
0 | 
258 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
303 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T29 | 
0 | 
2 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
| T434 | 
0 | 
1 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T68 T69 T70 
66                      
67                        // busy indication back-pressures upstream if the register is accessed
68                        // again.  The busy indication is also used as a "commit" indication for
69                        // resolving software and hardware write conflicts
70                        always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71         1/1              if (!rst_src_ni) begin
           Tests:       T1 T2 T3 
72         1/1                src_busy_q <= '0;
           Tests:       T1 T2 T3 
73         1/1              end else if (src_req) begin
           Tests:       T1 T2 T3 
74         1/1                src_busy_q <= 1'b1;
           Tests:       T68 T69 T70 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T68 T69 T70 
77                          end
                        MISSING_ELSE
78                        end
79                      
80                        // A src_ack should only be sent if there was a src_req.
81                        // src_busy_q asserts whenever there is a src_req.  By association,
82                        // whenever src_ack is seen, then src_busy must be high.
83                        `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84                      
85         1/1            assign src_busy_o = src_busy_q;
           Tests:       T68 T69 T70 
86                      
87                        // src_q acts as both the write holding register and the software read back
88                        // register.
89                        // When software performs a write, the write data is captured in src_q for
90                        // CDC purposes.  When not performing a write, the src_q reflects the most recent
91                        // hardware value. For registers with no hardware access, this is simply the
92                        // the value programmed by software (or in the case R1C, W1C etc) the value after
93                        // the operation. For registers with hardware access, this reflects a potentially
94                        // delayed version of the real value, as the software facing updates lag real
95                        // time updates.
96                        //
97                        // To resolve software and hardware conflicts, the process is as follows:
98                        // When software issues a write, this module asserts "busy".  While busy,
99                        // src_q does not take on destination value updates.  Since the
100                       // logic has committed to updating based on software command, there is an irreversible
101                       // window from which hardware writes are ignored.  Once the busy window completes,
102                       // the cdc portion then begins sampling once more.
103                       //
104                       // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105                       // software is always prioritized.  The main difference is the conflict resolution window
106                       // is now larger instead of just one destination clock cycle.
107                     
108                       logic busy;
109        1/1            assign busy = src_busy_q & !src_ack;
           Tests:       T68 T69 T70 
110                     
111                       // This is the current destination value
112                       logic [DataWidth-1:0] dst_qs;
113                       logic src_update;
114                       always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115        1/1              if (!rst_src_ni) begin
           Tests:       T1 T2 T3 
116        1/1                src_q <= ResetVal;
           Tests:       T1 T2 T3 
117        1/1                txn_bits_q <= '0;
           Tests:       T1 T2 T3 
118        1/1              end else if (src_req) begin
           Tests:       T1 T2 T3 
119                           // See assertion below
120                           // At the beginning of a software initiated transaction, the following
121                           // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122                           // change for the duration of the synchronization operation.
123        1/1                src_q <= src_wd_i & BitMask;
           Tests:       T68 T69 T70 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T68 T69 T70 
125        1/1              end else if (src_busy_q && src_ack || src_update && !busy) begin
           Tests:       T1 T2 T3 
126                           // sample data whenever a busy transaction finishes OR
127                           // when an update pulse is seen.
128                           // TODO: We should add a cover group to test different sync timings
129                           // between src_ack and src_update. ie. there can be 3 scenarios:
130                           // 1. update one cycle before ack
131                           // 2. ack one cycle before update
132                           // 3. update / ack on the same cycle
133                           // During all 3 cases the read data should be correct
134        1/1                src_q <= dst_qs;
           Tests:       T68 T69 T70 
135        1/1                txn_bits_q <= '0;
           Tests:       T68 T69 T70 
136                         end
                        MISSING_ELSE
137                       end
138                     
139                       // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140                       // (decoded from address) is busy. So this creates a situation in the current design where
141                       // src_req_i and busy can never be high at the same time.
142                       // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143                       // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144                       // condition cannot be met.
145                       // Thus we add an assertion here to ensure the condition is always satisfied.
146                       `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147                     
148                       // reserved bits are not used
149                       logic unused_wd;
150        1/1            assign unused_wd = ^src_wd_i;
           Tests:       T1 T2 T3 
151                     
152                       // src_q is always updated in the clk_src domain.
153                       // when performing an update to the destination domain, it is guaranteed
154                       // to not change by protocol.
155        1/1            assign src_qs_o = src_q;
           Tests:       T68 T69 T70 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T68 T69 T70 
157                     
158                       ////////////////////////////
159                       // CDC handling
160                       ////////////////////////////
161                     
162                       logic dst_req_from_src;
163                       logic dst_req;
164                     
165                     
166                       // the software transaction is pulse synced across the domain.
167                       // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168                       prim_pulse_sync u_src_to_dst_req (
169                         .clk_src_i,
170                         .rst_src_ni,
171                         .clk_dst_i,
172                         .rst_dst_ni,
173                         .src_pulse_i(src_req),
174                         .dst_pulse_o(dst_req_from_src)
175                       );
176                     
177                       prim_reg_cdc_arb #(
178                         .DataWidth(DataWidth),
179                         .ResetVal(ResetVal),
180                         .DstWrReq(DstWrReq)
181                       ) u_arb (
182                         .clk_src_i,
183                         .rst_src_ni,
184                         .clk_dst_i,
185                         .rst_dst_ni,
186                         .src_ack_o(src_ack),
187                         .src_update_o(src_update),
188                         .dst_req_i(dst_req_from_src),
189                         .dst_req_o(dst_req),
190                         .dst_update_i,
191                         .dst_ds_i,
192                         .dst_qs_i,
193                         .dst_qs_o(dst_qs)
194                       );
195                     
196                     
197                       // Each is valid only when destination request pulse is high; this is important in not propagating
198                       // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199                       // reset.
200        1/1            assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
           Tests:       T68 T69 T70 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc
 | Total | Covered | Percent | 
| Conditions | 13 | 12 | 92.31 | 
| Logical | 13 | 12 | 92.31 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T68,T69,T70 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T68,T69,T70 | 
| 1 | 1 | Covered | T68,T69,T70 | 
 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
| -1- | -2- | Status | Tests |                       
| 0 | - | Covered | T68,T69,T70 | 
| 1 | - | Covered | T68,T69,T70 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T68,T69,T70 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T68,T69,T70 | 
| 1 | 1 | Covered | T68,T69,T70 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T68,T69,T70 | 
| 0 | 
0 | 
1 | 
Covered | 
T68,T69,T70 | 
| 0 | 
0 | 
0 | 
Covered | 
T1,T2,T3 | 
115            if (!rst_src_ni) begin
               -1-  
116              src_q <= ResetVal;
                 ==>
117              txn_bits_q <= '0;
118            end else if (src_req) begin
                        -2-  
119              // See assertion below
120              // At the beginning of a software initiated transaction, the following
121              // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122              // change for the duration of the synchronization operation.
123              src_q <= src_wd_i & BitMask;
                 ==>
124              txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
125            end else if (src_busy_q && src_ack || src_update && !busy) begin
                        -3-  
126              // sample data whenever a busy transaction finishes OR
127              // when an update pulse is seen.
128              // TODO: We should add a cover group to test different sync timings
129              // between src_ack and src_update. ie. there can be 3 scenarios:
130              // 1. update one cycle before ack
131              // 2. ack one cycle before update
132              // 3. update / ack on the same cycle
133              // During all 3 cases the read data should be correct
134              src_q <= dst_qs;
                 ==>
135              txn_bits_q <= '0;
136            end
               MISSING_ELSE
               ==>
Branches:
| -1- | -2- | -3- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T68,T69,T70 | 
| 0 | 
0 | 
1 | 
Covered | 
T68,T69,T70 | 
| 0 | 
0 | 
0 | 
Covered | 
T1,T2,T3 | 
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
132047 | 
0 | 
0 | 
| T30 | 
0 | 
894 | 
0 | 
0 | 
| T64 | 
0 | 
262 | 
0 | 
0 | 
| T65 | 
0 | 
464 | 
0 | 
0 | 
| T68 | 
51029 | 
731 | 
0 | 
0 | 
| T69 | 
0 | 
1287 | 
0 | 
0 | 
| T70 | 
0 | 
877 | 
0 | 
0 | 
| T94 | 
45510 | 
0 | 
0 | 
0 | 
| T95 | 
50229 | 
0 | 
0 | 
0 | 
| T96 | 
53833 | 
0 | 
0 | 
0 | 
| T125 | 
0 | 
735 | 
0 | 
0 | 
| T166 | 
45354 | 
0 | 
0 | 
0 | 
| T180 | 
48787 | 
0 | 
0 | 
0 | 
| T315 | 
249346 | 
0 | 
0 | 
0 | 
| T323 | 
995012 | 
0 | 
0 | 
0 | 
| T417 | 
11596 | 
0 | 
0 | 
0 | 
| T436 | 
0 | 
1404 | 
0 | 
0 | 
| T437 | 
0 | 
770 | 
0 | 
0 | 
| T438 | 
0 | 
722 | 
0 | 
0 | 
| T439 | 
212095 | 
0 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
332 | 
0 | 
0 | 
| T30 | 
0 | 
2 | 
0 | 
0 | 
| T64 | 
0 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T68 | 
51029 | 
2 | 
0 | 
0 | 
| T69 | 
0 | 
4 | 
0 | 
0 | 
| T70 | 
0 | 
2 | 
0 | 
0 | 
| T94 | 
45510 | 
0 | 
0 | 
0 | 
| T95 | 
50229 | 
0 | 
0 | 
0 | 
| T96 | 
53833 | 
0 | 
0 | 
0 | 
| T125 | 
0 | 
2 | 
0 | 
0 | 
| T166 | 
45354 | 
0 | 
0 | 
0 | 
| T180 | 
48787 | 
0 | 
0 | 
0 | 
| T315 | 
249346 | 
0 | 
0 | 
0 | 
| T323 | 
995012 | 
0 | 
0 | 
0 | 
| T417 | 
11596 | 
0 | 
0 | 
0 | 
| T436 | 
0 | 
4 | 
0 | 
0 | 
| T437 | 
0 | 
2 | 
0 | 
0 | 
| T438 | 
0 | 
2 | 
0 | 
0 | 
| T439 | 
212095 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_6_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 20 | 90.91 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 0 | 0.00 | 
| CONT_ASSIGN | 156 | 1 | 0 | 0.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T64 T65 T102 
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:       T64 T65 T176 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
135        1/1                txn_bits_q <= '0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_6_cdc
 | Total | Covered | Percent | 
| Conditions | 13 | 11 | 84.62 | 
| Logical | 13 | 11 | 84.62 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
| -1- | -2- | Status | Tests |                       
| 0 | - | Covered | T64,T65,T176 | 
| 1 | - | Not Covered |  | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_6_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
129911 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
264 | 
0 | 
0 | 
| T65 | 
0 | 
474 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
685 | 
0 | 
0 | 
| T184 | 
0 | 
342 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
2887 | 
0 | 
0 | 
| T408 | 
0 | 
364 | 
0 | 
0 | 
| T409 | 
0 | 
457 | 
0 | 
0 | 
| T424 | 
0 | 
698 | 
0 | 
0 | 
| T433 | 
0 | 
365 | 
0 | 
0 | 
| T434 | 
0 | 
258 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
326 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
7 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
| T434 | 
0 | 
1 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 20 | 90.91 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 0 | 0.00 | 
| CONT_ASSIGN | 156 | 1 | 0 | 0.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T64 T65 T102 
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:       T64 T65 T176 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
135        1/1                txn_bits_q <= '0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_cdc
 | Total | Covered | Percent | 
| Conditions | 13 | 11 | 84.62 | 
| Logical | 13 | 11 | 84.62 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       123
 EXPRESSION (src_wd_i & BitMask)
             ----1---   ---2---
| -1- | -2- | Status | Tests |                       
| 0 | - | Covered | T64,T65,T176 | 
| 1 | - | Not Covered |  | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
135488 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
361 | 
0 | 
0 | 
| T65 | 
0 | 
377 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
690 | 
0 | 
0 | 
| T184 | 
0 | 
302 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
3310 | 
0 | 
0 | 
| T408 | 
0 | 
469 | 
0 | 
0 | 
| T409 | 
0 | 
450 | 
0 | 
0 | 
| T424 | 
0 | 
756 | 
0 | 
0 | 
| T433 | 
0 | 
436 | 
0 | 
0 | 
| T434 | 
0 | 
359 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
337 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
8 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
| T434 | 
0 | 
1 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_0_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T7 T16 T64 
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:       T7 T16 T64 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T7 T16 T64 
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:       T7 T16 T64 
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:       T7 T16 T64 
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:       T7 T16 T64 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T7 T16 T64 
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:       T7 T16 T64 
135        1/1                txn_bits_q <= '0;
           Tests:       T7 T16 T64 
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:       T16 T64 T66 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T16 T64 T66 
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:       T7 T16 T64 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_0_cdc
 | Total | Covered | Percent | 
| Conditions | 11 | 10 | 90.91 | 
| Logical | 11 | 10 | 90.91 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T7,T16,T64 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T7,T16,T64 | 
| 1 | 1 | Covered | T7,T16,T64 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T7,T16,T64 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T7,T16,T64 | 
| 1 | 1 | Covered | T7,T16,T64 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_0_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T7,T16,T64 | 
| 0 | 
0 | 
1 | 
Covered | 
T7,T16,T64 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T7,T16,T64 | 
| 0 | 
0 | 
1 | 
Covered | 
T7,T16,T64 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
127999 | 
0 | 
0 | 
| T7 | 
44303 | 
421 | 
0 | 
0 | 
| T11 | 
44406 | 
0 | 
0 | 
0 | 
| T12 | 
21882 | 
0 | 
0 | 
0 | 
| T16 | 
31607 | 
890 | 
0 | 
0 | 
| T31 | 
52068 | 
0 | 
0 | 
0 | 
| T32 | 
55659 | 
0 | 
0 | 
0 | 
| T48 | 
62291 | 
0 | 
0 | 
0 | 
| T49 | 
58031 | 
0 | 
0 | 
0 | 
| T50 | 
65231 | 
0 | 
0 | 
0 | 
| T64 | 
0 | 
278 | 
0 | 
0 | 
| T65 | 
0 | 
470 | 
0 | 
0 | 
| T66 | 
0 | 
777 | 
0 | 
0 | 
| T67 | 
0 | 
725 | 
0 | 
0 | 
| T71 | 
0 | 
386 | 
0 | 
0 | 
| T72 | 
0 | 
357 | 
0 | 
0 | 
| T126 | 
58557 | 
0 | 
0 | 
0 | 
| T408 | 
0 | 
398 | 
0 | 
0 | 
| T409 | 
0 | 
364 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
320 | 
0 | 
0 | 
| T7 | 
44303 | 
1 | 
0 | 
0 | 
| T11 | 
44406 | 
0 | 
0 | 
0 | 
| T12 | 
21882 | 
0 | 
0 | 
0 | 
| T16 | 
31607 | 
2 | 
0 | 
0 | 
| T31 | 
52068 | 
0 | 
0 | 
0 | 
| T32 | 
55659 | 
0 | 
0 | 
0 | 
| T48 | 
62291 | 
0 | 
0 | 
0 | 
| T49 | 
58031 | 
0 | 
0 | 
0 | 
| T50 | 
65231 | 
0 | 
0 | 
0 | 
| T64 | 
0 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T66 | 
0 | 
2 | 
0 | 
0 | 
| T67 | 
0 | 
2 | 
0 | 
0 | 
| T71 | 
0 | 
1 | 
0 | 
0 | 
| T72 | 
0 | 
1 | 
0 | 
0 | 
| T126 | 
58557 | 
0 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_1_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T64 T65 T102 
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:       T64 T65 T176 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
135        1/1                txn_bits_q <= '0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_1_cdc
 | Total | Covered | Percent | 
| Conditions | 11 | 10 | 90.91 | 
| Logical | 11 | 10 | 90.91 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T440 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_1_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
132480 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
310 | 
0 | 
0 | 
| T65 | 
0 | 
407 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
632 | 
0 | 
0 | 
| T184 | 
0 | 
255 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
3254 | 
0 | 
0 | 
| T408 | 
0 | 
428 | 
0 | 
0 | 
| T409 | 
0 | 
439 | 
0 | 
0 | 
| T424 | 
0 | 
748 | 
0 | 
0 | 
| T433 | 
0 | 
416 | 
0 | 
0 | 
| T434 | 
0 | 
340 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
331 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
8 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
| T434 | 
0 | 
1 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_2_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T27 T64 T65 
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:       T27 T64 T65 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T27 T64 T65 
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:       T27 T64 T65 
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:       T27 T64 T65 
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:       T27 T64 T65 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T27 T64 T65 
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:       T27 T64 T65 
135        1/1                txn_bits_q <= '0;
           Tests:       T27 T64 T65 
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:       T27 T64 T65 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T27 T64 T65 
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:       T27 T64 T65 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_2_cdc
 | Total | Covered | Percent | 
| Conditions | 11 | 10 | 90.91 | 
| Logical | 11 | 10 | 90.91 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T27,T64,T65 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T27,T64,T65 | 
| 1 | 1 | Covered | T27,T64,T65 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T27,T64,T65 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T27,T64,T65 | 
| 1 | 1 | Covered | T27,T64,T65 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_2_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T27,T64,T65 | 
| 0 | 
0 | 
1 | 
Covered | 
T27,T64,T65 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T27,T64,T65 | 
| 0 | 
0 | 
1 | 
Covered | 
T27,T64,T65 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
123847 | 
0 | 
0 | 
| T7 | 
44303 | 
0 | 
0 | 
0 | 
| T10 | 
35768 | 
0 | 
0 | 
0 | 
| T11 | 
44406 | 
0 | 
0 | 
0 | 
| T27 | 
38517 | 
395 | 
0 | 
0 | 
| T31 | 
52068 | 
0 | 
0 | 
0 | 
| T32 | 
55659 | 
0 | 
0 | 
0 | 
| T48 | 
62291 | 
0 | 
0 | 
0 | 
| T49 | 
58031 | 
0 | 
0 | 
0 | 
| T50 | 
65231 | 
0 | 
0 | 
0 | 
| T64 | 
0 | 
326 | 
0 | 
0 | 
| T65 | 
0 | 
443 | 
0 | 
0 | 
| T126 | 
58557 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
707 | 
0 | 
0 | 
| T184 | 
0 | 
266 | 
0 | 
0 | 
| T404 | 
0 | 
1606 | 
0 | 
0 | 
| T408 | 
0 | 
438 | 
0 | 
0 | 
| T409 | 
0 | 
391 | 
0 | 
0 | 
| T424 | 
0 | 
724 | 
0 | 
0 | 
| T433 | 
0 | 
422 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
313 | 
0 | 
0 | 
| T7 | 
44303 | 
0 | 
0 | 
0 | 
| T10 | 
35768 | 
0 | 
0 | 
0 | 
| T11 | 
44406 | 
0 | 
0 | 
0 | 
| T27 | 
38517 | 
1 | 
0 | 
0 | 
| T31 | 
52068 | 
0 | 
0 | 
0 | 
| T32 | 
55659 | 
0 | 
0 | 
0 | 
| T48 | 
62291 | 
0 | 
0 | 
0 | 
| T49 | 
58031 | 
0 | 
0 | 
0 | 
| T50 | 
65231 | 
0 | 
0 | 
0 | 
| T64 | 
0 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T126 | 
58557 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T404 | 
0 | 
4 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_3_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T64 T65 T102 
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:       T64 T65 T176 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
135        1/1                txn_bits_q <= '0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_3_cdc
 | Total | Covered | Percent | 
| Conditions | 11 | 10 | 90.91 | 
| Logical | 11 | 10 | 90.91 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_3_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
125863 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
259 | 
0 | 
0 | 
| T65 | 
0 | 
397 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
767 | 
0 | 
0 | 
| T184 | 
0 | 
292 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
2901 | 
0 | 
0 | 
| T408 | 
0 | 
450 | 
0 | 
0 | 
| T409 | 
0 | 
431 | 
0 | 
0 | 
| T424 | 
0 | 
654 | 
0 | 
0 | 
| T433 | 
0 | 
459 | 
0 | 
0 | 
| T434 | 
0 | 
273 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
314 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
7 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
| T434 | 
0 | 
1 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_4_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T64 T29 T65 
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:       T64 T29 T65 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T64 T29 T65 
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:       T64 T29 T65 
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:       T64 T29 T65 
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:       T64 T29 T65 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T64 T29 T65 
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:       T64 T29 T65 
135        1/1                txn_bits_q <= '0;
           Tests:       T64 T29 T65 
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:       T29 T65 T176 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T29 T65 T176 
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:       T64 T29 T65 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_4_cdc
 | Total | Covered | Percent | 
| Conditions | 11 | 10 | 90.91 | 
| Logical | 11 | 10 | 90.91 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T29,T65 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T64,T29,T65 | 
| 1 | 1 | Covered | T64,T29,T65 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T29,T65 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T64,T29,T65 | 
| 1 | 1 | Covered | T64,T29,T65 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_4_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T29,T65 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T29,T65 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T29,T65 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T29,T65 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
119949 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T29 | 
0 | 
364 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
243 | 
0 | 
0 | 
| T65 | 
0 | 
435 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
676 | 
0 | 
0 | 
| T184 | 
0 | 
242 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
4250 | 
0 | 
0 | 
| T408 | 
0 | 
378 | 
0 | 
0 | 
| T409 | 
0 | 
415 | 
0 | 
0 | 
| T424 | 
0 | 
712 | 
0 | 
0 | 
| T433 | 
0 | 
461 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
302 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T29 | 
0 | 
1 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
10 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_5_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T68 T69 T70 
66                      
67                        // busy indication back-pressures upstream if the register is accessed
68                        // again.  The busy indication is also used as a "commit" indication for
69                        // resolving software and hardware write conflicts
70                        always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71         1/1              if (!rst_src_ni) begin
           Tests:       T1 T2 T3 
72         1/1                src_busy_q <= '0;
           Tests:       T1 T2 T3 
73         1/1              end else if (src_req) begin
           Tests:       T1 T2 T3 
74         1/1                src_busy_q <= 1'b1;
           Tests:       T68 T69 T70 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T68 T69 T70 
77                          end
                        MISSING_ELSE
78                        end
79                      
80                        // A src_ack should only be sent if there was a src_req.
81                        // src_busy_q asserts whenever there is a src_req.  By association,
82                        // whenever src_ack is seen, then src_busy must be high.
83                        `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84                      
85         1/1            assign src_busy_o = src_busy_q;
           Tests:       T68 T69 T70 
86                      
87                        // src_q acts as both the write holding register and the software read back
88                        // register.
89                        // When software performs a write, the write data is captured in src_q for
90                        // CDC purposes.  When not performing a write, the src_q reflects the most recent
91                        // hardware value. For registers with no hardware access, this is simply the
92                        // the value programmed by software (or in the case R1C, W1C etc) the value after
93                        // the operation. For registers with hardware access, this reflects a potentially
94                        // delayed version of the real value, as the software facing updates lag real
95                        // time updates.
96                        //
97                        // To resolve software and hardware conflicts, the process is as follows:
98                        // When software issues a write, this module asserts "busy".  While busy,
99                        // src_q does not take on destination value updates.  Since the
100                       // logic has committed to updating based on software command, there is an irreversible
101                       // window from which hardware writes are ignored.  Once the busy window completes,
102                       // the cdc portion then begins sampling once more.
103                       //
104                       // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105                       // software is always prioritized.  The main difference is the conflict resolution window
106                       // is now larger instead of just one destination clock cycle.
107                     
108                       logic busy;
109        1/1            assign busy = src_busy_q & !src_ack;
           Tests:       T68 T69 T70 
110                     
111                       // This is the current destination value
112                       logic [DataWidth-1:0] dst_qs;
113                       logic src_update;
114                       always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115        1/1              if (!rst_src_ni) begin
           Tests:       T1 T2 T3 
116        1/1                src_q <= ResetVal;
           Tests:       T1 T2 T3 
117        1/1                txn_bits_q <= '0;
           Tests:       T1 T2 T3 
118        1/1              end else if (src_req) begin
           Tests:       T1 T2 T3 
119                           // See assertion below
120                           // At the beginning of a software initiated transaction, the following
121                           // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122                           // change for the duration of the synchronization operation.
123        1/1                src_q <= src_wd_i & BitMask;
           Tests:       T68 T69 T70 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T68 T69 T70 
125        1/1              end else if (src_busy_q && src_ack || src_update && !busy) begin
           Tests:       T1 T2 T3 
126                           // sample data whenever a busy transaction finishes OR
127                           // when an update pulse is seen.
128                           // TODO: We should add a cover group to test different sync timings
129                           // between src_ack and src_update. ie. there can be 3 scenarios:
130                           // 1. update one cycle before ack
131                           // 2. ack one cycle before update
132                           // 3. update / ack on the same cycle
133                           // During all 3 cases the read data should be correct
134        1/1                src_q <= dst_qs;
           Tests:       T68 T69 T70 
135        1/1                txn_bits_q <= '0;
           Tests:       T68 T69 T70 
136                         end
                        MISSING_ELSE
137                       end
138                     
139                       // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140                       // (decoded from address) is busy. So this creates a situation in the current design where
141                       // src_req_i and busy can never be high at the same time.
142                       // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143                       // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144                       // condition cannot be met.
145                       // Thus we add an assertion here to ensure the condition is always satisfied.
146                       `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147                     
148                       // reserved bits are not used
149                       logic unused_wd;
150        1/1            assign unused_wd = ^src_wd_i;
           Tests:       T1 T2 T3 
151                     
152                       // src_q is always updated in the clk_src domain.
153                       // when performing an update to the destination domain, it is guaranteed
154                       // to not change by protocol.
155        1/1            assign src_qs_o = src_q;
           Tests:       T64 T65 T30 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T64 T65 T30 
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:       T68 T69 T70 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_5_cdc
 | Total | Covered | Percent | 
| Conditions | 11 | 10 | 90.91 | 
| Logical | 11 | 10 | 90.91 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T68,T69,T70 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T68,T69,T70 | 
| 1 | 1 | Covered | T68,T69,T70 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T68,T69,T70 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T68,T69,T70 | 
| 1 | 1 | Covered | T68,T69,T70 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_5_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T68,T69,T70 | 
| 0 | 
0 | 
1 | 
Covered | 
T68,T69,T70 | 
| 0 | 
0 | 
0 | 
Covered | 
T1,T2,T3 | 
115            if (!rst_src_ni) begin
               -1-  
116              src_q <= ResetVal;
                 ==>
117              txn_bits_q <= '0;
118            end else if (src_req) begin
                        -2-  
119              // See assertion below
120              // At the beginning of a software initiated transaction, the following
121              // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122              // change for the duration of the synchronization operation.
123              src_q <= src_wd_i & BitMask;
                 ==>
124              txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
125            end else if (src_busy_q && src_ack || src_update && !busy) begin
                        -3-  
126              // sample data whenever a busy transaction finishes OR
127              // when an update pulse is seen.
128              // TODO: We should add a cover group to test different sync timings
129              // between src_ack and src_update. ie. there can be 3 scenarios:
130              // 1. update one cycle before ack
131              // 2. ack one cycle before update
132              // 3. update / ack on the same cycle
133              // During all 3 cases the read data should be correct
134              src_q <= dst_qs;
                 ==>
135              txn_bits_q <= '0;
136            end
               MISSING_ELSE
               ==>
Branches:
| -1- | -2- | -3- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T68,T69,T70 | 
| 0 | 
0 | 
1 | 
Covered | 
T68,T69,T70 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
128927 | 
0 | 
0 | 
| T30 | 
0 | 
349 | 
0 | 
0 | 
| T64 | 
0 | 
273 | 
0 | 
0 | 
| T65 | 
0 | 
467 | 
0 | 
0 | 
| T68 | 
51029 | 
354 | 
0 | 
0 | 
| T69 | 
0 | 
538 | 
0 | 
0 | 
| T70 | 
0 | 
382 | 
0 | 
0 | 
| T94 | 
45510 | 
0 | 
0 | 
0 | 
| T95 | 
50229 | 
0 | 
0 | 
0 | 
| T96 | 
53833 | 
0 | 
0 | 
0 | 
| T125 | 
0 | 
360 | 
0 | 
0 | 
| T166 | 
45354 | 
0 | 
0 | 
0 | 
| T180 | 
48787 | 
0 | 
0 | 
0 | 
| T315 | 
249346 | 
0 | 
0 | 
0 | 
| T323 | 
995012 | 
0 | 
0 | 
0 | 
| T417 | 
11596 | 
0 | 
0 | 
0 | 
| T436 | 
0 | 
656 | 
0 | 
0 | 
| T437 | 
0 | 
395 | 
0 | 
0 | 
| T438 | 
0 | 
346 | 
0 | 
0 | 
| T439 | 
212095 | 
0 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
323 | 
0 | 
0 | 
| T30 | 
0 | 
1 | 
0 | 
0 | 
| T64 | 
0 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T68 | 
51029 | 
1 | 
0 | 
0 | 
| T69 | 
0 | 
2 | 
0 | 
0 | 
| T70 | 
0 | 
1 | 
0 | 
0 | 
| T94 | 
45510 | 
0 | 
0 | 
0 | 
| T95 | 
50229 | 
0 | 
0 | 
0 | 
| T96 | 
53833 | 
0 | 
0 | 
0 | 
| T125 | 
0 | 
1 | 
0 | 
0 | 
| T166 | 
45354 | 
0 | 
0 | 
0 | 
| T180 | 
48787 | 
0 | 
0 | 
0 | 
| T315 | 
249346 | 
0 | 
0 | 
0 | 
| T323 | 
995012 | 
0 | 
0 | 
0 | 
| T417 | 
11596 | 
0 | 
0 | 
0 | 
| T436 | 
0 | 
2 | 
0 | 
0 | 
| T437 | 
0 | 
1 | 
0 | 
0 | 
| T438 | 
0 | 
1 | 
0 | 
0 | 
| T439 | 
212095 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_6_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T64 T65 T102 
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:       T64 T65 T176 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
135        1/1                txn_bits_q <= '0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_6_cdc
 | Total | Covered | Percent | 
| Conditions | 11 | 10 | 90.91 | 
| Logical | 11 | 10 | 90.91 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_6_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
122048 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
302 | 
0 | 
0 | 
| T65 | 
0 | 
400 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
783 | 
0 | 
0 | 
| T184 | 
0 | 
298 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
3236 | 
0 | 
0 | 
| T408 | 
0 | 
450 | 
0 | 
0 | 
| T409 | 
0 | 
440 | 
0 | 
0 | 
| T424 | 
0 | 
714 | 
0 | 
0 | 
| T433 | 
0 | 
371 | 
0 | 
0 | 
| T434 | 
0 | 
294 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
308 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
8 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
| T434 | 
0 | 
1 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_7_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T64 T65 T102 
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:       T64 T65 T176 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
135        1/1                txn_bits_q <= '0;
           Tests:       T64 T65 T176 
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 T176 T409 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T65 T176 T409 
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:       T64 T65 T176 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_7_cdc
 | Total | Covered | Percent | 
| Conditions | 11 | 10 | 90.91 | 
| Logical | 11 | 10 | 90.91 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_7_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
125802 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
254 | 
0 | 
0 | 
| T65 | 
0 | 
458 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
672 | 
0 | 
0 | 
| T184 | 
0 | 
331 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
1189 | 
0 | 
0 | 
| T408 | 
0 | 
405 | 
0 | 
0 | 
| T409 | 
0 | 
368 | 
0 | 
0 | 
| T424 | 
0 | 
792 | 
0 | 
0 | 
| T433 | 
0 | 
409 | 
0 | 
0 | 
| T434 | 
0 | 
342 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
316 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
3 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
| T434 | 
0 | 
1 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_0_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T64 T65 T102 
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:       T64 T65 T176 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
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:       T64 T65 T176 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
135        1/1                txn_bits_q <= '0;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T64 T65 T176 
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:       T64 T65 T176 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_0_cdc
 | Total | Covered | Percent | 
| Conditions | 11 | 10 | 90.91 | 
| Logical | 11 | 10 | 90.91 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T64,T65,T176 | 
| 1 | 1 | Covered | T64,T65,T176 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_0_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T64,T65,T176 | 
| 0 | 
0 | 
1 | 
Covered | 
T64,T65,T176 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
132817 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
296 | 
0 | 
0 | 
| T65 | 
0 | 
371 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
614 | 
0 | 
0 | 
| T184 | 
0 | 
271 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
4969 | 
0 | 
0 | 
| T408 | 
0 | 
390 | 
0 | 
0 | 
| T409 | 
0 | 
395 | 
0 | 
0 | 
| T424 | 
0 | 
683 | 
0 | 
0 | 
| T433 | 
0 | 
467 | 
0 | 
0 | 
| T434 | 
0 | 
326 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
333 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
12 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
| T434 | 
0 | 
1 | 
0 | 
0 | 
| T435 | 
90874 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 | 
 
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_1_cdc
 | Line No. | Total | Covered | Percent | 
| TOTAL |  | 22 | 22 | 100.00 | 
| CONT_ASSIGN | 65 | 1 | 1 | 100.00 | 
| ALWAYS | 71 | 6 | 6 | 100.00 | 
| CONT_ASSIGN | 85 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 109 | 1 | 1 | 100.00 | 
| ALWAYS | 115 | 9 | 9 | 100.00 | 
| CONT_ASSIGN | 150 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 155 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 156 | 1 | 1 | 100.00 | 
| CONT_ASSIGN | 200 | 1 | 1 | 100.00 | 
64                      
65         1/1            assign src_req = src_we_i | src_re_i;
           Tests:       T63 T64 T410 
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:       T63 T64 T410 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T63 T64 T65 
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:       T63 T64 T410 
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:       T63 T64 T410 
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:       T63 T64 T410 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T63 T64 T410 
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:       T63 T64 T65 
135        1/1                txn_bits_q <= '0;
           Tests:       T63 T64 T65 
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:       T63 T64 T410 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T63 T64 T410 
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:       T63 T64 T410 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_1_cdc
 | Total | Covered | Percent | 
| Conditions | 11 | 10 | 90.91 | 
| Logical | 11 | 10 | 90.91 | 
| Non-Logical | 0 | 0 |  | 
| Event | 0 | 0 |  | 
 LINE       65
 EXPRESSION (src_we_i | src_re_i)
             ----1---   ----2---
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T63,T64,T410 | 
 LINE       109
 EXPRESSION (src_busy_q & ((!src_ack)))
             -----1----   ------2-----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Covered | T63,T64,T65 | 
| 1 | 1 | Covered | T63,T64,T410 | 
 LINE       125
 EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
             -----------1-----------    ------------2------------
| -1- | -2- | Status | Tests |                       
| 0 | 0 | Covered | T1,T2,T3 | 
| 0 | 1 | Unreachable |  | 
| 1 | 0 | Covered | T63,T64,T65 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T63,T64,T410 | 
| 1 | 1 | Covered | T63,T64,T65 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Unreachable |  | 
| 1 | 1 | Unreachable |  | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_1_cdc
 | Line No. | Total | Covered | Percent | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T63,T64,T410 | 
| 0 | 
0 | 
1 | 
Covered | 
T63,T64,T65 | 
| 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- | Status | Tests | 
| 1 | 
- | 
- | 
Covered | 
T1,T2,T3 | 
| 0 | 
1 | 
- | 
Covered | 
T63,T64,T410 | 
| 0 | 
0 | 
1 | 
Covered | 
T63,T64,T65 | 
| 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
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
111841 | 
0 | 
0 | 
| T63 | 
29397 | 
320 | 
0 | 
0 | 
| T64 | 
0 | 
329 | 
0 | 
0 | 
| T65 | 
0 | 
445 | 
0 | 
0 | 
| T68 | 
51029 | 
0 | 
0 | 
0 | 
| T94 | 
45510 | 
0 | 
0 | 
0 | 
| T95 | 
50229 | 
0 | 
0 | 
0 | 
| T166 | 
45354 | 
0 | 
0 | 
0 | 
| T180 | 
48787 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
833 | 
0 | 
0 | 
| T184 | 
0 | 
321 | 
0 | 
0 | 
| T324 | 
101135 | 
0 | 
0 | 
0 | 
| T367 | 
43845 | 
0 | 
0 | 
0 | 
| T408 | 
0 | 
412 | 
0 | 
0 | 
| T409 | 
0 | 
434 | 
0 | 
0 | 
| T410 | 
0 | 
289 | 
0 | 
0 | 
| T432 | 
165726 | 
0 | 
0 | 
0 | 
| T433 | 
0 | 
467 | 
0 | 
0 | 
| T439 | 
212095 | 
0 | 
0 | 
0 | 
| T441 | 
0 | 
364 | 
0 | 
0 | 
DstReqKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
1947974 | 
1721074 | 
0 | 
0 | 
| T1 | 
282 | 
108 | 
0 | 
0 | 
| T2 | 
333 | 
159 | 
0 | 
0 | 
| T3 | 
343 | 
169 | 
0 | 
0 | 
| T4 | 
473 | 
300 | 
0 | 
0 | 
| T5 | 
510 | 
338 | 
0 | 
0 | 
| T6 | 
385 | 
211 | 
0 | 
0 | 
| T8 | 
509 | 
336 | 
0 | 
0 | 
| T9 | 
351 | 
177 | 
0 | 
0 | 
| T27 | 
859 | 
686 | 
0 | 
0 | 
| T38 | 
324 | 
151 | 
0 | 
0 | 
SrcAckBusyChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
280 | 
0 | 
0 | 
| T63 | 
29397 | 
1 | 
0 | 
0 | 
| T64 | 
0 | 
1 | 
0 | 
0 | 
| T65 | 
0 | 
1 | 
0 | 
0 | 
| T68 | 
51029 | 
0 | 
0 | 
0 | 
| T94 | 
45510 | 
0 | 
0 | 
0 | 
| T95 | 
50229 | 
0 | 
0 | 
0 | 
| T166 | 
45354 | 
0 | 
0 | 
0 | 
| T180 | 
48787 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
2 | 
0 | 
0 | 
| T184 | 
0 | 
1 | 
0 | 
0 | 
| T324 | 
101135 | 
0 | 
0 | 
0 | 
| T367 | 
43845 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
1 | 
0 | 
0 | 
| T408 | 
0 | 
1 | 
0 | 
0 | 
| T409 | 
0 | 
1 | 
0 | 
0 | 
| T424 | 
0 | 
2 | 
0 | 
0 | 
| T432 | 
165726 | 
0 | 
0 | 
0 | 
| T433 | 
0 | 
1 | 
0 | 
0 | 
| T439 | 
212095 | 
0 | 
0 | 
0 | 
SrcBusyKnown_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
161500794 | 
0 | 
0 | 
| T1 | 
11237 | 
10514 | 
0 | 
0 | 
| T2 | 
15670 | 
15042 | 
0 | 
0 | 
| T3 | 
16641 | 
16010 | 
0 | 
0 | 
| T4 | 
22764 | 
22435 | 
0 | 
0 | 
| T5 | 
28558 | 
28167 | 
0 | 
0 | 
| T6 | 
26450 | 
25534 | 
0 | 
0 | 
| T8 | 
26469 | 
26134 | 
0 | 
0 | 
| T9 | 
22989 | 
22016 | 
0 | 
0 | 
| T27 | 
38517 | 
37785 | 
0 | 
0 | 
| T38 | 
15636 | 
15044 | 
0 | 
0 |