Line Coverage for Module :
prim_arbiter_ppc
| Line No. | Total | Covered | Percent |
TOTAL | | 20 | 19 | 95.00 |
CONT_ASSIGN | 55 | 0 | 0 | |
CONT_ASSIGN | 75 | 1 | 1 | 100.00 |
CONT_ASSIGN | 76 | 1 | 1 | 100.00 |
ALWAYS | 82 | 3 | 3 | 100.00 |
CONT_ASSIGN | 89 | 1 | 1 | 100.00 |
CONT_ASSIGN | 90 | 1 | 1 | 100.00 |
CONT_ASSIGN | 92 | 1 | 1 | 100.00 |
CONT_ASSIGN | 94 | 1 | 1 | 100.00 |
ALWAYS | 96 | 6 | 6 | 100.00 |
CONT_ASSIGN | 120 | 1 | 0 | 0.00 |
ALWAYS | 124 | 4 | 4 | 100.00 |
54 logic unused_req_chk;
55 unreachable assign unused_req_chk = req_chk_i;
56
57 `ASSERT_INIT(CheckNGreaterZero_A, N > 0)
58
59 // this case is basically just a bypass
60 if (N == 1) begin : gen_degenerate_case
61
62 assign valid_o = req_i[0];
63 assign data_o = data_i[0];
64 assign gnt_o[0] = valid_o & ready_i;
65 assign idx_o = '0;
66
67 end else begin : gen_normal_case
68
69 logic [N-1:0] masked_req;
70 logic [N-1:0] ppc_out;
71 logic [N-1:0] arb_req;
72 logic [N-1:0] mask, mask_next;
73 logic [N-1:0] winner;
74
75 1/1 assign masked_req = mask & req_i;
Tests: T1 T2 T3
76 1/1 assign arb_req = (|masked_req) ? masked_req : req_i;
Tests: T1 T2 T3
77
78 // PPC
79 // Even below code looks O(n) but DC optimizes it to O(log(N))
80 // Using Parallel Prefix Computation
81 always_comb begin
82 1/1 ppc_out[0] = arb_req[0];
Tests: T1 T2 T3
83 1/1 for (int i = 1 ; i < N ; i++) begin
Tests: T1 T2 T3
84 1/1 ppc_out[i] = ppc_out[i-1] | arb_req[i];
Tests: T1 T2 T3
85 end
86 end
87
88 // Grant Generation: Leading-One detector
89 1/1 assign winner = ppc_out ^ {ppc_out[N-2:0], 1'b0};
Tests: T1 T2 T3
90 1/1 assign gnt_o = (ready_i) ? winner : '0;
Tests: T1 T2 T3
91
92 1/1 assign valid_o = |req_i;
Tests: T1 T2 T3
93 // Mask Generation
94 1/1 assign mask_next = {ppc_out[N-2:0], 1'b0};
Tests: T1 T2 T3
95 always_ff @(posedge clk_i or negedge rst_ni) begin
96 1/1 if (!rst_ni) begin
Tests: T1 T2 T3
97 1/1 mask <= '0;
Tests: T1 T2 T3
98 1/1 end else if (valid_o && ready_i) begin
Tests: T1 T2 T3
99 // Latch only when requests accepted
100 1/1 mask <= mask_next;
Tests: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T2 T3
104 end
MISSING_ELSE
105 end
106
107 if (EnDataPort == 1) begin: gen_datapath
108 always_comb begin
109 data_o = '0;
110 for (int i = 0 ; i < N ; i++) begin
111 if (winner[i]) begin
112 data_o = data_i[i];
113 end
114 end
115 end
116 end else begin: gen_nodatapath
117 assign data_o = '1;
118 // The following signal is used to avoid possible lint errors.
119 logic [DW-1:0] unused_data [N];
120 0/1 ==> assign unused_data = data_i;
121 end
122
123 always_comb begin
124 1/1 idx_o = '0;
Tests: T1 T2 T3
125 1/1 for (int unsigned i = 0 ; i < N ; i++) begin
Tests: T1 T2 T3
126 1/1 if (winner[i]) begin
Tests: T1 T2 T3
127 1/1 idx_o = i[IdxW-1:0];
Tests: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Module :
prim_arbiter_ppc
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T5,T24,T10 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T17,T4,T10 |
1 | 0 | Covered | T1,T2,T3 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T2,T3 |
Branch Coverage for Module :
prim_arbiter_ppc
| Line No. | Total | Covered | Percent |
Branches |
|
10 |
10 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T2,T3 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Module :
prim_arbiter_ppc
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
12275519 |
0 |
0 |
T1 |
1872 |
1815 |
0 |
0 |
T2 |
1509 |
1421 |
0 |
0 |
T3 |
2534 |
2469 |
0 |
0 |
T4 |
1705 |
1560 |
0 |
0 |
T5 |
652 |
527 |
0 |
0 |
T6 |
10597 |
10289 |
0 |
0 |
T17 |
2262 |
2203 |
0 |
0 |
T24 |
1402 |
1319 |
0 |
0 |
T25 |
1337 |
1238 |
0 |
0 |
T26 |
1206 |
1107 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
946 |
946 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T4 |
1 |
1 |
0 |
0 |
T5 |
1 |
1 |
0 |
0 |
T6 |
1 |
1 |
0 |
0 |
T17 |
1 |
1 |
0 |
0 |
T24 |
1 |
1 |
0 |
0 |
T25 |
1 |
1 |
0 |
0 |
T26 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
23870 |
0 |
0 |
T1 |
1872 |
1 |
0 |
0 |
T2 |
1509 |
1 |
0 |
0 |
T3 |
2534 |
6 |
0 |
0 |
T4 |
1705 |
1 |
0 |
0 |
T5 |
652 |
0 |
0 |
0 |
T6 |
10597 |
4 |
0 |
0 |
T10 |
0 |
2 |
0 |
0 |
T17 |
2262 |
3 |
0 |
0 |
T24 |
1402 |
2 |
0 |
0 |
T25 |
1337 |
1 |
0 |
0 |
T26 |
1206 |
0 |
0 |
0 |
T27 |
0 |
1 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
23870 |
0 |
0 |
T1 |
1872 |
1 |
0 |
0 |
T2 |
1509 |
1 |
0 |
0 |
T3 |
2534 |
6 |
0 |
0 |
T4 |
1705 |
1 |
0 |
0 |
T5 |
652 |
0 |
0 |
0 |
T6 |
10597 |
4 |
0 |
0 |
T10 |
0 |
2 |
0 |
0 |
T17 |
2262 |
3 |
0 |
0 |
T24 |
1402 |
2 |
0 |
0 |
T25 |
1337 |
1 |
0 |
0 |
T26 |
1206 |
0 |
0 |
0 |
T27 |
0 |
1 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
12275519 |
0 |
0 |
T1 |
1872 |
1815 |
0 |
0 |
T2 |
1509 |
1421 |
0 |
0 |
T3 |
2534 |
2469 |
0 |
0 |
T4 |
1705 |
1560 |
0 |
0 |
T5 |
652 |
527 |
0 |
0 |
T6 |
10597 |
10289 |
0 |
0 |
T17 |
2262 |
2203 |
0 |
0 |
T24 |
1402 |
1319 |
0 |
0 |
T25 |
1337 |
1238 |
0 |
0 |
T26 |
1206 |
1107 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
12275519 |
0 |
0 |
T1 |
1872 |
1815 |
0 |
0 |
T2 |
1509 |
1421 |
0 |
0 |
T3 |
2534 |
2469 |
0 |
0 |
T4 |
1705 |
1560 |
0 |
0 |
T5 |
652 |
527 |
0 |
0 |
T6 |
10597 |
10289 |
0 |
0 |
T17 |
2262 |
2203 |
0 |
0 |
T24 |
1402 |
1319 |
0 |
0 |
T25 |
1337 |
1238 |
0 |
0 |
T26 |
1206 |
1107 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
23870 |
0 |
0 |
T1 |
1872 |
1 |
0 |
0 |
T2 |
1509 |
1 |
0 |
0 |
T3 |
2534 |
6 |
0 |
0 |
T4 |
1705 |
1 |
0 |
0 |
T5 |
652 |
0 |
0 |
0 |
T6 |
10597 |
4 |
0 |
0 |
T10 |
0 |
2 |
0 |
0 |
T17 |
2262 |
3 |
0 |
0 |
T24 |
1402 |
2 |
0 |
0 |
T25 |
1337 |
1 |
0 |
0 |
T26 |
1206 |
0 |
0 |
0 |
T27 |
0 |
1 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
1208809 |
0 |
0 |
T1 |
1872 |
144 |
0 |
0 |
T2 |
1509 |
129 |
0 |
0 |
T3 |
2534 |
579 |
0 |
0 |
T4 |
1705 |
0 |
0 |
0 |
T5 |
652 |
354 |
0 |
0 |
T6 |
10597 |
471 |
0 |
0 |
T10 |
0 |
1319 |
0 |
0 |
T11 |
0 |
1186 |
0 |
0 |
T17 |
2262 |
0 |
0 |
0 |
T24 |
1402 |
96 |
0 |
0 |
T25 |
1337 |
59 |
0 |
0 |
T26 |
1206 |
0 |
0 |
0 |
T27 |
0 |
47 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
10916052 |
0 |
0 |
T1 |
1872 |
1670 |
0 |
0 |
T2 |
1509 |
1291 |
0 |
0 |
T3 |
2534 |
1884 |
0 |
0 |
T4 |
1705 |
1498 |
0 |
0 |
T5 |
652 |
172 |
0 |
0 |
T6 |
10597 |
9814 |
0 |
0 |
T17 |
2262 |
2044 |
0 |
0 |
T24 |
1402 |
1221 |
0 |
0 |
T25 |
1337 |
1178 |
0 |
0 |
T26 |
1206 |
1107 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
23870 |
0 |
0 |
T1 |
1872 |
1 |
0 |
0 |
T2 |
1509 |
1 |
0 |
0 |
T3 |
2534 |
6 |
0 |
0 |
T4 |
1705 |
1 |
0 |
0 |
T5 |
652 |
0 |
0 |
0 |
T6 |
10597 |
4 |
0 |
0 |
T10 |
0 |
2 |
0 |
0 |
T17 |
2262 |
3 |
0 |
0 |
T24 |
1402 |
2 |
0 |
0 |
T25 |
1337 |
1 |
0 |
0 |
T26 |
1206 |
0 |
0 |
0 |
T27 |
0 |
1 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
23870 |
0 |
0 |
T1 |
1872 |
1 |
0 |
0 |
T2 |
1509 |
1 |
0 |
0 |
T3 |
2534 |
6 |
0 |
0 |
T4 |
1705 |
1 |
0 |
0 |
T5 |
652 |
0 |
0 |
0 |
T6 |
10597 |
4 |
0 |
0 |
T10 |
0 |
2 |
0 |
0 |
T17 |
2262 |
3 |
0 |
0 |
T24 |
1402 |
2 |
0 |
0 |
T25 |
1337 |
1 |
0 |
0 |
T26 |
1206 |
0 |
0 |
0 |
T27 |
0 |
1 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
1233941 |
0 |
0 |
T1 |
1872 |
145 |
0 |
0 |
T2 |
1509 |
130 |
0 |
0 |
T3 |
2534 |
585 |
0 |
0 |
T4 |
1705 |
1 |
0 |
0 |
T5 |
652 |
355 |
0 |
0 |
T6 |
10597 |
475 |
0 |
0 |
T10 |
0 |
1321 |
0 |
0 |
T17 |
2262 |
3 |
0 |
0 |
T24 |
1402 |
98 |
0 |
0 |
T25 |
1337 |
60 |
0 |
0 |
T26 |
1206 |
0 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
1208809 |
0 |
0 |
T1 |
1872 |
144 |
0 |
0 |
T2 |
1509 |
129 |
0 |
0 |
T3 |
2534 |
579 |
0 |
0 |
T4 |
1705 |
0 |
0 |
0 |
T5 |
652 |
354 |
0 |
0 |
T6 |
10597 |
471 |
0 |
0 |
T10 |
0 |
1319 |
0 |
0 |
T11 |
0 |
1186 |
0 |
0 |
T17 |
2262 |
0 |
0 |
0 |
T24 |
1402 |
96 |
0 |
0 |
T25 |
1337 |
59 |
0 |
0 |
T26 |
1206 |
0 |
0 |
0 |
T27 |
0 |
47 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
0 |
0 |
946 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
12472250 |
12275519 |
0 |
0 |
T1 |
1872 |
1815 |
0 |
0 |
T2 |
1509 |
1421 |
0 |
0 |
T3 |
2534 |
2469 |
0 |
0 |
T4 |
1705 |
1560 |
0 |
0 |
T5 |
652 |
527 |
0 |
0 |
T6 |
10597 |
10289 |
0 |
0 |
T17 |
2262 |
2203 |
0 |
0 |
T24 |
1402 |
1319 |
0 |
0 |
T25 |
1337 |
1238 |
0 |
0 |
T26 |
1206 |
1107 |
0 |
0 |