Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_0_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T26 T12 T70
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T26 T12 T70
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T26 T12 T70
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T26 T12 T70
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T26 T12 T70
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T26 T12 T70
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T26 T12 T70
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T26 T12 T70
135 1/1 txn_bits_q <= '0;
Tests: T26 T12 T70
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T26 T12 T70
156 1/1 assign dst_wd_o = src_q;
Tests: T26 T12 T70
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T26 T12 T70
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_0_cdc
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T26,T12,T70 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T26,T12,T70 |
1 | 1 | Covered | T26,T12,T70 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T26,T12,T70 |
1 | - | Covered | T26,T12,T70 |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T26,T12,T70 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T26,T12,T70 |
1 | 1 | Covered | T26,T12,T70 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_0_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T26,T12,T70 |
0 |
0 |
1 |
Covered |
T26,T12,T70 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
115 if (!rst_src_ni) begin
-1-
116 src_q <= ResetVal;
==>
117 txn_bits_q <= '0;
118 end else if (src_req) begin
-2-
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 src_q <= src_wd_i & BitMask;
==>
124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
125 end else if (src_busy_q && src_ack || src_update && !busy) begin
-3-
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 src_q <= dst_qs;
==>
135 txn_bits_q <= '0;
136 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T26,T12,T70 |
0 |
0 |
1 |
Covered |
T26,T12,T70 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_0_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
121379 |
0 |
0 |
T7 |
24676 |
0 |
0 |
0 |
T12 |
0 |
1959 |
0 |
0 |
T13 |
34933 |
0 |
0 |
0 |
T26 |
25690 |
746 |
0 |
0 |
T27 |
47989 |
0 |
0 |
0 |
T28 |
23498 |
0 |
0 |
0 |
T32 |
23203 |
0 |
0 |
0 |
T68 |
0 |
526 |
0 |
0 |
T70 |
0 |
741 |
0 |
0 |
T78 |
0 |
954 |
0 |
0 |
T79 |
0 |
1934 |
0 |
0 |
T80 |
0 |
1913 |
0 |
0 |
T106 |
23413 |
0 |
0 |
0 |
T121 |
23976 |
0 |
0 |
0 |
T122 |
23842 |
0 |
0 |
0 |
T141 |
20841 |
0 |
0 |
0 |
T182 |
0 |
353 |
0 |
0 |
T385 |
0 |
315 |
0 |
0 |
T411 |
0 |
397 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
306 |
0 |
0 |
T7 |
24676 |
0 |
0 |
0 |
T12 |
0 |
5 |
0 |
0 |
T13 |
34933 |
0 |
0 |
0 |
T26 |
25690 |
2 |
0 |
0 |
T27 |
47989 |
0 |
0 |
0 |
T28 |
23498 |
0 |
0 |
0 |
T32 |
23203 |
0 |
0 |
0 |
T68 |
0 |
2 |
0 |
0 |
T70 |
0 |
2 |
0 |
0 |
T78 |
0 |
2 |
0 |
0 |
T79 |
0 |
5 |
0 |
0 |
T80 |
0 |
5 |
0 |
0 |
T106 |
23413 |
0 |
0 |
0 |
T121 |
23976 |
0 |
0 |
0 |
T122 |
23842 |
0 |
0 |
0 |
T141 |
20841 |
0 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 20 | 90.91 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 0 | 0.00 |
CONT_ASSIGN | 156 | 1 | 0 | 0.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T68 T95 T96
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T68 T174 T385
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T68 T174 T385
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T68 T174 T385
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T68 T174 T385
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T68 T174 T385
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T68 T174 T385
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T68 T174 T385
135 1/1 txn_bits_q <= '0;
Tests: T68 T174 T385
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 0/1 ==> assign src_qs_o = src_q;
156 0/1 ==> assign dst_wd_o = src_q;
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T68 T174 T385
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_cdc
| Total | Covered | Percent |
Conditions | 13 | 11 | 84.62 |
Logical | 13 | 11 | 84.62 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T433,T174 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T68,T174,T385 |
1 | - | Not Covered | |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
115 if (!rst_src_ni) begin
-1-
116 src_q <= ResetVal;
==>
117 txn_bits_q <= '0;
118 end else if (src_req) begin
-2-
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 src_q <= src_wd_i & BitMask;
==>
124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
125 end else if (src_busy_q && src_ack || src_update && !busy) begin
-3-
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 src_q <= dst_qs;
==>
135 txn_bits_q <= '0;
136 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_1_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
113029 |
0 |
0 |
T68 |
480871 |
645 |
0 |
0 |
T182 |
0 |
353 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
284 |
0 |
0 |
T411 |
0 |
467 |
0 |
0 |
T424 |
0 |
373 |
0 |
0 |
T425 |
0 |
750 |
0 |
0 |
T426 |
0 |
272 |
0 |
0 |
T427 |
0 |
595 |
0 |
0 |
T428 |
0 |
712 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
805 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
287 |
0 |
0 |
T68 |
480871 |
2 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T428 |
0 |
2 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
2 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_2_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T71 T68 T95
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T71 T68 T174
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T71 T68 T174
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T71 T68 T174
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T71 T68 T174
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T71 T68 T174
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T71 T68 T174
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T71 T68 T174
135 1/1 txn_bits_q <= '0;
Tests: T71 T68 T174
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T71
156 1/1 assign dst_wd_o = src_q;
Tests: T71
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T71 T68 T174
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_2_cdc
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T71,T68,T174 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T71,T68,T174 |
1 | 1 | Covered | T71,T68,T174 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T71,T68,T174 |
1 | - | Covered | T71 |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T71,T68,T174 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T71,T68,T174 |
1 | 1 | Covered | T71,T68,T174 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_2_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T71,T68,T174 |
0 |
0 |
1 |
Covered |
T71,T68,T174 |
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 |
T71,T68,T174 |
0 |
0 |
1 |
Covered |
T71,T68,T174 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_2_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
107085 |
0 |
0 |
T50 |
37758 |
0 |
0 |
0 |
T68 |
0 |
582 |
0 |
0 |
T71 |
44620 |
1070 |
0 |
0 |
T129 |
110597 |
0 |
0 |
0 |
T182 |
0 |
334 |
0 |
0 |
T292 |
66982 |
0 |
0 |
0 |
T349 |
51310 |
0 |
0 |
0 |
T365 |
54743 |
0 |
0 |
0 |
T385 |
0 |
284 |
0 |
0 |
T411 |
0 |
404 |
0 |
0 |
T424 |
0 |
464 |
0 |
0 |
T425 |
0 |
682 |
0 |
0 |
T426 |
0 |
290 |
0 |
0 |
T427 |
0 |
667 |
0 |
0 |
T428 |
0 |
721 |
0 |
0 |
T435 |
71543 |
0 |
0 |
0 |
T436 |
57858 |
0 |
0 |
0 |
T437 |
59110 |
0 |
0 |
0 |
T438 |
402656 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
273 |
0 |
0 |
T50 |
37758 |
0 |
0 |
0 |
T68 |
0 |
2 |
0 |
0 |
T71 |
44620 |
2 |
0 |
0 |
T129 |
110597 |
0 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T292 |
66982 |
0 |
0 |
0 |
T349 |
51310 |
0 |
0 |
0 |
T365 |
54743 |
0 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T428 |
0 |
2 |
0 |
0 |
T435 |
71543 |
0 |
0 |
0 |
T436 |
57858 |
0 |
0 |
0 |
T437 |
59110 |
0 |
0 |
0 |
T438 |
402656 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_3_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 20 | 90.91 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 0 | 0.00 |
CONT_ASSIGN | 156 | 1 | 0 | 0.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T68 T95 T96
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T68 T174 T385
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T68 T174 T385
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T68 T174 T385
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T68 T174 T385
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T68 T174 T385
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T68 T174 T385
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T68 T174 T385
135 1/1 txn_bits_q <= '0;
Tests: T68 T174 T385
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 0/1 ==> assign src_qs_o = src_q;
156 0/1 ==> assign dst_wd_o = src_q;
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T68 T174 T385
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_3_cdc
| Total | Covered | Percent |
Conditions | 13 | 11 | 84.62 |
Logical | 13 | 11 | 84.62 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T68,T174,T385 |
1 | - | Not Covered | |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_3_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
115 if (!rst_src_ni) begin
-1-
116 src_q <= ResetVal;
==>
117 txn_bits_q <= '0;
118 end else if (src_req) begin
-2-
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 src_q <= src_wd_i & BitMask;
==>
124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
125 end else if (src_busy_q && src_ack || src_update && !busy) begin
-3-
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 src_q <= dst_qs;
==>
135 txn_bits_q <= '0;
136 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_3_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
130742 |
0 |
0 |
T68 |
480871 |
598 |
0 |
0 |
T182 |
0 |
311 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
311 |
0 |
0 |
T411 |
0 |
397 |
0 |
0 |
T424 |
0 |
482 |
0 |
0 |
T425 |
0 |
821 |
0 |
0 |
T426 |
0 |
267 |
0 |
0 |
T427 |
0 |
628 |
0 |
0 |
T428 |
0 |
806 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
843 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
327 |
0 |
0 |
T68 |
480871 |
2 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T428 |
0 |
2 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
2 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_4_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T4 T68 T95
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T4 T68 T174
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T4 T68 T174
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T4 T68 T174
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T4 T68 T174
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T4 T68 T174
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T4 T68 T174
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T4 T68 T174
135 1/1 txn_bits_q <= '0;
Tests: T4 T68 T174
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T4
156 1/1 assign dst_wd_o = src_q;
Tests: T4
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T4 T68 T174
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_4_cdc
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T4,T68,T271 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T4,T68,T174 |
1 | 1 | Covered | T4,T68,T174 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T4,T68,T174 |
1 | - | Covered | T4 |
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 | T4,T68,T174 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T4,T68,T174 |
1 | 1 | Covered | T4,T68,T174 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_4_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T4,T68,T174 |
0 |
0 |
1 |
Covered |
T4,T68,T174 |
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 |
T4,T68,T174 |
0 |
0 |
1 |
Covered |
T4,T68,T174 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_4_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
117481 |
0 |
0 |
T4 |
27713 |
915 |
0 |
0 |
T5 |
31598 |
0 |
0 |
0 |
T6 |
19937 |
0 |
0 |
0 |
T7 |
24676 |
0 |
0 |
0 |
T26 |
25690 |
0 |
0 |
0 |
T34 |
10008 |
0 |
0 |
0 |
T68 |
0 |
550 |
0 |
0 |
T105 |
15509 |
0 |
0 |
0 |
T106 |
23413 |
0 |
0 |
0 |
T121 |
23976 |
0 |
0 |
0 |
T122 |
23842 |
0 |
0 |
0 |
T182 |
0 |
265 |
0 |
0 |
T385 |
0 |
298 |
0 |
0 |
T411 |
0 |
439 |
0 |
0 |
T424 |
0 |
390 |
0 |
0 |
T425 |
0 |
737 |
0 |
0 |
T426 |
0 |
260 |
0 |
0 |
T427 |
0 |
615 |
0 |
0 |
T428 |
0 |
719 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
298 |
0 |
0 |
T4 |
27713 |
2 |
0 |
0 |
T5 |
31598 |
0 |
0 |
0 |
T6 |
19937 |
0 |
0 |
0 |
T7 |
24676 |
0 |
0 |
0 |
T26 |
25690 |
0 |
0 |
0 |
T34 |
10008 |
0 |
0 |
0 |
T68 |
0 |
2 |
0 |
0 |
T105 |
15509 |
0 |
0 |
0 |
T106 |
23413 |
0 |
0 |
0 |
T121 |
23976 |
0 |
0 |
0 |
T122 |
23842 |
0 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T428 |
0 |
2 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T72 T73 T74
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: T72 T73 T74
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T72 T73 T74
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: T72 T73 T74
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: T72 T73 T74
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: T72 T73 T74
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T72 T73 T74
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: T72 T73 T74
135 1/1 txn_bits_q <= '0;
Tests: T72 T73 T74
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: T72 T73 T74
156 1/1 assign dst_wd_o = src_q;
Tests: T72 T73 T74
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: T72 T73 T74
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T72,T73,T74 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T72,T73,T74 |
1 | 1 | Covered | T72,T73,T74 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T72,T73,T74 |
1 | - | Covered | T72,T73,T74 |
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 | T72,T73,T74 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T72,T73,T74 |
1 | 1 | Covered | T72,T73,T74 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T72,T73,T74 |
0 |
0 |
1 |
Covered |
T72,T73,T74 |
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 |
T72,T73,T74 |
0 |
0 |
1 |
Covered |
T72,T73,T74 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_5_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
132797 |
0 |
0 |
T25 |
0 |
809 |
0 |
0 |
T72 |
49330 |
624 |
0 |
0 |
T73 |
0 |
654 |
0 |
0 |
T74 |
0 |
1429 |
0 |
0 |
T89 |
36311 |
0 |
0 |
0 |
T90 |
55639 |
0 |
0 |
0 |
T120 |
0 |
624 |
0 |
0 |
T125 |
0 |
1554 |
0 |
0 |
T331 |
101169 |
0 |
0 |
0 |
T377 |
35275 |
0 |
0 |
0 |
T401 |
18682 |
0 |
0 |
0 |
T423 |
0 |
897 |
0 |
0 |
T439 |
0 |
619 |
0 |
0 |
T440 |
0 |
1312 |
0 |
0 |
T441 |
0 |
773 |
0 |
0 |
T442 |
52283 |
0 |
0 |
0 |
T443 |
64612 |
0 |
0 |
0 |
T444 |
51606 |
0 |
0 |
0 |
T445 |
18289 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
338 |
0 |
0 |
T25 |
0 |
2 |
0 |
0 |
T72 |
49330 |
2 |
0 |
0 |
T73 |
0 |
2 |
0 |
0 |
T74 |
0 |
4 |
0 |
0 |
T89 |
36311 |
0 |
0 |
0 |
T90 |
55639 |
0 |
0 |
0 |
T120 |
0 |
2 |
0 |
0 |
T125 |
0 |
4 |
0 |
0 |
T331 |
101169 |
0 |
0 |
0 |
T377 |
35275 |
0 |
0 |
0 |
T401 |
18682 |
0 |
0 |
0 |
T423 |
0 |
2 |
0 |
0 |
T439 |
0 |
2 |
0 |
0 |
T440 |
0 |
4 |
0 |
0 |
T441 |
0 |
2 |
0 |
0 |
T442 |
52283 |
0 |
0 |
0 |
T443 |
64612 |
0 |
0 |
0 |
T444 |
51606 |
0 |
0 |
0 |
T445 |
18289 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_6_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 20 | 90.91 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 0 | 0.00 |
CONT_ASSIGN | 156 | 1 | 0 | 0.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T68 T95 T96
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T68 T174 T385
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T68 T174 T385
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T68 T174 T385
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T68 T174 T385
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T68 T174 T385
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T68 T174 T385
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T68 T174 T385
135 1/1 txn_bits_q <= '0;
Tests: T68 T174 T385
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 0/1 ==> assign src_qs_o = src_q;
156 0/1 ==> assign dst_wd_o = src_q;
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T68 T174 T385
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_6_cdc
| Total | Covered | Percent |
Conditions | 13 | 11 | 84.62 |
Logical | 13 | 11 | 84.62 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T68,T174,T385 |
1 | - | Not Covered | |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_6_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
115 if (!rst_src_ni) begin
-1-
116 src_q <= ResetVal;
==>
117 txn_bits_q <= '0;
118 end else if (src_req) begin
-2-
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 src_q <= src_wd_i & BitMask;
==>
124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
125 end else if (src_busy_q && src_ack || src_update && !busy) begin
-3-
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 src_q <= dst_qs;
==>
135 txn_bits_q <= '0;
136 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_6_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
118655 |
0 |
0 |
T68 |
480871 |
539 |
0 |
0 |
T182 |
0 |
324 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
357 |
0 |
0 |
T411 |
0 |
448 |
0 |
0 |
T424 |
0 |
381 |
0 |
0 |
T425 |
0 |
750 |
0 |
0 |
T426 |
0 |
268 |
0 |
0 |
T427 |
0 |
609 |
0 |
0 |
T428 |
0 |
695 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
840 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
298 |
0 |
0 |
T68 |
480871 |
2 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T428 |
0 |
2 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
2 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 20 | 90.91 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 0 | 0.00 |
CONT_ASSIGN | 156 | 1 | 0 | 0.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T68 T95 T96
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T68 T174 T385
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T68 T174 T385
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T68 T174 T385
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T68 T174 T385
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T68 T174 T385
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T68 T174 T385
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T68 T174 T385
135 1/1 txn_bits_q <= '0;
Tests: T68 T174 T385
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 0/1 ==> assign src_qs_o = src_q;
156 0/1 ==> assign dst_wd_o = src_q;
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T68 T174 T385
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_cdc
| Total | Covered | Percent |
Conditions | 13 | 11 | 84.62 |
Logical | 13 | 11 | 84.62 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T68,T174,T385 |
1 | - | Not Covered | |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
115 if (!rst_src_ni) begin
-1-
116 src_q <= ResetVal;
==>
117 txn_bits_q <= '0;
118 end else if (src_req) begin
-2-
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 src_q <= src_wd_i & BitMask;
==>
124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
125 end else if (src_busy_q && src_ack || src_update && !busy) begin
-3-
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 src_q <= dst_qs;
==>
135 txn_bits_q <= '0;
136 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_en_7_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
115792 |
0 |
0 |
T68 |
480871 |
579 |
0 |
0 |
T182 |
0 |
306 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
326 |
0 |
0 |
T411 |
0 |
380 |
0 |
0 |
T424 |
0 |
441 |
0 |
0 |
T425 |
0 |
711 |
0 |
0 |
T426 |
0 |
269 |
0 |
0 |
T427 |
0 |
685 |
0 |
0 |
T428 |
0 |
678 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
829 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
291 |
0 |
0 |
T68 |
480871 |
2 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T428 |
0 |
2 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
2 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_0_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T26 T12 T70
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T26 T12 T70
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T26 T12 T70
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T26 T12 T70
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T26 T12 T70
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T26 T12 T70
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T26 T12 T70
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T26 T12 T70
135 1/1 txn_bits_q <= '0;
Tests: T26 T12 T70
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T12 T79 T80
156 1/1 assign dst_wd_o = src_q;
Tests: T12 T79 T80
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T26 T12 T70
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_0_cdc
| Total | Covered | Percent |
Conditions | 11 | 10 | 90.91 |
Logical | 11 | 10 | 90.91 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T26,T12,T70 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T26,T12,T70 |
1 | 1 | Covered | T26,T12,T70 |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T26,T12,T70 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T26,T12,T70 |
1 | 1 | Covered | T26,T12,T70 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_0_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T26,T12,T70 |
0 |
0 |
1 |
Covered |
T26,T12,T70 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
115 if (!rst_src_ni) begin
-1-
116 src_q <= ResetVal;
==>
117 txn_bits_q <= '0;
118 end else if (src_req) begin
-2-
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 src_q <= src_wd_i & BitMask;
==>
124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
125 end else if (src_busy_q && src_ack || src_update && !busy) begin
-3-
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 src_q <= dst_qs;
==>
135 txn_bits_q <= '0;
136 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T26,T12,T70 |
0 |
0 |
1 |
Covered |
T26,T12,T70 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_0_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
121496 |
0 |
0 |
T7 |
24676 |
0 |
0 |
0 |
T12 |
0 |
662 |
0 |
0 |
T13 |
34933 |
0 |
0 |
0 |
T26 |
25690 |
249 |
0 |
0 |
T27 |
47989 |
0 |
0 |
0 |
T28 |
23498 |
0 |
0 |
0 |
T32 |
23203 |
0 |
0 |
0 |
T68 |
0 |
571 |
0 |
0 |
T70 |
0 |
244 |
0 |
0 |
T78 |
0 |
460 |
0 |
0 |
T79 |
0 |
636 |
0 |
0 |
T80 |
0 |
610 |
0 |
0 |
T106 |
23413 |
0 |
0 |
0 |
T121 |
23976 |
0 |
0 |
0 |
T122 |
23842 |
0 |
0 |
0 |
T141 |
20841 |
0 |
0 |
0 |
T182 |
0 |
248 |
0 |
0 |
T385 |
0 |
323 |
0 |
0 |
T411 |
0 |
365 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
310 |
0 |
0 |
T7 |
24676 |
0 |
0 |
0 |
T12 |
0 |
2 |
0 |
0 |
T13 |
34933 |
0 |
0 |
0 |
T26 |
25690 |
1 |
0 |
0 |
T27 |
47989 |
0 |
0 |
0 |
T28 |
23498 |
0 |
0 |
0 |
T32 |
23203 |
0 |
0 |
0 |
T68 |
0 |
2 |
0 |
0 |
T70 |
0 |
1 |
0 |
0 |
T78 |
0 |
1 |
0 |
0 |
T79 |
0 |
2 |
0 |
0 |
T80 |
0 |
2 |
0 |
0 |
T106 |
23413 |
0 |
0 |
0 |
T121 |
23976 |
0 |
0 |
0 |
T122 |
23842 |
0 |
0 |
0 |
T141 |
20841 |
0 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_1_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T68 T95 T96
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T68 T174 T385
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T68 T174 T385
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T68 T174 T385
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T68 T174 T385
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T68 T174 T385
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T68 T174 T385
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T68 T174 T385
135 1/1 txn_bits_q <= '0;
Tests: T68 T174 T385
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T68 T174 T385
156 1/1 assign dst_wd_o = src_q;
Tests: T68 T174 T385
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T68 T174 T385
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_1_cdc
| Total | Covered | Percent |
Conditions | 11 | 10 | 90.91 |
Logical | 11 | 10 | 90.91 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_1_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
115 if (!rst_src_ni) begin
-1-
116 src_q <= ResetVal;
==>
117 txn_bits_q <= '0;
118 end else if (src_req) begin
-2-
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 src_q <= src_wd_i & BitMask;
==>
124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
125 end else if (src_busy_q && src_ack || src_update && !busy) begin
-3-
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 src_q <= dst_qs;
==>
135 txn_bits_q <= '0;
136 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_1_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
120839 |
0 |
0 |
T68 |
480871 |
575 |
0 |
0 |
T182 |
0 |
309 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
311 |
0 |
0 |
T411 |
0 |
469 |
0 |
0 |
T424 |
0 |
471 |
0 |
0 |
T425 |
0 |
801 |
0 |
0 |
T426 |
0 |
334 |
0 |
0 |
T427 |
0 |
649 |
0 |
0 |
T428 |
0 |
764 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
849 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
304 |
0 |
0 |
T68 |
480871 |
2 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T428 |
0 |
2 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
2 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_2_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T71 T68 T95
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T71 T68 T174
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T71 T68 T174
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T71 T68 T174
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T71 T68 T174
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T71 T68 T174
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T71 T68 T174
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T71 T68 T174
135 1/1 txn_bits_q <= '0;
Tests: T71 T68 T174
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T71 T68 T174
156 1/1 assign dst_wd_o = src_q;
Tests: T71 T68 T174
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T71 T68 T174
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_2_cdc
| Total | Covered | Percent |
Conditions | 11 | 10 | 90.91 |
Logical | 11 | 10 | 90.91 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T71,T68,T174 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T71,T68,T174 |
1 | 1 | Covered | T71,T68,T174 |
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 | T71,T68,T174 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T71,T68,T174 |
1 | 1 | Covered | T71,T68,T174 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_2_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T71,T68,T174 |
0 |
0 |
1 |
Covered |
T71,T68,T174 |
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 |
T71,T68,T174 |
0 |
0 |
1 |
Covered |
T71,T68,T174 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_2_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
126215 |
0 |
0 |
T50 |
37758 |
0 |
0 |
0 |
T68 |
0 |
647 |
0 |
0 |
T71 |
44620 |
411 |
0 |
0 |
T129 |
110597 |
0 |
0 |
0 |
T182 |
0 |
247 |
0 |
0 |
T292 |
66982 |
0 |
0 |
0 |
T349 |
51310 |
0 |
0 |
0 |
T365 |
54743 |
0 |
0 |
0 |
T385 |
0 |
247 |
0 |
0 |
T411 |
0 |
379 |
0 |
0 |
T424 |
0 |
396 |
0 |
0 |
T425 |
0 |
679 |
0 |
0 |
T426 |
0 |
315 |
0 |
0 |
T427 |
0 |
702 |
0 |
0 |
T428 |
0 |
697 |
0 |
0 |
T435 |
71543 |
0 |
0 |
0 |
T436 |
57858 |
0 |
0 |
0 |
T437 |
59110 |
0 |
0 |
0 |
T438 |
402656 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
318 |
0 |
0 |
T50 |
37758 |
0 |
0 |
0 |
T68 |
0 |
2 |
0 |
0 |
T71 |
44620 |
1 |
0 |
0 |
T129 |
110597 |
0 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T292 |
66982 |
0 |
0 |
0 |
T349 |
51310 |
0 |
0 |
0 |
T365 |
54743 |
0 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T428 |
0 |
2 |
0 |
0 |
T435 |
71543 |
0 |
0 |
0 |
T436 |
57858 |
0 |
0 |
0 |
T437 |
59110 |
0 |
0 |
0 |
T438 |
402656 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_3_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T68 T95 T96
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T68 T174 T385
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T68 T174 T385
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T68 T174 T385
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T68 T174 T385
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T68 T174 T385
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T68 T174 T385
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T68 T174 T385
135 1/1 txn_bits_q <= '0;
Tests: T68 T174 T385
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T68 T174 T385
156 1/1 assign dst_wd_o = src_q;
Tests: T68 T174 T385
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T68 T174 T385
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_3_cdc
| Total | Covered | Percent |
Conditions | 11 | 10 | 90.91 |
Logical | 11 | 10 | 90.91 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_3_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
115 if (!rst_src_ni) begin
-1-
116 src_q <= ResetVal;
==>
117 txn_bits_q <= '0;
118 end else if (src_req) begin
-2-
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 src_q <= src_wd_i & BitMask;
==>
124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
125 end else if (src_busy_q && src_ack || src_update && !busy) begin
-3-
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 src_q <= dst_qs;
==>
135 txn_bits_q <= '0;
136 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_3_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
117997 |
0 |
0 |
T68 |
480871 |
596 |
0 |
0 |
T182 |
0 |
293 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
257 |
0 |
0 |
T411 |
0 |
481 |
0 |
0 |
T424 |
0 |
468 |
0 |
0 |
T425 |
0 |
729 |
0 |
0 |
T426 |
0 |
342 |
0 |
0 |
T427 |
0 |
532 |
0 |
0 |
T428 |
0 |
729 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
832 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
296 |
0 |
0 |
T68 |
480871 |
2 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T428 |
0 |
2 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
2 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_4_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T4 T68 T95
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T4 T68 T174
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T4 T68 T174
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T4 T68 T174
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T4 T68 T174
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T4 T68 T174
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T4 T68 T174
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T4 T68 T174
135 1/1 txn_bits_q <= '0;
Tests: T4 T68 T174
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T4 T68 T174
156 1/1 assign dst_wd_o = src_q;
Tests: T4 T68 T174
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T4 T68 T174
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_4_cdc
| Total | Covered | Percent |
Conditions | 11 | 10 | 90.91 |
Logical | 11 | 10 | 90.91 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T4,T68,T174 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T4,T68,T174 |
1 | 1 | Covered | T4,T68,T174 |
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 | T4,T68,T174 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T4,T68,T174 |
1 | 1 | Covered | T4,T68,T174 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_4_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T4,T68,T174 |
0 |
0 |
1 |
Covered |
T4,T68,T174 |
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 |
T4,T68,T174 |
0 |
0 |
1 |
Covered |
T4,T68,T174 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_4_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
110468 |
0 |
0 |
T4 |
27713 |
250 |
0 |
0 |
T5 |
31598 |
0 |
0 |
0 |
T6 |
19937 |
0 |
0 |
0 |
T7 |
24676 |
0 |
0 |
0 |
T26 |
25690 |
0 |
0 |
0 |
T34 |
10008 |
0 |
0 |
0 |
T68 |
0 |
598 |
0 |
0 |
T105 |
15509 |
0 |
0 |
0 |
T106 |
23413 |
0 |
0 |
0 |
T121 |
23976 |
0 |
0 |
0 |
T122 |
23842 |
0 |
0 |
0 |
T182 |
0 |
244 |
0 |
0 |
T385 |
0 |
339 |
0 |
0 |
T411 |
0 |
444 |
0 |
0 |
T424 |
0 |
454 |
0 |
0 |
T425 |
0 |
728 |
0 |
0 |
T426 |
0 |
253 |
0 |
0 |
T427 |
0 |
668 |
0 |
0 |
T428 |
0 |
649 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
281 |
0 |
0 |
T4 |
27713 |
1 |
0 |
0 |
T5 |
31598 |
0 |
0 |
0 |
T6 |
19937 |
0 |
0 |
0 |
T7 |
24676 |
0 |
0 |
0 |
T26 |
25690 |
0 |
0 |
0 |
T34 |
10008 |
0 |
0 |
0 |
T68 |
0 |
2 |
0 |
0 |
T105 |
15509 |
0 |
0 |
0 |
T106 |
23413 |
0 |
0 |
0 |
T121 |
23976 |
0 |
0 |
0 |
T122 |
23842 |
0 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T428 |
0 |
2 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_5_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T72 T73 T74
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: T72 T73 T74
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T72 T73 T74
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: T72 T73 T74
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: T72 T73 T74
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: T72 T73 T74
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T72 T73 T74
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: T72 T73 T74
135 1/1 txn_bits_q <= '0;
Tests: T72 T73 T74
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T25 T68 T174
156 1/1 assign dst_wd_o = src_q;
Tests: T25 T68 T174
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: T72 T73 T74
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_5_cdc
| Total | Covered | Percent |
Conditions | 11 | 10 | 90.91 |
Logical | 11 | 10 | 90.91 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T72,T73,T74 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T72,T73,T74 |
1 | 1 | Covered | T72,T73,T74 |
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 | T72,T73,T74 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T72,T73,T74 |
1 | 1 | Covered | T72,T73,T74 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_5_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T72,T73,T74 |
0 |
0 |
1 |
Covered |
T72,T73,T74 |
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 |
T72,T73,T74 |
0 |
0 |
1 |
Covered |
T72,T73,T74 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_5_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
117632 |
0 |
0 |
T25 |
0 |
270 |
0 |
0 |
T72 |
49330 |
249 |
0 |
0 |
T73 |
0 |
280 |
0 |
0 |
T74 |
0 |
559 |
0 |
0 |
T89 |
36311 |
0 |
0 |
0 |
T90 |
55639 |
0 |
0 |
0 |
T120 |
0 |
249 |
0 |
0 |
T125 |
0 |
563 |
0 |
0 |
T331 |
101169 |
0 |
0 |
0 |
T377 |
35275 |
0 |
0 |
0 |
T401 |
18682 |
0 |
0 |
0 |
T423 |
0 |
401 |
0 |
0 |
T439 |
0 |
244 |
0 |
0 |
T440 |
0 |
563 |
0 |
0 |
T441 |
0 |
277 |
0 |
0 |
T442 |
52283 |
0 |
0 |
0 |
T443 |
64612 |
0 |
0 |
0 |
T444 |
51606 |
0 |
0 |
0 |
T445 |
18289 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
300 |
0 |
0 |
T25 |
0 |
1 |
0 |
0 |
T72 |
49330 |
1 |
0 |
0 |
T73 |
0 |
1 |
0 |
0 |
T74 |
0 |
2 |
0 |
0 |
T89 |
36311 |
0 |
0 |
0 |
T90 |
55639 |
0 |
0 |
0 |
T120 |
0 |
1 |
0 |
0 |
T125 |
0 |
2 |
0 |
0 |
T331 |
101169 |
0 |
0 |
0 |
T377 |
35275 |
0 |
0 |
0 |
T401 |
18682 |
0 |
0 |
0 |
T423 |
0 |
1 |
0 |
0 |
T439 |
0 |
1 |
0 |
0 |
T440 |
0 |
2 |
0 |
0 |
T441 |
0 |
1 |
0 |
0 |
T442 |
52283 |
0 |
0 |
0 |
T443 |
64612 |
0 |
0 |
0 |
T444 |
51606 |
0 |
0 |
0 |
T445 |
18289 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_6_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T68 T95 T96
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T68 T174 T385
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T68 T174 T385
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T68 T174 T385
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T68 T174 T385
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T68 T174 T385
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T68 T174 T385
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T68 T174 T385
135 1/1 txn_bits_q <= '0;
Tests: T68 T174 T385
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T68 T174 T385
156 1/1 assign dst_wd_o = src_q;
Tests: T68 T174 T385
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T68 T174 T385
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_6_cdc
| Total | Covered | Percent |
Conditions | 11 | 10 | 90.91 |
Logical | 11 | 10 | 90.91 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T446,T174 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_6_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
115 if (!rst_src_ni) begin
-1-
116 src_q <= ResetVal;
==>
117 txn_bits_q <= '0;
118 end else if (src_req) begin
-2-
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 src_q <= src_wd_i & BitMask;
==>
124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
125 end else if (src_busy_q && src_ack || src_update && !busy) begin
-3-
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 src_q <= dst_qs;
==>
135 txn_bits_q <= '0;
136 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_6_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
105584 |
0 |
0 |
T68 |
480871 |
541 |
0 |
0 |
T182 |
0 |
277 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
321 |
0 |
0 |
T411 |
0 |
471 |
0 |
0 |
T424 |
0 |
391 |
0 |
0 |
T425 |
0 |
650 |
0 |
0 |
T426 |
0 |
252 |
0 |
0 |
T427 |
0 |
682 |
0 |
0 |
T428 |
0 |
744 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
733 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
268 |
0 |
0 |
T68 |
480871 |
2 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T428 |
0 |
2 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
2 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_7_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T68 T95 T96
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T68 T174 T385
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T68 T174 T385
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T68 T174 T385
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T68 T174 T385
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T68 T174 T385
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T68 T174 T385
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T68 T174 T385
135 1/1 txn_bits_q <= '0;
Tests: T68 T174 T385
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T68 T174 T385
156 1/1 assign dst_wd_o = src_q;
Tests: T68 T174 T385
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T68 T174 T385
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_7_cdc
| Total | Covered | Percent |
Conditions | 11 | 10 | 90.91 |
Logical | 11 | 10 | 90.91 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_7_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
115 if (!rst_src_ni) begin
-1-
116 src_q <= ResetVal;
==>
117 txn_bits_q <= '0;
118 end else if (src_req) begin
-2-
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 src_q <= src_wd_i & BitMask;
==>
124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
125 end else if (src_busy_q && src_ack || src_update && !busy) begin
-3-
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 src_q <= dst_qs;
==>
135 txn_bits_q <= '0;
136 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_7_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
122513 |
0 |
0 |
T68 |
480871 |
706 |
0 |
0 |
T182 |
0 |
338 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
280 |
0 |
0 |
T411 |
0 |
370 |
0 |
0 |
T424 |
0 |
417 |
0 |
0 |
T425 |
0 |
810 |
0 |
0 |
T426 |
0 |
320 |
0 |
0 |
T427 |
0 |
572 |
0 |
0 |
T428 |
0 |
803 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
906 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
310 |
0 |
0 |
T68 |
480871 |
2 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T428 |
0 |
2 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
2 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_0_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T68 T95 T96
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T68 T174 T385
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T68 T174 T385
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T68 T174 T385
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T68 T174 T385
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T68 T174 T385
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T68 T174 T385
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T68 T174 T385
135 1/1 txn_bits_q <= '0;
Tests: T68 T174 T385
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T68 T174 T385
156 1/1 assign dst_wd_o = src_q;
Tests: T68 T174 T385
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T68 T174 T385
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_0_cdc
| Total | Covered | Percent |
Conditions | 11 | 10 | 90.91 |
Logical | 11 | 10 | 90.91 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T68,T174,T385 |
1 | 1 | Covered | T68,T174,T385 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_0_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
115 if (!rst_src_ni) begin
-1-
116 src_q <= ResetVal;
==>
117 txn_bits_q <= '0;
118 end else if (src_req) begin
-2-
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 src_q <= src_wd_i & BitMask;
==>
124 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
125 end else if (src_busy_q && src_ack || src_update && !busy) begin
-3-
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 src_q <= dst_qs;
==>
135 txn_bits_q <= '0;
136 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T68,T174,T385 |
0 |
0 |
1 |
Covered |
T68,T174,T385 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_0_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
113774 |
0 |
0 |
T68 |
480871 |
666 |
0 |
0 |
T182 |
0 |
335 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
313 |
0 |
0 |
T411 |
0 |
376 |
0 |
0 |
T424 |
0 |
472 |
0 |
0 |
T425 |
0 |
637 |
0 |
0 |
T426 |
0 |
342 |
0 |
0 |
T427 |
0 |
589 |
0 |
0 |
T428 |
0 |
735 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
843 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
286 |
0 |
0 |
T68 |
480871 |
2 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T197 |
65525 |
0 |
0 |
0 |
T264 |
56929 |
0 |
0 |
0 |
T269 |
36029 |
0 |
0 |
0 |
T338 |
35301 |
0 |
0 |
0 |
T342 |
575190 |
0 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T428 |
0 |
2 |
0 |
0 |
T429 |
61782 |
0 |
0 |
0 |
T430 |
124129 |
0 |
0 |
0 |
T431 |
113902 |
0 |
0 |
0 |
T432 |
36232 |
0 |
0 |
0 |
T434 |
0 |
2 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |
Line Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_1_cdc
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
ALWAYS | 71 | 6 | 6 | 100.00 |
CONT_ASSIGN | 85 | 1 | 1 | 100.00 |
CONT_ASSIGN | 109 | 1 | 1 | 100.00 |
ALWAYS | 115 | 9 | 9 | 100.00 |
CONT_ASSIGN | 150 | 1 | 1 | 100.00 |
CONT_ASSIGN | 155 | 1 | 1 | 100.00 |
CONT_ASSIGN | 156 | 1 | 1 | 100.00 |
CONT_ASSIGN | 200 | 1 | 1 | 100.00 |
64
65 1/1 assign src_req = src_we_i | src_re_i;
Tests: T123 T386 T124
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: T123 T386 T124
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T123 T124 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: T123 T386 T124
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: T123 T386 T124
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: T123 T386 T124
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T123 T386 T124
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: T123 T124 T68
135 1/1 txn_bits_q <= '0;
Tests: T123 T124 T68
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: T123 T386 T124
156 1/1 assign dst_wd_o = src_q;
Tests: T123 T386 T124
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: T123 T386 T124
Cond Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_1_cdc
| Total | Covered | Percent |
Conditions | 11 | 10 | 90.91 |
Logical | 11 | 10 | 90.91 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (src_we_i | src_re_i)
----1--- ----2---
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T123,T386,T124 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T123,T124,T68 |
1 | 1 | Covered | T123,T386,T124 |
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 | T123,T124,T68 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T123,T386,T124 |
1 | 1 | Covered | T123,T124,T68 |
LINE 125
SUB-EXPRESSION (src_update && ((!busy)))
-----1---- ----2----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_1_cdc
| Line No. | Total | Covered | Percent |
Branches |
|
8 |
8 |
100.00 |
IF |
71 |
4 |
4 |
100.00 |
IF |
115 |
4 |
4 |
100.00 |
71 if (!rst_src_ni) begin
-1-
72 src_busy_q <= '0;
==>
73 end else if (src_req) begin
-2-
74 src_busy_q <= 1'b1;
==>
75 end else if (src_ack) begin
-3-
76 src_busy_q <= 1'b0;
==>
77 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T123,T386,T124 |
0 |
0 |
1 |
Covered |
T123,T124,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 |
T123,T386,T124 |
0 |
0 |
1 |
Covered |
T123,T124,T68 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.top_earlgrey.u_pinmux_aon.u_reg.u_wkup_detector_cnt_th_1_cdc
Assertion Details
BusySrcReqChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
112531 |
0 |
0 |
T68 |
0 |
547 |
0 |
0 |
T98 |
50392 |
0 |
0 |
0 |
T123 |
41135 |
289 |
0 |
0 |
T124 |
0 |
253 |
0 |
0 |
T182 |
0 |
322 |
0 |
0 |
T236 |
156955 |
0 |
0 |
0 |
T276 |
153754 |
0 |
0 |
0 |
T314 |
28671 |
0 |
0 |
0 |
T315 |
143946 |
0 |
0 |
0 |
T316 |
29349 |
0 |
0 |
0 |
T385 |
0 |
284 |
0 |
0 |
T386 |
0 |
308 |
0 |
0 |
T404 |
154952 |
0 |
0 |
0 |
T405 |
299280 |
0 |
0 |
0 |
T411 |
0 |
435 |
0 |
0 |
T424 |
0 |
397 |
0 |
0 |
T425 |
0 |
711 |
0 |
0 |
T426 |
0 |
319 |
0 |
0 |
T447 |
29637 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1785066 |
1558836 |
0 |
0 |
T1 |
248 |
76 |
0 |
0 |
T2 |
419 |
247 |
0 |
0 |
T3 |
402 |
229 |
0 |
0 |
T4 |
580 |
408 |
0 |
0 |
T5 |
484 |
310 |
0 |
0 |
T6 |
397 |
223 |
0 |
0 |
T26 |
538 |
366 |
0 |
0 |
T34 |
248 |
74 |
0 |
0 |
T105 |
411 |
239 |
0 |
0 |
T106 |
419 |
248 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
285 |
0 |
0 |
T68 |
0 |
2 |
0 |
0 |
T98 |
50392 |
0 |
0 |
0 |
T123 |
41135 |
1 |
0 |
0 |
T124 |
0 |
1 |
0 |
0 |
T182 |
0 |
1 |
0 |
0 |
T236 |
156955 |
0 |
0 |
0 |
T276 |
153754 |
0 |
0 |
0 |
T314 |
28671 |
0 |
0 |
0 |
T315 |
143946 |
0 |
0 |
0 |
T316 |
29349 |
0 |
0 |
0 |
T385 |
0 |
1 |
0 |
0 |
T404 |
154952 |
0 |
0 |
0 |
T405 |
299280 |
0 |
0 |
0 |
T411 |
0 |
1 |
0 |
0 |
T424 |
0 |
1 |
0 |
0 |
T425 |
0 |
2 |
0 |
0 |
T426 |
0 |
1 |
0 |
0 |
T427 |
0 |
2 |
0 |
0 |
T447 |
29637 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
151637819 |
150817875 |
0 |
0 |
T1 |
11549 |
10507 |
0 |
0 |
T2 |
21148 |
20686 |
0 |
0 |
T3 |
19174 |
18759 |
0 |
0 |
T4 |
27713 |
27358 |
0 |
0 |
T5 |
31598 |
31042 |
0 |
0 |
T6 |
19937 |
19415 |
0 |
0 |
T26 |
25690 |
25334 |
0 |
0 |
T34 |
10008 |
9090 |
0 |
0 |
T105 |
15509 |
15134 |
0 |
0 |
T106 |
23413 |
22955 |
0 |
0 |