Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_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:       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_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 | 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_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 | 
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_2_cdc
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
128406 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
302 | 
0 | 
0 | 
| T65 | 
0 | 
425 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
665 | 
0 | 
0 | 
| T184 | 
0 | 
257 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
2927 | 
0 | 
0 | 
| T408 | 
0 | 
477 | 
0 | 
0 | 
| T409 | 
0 | 
413 | 
0 | 
0 | 
| T424 | 
0 | 
772 | 
0 | 
0 | 
| T433 | 
0 | 
401 | 
0 | 
0 | 
| T434 | 
0 | 
299 | 
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 | 
322 | 
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_cnt_th_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_cnt_th_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_cnt_th_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_cnt_th_3_cdc
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
117014 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
309 | 
0 | 
0 | 
| T65 | 
0 | 
401 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
641 | 
0 | 
0 | 
| T184 | 
0 | 
275 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
3723 | 
0 | 
0 | 
| T408 | 
0 | 
374 | 
0 | 
0 | 
| T409 | 
0 | 
468 | 
0 | 
0 | 
| T424 | 
0 | 
728 | 
0 | 
0 | 
| T433 | 
0 | 
414 | 
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 | 
293 | 
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 | 
9 | 
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_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 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_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,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_cnt_th_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,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_4_cdc
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
124338 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
329 | 
0 | 
0 | 
| T65 | 
0 | 
461 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
689 | 
0 | 
0 | 
| T184 | 
0 | 
262 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
3703 | 
0 | 
0 | 
| T408 | 
0 | 
371 | 
0 | 
0 | 
| T409 | 
0 | 
447 | 
0 | 
0 | 
| T424 | 
0 | 
720 | 
0 | 
0 | 
| T433 | 
0 | 
419 | 
0 | 
0 | 
| T434 | 
0 | 
285 | 
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 | 
312 | 
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 | 
9 | 
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_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:       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_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 | 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_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 | 
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_5_cdc
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
133303 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
302 | 
0 | 
0 | 
| T65 | 
0 | 
425 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
712 | 
0 | 
0 | 
| T184 | 
0 | 
259 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
610 | 
0 | 
0 | 
| T408 | 
0 | 
434 | 
0 | 
0 | 
| T409 | 
0 | 
368 | 
0 | 
0 | 
| T424 | 
0 | 
656 | 
0 | 
0 | 
| T433 | 
0 | 
409 | 
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 | 
332 | 
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_cnt_th_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_cnt_th_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_cnt_th_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_cnt_th_6_cdc
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
126193 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
250 | 
0 | 
0 | 
| T65 | 
0 | 
441 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
700 | 
0 | 
0 | 
| T184 | 
0 | 
256 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
681 | 
0 | 
0 | 
| T408 | 
0 | 
417 | 
0 | 
0 | 
| T409 | 
0 | 
473 | 
0 | 
0 | 
| T424 | 
0 | 
689 | 
0 | 
0 | 
| T433 | 
0 | 
376 | 
0 | 
0 | 
| T434 | 
0 | 
272 | 
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 | 
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_cnt_th_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:       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_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_cnt_th_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_cnt_th_7_cdc
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
124346 | 
0 | 
0 | 
| T15 | 
112109 | 
0 | 
0 | 
0 | 
| T60 | 
226438 | 
0 | 
0 | 
0 | 
| T61 | 
228797 | 
0 | 
0 | 
0 | 
| T64 | 
441753 | 
348 | 
0 | 
0 | 
| T65 | 
0 | 
445 | 
0 | 
0 | 
| T100 | 
368407 | 
0 | 
0 | 
0 | 
| T101 | 
713039 | 
0 | 
0 | 
0 | 
| T141 | 
348683 | 
0 | 
0 | 
0 | 
| T183 | 
0 | 
790 | 
0 | 
0 | 
| T184 | 
0 | 
321 | 
0 | 
0 | 
| T274 | 
574020 | 
0 | 
0 | 
0 | 
| T321 | 
272482 | 
0 | 
0 | 
0 | 
| T404 | 
0 | 
653 | 
0 | 
0 | 
| T408 | 
0 | 
479 | 
0 | 
0 | 
| T409 | 
0 | 
410 | 
0 | 
0 | 
| T424 | 
0 | 
681 | 
0 | 
0 | 
| T433 | 
0 | 
365 | 
0 | 
0 | 
| T434 | 
0 | 
346 | 
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 | 
312 | 
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_cause_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 T68 
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 T68 
75         1/1              end else if (src_ack) begin
           Tests:       T1 T2 T3 
