Line Coverage for Module :
prim_arbiter_ppc ( parameter N=3,DW=75,EnDataPort=1,IdxW=2 + N=5,DW=75,EnDataPort=1,IdxW=3 )
Line Coverage for Module self-instances :
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.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 | 5 | 5 | 100.00 |
ALWAYS | 109 | 4 | 4 | 100.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: T4 T6 T7
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 unreachable mask <= ppc_out;
104 end
MISSING_ELSE
105 end
106
107 if (EnDataPort == 1) begin: gen_datapath
108 always_comb begin
109 1/1 data_o = '0;
Tests: T1 T2 T3
110 1/1 for (int i = 0 ; i < N ; i++) begin
Tests: T1 T2 T3
111 1/1 if (winner[i]) begin
Tests: T1 T2 T3
112 1/1 data_o = data_i[i];
Tests: T4 T6 T7
113 end
MISSING_ELSE
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 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: T4 T6 T7
128 end
MISSING_ELSE
Line Coverage for Module :
prim_arbiter_ppc ( parameter N=2,DW=75,EnDataPort=1,IdxW=1 )
Line Coverage for Module self-instances :
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.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 | 5 | 5 | 100.00 |
ALWAYS | 109 | 4 | 4 | 100.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: T5 T6 T7
99 // Latch only when requests accepted
100 1/1 mask <= mask_next;
Tests: T6 T7 T11
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T5 T6 T7
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 unreachable mask <= ppc_out;
104 end
MISSING_ELSE
105 end
106
107 if (EnDataPort == 1) begin: gen_datapath
108 always_comb begin
109 1/1 data_o = '0;
Tests: T1 T2 T3
110 1/1 for (int i = 0 ; i < N ; i++) begin
Tests: T1 T2 T3
111 1/1 if (winner[i]) begin
Tests: T1 T2 T3
112 1/1 data_o = data_i[i];
Tests: T6 T7 T11
113 end
MISSING_ELSE
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 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: T6 T7 T11
128 end
MISSING_ELSE
Cond Coverage for Module :
prim_arbiter_ppc ( parameter N=2,DW=75,EnDataPort=1,IdxW=1 )
Cond Coverage for Module self-instances :
| Total | Covered | Percent |
Conditions | 9 | 7 | 77.78 |
Logical | 9 | 7 | 77.78 |
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 | Not Covered | |
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 | T6,T11,T28 |
1 | 0 | Covered | T6,T7,T11 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Unreachable | |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T5,T6,T7 |
1 | 0 | Unreachable | |
1 | 1 | Covered | T6,T7,T11 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Unreachable | |
1 | 0 | Not Covered | |
1 | 1 | Unreachable | |
Cond Coverage for Module :
prim_arbiter_ppc ( parameter N=3,DW=75,EnDataPort=1,IdxW=2 )
Cond Coverage for Module self-instances :
| Total | Covered | Percent |
Conditions | 9 | 8 | 88.89 |
Logical | 9 | 8 | 88.89 |
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 | T24,T56,T65 |
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 | T24,T56,T65 |
1 | 0 | Covered | T24,T56,T65 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Unreachable | |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T13,T14,T15 |
1 | 0 | Unreachable | |
1 | 1 | Covered | T24,T56,T65 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Unreachable | |
1 | 0 | Not Covered | |
1 | 1 | Unreachable | |
Cond Coverage for Module :
prim_arbiter_ppc ( parameter N=5,DW=75,EnDataPort=1,IdxW=3 )
Cond Coverage for Module self-instances :
| Total | Covered | Percent |
Conditions | 9 | 8 | 88.89 |
Logical | 9 | 8 | 88.89 |
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 | T4,T6,T26 |
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 | T4,T6,T7 |
1 | 0 | Covered | T4,T6,T26 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Unreachable | |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Covered | T4,T6,T7 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Unreachable | |
1 | 0 | Not Covered | |
1 | 1 | Unreachable | |
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 |
1 |
1 |
100.00 |
IF |
96 |
3 |
3 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T4,T6,T26 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==> (Unreachable)
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Unreachable |
|
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;
==> (Unreachable)
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T4,T6,T7 |
0 |
0 |
1 |
Unreachable |
|
0 |
0 |
0 |
Covered |
T1,T5,T6 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T4,T6,T7 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T4,T6,T7 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Module :
prim_arbiter_ppc
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
593600658 |
0 |
0 |
T1 |
1363 |
1275 |
0 |
0 |
T2 |
1816 |
1728 |
0 |
0 |
T3 |
1550 |
1490 |
0 |
0 |
T4 |
1191 |
1124 |
0 |
0 |
T5 |
1834 |
1758 |
0 |
0 |
T6 |
41776 |
41640 |
0 |
0 |
T7 |
2728 |
2629 |
0 |
0 |
T8 |
1110 |
1010 |
0 |
0 |
T9 |
796 |
701 |
0 |
0 |
T10 |
7557 |
7369 |
0 |
0 |
T11 |
1240 |
1240 |
0 |
0 |
T13 |
2724 |
1362 |
0 |
0 |
T14 |
25932 |
12966 |
0 |
0 |
T15 |
112620 |
55596 |
0 |
0 |
T16 |
58172 |
29086 |
0 |
0 |
T17 |
90168 |
44664 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T21 |
33897 |
0 |
0 |
0 |
T22 |
38186 |
0 |
0 |
0 |
T23 |
24346 |
0 |
0 |
0 |
T27 |
360 |
360 |
0 |
0 |
T28 |
0 |
4624 |
0 |
0 |
T29 |
0 |
91096 |
0 |
0 |
T30 |
0 |
85208 |
0 |
0 |
T31 |
0 |
3800 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2928 |
2928 |
0 |
0 |
T1 |
3 |
3 |
0 |
0 |
T2 |
3 |
3 |
0 |
0 |
T3 |
3 |
3 |
0 |
0 |
T4 |
3 |
3 |
0 |
0 |
T5 |
3 |
3 |
0 |
0 |
T6 |
3 |
3 |
0 |
0 |
T7 |
3 |
3 |
0 |
0 |
T8 |
3 |
3 |
0 |
0 |
T9 |
3 |
3 |
0 |
0 |
T10 |
3 |
3 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
3643497 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
41776 |
719 |
0 |
0 |
T7 |
2728 |
14 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
7557 |
0 |
0 |
0 |
T11 |
2638 |
109 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
1362 |
832 |
0 |
0 |
T14 |
12966 |
832 |
0 |
0 |
T15 |
56310 |
832 |
0 |
0 |
T16 |
29086 |
832 |
0 |
0 |
T17 |
45084 |
832 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T56 |
0 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
3643497 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
41776 |
719 |
0 |
0 |
T7 |
2728 |
14 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
7557 |
0 |
0 |
0 |
T11 |
2638 |
109 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
1362 |
832 |
0 |
0 |
T14 |
12966 |
832 |
0 |
0 |
T15 |
56310 |
832 |
0 |
0 |
T16 |
29086 |
832 |
0 |
0 |
T17 |
45084 |
832 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T56 |
0 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
593600658 |
0 |
0 |
T1 |
1363 |
1275 |
0 |
0 |
T2 |
1816 |
1728 |
0 |
0 |
T3 |
1550 |
1490 |
0 |
0 |
T4 |
1191 |
1124 |
0 |
0 |
T5 |
1834 |
1758 |
0 |
0 |
T6 |
41776 |
41640 |
0 |
0 |
T7 |
2728 |
2629 |
0 |
0 |
T8 |
1110 |
1010 |
0 |
0 |
T9 |
796 |
701 |
0 |
0 |
T10 |
7557 |
7369 |
0 |
0 |
T11 |
1240 |
1240 |
0 |
0 |
T13 |
2724 |
1362 |
0 |
0 |
T14 |
25932 |
12966 |
0 |
0 |
T15 |
112620 |
55596 |
0 |
0 |
T16 |
58172 |
29086 |
0 |
0 |
T17 |
90168 |
44664 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T21 |
33897 |
0 |
0 |
0 |
T22 |
38186 |
0 |
0 |
0 |
T23 |
24346 |
0 |
0 |
0 |
T27 |
360 |
360 |
0 |
0 |
T28 |
0 |
4624 |
0 |
0 |
T29 |
0 |
91096 |
0 |
0 |
T30 |
0 |
85208 |
0 |
0 |
T31 |
0 |
3800 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
593600658 |
0 |
0 |
T1 |
1363 |
1275 |
0 |
0 |
T2 |
1816 |
1728 |
0 |
0 |
T3 |
1550 |
1490 |
0 |
0 |
T4 |
1191 |
1124 |
0 |
0 |
T5 |
1834 |
1758 |
0 |
0 |
T6 |
41776 |
41640 |
0 |
0 |
T7 |
2728 |
2629 |
0 |
0 |
T8 |
1110 |
1010 |
0 |
0 |
T9 |
796 |
701 |
0 |
0 |
T10 |
7557 |
7369 |
0 |
0 |
T11 |
1240 |
1240 |
0 |
0 |
T13 |
2724 |
1362 |
0 |
0 |
T14 |
25932 |
12966 |
0 |
0 |
T15 |
112620 |
55596 |
0 |
0 |
T16 |
58172 |
29086 |
0 |
0 |
T17 |
90168 |
44664 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T21 |
33897 |
0 |
0 |
0 |
T22 |
38186 |
0 |
0 |
0 |
T23 |
24346 |
0 |
0 |
0 |
T27 |
360 |
360 |
0 |
0 |
T28 |
0 |
4624 |
0 |
0 |
T29 |
0 |
91096 |
0 |
0 |
T30 |
0 |
85208 |
0 |
0 |
T31 |
0 |
3800 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
3643497 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
41776 |
719 |
0 |
0 |
T7 |
2728 |
14 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
7557 |
0 |
0 |
0 |
T11 |
2638 |
109 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
1362 |
832 |
0 |
0 |
T14 |
12966 |
832 |
0 |
0 |
T15 |
56310 |
832 |
0 |
0 |
T16 |
29086 |
832 |
0 |
0 |
T17 |
45084 |
832 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T56 |
0 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
0 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
3643497 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
41776 |
719 |
0 |
0 |
T7 |
2728 |
14 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
7557 |
0 |
0 |
0 |
T11 |
2638 |
109 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
1362 |
832 |
0 |
0 |
T14 |
12966 |
832 |
0 |
0 |
T15 |
56310 |
832 |
0 |
0 |
T16 |
29086 |
832 |
0 |
0 |
T17 |
45084 |
832 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T56 |
0 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
3643497 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
41776 |
719 |
0 |
0 |
T7 |
2728 |
14 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
7557 |
0 |
0 |
0 |
T11 |
2638 |
109 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
1362 |
832 |
0 |
0 |
T14 |
12966 |
832 |
0 |
0 |
T15 |
56310 |
832 |
0 |
0 |
T16 |
29086 |
832 |
0 |
0 |
T17 |
45084 |
832 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T56 |
0 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
3643497 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
41776 |
719 |
0 |
0 |
T7 |
2728 |
14 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
7557 |
0 |
0 |
0 |
T11 |
2638 |
109 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
1362 |
832 |
0 |
0 |
T14 |
12966 |
832 |
0 |
0 |
T15 |
56310 |
832 |
0 |
0 |
T16 |
29086 |
832 |
0 |
0 |
T17 |
45084 |
832 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T56 |
0 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
7 |
0 |
976 |
T84 |
121155 |
1 |
0 |
1 |
T85 |
0 |
1 |
0 |
0 |
T86 |
0 |
1 |
0 |
0 |
T87 |
0 |
1 |
0 |
0 |
T88 |
0 |
1 |
0 |
0 |
T89 |
0 |
1 |
0 |
0 |
T90 |
0 |
1 |
0 |
0 |
T91 |
49260 |
0 |
0 |
1 |
T92 |
17036 |
0 |
0 |
1 |
T93 |
1459 |
0 |
0 |
1 |
T94 |
123557 |
0 |
0 |
1 |
T95 |
1465 |
0 |
0 |
1 |
T96 |
1236 |
0 |
0 |
1 |
T97 |
38053 |
0 |
0 |
1 |
T98 |
1035 |
0 |
0 |
1 |
T99 |
1359 |
0 |
0 |
1 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
593600658 |
0 |
0 |
T1 |
1363 |
1275 |
0 |
0 |
T2 |
1816 |
1728 |
0 |
0 |
T3 |
1550 |
1490 |
0 |
0 |
T4 |
1191 |
1124 |
0 |
0 |
T5 |
1834 |
1758 |
0 |
0 |
T6 |
41776 |
41640 |
0 |
0 |
T7 |
2728 |
2629 |
0 |
0 |
T8 |
1110 |
1010 |
0 |
0 |
T9 |
796 |
701 |
0 |
0 |
T10 |
7557 |
7369 |
0 |
0 |
T11 |
1240 |
1240 |
0 |
0 |
T13 |
2724 |
1362 |
0 |
0 |
T14 |
25932 |
12966 |
0 |
0 |
T15 |
112620 |
55596 |
0 |
0 |
T16 |
58172 |
29086 |
0 |
0 |
T17 |
90168 |
44664 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T21 |
33897 |
0 |
0 |
0 |
T22 |
38186 |
0 |
0 |
0 |
T23 |
24346 |
0 |
0 |
0 |
T27 |
360 |
360 |
0 |
0 |
T28 |
0 |
4624 |
0 |
0 |
T29 |
0 |
91096 |
0 |
0 |
T30 |
0 |
85208 |
0 |
0 |
T31 |
0 |
3800 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
735230081 |
3643497 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
41776 |
719 |
0 |
0 |
T7 |
2728 |
14 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
7557 |
0 |
0 |
0 |
T11 |
2638 |
109 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
1362 |
832 |
0 |
0 |
T14 |
12966 |
832 |
0 |
0 |
T15 |
56310 |
832 |
0 |
0 |
T16 |
29086 |
832 |
0 |
0 |
T17 |
45084 |
832 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T56 |
0 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_spi_tpm.u_arbiter.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.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 | 5 | 5 | 100.00 |
ALWAYS | 109 | 4 | 4 | 100.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: T5 T6 T7
99 // Latch only when requests accepted
100 1/1 mask <= mask_next;
Tests: T6 T7 T11
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T5 T6 T7
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 unreachable mask <= ppc_out;
104 end
MISSING_ELSE
105 end
106
107 if (EnDataPort == 1) begin: gen_datapath
108 always_comb begin
109 1/1 data_o = '0;
Tests: T1 T2 T3
110 1/1 for (int i = 0 ; i < N ; i++) begin
Tests: T1 T2 T3
111 1/1 if (winner[i]) begin
Tests: T1 T2 T3
112 1/1 data_o = data_i[i];
Tests: T6 T7 T11
113 end
MISSING_ELSE
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 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: T6 T7 T11
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_spi_tpm.u_arbiter.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 9 | 7 | 77.78 |
Logical | 9 | 7 | 77.78 |
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 | Not Covered | |
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 | T6,T11,T28 |
1 | 0 | Covered | T6,T7,T11 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Unreachable | |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T5,T6,T7 |
1 | 0 | Unreachable | |
1 | 1 | Covered | T6,T7,T11 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Unreachable | |
1 | 0 | Not Covered | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.u_spi_tpm.u_arbiter.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
10 |
9 |
90.00 |
TERNARY |
76 |
2 |
1 |
50.00 |
TERNARY |
90 |
1 |
1 |
100.00 |
IF |
96 |
3 |
3 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Not Covered |
|
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==> (Unreachable)
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Unreachable |
|
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;
==> (Unreachable)
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T6,T7,T11 |
0 |
0 |
1 |
Unreachable |
|
0 |
0 |
0 |
Covered |
T5,T6,T7 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T6,T7,T11 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T6,T7,T11 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_spi_tpm.u_arbiter.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
28407661 |
0 |
0 |
T5 |
144 |
144 |
0 |
0 |
T6 |
29446 |
29360 |
0 |
0 |
T7 |
432 |
432 |
0 |
0 |
T10 |
762 |
648 |
0 |
0 |
T11 |
1240 |
1240 |
0 |
0 |
T13 |
1362 |
0 |
0 |
0 |
T14 |
12966 |
0 |
0 |
0 |
T15 |
56310 |
0 |
0 |
0 |
T16 |
29086 |
0 |
0 |
0 |
T17 |
45084 |
0 |
0 |
0 |
T27 |
0 |
360 |
0 |
0 |
T28 |
0 |
4624 |
0 |
0 |
T29 |
0 |
91096 |
0 |
0 |
T30 |
0 |
85208 |
0 |
0 |
T31 |
0 |
3800 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
976 |
976 |
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 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
653368 |
0 |
0 |
T6 |
29446 |
529 |
0 |
0 |
T7 |
432 |
8 |
0 |
0 |
T10 |
762 |
0 |
0 |
0 |
T11 |
1240 |
80 |
0 |
0 |
T13 |
1362 |
0 |
0 |
0 |
T14 |
12966 |
0 |
0 |
0 |
T15 |
56310 |
0 |
0 |
0 |
T16 |
29086 |
0 |
0 |
0 |
T17 |
45084 |
0 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
653368 |
0 |
0 |
T6 |
29446 |
529 |
0 |
0 |
T7 |
432 |
8 |
0 |
0 |
T10 |
762 |
0 |
0 |
0 |
T11 |
1240 |
80 |
0 |
0 |
T13 |
1362 |
0 |
0 |
0 |
T14 |
12966 |
0 |
0 |
0 |
T15 |
56310 |
0 |
0 |
0 |
T16 |
29086 |
0 |
0 |
0 |
T17 |
45084 |
0 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
28407661 |
0 |
0 |
T5 |
144 |
144 |
0 |
0 |
T6 |
29446 |
29360 |
0 |
0 |
T7 |
432 |
432 |
0 |
0 |
T10 |
762 |
648 |
0 |
0 |
T11 |
1240 |
1240 |
0 |
0 |
T13 |
1362 |
0 |
0 |
0 |
T14 |
12966 |
0 |
0 |
0 |
T15 |
56310 |
0 |
0 |
0 |
T16 |
29086 |
0 |
0 |
0 |
T17 |
45084 |
0 |
0 |
0 |
T27 |
0 |
360 |
0 |
0 |
T28 |
0 |
4624 |
0 |
0 |
T29 |
0 |
91096 |
0 |
0 |
T30 |
0 |
85208 |
0 |
0 |
T31 |
0 |
3800 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
28407661 |
0 |
0 |
T5 |
144 |
144 |
0 |
0 |
T6 |
29446 |
29360 |
0 |
0 |
T7 |
432 |
432 |
0 |
0 |
T10 |
762 |
648 |
0 |
0 |
T11 |
1240 |
1240 |
0 |
0 |
T13 |
1362 |
0 |
0 |
0 |
T14 |
12966 |
0 |
0 |
0 |
T15 |
56310 |
0 |
0 |
0 |
T16 |
29086 |
0 |
0 |
0 |
T17 |
45084 |
0 |
0 |
0 |
T27 |
0 |
360 |
0 |
0 |
T28 |
0 |
4624 |
0 |
0 |
T29 |
0 |
91096 |
0 |
0 |
T30 |
0 |
85208 |
0 |
0 |
T31 |
0 |
3800 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
653368 |
0 |
0 |
T6 |
29446 |
529 |
0 |
0 |
T7 |
432 |
8 |
0 |
0 |
T10 |
762 |
0 |
0 |
0 |
T11 |
1240 |
80 |
0 |
0 |
T13 |
1362 |
0 |
0 |
0 |
T14 |
12966 |
0 |
0 |
0 |
T15 |
56310 |
0 |
0 |
0 |
T16 |
29086 |
0 |
0 |
0 |
T17 |
45084 |
0 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
0 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
653368 |
0 |
0 |
T6 |
29446 |
529 |
0 |
0 |
T7 |
432 |
8 |
0 |
0 |
T10 |
762 |
0 |
0 |
0 |
T11 |
1240 |
80 |
0 |
0 |
T13 |
1362 |
0 |
0 |
0 |
T14 |
12966 |
0 |
0 |
0 |
T15 |
56310 |
0 |
0 |
0 |
T16 |
29086 |
0 |
0 |
0 |
T17 |
45084 |
0 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
653368 |
0 |
0 |
T6 |
29446 |
529 |
0 |
0 |
T7 |
432 |
8 |
0 |
0 |
T10 |
762 |
0 |
0 |
0 |
T11 |
1240 |
80 |
0 |
0 |
T13 |
1362 |
0 |
0 |
0 |
T14 |
12966 |
0 |
0 |
0 |
T15 |
56310 |
0 |
0 |
0 |
T16 |
29086 |
0 |
0 |
0 |
T17 |
45084 |
0 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
653368 |
0 |
0 |
T6 |
29446 |
529 |
0 |
0 |
T7 |
432 |
8 |
0 |
0 |
T10 |
762 |
0 |
0 |
0 |
T11 |
1240 |
80 |
0 |
0 |
T13 |
1362 |
0 |
0 |
0 |
T14 |
12966 |
0 |
0 |
0 |
T15 |
56310 |
0 |
0 |
0 |
T16 |
29086 |
0 |
0 |
0 |
T17 |
45084 |
0 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
0 |
0 |
0 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
28407661 |
0 |
0 |
T5 |
144 |
144 |
0 |
0 |
T6 |
29446 |
29360 |
0 |
0 |
T7 |
432 |
432 |
0 |
0 |
T10 |
762 |
648 |
0 |
0 |
T11 |
1240 |
1240 |
0 |
0 |
T13 |
1362 |
0 |
0 |
0 |
T14 |
12966 |
0 |
0 |
0 |
T15 |
56310 |
0 |
0 |
0 |
T16 |
29086 |
0 |
0 |
0 |
T17 |
45084 |
0 |
0 |
0 |
T27 |
0 |
360 |
0 |
0 |
T28 |
0 |
4624 |
0 |
0 |
T29 |
0 |
91096 |
0 |
0 |
T30 |
0 |
85208 |
0 |
0 |
T31 |
0 |
3800 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
653368 |
0 |
0 |
T6 |
29446 |
529 |
0 |
0 |
T7 |
432 |
8 |
0 |
0 |
T10 |
762 |
0 |
0 |
0 |
T11 |
1240 |
80 |
0 |
0 |
T13 |
1362 |
0 |
0 |
0 |
T14 |
12966 |
0 |
0 |
0 |
T15 |
56310 |
0 |
0 |
0 |
T16 |
29086 |
0 |
0 |
0 |
T17 |
45084 |
0 |
0 |
0 |
T19 |
16479 |
0 |
0 |
0 |
T28 |
0 |
265 |
0 |
0 |
T31 |
0 |
278 |
0 |
0 |
T45 |
0 |
2901 |
0 |
0 |
T46 |
0 |
2532 |
0 |
0 |
T48 |
0 |
142 |
0 |
0 |
T80 |
0 |
5994 |
0 |
0 |
T81 |
0 |
5801 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_upload.u_arbiter.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.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 | 5 | 5 | 100.00 |
ALWAYS | 109 | 4 | 4 | 100.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: T13 T14 T15
99 // Latch only when requests accepted
100 1/1 mask <= mask_next;
Tests: T24 T56 T65
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T13 T14 T15
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 unreachable mask <= ppc_out;
104 end
MISSING_ELSE
105 end
106
107 if (EnDataPort == 1) begin: gen_datapath
108 always_comb begin
109 1/1 data_o = '0;
Tests: T1 T2 T3
110 1/1 for (int i = 0 ; i < N ; i++) begin
Tests: T1 T2 T3
111 1/1 if (winner[i]) begin
Tests: T1 T2 T3
112 1/1 data_o = data_i[i];
Tests: T24 T56 T65
113 end
MISSING_ELSE
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 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: T24 T56 T65
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_upload.u_arbiter.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 9 | 8 | 88.89 |
Logical | 9 | 8 | 88.89 |
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 | T24,T56,T65 |
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 | T24,T56,T65 |
1 | 0 | Covered | T24,T56,T65 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Unreachable | |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T13,T14,T15 |
1 | 0 | Unreachable | |
1 | 1 | Covered | T24,T56,T65 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Unreachable | |
1 | 0 | Not Covered | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.u_upload.u_arbiter.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
10 |
10 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
1 |
1 |
100.00 |
IF |
96 |
3 |
3 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T24,T56,T65 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==> (Unreachable)
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Unreachable |
|
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;
==> (Unreachable)
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T24,T56,T65 |
0 |
0 |
1 |
Unreachable |
|
0 |
0 |
0 |
Covered |
T13,T14,T15 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T24,T56,T65 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T24,T56,T65 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_upload.u_arbiter.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
110429241 |
0 |
0 |
T13 |
1362 |
1362 |
0 |
0 |
T14 |
12966 |
12966 |
0 |
0 |
T15 |
56310 |
55596 |
0 |
0 |
T16 |
29086 |
29086 |
0 |
0 |
T17 |
45084 |
44664 |
0 |
0 |
T19 |
16479 |
16479 |
0 |
0 |
T21 |
33897 |
33664 |
0 |
0 |
T22 |
38186 |
37584 |
0 |
0 |
T23 |
24346 |
24204 |
0 |
0 |
T24 |
0 |
41932 |
0 |
0 |
T27 |
360 |
0 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
976 |
976 |
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 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
811590 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T37 |
0 |
1067 |
0 |
0 |
T50 |
8855 |
0 |
0 |
0 |
T51 |
0 |
6566 |
0 |
0 |
T52 |
0 |
2630 |
0 |
0 |
T53 |
0 |
2 |
0 |
0 |
T54 |
0 |
8414 |
0 |
0 |
T56 |
4368 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T62 |
117114 |
0 |
0 |
0 |
T64 |
25594 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
T100 |
0 |
518 |
0 |
0 |
T101 |
12822 |
0 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
811590 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T37 |
0 |
1067 |
0 |
0 |
T50 |
8855 |
0 |
0 |
0 |
T51 |
0 |
6566 |
0 |
0 |
T52 |
0 |
2630 |
0 |
0 |
T53 |
0 |
2 |
0 |
0 |
T54 |
0 |
8414 |
0 |
0 |
T56 |
4368 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T62 |
117114 |
0 |
0 |
0 |
T64 |
25594 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
T100 |
0 |
518 |
0 |
0 |
T101 |
12822 |
0 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
110429241 |
0 |
0 |
T13 |
1362 |
1362 |
0 |
0 |
T14 |
12966 |
12966 |
0 |
0 |
T15 |
56310 |
55596 |
0 |
0 |
T16 |
29086 |
29086 |
0 |
0 |
T17 |
45084 |
44664 |
0 |
0 |
T19 |
16479 |
16479 |
0 |
0 |
T21 |
33897 |
33664 |
0 |
0 |
T22 |
38186 |
37584 |
0 |
0 |
T23 |
24346 |
24204 |
0 |
0 |
T24 |
0 |
41932 |
0 |
0 |
T27 |
360 |
0 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
110429241 |
0 |
0 |
T13 |
1362 |
1362 |
0 |
0 |
T14 |
12966 |
12966 |
0 |
0 |
T15 |
56310 |
55596 |
0 |
0 |
T16 |
29086 |
29086 |
0 |
0 |
T17 |
45084 |
44664 |
0 |
0 |
T19 |
16479 |
16479 |
0 |
0 |
T21 |
33897 |
33664 |
0 |
0 |
T22 |
38186 |
37584 |
0 |
0 |
T23 |
24346 |
24204 |
0 |
0 |
T24 |
0 |
41932 |
0 |
0 |
T27 |
360 |
0 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
811590 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T37 |
0 |
1067 |
0 |
0 |
T50 |
8855 |
0 |
0 |
0 |
T51 |
0 |
6566 |
0 |
0 |
T52 |
0 |
2630 |
0 |
0 |
T53 |
0 |
2 |
0 |
0 |
T54 |
0 |
8414 |
0 |
0 |
T56 |
4368 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T62 |
117114 |
0 |
0 |
0 |
T64 |
25594 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
T100 |
0 |
518 |
0 |
0 |
T101 |
12822 |
0 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
0 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
811590 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T37 |
0 |
1067 |
0 |
0 |
T50 |
8855 |
0 |
0 |
0 |
T51 |
0 |
6566 |
0 |
0 |
T52 |
0 |
2630 |
0 |
0 |
T53 |
0 |
2 |
0 |
0 |
T54 |
0 |
8414 |
0 |
0 |
T56 |
4368 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T62 |
117114 |
0 |
0 |
0 |
T64 |
25594 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
T100 |
0 |
518 |
0 |
0 |
T101 |
12822 |
0 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
811590 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T37 |
0 |
1067 |
0 |
0 |
T50 |
8855 |
0 |
0 |
0 |
T51 |
0 |
6566 |
0 |
0 |
T52 |
0 |
2630 |
0 |
0 |
T53 |
0 |
2 |
0 |
0 |
T54 |
0 |
8414 |
0 |
0 |
T56 |
4368 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T62 |
117114 |
0 |
0 |
0 |
T64 |
25594 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
T100 |
0 |
518 |
0 |
0 |
T101 |
12822 |
0 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
811590 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T37 |
0 |
1067 |
0 |
0 |
T50 |
8855 |
0 |
0 |
0 |
T51 |
0 |
6566 |
0 |
0 |
T52 |
0 |
2630 |
0 |
0 |
T53 |
0 |
2 |
0 |
0 |
T54 |
0 |
8414 |
0 |
0 |
T56 |
4368 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T62 |
117114 |
0 |
0 |
0 |
T64 |
25594 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
T100 |
0 |
518 |
0 |
0 |
T101 |
12822 |
0 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
0 |
0 |
0 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
110429241 |
0 |
0 |
T13 |
1362 |
1362 |
0 |
0 |
T14 |
12966 |
12966 |
0 |
0 |
T15 |
56310 |
55596 |
0 |
0 |
T16 |
29086 |
29086 |
0 |
0 |
T17 |
45084 |
44664 |
0 |
0 |
T19 |
16479 |
16479 |
0 |
0 |
T21 |
33897 |
33664 |
0 |
0 |
T22 |
38186 |
37584 |
0 |
0 |
T23 |
24346 |
24204 |
0 |
0 |
T24 |
0 |
41932 |
0 |
0 |
T27 |
360 |
0 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
140189703 |
811590 |
0 |
0 |
T24 |
42367 |
520 |
0 |
0 |
T29 |
93794 |
0 |
0 |
0 |
T30 |
89065 |
0 |
0 |
0 |
T37 |
0 |
1067 |
0 |
0 |
T50 |
8855 |
0 |
0 |
0 |
T51 |
0 |
6566 |
0 |
0 |
T52 |
0 |
2630 |
0 |
0 |
T53 |
0 |
2 |
0 |
0 |
T54 |
0 |
8414 |
0 |
0 |
T56 |
4368 |
4 |
0 |
0 |
T57 |
22513 |
0 |
0 |
0 |
T62 |
117114 |
0 |
0 |
0 |
T64 |
25594 |
0 |
0 |
0 |
T65 |
0 |
2652 |
0 |
0 |
T82 |
0 |
514 |
0 |
0 |
T83 |
41552 |
0 |
0 |
0 |
T100 |
0 |
518 |
0 |
0 |
T101 |
12822 |
0 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sys_sram_arbiter.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 22 | 22 | 100.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 | 5 | 5 | 100.00 |
ALWAYS | 109 | 4 | 4 | 100.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: T4 T6 T7
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 unreachable mask <= ppc_out;
104 end
MISSING_ELSE
105 end
106
107 if (EnDataPort == 1) begin: gen_datapath
108 always_comb begin
109 1/1 data_o = '0;
Tests: T1 T2 T3
110 1/1 for (int i = 0 ; i < N ; i++) begin
Tests: T1 T2 T3
111 1/1 if (winner[i]) begin
Tests: T1 T2 T3
112 1/1 data_o = data_i[i];
Tests: T4 T6 T7
113 end
MISSING_ELSE
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 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: T4 T6 T7
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sys_sram_arbiter.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 9 | 8 | 88.89 |
Logical | 9 | 8 | 88.89 |
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 | T4,T6,T26 |
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 | T4,T6,T7 |
1 | 0 | Covered | T4,T6,T26 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Unreachable | |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Unreachable | |
1 | 1 | Covered | T4,T6,T7 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Unreachable | |
1 | 0 | Not Covered | |
1 | 1 | Unreachable | |
Branch Coverage for Instance : tb.dut.u_sys_sram_arbiter.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
10 |
10 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
1 |
1 |
100.00 |
IF |
96 |
3 |
3 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T4,T6,T26 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==> (Unreachable)
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Unreachable |
|
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;
==> (Unreachable)
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T4,T6,T7 |
0 |
0 |
1 |
Unreachable |
|
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 |
T4,T6,T7 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T4,T6,T7 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sys_sram_arbiter.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
454763756 |
0 |
0 |
T1 |
1363 |
1275 |
0 |
0 |
T2 |
1816 |
1728 |
0 |
0 |
T3 |
1550 |
1490 |
0 |
0 |
T4 |
1191 |
1124 |
0 |
0 |
T5 |
1690 |
1614 |
0 |
0 |
T6 |
12330 |
12280 |
0 |
0 |
T7 |
2296 |
2197 |
0 |
0 |
T8 |
1110 |
1010 |
0 |
0 |
T9 |
796 |
701 |
0 |
0 |
T10 |
6795 |
6721 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
976 |
976 |
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 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
2178539 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
12330 |
190 |
0 |
0 |
T7 |
2296 |
6 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
6795 |
0 |
0 |
0 |
T11 |
1398 |
29 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
0 |
832 |
0 |
0 |
T14 |
0 |
832 |
0 |
0 |
T15 |
0 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T17 |
0 |
832 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
2178539 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
12330 |
190 |
0 |
0 |
T7 |
2296 |
6 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
6795 |
0 |
0 |
0 |
T11 |
1398 |
29 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
0 |
832 |
0 |
0 |
T14 |
0 |
832 |
0 |
0 |
T15 |
0 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T17 |
0 |
832 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
454763756 |
0 |
0 |
T1 |
1363 |
1275 |
0 |
0 |
T2 |
1816 |
1728 |
0 |
0 |
T3 |
1550 |
1490 |
0 |
0 |
T4 |
1191 |
1124 |
0 |
0 |
T5 |
1690 |
1614 |
0 |
0 |
T6 |
12330 |
12280 |
0 |
0 |
T7 |
2296 |
2197 |
0 |
0 |
T8 |
1110 |
1010 |
0 |
0 |
T9 |
796 |
701 |
0 |
0 |
T10 |
6795 |
6721 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
454763756 |
0 |
0 |
T1 |
1363 |
1275 |
0 |
0 |
T2 |
1816 |
1728 |
0 |
0 |
T3 |
1550 |
1490 |
0 |
0 |
T4 |
1191 |
1124 |
0 |
0 |
T5 |
1690 |
1614 |
0 |
0 |
T6 |
12330 |
12280 |
0 |
0 |
T7 |
2296 |
2197 |
0 |
0 |
T8 |
1110 |
1010 |
0 |
0 |
T9 |
796 |
701 |
0 |
0 |
T10 |
6795 |
6721 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
2178539 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
12330 |
190 |
0 |
0 |
T7 |
2296 |
6 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
6795 |
0 |
0 |
0 |
T11 |
1398 |
29 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
0 |
832 |
0 |
0 |
T14 |
0 |
832 |
0 |
0 |
T15 |
0 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T17 |
0 |
832 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
0 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
2178539 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
12330 |
190 |
0 |
0 |
T7 |
2296 |
6 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
6795 |
0 |
0 |
0 |
T11 |
1398 |
29 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
0 |
832 |
0 |
0 |
T14 |
0 |
832 |
0 |
0 |
T15 |
0 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T17 |
0 |
832 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
2178539 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
12330 |
190 |
0 |
0 |
T7 |
2296 |
6 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
6795 |
0 |
0 |
0 |
T11 |
1398 |
29 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
0 |
832 |
0 |
0 |
T14 |
0 |
832 |
0 |
0 |
T15 |
0 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T17 |
0 |
832 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
2178539 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
12330 |
190 |
0 |
0 |
T7 |
2296 |
6 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
6795 |
0 |
0 |
0 |
T11 |
1398 |
29 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
0 |
832 |
0 |
0 |
T14 |
0 |
832 |
0 |
0 |
T15 |
0 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T17 |
0 |
832 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
7 |
0 |
976 |
T84 |
121155 |
1 |
0 |
1 |
T85 |
0 |
1 |
0 |
0 |
T86 |
0 |
1 |
0 |
0 |
T87 |
0 |
1 |
0 |
0 |
T88 |
0 |
1 |
0 |
0 |
T89 |
0 |
1 |
0 |
0 |
T90 |
0 |
1 |
0 |
0 |
T91 |
49260 |
0 |
0 |
1 |
T92 |
17036 |
0 |
0 |
1 |
T93 |
1459 |
0 |
0 |
1 |
T94 |
123557 |
0 |
0 |
1 |
T95 |
1465 |
0 |
0 |
1 |
T96 |
1236 |
0 |
0 |
1 |
T97 |
38053 |
0 |
0 |
1 |
T98 |
1035 |
0 |
0 |
1 |
T99 |
1359 |
0 |
0 |
1 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
454763756 |
0 |
0 |
T1 |
1363 |
1275 |
0 |
0 |
T2 |
1816 |
1728 |
0 |
0 |
T3 |
1550 |
1490 |
0 |
0 |
T4 |
1191 |
1124 |
0 |
0 |
T5 |
1690 |
1614 |
0 |
0 |
T6 |
12330 |
12280 |
0 |
0 |
T7 |
2296 |
2197 |
0 |
0 |
T8 |
1110 |
1010 |
0 |
0 |
T9 |
796 |
701 |
0 |
0 |
T10 |
6795 |
6721 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
454850675 |
2178539 |
0 |
0 |
T4 |
1191 |
200 |
0 |
0 |
T5 |
1690 |
0 |
0 |
0 |
T6 |
12330 |
190 |
0 |
0 |
T7 |
2296 |
6 |
0 |
0 |
T8 |
1110 |
0 |
0 |
0 |
T9 |
796 |
0 |
0 |
0 |
T10 |
6795 |
0 |
0 |
0 |
T11 |
1398 |
29 |
0 |
0 |
T12 |
7611 |
0 |
0 |
0 |
T13 |
0 |
832 |
0 |
0 |
T14 |
0 |
832 |
0 |
0 |
T15 |
0 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T17 |
0 |
832 |
0 |
0 |
T26 |
2327 |
200 |
0 |
0 |