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: T6 T25 T29
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T6 T25 T29
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T6 T25 T29
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T6 T25 T29
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T6 T25 T29
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T6 T25 T29
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T6 T25 T29
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T6 T25 T29
135 1/1 txn_bits_q <= '0;
Tests: T6 T25 T29
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T6 T25 T29
156 1/1 assign dst_wd_o = src_q;
Tests: T6 T25 T29
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T6 T25 T29
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 | T6,T25,T29 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T6,T25,T29 |
1 | 1 | Covered | T6,T25,T29 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T6,T25,T29 |
1 | - | Covered | T6,T25,T29 |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T6,T25,T29 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T6,T25,T29 |
1 | 1 | Covered | T6,T25,T29 |
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 |
T6,T25,T29 |
0 |
0 |
1 |
Covered |
T6,T25,T29 |
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 |
T6,T25,T29 |
0 |
0 |
1 |
Covered |
T6,T25,T29 |
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 |
144043060 |
128507 |
0 |
0 |
T6 |
35891 |
2148 |
0 |
0 |
T8 |
42967 |
0 |
0 |
0 |
T9 |
49053 |
0 |
0 |
0 |
T13 |
31255 |
0 |
0 |
0 |
T25 |
27362 |
1065 |
0 |
0 |
T29 |
36284 |
933 |
0 |
0 |
T32 |
54101 |
0 |
0 |
0 |
T35 |
20032 |
0 |
0 |
0 |
T46 |
54545 |
0 |
0 |
0 |
T73 |
53368 |
0 |
0 |
0 |
T74 |
0 |
249 |
0 |
0 |
T76 |
0 |
682 |
0 |
0 |
T83 |
0 |
768 |
0 |
0 |
T84 |
0 |
1920 |
0 |
0 |
T85 |
0 |
2054 |
0 |
0 |
T180 |
0 |
344 |
0 |
0 |
T407 |
0 |
416 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
320 |
0 |
0 |
T6 |
35891 |
5 |
0 |
0 |
T8 |
42967 |
0 |
0 |
0 |
T9 |
49053 |
0 |
0 |
0 |
T13 |
31255 |
0 |
0 |
0 |
T25 |
27362 |
2 |
0 |
0 |
T29 |
36284 |
2 |
0 |
0 |
T32 |
54101 |
0 |
0 |
0 |
T35 |
20032 |
0 |
0 |
0 |
T46 |
54545 |
0 |
0 |
0 |
T73 |
53368 |
0 |
0 |
0 |
T74 |
0 |
1 |
0 |
0 |
T76 |
0 |
2 |
0 |
0 |
T83 |
0 |
2 |
0 |
0 |
T84 |
0 |
4 |
0 |
0 |
T85 |
0 |
4 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T74 T97 T98
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: T74 T407 T158
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T74 T407 T158
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: T74 T407 T158
135 1/1 txn_bits_q <= '0;
Tests: T74 T407 T158
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: T74 T407 T158
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 | T74,T407,T158 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T74,T407,T158 |
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 | T74,T407,T158 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
144043060 |
129141 |
0 |
0 |
T74 |
245191 |
324 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
264 |
0 |
0 |
T407 |
0 |
483 |
0 |
0 |
T408 |
0 |
293 |
0 |
0 |
T421 |
0 |
343 |
0 |
0 |
T422 |
0 |
304 |
0 |
0 |
T433 |
0 |
269 |
0 |
0 |
T434 |
0 |
322 |
0 |
0 |
T435 |
0 |
420 |
0 |
0 |
T436 |
0 |
286 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
324 |
0 |
0 |
T74 |
245191 |
1 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T422 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T435 |
0 |
1 |
0 |
0 |
T436 |
0 |
1 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T26 T74 T97
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 T74 T407
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T26 T74 T407
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 T74 T407
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 T74 T407
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 T74 T407
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T26 T74 T407
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 T74 T407
135 1/1 txn_bits_q <= '0;
Tests: T26 T74 T407
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T26
156 1/1 assign dst_wd_o = src_q;
Tests: T26
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T26 T74 T407
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 | T26,T74,T407 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T26,T74,T407 |
1 | 1 | Covered | T26,T74,T407 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T26,T74,T407 |
1 | - | Covered | T26 |
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,T74,T407 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T26,T74,T407 |
1 | 1 | Covered | T26,T74,T407 |
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 |
T26,T74,T407 |
0 |
0 |
1 |
Covered |
T26,T74,T407 |
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,T74,T407 |
0 |
0 |
1 |
Covered |
T26,T74,T407 |
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 |
144043060 |
136102 |
0 |
0 |
T26 |
36091 |
931 |
0 |
0 |
T74 |
0 |
292 |
0 |
0 |
T95 |
707630 |
0 |
0 |
0 |
T180 |
0 |
326 |
0 |
0 |
T265 |
62177 |
0 |
0 |
0 |
T287 |
101570 |
0 |
0 |
0 |
T407 |
0 |
378 |
0 |
0 |
T408 |
0 |
342 |
0 |
0 |
T421 |
0 |
259 |
0 |
0 |
T433 |
0 |
296 |
0 |
0 |
T434 |
0 |
358 |
0 |
0 |
T435 |
0 |
365 |
0 |
0 |
T436 |
0 |
348 |
0 |
0 |
T445 |
315616 |
0 |
0 |
0 |
T446 |
324214 |
0 |
0 |
0 |
T447 |
54887 |
0 |
0 |
0 |
T448 |
327701 |
0 |
0 |
0 |
T449 |
299140 |
0 |
0 |
0 |
T450 |
326025 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
341 |
0 |
0 |
T26 |
36091 |
2 |
0 |
0 |
T74 |
0 |
1 |
0 |
0 |
T95 |
707630 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T265 |
62177 |
0 |
0 |
0 |
T287 |
101570 |
0 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T435 |
0 |
1 |
0 |
0 |
T436 |
0 |
1 |
0 |
0 |
T445 |
315616 |
0 |
0 |
0 |
T446 |
324214 |
0 |
0 |
0 |
T447 |
54887 |
0 |
0 |
0 |
T448 |
327701 |
0 |
0 |
0 |
T449 |
299140 |
0 |
0 |
0 |
T450 |
326025 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T74 T97 T98
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: T74 T407 T158
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T74 T407 T158
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: T74 T407 T158
135 1/1 txn_bits_q <= '0;
Tests: T74 T407 T158
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: T74 T407 T158
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 | T74,T407,T158 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T74,T407,T158 |
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 | T74,T407,T158 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
144043060 |
130201 |
0 |
0 |
T74 |
245191 |
297 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
293 |
0 |
0 |
T407 |
0 |
474 |
0 |
0 |
T408 |
0 |
334 |
0 |
0 |
T421 |
0 |
271 |
0 |
0 |
T422 |
0 |
243 |
0 |
0 |
T433 |
0 |
323 |
0 |
0 |
T434 |
0 |
324 |
0 |
0 |
T435 |
0 |
463 |
0 |
0 |
T436 |
0 |
342 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
327 |
0 |
0 |
T74 |
245191 |
1 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T422 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T435 |
0 |
1 |
0 |
0 |
T436 |
0 |
1 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T74 T27 T97
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: T74 T27 T407
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T74 T27 T407
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: T74 T27 T407
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: T74 T27 T407
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: T74 T27 T407
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T74 T27 T407
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: T74 T27 T407
135 1/1 txn_bits_q <= '0;
Tests: T74 T27 T407
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T27
156 1/1 assign dst_wd_o = src_q;
Tests: T27
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T74 T27 T407
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 | T74,T27,T451 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T74,T27,T407 |
1 | 1 | Covered | T74,T27,T407 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T74,T27,T407 |
1 | - | Covered | T27 |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T74,T27,T407 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T74,T27,T407 |
1 | 1 | Covered | T74,T27,T407 |
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 |
T74,T27,T407 |
0 |
0 |
1 |
Covered |
T74,T27,T407 |
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 |
T74,T27,T407 |
0 |
0 |
1 |
Covered |
T74,T27,T407 |
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 |
144043060 |
123302 |
0 |
0 |
T27 |
0 |
1098 |
0 |
0 |
T74 |
245191 |
293 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
270 |
0 |
0 |
T407 |
0 |
439 |
0 |
0 |
T408 |
0 |
269 |
0 |
0 |
T421 |
0 |
318 |
0 |
0 |
T433 |
0 |
327 |
0 |
0 |
T434 |
0 |
347 |
0 |
0 |
T435 |
0 |
373 |
0 |
0 |
T436 |
0 |
299 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
309 |
0 |
0 |
T27 |
0 |
2 |
0 |
0 |
T74 |
245191 |
1 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T435 |
0 |
1 |
0 |
0 |
T436 |
0 |
1 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T77 T78 T79
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: T77 T78 T79
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T77 T78 T79
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: T77 T78 T79
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: T77 T78 T79
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: T77 T78 T79
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T77 T78 T79
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: T77 T78 T79
135 1/1 txn_bits_q <= '0;
Tests: T77 T78 T79
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: T77 T78 T79
156 1/1 assign dst_wd_o = src_q;
Tests: T77 T78 T79
157
158 ////////////////////////////
159 // CDC handling
160 ////////////////////////////
161
162 logic dst_req_from_src;
163 logic dst_req;
164
165
166 // the software transaction is pulse synced across the domain.
167 // the prim_reg_cdc_arb module handles conflicts with ongoing hardware updates.
168 prim_pulse_sync u_src_to_dst_req (
169 .clk_src_i,
170 .rst_src_ni,
171 .clk_dst_i,
172 .rst_dst_ni,
173 .src_pulse_i(src_req),
174 .dst_pulse_o(dst_req_from_src)
175 );
176
177 prim_reg_cdc_arb #(
178 .DataWidth(DataWidth),
179 .ResetVal(ResetVal),
180 .DstWrReq(DstWrReq)
181 ) u_arb (
182 .clk_src_i,
183 .rst_src_ni,
184 .clk_dst_i,
185 .rst_dst_ni,
186 .src_ack_o(src_ack),
187 .src_update_o(src_update),
188 .dst_req_i(dst_req_from_src),
189 .dst_req_o(dst_req),
190 .dst_update_i,
191 .dst_ds_i,
192 .dst_qs_i,
193 .dst_qs_o(dst_qs)
194 );
195
196
197 // Each is valid only when destination request pulse is high; this is important in not propagating
198 // the internal assertion of 'dst_req' by the 'prim_pulse_sync' channel when just one domain is
199 // reset.
200 1/1 assign {dst_we_o, dst_re_o, dst_regwen_o} = txn_bits_q & {TxnWidth{dst_req}};
Tests: T77 T78 T79
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 | T77,T78,T79 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T77,T78,T79 |
1 | 1 | Covered | T77,T78,T79 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T77,T78,T79 |
1 | - | Covered | T77,T78,T79 |
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 | T77,T78,T79 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T77,T78,T79 |
1 | 1 | Covered | T77,T78,T79 |
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 |
T77,T78,T79 |
0 |
0 |
1 |
Covered |
T77,T78,T79 |
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 |
T77,T78,T79 |
0 |
0 |
1 |
Covered |
T77,T78,T79 |
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 |
144043060 |
133393 |
0 |
0 |
T74 |
0 |
255 |
0 |
0 |
T77 |
46224 |
729 |
0 |
0 |
T78 |
0 |
1641 |
0 |
0 |
T79 |
0 |
784 |
0 |
0 |
T90 |
40558 |
0 |
0 |
0 |
T127 |
0 |
632 |
0 |
0 |
T129 |
0 |
1433 |
0 |
0 |
T151 |
49045 |
0 |
0 |
0 |
T156 |
45222 |
0 |
0 |
0 |
T203 |
51657 |
0 |
0 |
0 |
T214 |
26259 |
0 |
0 |
0 |
T272 |
123656 |
0 |
0 |
0 |
T278 |
123966 |
0 |
0 |
0 |
T345 |
56857 |
0 |
0 |
0 |
T414 |
13065 |
0 |
0 |
0 |
T452 |
0 |
898 |
0 |
0 |
T453 |
0 |
601 |
0 |
0 |
T454 |
0 |
1772 |
0 |
0 |
T455 |
0 |
897 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
335 |
0 |
0 |
T74 |
0 |
1 |
0 |
0 |
T77 |
46224 |
2 |
0 |
0 |
T78 |
0 |
4 |
0 |
0 |
T79 |
0 |
2 |
0 |
0 |
T90 |
40558 |
0 |
0 |
0 |
T127 |
0 |
2 |
0 |
0 |
T129 |
0 |
4 |
0 |
0 |
T151 |
49045 |
0 |
0 |
0 |
T156 |
45222 |
0 |
0 |
0 |
T203 |
51657 |
0 |
0 |
0 |
T214 |
26259 |
0 |
0 |
0 |
T272 |
123656 |
0 |
0 |
0 |
T278 |
123966 |
0 |
0 |
0 |
T345 |
56857 |
0 |
0 |
0 |
T414 |
13065 |
0 |
0 |
0 |
T452 |
0 |
2 |
0 |
0 |
T453 |
0 |
2 |
0 |
0 |
T454 |
0 |
4 |
0 |
0 |
T455 |
0 |
2 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T74 T97 T98
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: T74 T407 T158
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T74 T407 T158
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: T74 T407 T158
135 1/1 txn_bits_q <= '0;
Tests: T74 T407 T158
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: T74 T407 T158
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 | T74,T407,T158 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T74,T407,T158 |
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 | T74,T407,T158 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
144043060 |
131965 |
0 |
0 |
T74 |
245191 |
361 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
356 |
0 |
0 |
T407 |
0 |
453 |
0 |
0 |
T408 |
0 |
293 |
0 |
0 |
T421 |
0 |
272 |
0 |
0 |
T422 |
0 |
250 |
0 |
0 |
T433 |
0 |
252 |
0 |
0 |
T434 |
0 |
349 |
0 |
0 |
T435 |
0 |
365 |
0 |
0 |
T436 |
0 |
291 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
331 |
0 |
0 |
T74 |
245191 |
1 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T422 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T435 |
0 |
1 |
0 |
0 |
T436 |
0 |
1 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T74 T97 T98
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: T74 T407 T158
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T74 T407 T158
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: T74 T407 T158
135 1/1 txn_bits_q <= '0;
Tests: T74 T407 T158
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: T74 T407 T158
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 | T74,T407,T158 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
LINE 123
EXPRESSION (src_wd_i & BitMask)
----1--- ---2---
-1- | -2- | Status | Tests |
0 | - | Covered | T74,T407,T158 |
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 | T74,T407,T158 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
144043060 |
112687 |
0 |
0 |
T74 |
245191 |
275 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
353 |
0 |
0 |
T407 |
0 |
478 |
0 |
0 |
T408 |
0 |
326 |
0 |
0 |
T421 |
0 |
245 |
0 |
0 |
T422 |
0 |
285 |
0 |
0 |
T433 |
0 |
251 |
0 |
0 |
T434 |
0 |
335 |
0 |
0 |
T435 |
0 |
416 |
0 |
0 |
T436 |
0 |
271 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
284 |
0 |
0 |
T74 |
245191 |
1 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T422 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T435 |
0 |
1 |
0 |
0 |
T436 |
0 |
1 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T6 T25 T29
66
67 // busy indication back-pressures upstream if the register is accessed
68 // again. The busy indication is also used as a "commit" indication for
69 // resolving software and hardware write conflicts
70 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
71 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
72 1/1 src_busy_q <= '0;
Tests: T1 T2 T3
73 1/1 end else if (src_req) begin
Tests: T1 T2 T3
74 1/1 src_busy_q <= 1'b1;
Tests: T6 T25 T29
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T6 T25 T29
77 end
MISSING_ELSE
78 end
79
80 // A src_ack should only be sent if there was a src_req.
81 // src_busy_q asserts whenever there is a src_req. By association,
82 // whenever src_ack is seen, then src_busy must be high.
83 `ASSERT(SrcAckBusyChk_A, src_ack |-> src_busy_q, clk_src_i, !rst_src_ni)
84
85 1/1 assign src_busy_o = src_busy_q;
Tests: T6 T25 T29
86
87 // src_q acts as both the write holding register and the software read back
88 // register.
89 // When software performs a write, the write data is captured in src_q for
90 // CDC purposes. When not performing a write, the src_q reflects the most recent
91 // hardware value. For registers with no hardware access, this is simply the
92 // the value programmed by software (or in the case R1C, W1C etc) the value after
93 // the operation. For registers with hardware access, this reflects a potentially
94 // delayed version of the real value, as the software facing updates lag real
95 // time updates.
96 //
97 // To resolve software and hardware conflicts, the process is as follows:
98 // When software issues a write, this module asserts "busy". While busy,
99 // src_q does not take on destination value updates. Since the
100 // logic has committed to updating based on software command, there is an irreversible
101 // window from which hardware writes are ignored. Once the busy window completes,
102 // the cdc portion then begins sampling once more.
103 //
104 // This is consistent with prim_subreg_arb where during software / hardware conflicts,
105 // software is always prioritized. The main difference is the conflict resolution window
106 // is now larger instead of just one destination clock cycle.
107
108 logic busy;
109 1/1 assign busy = src_busy_q & !src_ack;
Tests: T6 T25 T29
110
111 // This is the current destination value
112 logic [DataWidth-1:0] dst_qs;
113 logic src_update;
114 always_ff @(posedge clk_src_i or negedge rst_src_ni) begin
115 1/1 if (!rst_src_ni) begin
Tests: T1 T2 T3
116 1/1 src_q <= ResetVal;
Tests: T1 T2 T3
117 1/1 txn_bits_q <= '0;
Tests: T1 T2 T3
118 1/1 end else if (src_req) begin
Tests: T1 T2 T3
119 // See assertion below
120 // At the beginning of a software initiated transaction, the following
121 // values are captured in the src_q/txn_bits_q flops to ensure they cannot
122 // change for the duration of the synchronization operation.
123 1/1 src_q <= src_wd_i & BitMask;
Tests: T6 T25 T29
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T6 T25 T29
125 1/1 end else if (src_busy_q && src_ack || src_update && !busy) begin
Tests: T1 T2 T3
126 // sample data whenever a busy transaction finishes OR
127 // when an update pulse is seen.
128 // TODO: We should add a cover group to test different sync timings
129 // between src_ack and src_update. ie. there can be 3 scenarios:
130 // 1. update one cycle before ack
131 // 2. ack one cycle before update
132 // 3. update / ack on the same cycle
133 // During all 3 cases the read data should be correct
134 1/1 src_q <= dst_qs;
Tests: T6 T25 T29
135 1/1 txn_bits_q <= '0;
Tests: T6 T25 T29
136 end
MISSING_ELSE
137 end
138
139 // The current design (tlul_adapter_reg) does not spit out a request if the destination it chooses
140 // (decoded from address) is busy. So this creates a situation in the current design where
141 // src_req_i and busy can never be high at the same time.
142 // While the code above could be coded directly to be expressed as `src_req & !busy`, which makes
143 // the intent clearer, it ends up causing coverage holes from the tool's perspective since that
144 // condition cannot be met.
145 // Thus we add an assertion here to ensure the condition is always satisfied.
146 `ASSERT(BusySrcReqChk_A, busy |-> !src_req, clk_src_i, !rst_src_ni)
147
148 // reserved bits are not used
149 logic unused_wd;
150 1/1 assign unused_wd = ^src_wd_i;
Tests: T1 T2 T3
151
152 // src_q is always updated in the clk_src domain.
153 // when performing an update to the destination domain, it is guaranteed
154 // to not change by protocol.
155 1/1 assign src_qs_o = src_q;
Tests: T6 T84 T74
156 1/1 assign dst_wd_o = src_q;
Tests: T6 T84 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: T6 T25 T29
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 | T6,T25,T29 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T6,T25,T29 |
1 | 1 | Covered | T6,T25,T29 |
LINE 125
EXPRESSION ((src_busy_q && src_ack) || (src_update && ((!busy))))
-----------1----------- ------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Unreachable | |
1 | 0 | Covered | T6,T25,T29 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T6,T25,T29 |
1 | 1 | Covered | T6,T25,T29 |
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 |
T6,T25,T29 |
0 |
0 |
1 |
Covered |
T6,T25,T29 |
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 |
T6,T25,T29 |
0 |
0 |
1 |
Covered |
T6,T25,T29 |
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 |
144043060 |
145123 |
0 |
0 |
T6 |
35891 |
840 |
0 |
0 |
T8 |
42967 |
0 |
0 |
0 |
T9 |
49053 |
0 |
0 |
0 |
T13 |
31255 |
0 |
0 |
0 |
T25 |
27362 |
403 |
0 |
0 |
T29 |
36284 |
437 |
0 |
0 |
T32 |
54101 |
0 |
0 |
0 |
T35 |
20032 |
0 |
0 |
0 |
T46 |
54545 |
0 |
0 |
0 |
T73 |
53368 |
0 |
0 |
0 |
T74 |
0 |
331 |
0 |
0 |
T76 |
0 |
307 |
0 |
0 |
T83 |
0 |
393 |
0 |
0 |
T84 |
0 |
734 |
0 |
0 |
T85 |
0 |
902 |
0 |
0 |
T180 |
0 |
298 |
0 |
0 |
T407 |
0 |
459 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
364 |
0 |
0 |
T6 |
35891 |
2 |
0 |
0 |
T8 |
42967 |
0 |
0 |
0 |
T9 |
49053 |
0 |
0 |
0 |
T13 |
31255 |
0 |
0 |
0 |
T25 |
27362 |
1 |
0 |
0 |
T29 |
36284 |
1 |
0 |
0 |
T32 |
54101 |
0 |
0 |
0 |
T35 |
20032 |
0 |
0 |
0 |
T46 |
54545 |
0 |
0 |
0 |
T73 |
53368 |
0 |
0 |
0 |
T74 |
0 |
1 |
0 |
0 |
T76 |
0 |
1 |
0 |
0 |
T83 |
0 |
1 |
0 |
0 |
T84 |
0 |
2 |
0 |
0 |
T85 |
0 |
2 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T74 T97 T98
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: T74 T407 T158
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T74 T407 T158
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: T74 T407 T158
135 1/1 txn_bits_q <= '0;
Tests: T74 T407 T158
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: T74 T407 T158
156 1/1 assign dst_wd_o = src_q;
Tests: T74 T407 T158
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: T74 T407 T158
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 | T74,T407,T158 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 | T74,T407,T158 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
144043060 |
119069 |
0 |
0 |
T74 |
245191 |
313 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
304 |
0 |
0 |
T407 |
0 |
372 |
0 |
0 |
T408 |
0 |
289 |
0 |
0 |
T421 |
0 |
307 |
0 |
0 |
T422 |
0 |
338 |
0 |
0 |
T433 |
0 |
302 |
0 |
0 |
T434 |
0 |
347 |
0 |
0 |
T435 |
0 |
482 |
0 |
0 |
T436 |
0 |
248 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
300 |
0 |
0 |
T74 |
245191 |
1 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T422 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T435 |
0 |
1 |
0 |
0 |
T436 |
0 |
1 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T26 T74 T97
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 T74 T407
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T26 T74 T407
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 T74 T407
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 T74 T407
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 T74 T407
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T26 T74 T407
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 T74 T407
135 1/1 txn_bits_q <= '0;
Tests: T26 T74 T407
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 T74 T158
156 1/1 assign dst_wd_o = src_q;
Tests: T26 T74 T158
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 T74 T407
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 | T26,T74,T456 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T26,T74,T407 |
1 | 1 | Covered | T26,T74,T407 |
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,T74,T407 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T26,T74,T407 |
1 | 1 | Covered | T26,T74,T407 |
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 |
T26,T74,T407 |
0 |
0 |
1 |
Covered |
T26,T74,T407 |
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,T74,T407 |
0 |
0 |
1 |
Covered |
T26,T74,T407 |
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 |
144043060 |
124855 |
0 |
0 |
T26 |
36091 |
267 |
0 |
0 |
T74 |
0 |
318 |
0 |
0 |
T95 |
707630 |
0 |
0 |
0 |
T180 |
0 |
272 |
0 |
0 |
T265 |
62177 |
0 |
0 |
0 |
T287 |
101570 |
0 |
0 |
0 |
T407 |
0 |
473 |
0 |
0 |
T408 |
0 |
271 |
0 |
0 |
T421 |
0 |
311 |
0 |
0 |
T433 |
0 |
299 |
0 |
0 |
T434 |
0 |
284 |
0 |
0 |
T435 |
0 |
373 |
0 |
0 |
T436 |
0 |
269 |
0 |
0 |
T445 |
315616 |
0 |
0 |
0 |
T446 |
324214 |
0 |
0 |
0 |
T447 |
54887 |
0 |
0 |
0 |
T448 |
327701 |
0 |
0 |
0 |
T449 |
299140 |
0 |
0 |
0 |
T450 |
326025 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
315 |
0 |
0 |
T26 |
36091 |
1 |
0 |
0 |
T74 |
0 |
1 |
0 |
0 |
T95 |
707630 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T265 |
62177 |
0 |
0 |
0 |
T287 |
101570 |
0 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T435 |
0 |
1 |
0 |
0 |
T436 |
0 |
1 |
0 |
0 |
T445 |
315616 |
0 |
0 |
0 |
T446 |
324214 |
0 |
0 |
0 |
T447 |
54887 |
0 |
0 |
0 |
T448 |
327701 |
0 |
0 |
0 |
T449 |
299140 |
0 |
0 |
0 |
T450 |
326025 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T74 T97 T98
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: T74 T407 T158
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T74 T407 T158
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: T74 T407 T158
135 1/1 txn_bits_q <= '0;
Tests: T74 T407 T158
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: T74 T407 T158
156 1/1 assign dst_wd_o = src_q;
Tests: T74 T407 T158
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: T74 T407 T158
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 | T74,T457,T407 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 | T74,T407,T158 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
144043060 |
128712 |
0 |
0 |
T74 |
245191 |
320 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
361 |
0 |
0 |
T407 |
0 |
437 |
0 |
0 |
T408 |
0 |
306 |
0 |
0 |
T421 |
0 |
289 |
0 |
0 |
T422 |
0 |
272 |
0 |
0 |
T433 |
0 |
340 |
0 |
0 |
T434 |
0 |
274 |
0 |
0 |
T435 |
0 |
430 |
0 |
0 |
T436 |
0 |
298 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
322 |
0 |
0 |
T74 |
245191 |
1 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T422 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T435 |
0 |
1 |
0 |
0 |
T436 |
0 |
1 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T74 T27 T97
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: T74 T27 T407
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T74 T27 T407
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: T74 T27 T407
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: T74 T27 T407
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: T74 T27 T407
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T74 T27 T407
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: T74 T27 T407
135 1/1 txn_bits_q <= '0;
Tests: T74 T27 T407
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: T74 T27 T407
156 1/1 assign dst_wd_o = src_q;
Tests: T74 T27 T407
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: T74 T27 T407
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 | T74,T27,T407 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T74,T27,T407 |
1 | 1 | Covered | T74,T27,T407 |
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 | T74,T27,T407 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T74,T27,T407 |
1 | 1 | Covered | T74,T27,T407 |
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 |
T74,T27,T407 |
0 |
0 |
1 |
Covered |
T74,T27,T407 |
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 |
T74,T27,T407 |
0 |
0 |
1 |
Covered |
T74,T27,T407 |
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 |
144043060 |
127995 |
0 |
0 |
T27 |
0 |
436 |
0 |
0 |
T74 |
245191 |
271 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
336 |
0 |
0 |
T407 |
0 |
449 |
0 |
0 |
T408 |
0 |
280 |
0 |
0 |
T421 |
0 |
260 |
0 |
0 |
T433 |
0 |
355 |
0 |
0 |
T434 |
0 |
359 |
0 |
0 |
T435 |
0 |
388 |
0 |
0 |
T436 |
0 |
250 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
320 |
0 |
0 |
T27 |
0 |
1 |
0 |
0 |
T74 |
245191 |
1 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T435 |
0 |
1 |
0 |
0 |
T436 |
0 |
1 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T77 T78 T79
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: T77 T78 T79
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T77 T78 T79
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: T77 T78 T79
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: T77 T78 T79
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: T77 T78 T79
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T77 T78 T79
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: T77 T78 T79
135 1/1 txn_bits_q <= '0;
Tests: T77 T78 T79
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: T74 T407 T158
156 1/1 assign dst_wd_o = src_q;
Tests: T74 T407 T158
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: T77 T78 T79
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 | T77,T78,T79 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T77,T78,T79 |
1 | 1 | Covered | T77,T78,T79 |
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 | T77,T78,T79 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T77,T78,T79 |
1 | 1 | Covered | T77,T78,T79 |
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 |
T77,T78,T79 |
0 |
0 |
1 |
Covered |
T77,T78,T79 |
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 |
T77,T78,T79 |
0 |
0 |
1 |
Covered |
T77,T78,T79 |
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 |
144043060 |
114178 |
0 |
0 |
T74 |
0 |
310 |
0 |
0 |
T77 |
46224 |
353 |
0 |
0 |
T78 |
0 |
652 |
0 |
0 |
T79 |
0 |
409 |
0 |
0 |
T90 |
40558 |
0 |
0 |
0 |
T127 |
0 |
256 |
0 |
0 |
T129 |
0 |
565 |
0 |
0 |
T151 |
49045 |
0 |
0 |
0 |
T156 |
45222 |
0 |
0 |
0 |
T203 |
51657 |
0 |
0 |
0 |
T214 |
26259 |
0 |
0 |
0 |
T272 |
123656 |
0 |
0 |
0 |
T278 |
123966 |
0 |
0 |
0 |
T345 |
56857 |
0 |
0 |
0 |
T414 |
13065 |
0 |
0 |
0 |
T452 |
0 |
402 |
0 |
0 |
T453 |
0 |
345 |
0 |
0 |
T454 |
0 |
784 |
0 |
0 |
T455 |
0 |
403 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
290 |
0 |
0 |
T74 |
0 |
1 |
0 |
0 |
T77 |
46224 |
1 |
0 |
0 |
T78 |
0 |
2 |
0 |
0 |
T79 |
0 |
1 |
0 |
0 |
T90 |
40558 |
0 |
0 |
0 |
T127 |
0 |
1 |
0 |
0 |
T129 |
0 |
2 |
0 |
0 |
T151 |
49045 |
0 |
0 |
0 |
T156 |
45222 |
0 |
0 |
0 |
T203 |
51657 |
0 |
0 |
0 |
T214 |
26259 |
0 |
0 |
0 |
T272 |
123656 |
0 |
0 |
0 |
T278 |
123966 |
0 |
0 |
0 |
T345 |
56857 |
0 |
0 |
0 |
T414 |
13065 |
0 |
0 |
0 |
T452 |
0 |
1 |
0 |
0 |
T453 |
0 |
1 |
0 |
0 |
T454 |
0 |
2 |
0 |
0 |
T455 |
0 |
1 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T74 T97 T98
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: T74 T407 T158
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T74 T407 T158
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: T74 T407 T158
135 1/1 txn_bits_q <= '0;
Tests: T74 T407 T158
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: T74 T407 T158
156 1/1 assign dst_wd_o = src_q;
Tests: T74 T407 T158
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: T74 T407 T158
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 | T74,T407,T158 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 | T74,T407,T158 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
144043060 |
117568 |
0 |
0 |
T74 |
245191 |
258 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
321 |
0 |
0 |
T407 |
0 |
395 |
0 |
0 |
T408 |
0 |
281 |
0 |
0 |
T421 |
0 |
291 |
0 |
0 |
T422 |
0 |
261 |
0 |
0 |
T433 |
0 |
341 |
0 |
0 |
T434 |
0 |
280 |
0 |
0 |
T435 |
0 |
474 |
0 |
0 |
T436 |
0 |
255 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
297 |
0 |
0 |
T74 |
245191 |
1 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T422 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T435 |
0 |
1 |
0 |
0 |
T436 |
0 |
1 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T74 T97 T98
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: T74 T407 T158
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T74 T407 T158
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: T74 T407 T158
135 1/1 txn_bits_q <= '0;
Tests: T74 T407 T158
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: T74 T407 T158
156 1/1 assign dst_wd_o = src_q;
Tests: T74 T407 T158
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: T74 T407 T158
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 | T74,T103,T407 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 | T74,T407,T158 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
144043060 |
131318 |
0 |
0 |
T74 |
245191 |
289 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
287 |
0 |
0 |
T407 |
0 |
366 |
0 |
0 |
T408 |
0 |
342 |
0 |
0 |
T421 |
0 |
275 |
0 |
0 |
T422 |
0 |
350 |
0 |
0 |
T433 |
0 |
274 |
0 |
0 |
T434 |
0 |
339 |
0 |
0 |
T435 |
0 |
446 |
0 |
0 |
T436 |
0 |
319 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
327 |
0 |
0 |
T74 |
245191 |
1 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T422 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T435 |
0 |
1 |
0 |
0 |
T436 |
0 |
1 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T74 T97 T98
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: T74 T407 T158
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
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: T74 T407 T158
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T74 T407 T158
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: T74 T407 T158
135 1/1 txn_bits_q <= '0;
Tests: T74 T407 T158
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: T74 T407 T158
156 1/1 assign dst_wd_o = src_q;
Tests: T74 T407 T158
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: T74 T407 T158
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 | T74,T458,T407 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 | T74,T407,T158 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T74,T407,T158 |
1 | 1 | Covered | T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
T74,T407,T158 |
0 |
0 |
1 |
Covered |
T74,T407,T158 |
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 |
144043060 |
113272 |
0 |
0 |
T74 |
245191 |
303 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
355 |
0 |
0 |
T407 |
0 |
411 |
0 |
0 |
T408 |
0 |
357 |
0 |
0 |
T421 |
0 |
278 |
0 |
0 |
T422 |
0 |
308 |
0 |
0 |
T433 |
0 |
300 |
0 |
0 |
T434 |
0 |
304 |
0 |
0 |
T435 |
0 |
445 |
0 |
0 |
T436 |
0 |
265 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
285 |
0 |
0 |
T74 |
245191 |
1 |
0 |
0 |
T129 |
157712 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T422 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T435 |
0 |
1 |
0 |
0 |
T436 |
0 |
1 |
0 |
0 |
T437 |
11268 |
0 |
0 |
0 |
T438 |
17634 |
0 |
0 |
0 |
T439 |
45269 |
0 |
0 |
0 |
T440 |
17072 |
0 |
0 |
0 |
T441 |
127801 |
0 |
0 |
0 |
T442 |
23495 |
0 |
0 |
0 |
T443 |
46713 |
0 |
0 |
0 |
T444 |
19319 |
0 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
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: T90 T128 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: T90 T128 T74
75 1/1 end else if (src_ack) begin
Tests: T1 T2 T3
76 1/1 src_busy_q <= 1'b0;
Tests: T90 T128 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: T90 T128 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: T90 T128 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: T90 T128 T74
124 1/1 txn_bits_q <= {src_we_i, src_re_i, src_regwen_i};
Tests: T90 T128 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: T90 T128 T74
135 1/1 txn_bits_q <= '0;
Tests: T90 T128 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: T90 T128 T74
156 1/1 assign dst_wd_o = src_q;
Tests: T90 T128 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: T90 T128 T74
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 | T90,T128,T74 |
LINE 109
EXPRESSION (src_busy_q & ((!src_ack)))
-----1---- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T90,T128,T74 |
1 | 1 | Covered | T90,T128,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 | T90,T128,T74 |
LINE 125
SUB-EXPRESSION (src_busy_q && src_ack)
-----1---- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Not Covered | |
1 | 0 | Covered | T90,T128,T74 |
1 | 1 | Covered | T90,T128,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_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 |
T90,T128,T74 |
0 |
0 |
1 |
Covered |
T90,T128,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 |
T90,T128,T74 |
0 |
0 |
1 |
Covered |
T90,T128,T74 |
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 |
144043060 |
119243 |
0 |
0 |
T19 |
239567 |
0 |
0 |
0 |
T74 |
0 |
286 |
0 |
0 |
T90 |
40558 |
322 |
0 |
0 |
T91 |
47320 |
0 |
0 |
0 |
T128 |
0 |
412 |
0 |
0 |
T151 |
49045 |
0 |
0 |
0 |
T180 |
0 |
339 |
0 |
0 |
T215 |
22793 |
0 |
0 |
0 |
T257 |
104083 |
0 |
0 |
0 |
T345 |
56857 |
0 |
0 |
0 |
T346 |
144217 |
0 |
0 |
0 |
T347 |
23038 |
0 |
0 |
0 |
T348 |
130943 |
0 |
0 |
0 |
T407 |
0 |
453 |
0 |
0 |
T408 |
0 |
303 |
0 |
0 |
T421 |
0 |
312 |
0 |
0 |
T433 |
0 |
325 |
0 |
0 |
T434 |
0 |
253 |
0 |
0 |
T459 |
0 |
480 |
0 |
0 |
DstReqKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
1674537 |
1450796 |
0 |
0 |
T1 |
479 |
306 |
0 |
0 |
T2 |
382 |
209 |
0 |
0 |
T3 |
342 |
168 |
0 |
0 |
T4 |
388 |
214 |
0 |
0 |
T5 |
410 |
236 |
0 |
0 |
T6 |
460 |
286 |
0 |
0 |
T7 |
431 |
259 |
0 |
0 |
T28 |
414 |
241 |
0 |
0 |
T109 |
396 |
224 |
0 |
0 |
T110 |
315 |
143 |
0 |
0 |
SrcAckBusyChk_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
302 |
0 |
0 |
T19 |
239567 |
0 |
0 |
0 |
T74 |
0 |
1 |
0 |
0 |
T90 |
40558 |
1 |
0 |
0 |
T91 |
47320 |
0 |
0 |
0 |
T128 |
0 |
1 |
0 |
0 |
T151 |
49045 |
0 |
0 |
0 |
T180 |
0 |
1 |
0 |
0 |
T215 |
22793 |
0 |
0 |
0 |
T257 |
104083 |
0 |
0 |
0 |
T345 |
56857 |
0 |
0 |
0 |
T346 |
144217 |
0 |
0 |
0 |
T347 |
23038 |
0 |
0 |
0 |
T348 |
130943 |
0 |
0 |
0 |
T407 |
0 |
1 |
0 |
0 |
T408 |
0 |
1 |
0 |
0 |
T421 |
0 |
1 |
0 |
0 |
T433 |
0 |
1 |
0 |
0 |
T434 |
0 |
1 |
0 |
0 |
T459 |
0 |
1 |
0 |
0 |
SrcBusyKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
144043060 |
143239795 |
0 |
0 |
T1 |
27617 |
27229 |
0 |
0 |
T2 |
19812 |
19316 |
0 |
0 |
T3 |
10964 |
10508 |
0 |
0 |
T4 |
25985 |
25138 |
0 |
0 |
T5 |
25239 |
24581 |
0 |
0 |
T6 |
35891 |
34928 |
0 |
0 |
T7 |
25464 |
24868 |
0 |
0 |
T28 |
24307 |
23793 |
0 |
0 |
T109 |
17085 |
16650 |
0 |
0 |
T110 |
17700 |
16837 |
0 |
0 |