76         1/1                src_busy_q <= 1'b0;
           Tests:       T7 T16 T68 
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 T68 
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 T68 
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 T68 
124        1/1                txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
           Tests:       T7 T16 T68 
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 T7 T16 
135        1/1                txn_bits_q <= '0;
           Tests:       T27 T7 T16 
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 T7 T16 
156        1/1            assign dst_wd_o = src_q;
           Tests:       T27 T7 T16 
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 T68 
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_cause_cdc
 | Total | Covered | Percent | 
| Conditions | 14 | 12 | 85.71 | 
| Logical | 14 | 12 | 85.71 | 
| 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,T68 | 
 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,T68 | 
| 1 | 1 | Covered | T7,T16,T68 | 
 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 | Covered | T27,T7,T16 | 
| 1 | 0 | Covered | T7,T16,T68 | 
 LINE       125
 SUB-EXPRESSION (src_busy_q && src_ack)
                 -----1----    ---2---
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Not Covered |  | 
| 1 | 0 | Covered | T7,T16,T68 | 
| 1 | 1 | Covered | T7,T16,T68 | 
 LINE       125
 SUB-EXPRESSION (src_update && ((!busy)))
                 -----1----    ----2----
| -1- | -2- | Status | Tests |                       
| 0 | 1 | Covered | T1,T2,T3 | 
| 1 | 0 | Not Covered |  | 
| 1 | 1 | Covered | T27,T7,T16 | 
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_cause_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,T68 | 
| 0 | 
0 | 
1 | 
Covered | 
T7,T16,T68 | 
| 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,T68 | 
| 0 | 
0 | 
1 | 
Covered | 
T27,T7,T16 | 
| 0 | 
0 | 
0 | 
Covered | 
T1,T2,T3 | 
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_cause_cdc
Assertion Details
BusySrcReqChk_A
| Name | Attempts | Real Successes | Failures | Incomplete | 
| Total | 
162325594 | 
176748 | 
0 | 
0 | 
| T7 | 
44303 | 
1894 | 
0 | 
0 | 
| T11 | 
44406 | 
0 | 
0 | 
0 | 
| T12 | 
21882 | 
0 | 
0 | 
0 | 
| T16 | 
31607 | 
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 | 
335 | 
0 | 
0 | 
| T65 | 
0 | 
475 | 
0 | 
0 | 
| T66 | 
0 | 
932 | 
0 | 
0 | 
| T68 | 
0 | 
797 | 
0 | 
0 | 
| T69 | 
0 | 
1352 | 
0 | 
0 | 
| T70 | 
0 | 
876 | 
0 | 
0 | 
| T71 | 
0 | 
1196 | 
0 | 
0 | 
| T125 | 
0 | 
786 | 
0 | 
0 | 
| T126 | 
58557 | 
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 | 
378 | 
0 | 
0 | 
| T7 | 
44303 | 
4 | 
0 | 
0 | 
| T11 | 
44406 | 
0 | 
0 | 
0 | 
| T12 | 
21882 | 
0 | 
0 | 
0 | 
| T16 | 
31607 | 
3 | 
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 | 
3 | 
0 | 
0 | 
| T68 | 
0 | 
2 | 
0 | 
0 | 
| T69 | 
0 | 
4 | 
0 | 
0 | 
| T70 | 
0 | 
2 | 
0 | 
0 | 
| T71 | 
0 | 
4 | 
0 | 
0 | 
| T125 | 
0 | 
2 | 
0 | 
0 | 
| T126 | 
58557 | 
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 |