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: T5 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: T5 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: T5 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: T3 T4 T5
99 // Latch only when requests accepted
100 1/1 mask <= mask_next;
Tests: T5 T9 T26
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T3 T4 T5
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: T5 T9 T26
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: T5 T9 T26
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 | T5,T9,T26 |
1 | 0 | Covered | T5,T9,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 | T3,T4,T5 |
1 | 0 | Unreachable | |
1 | 1 | Covered | T5,T9,T26 |
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 | T40,T47,T48 |
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 | T40,T47,T48 |
1 | 0 | Covered | T40,T47,T48 |
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 | T6,T7,T8 |
1 | 0 | Unreachable | |
1 | 1 | Covered | T40,T47,T48 |
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 | T9,T31,T40 |
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,T9,T26 |
1 | 0 | Covered | T5,T6,T7 |
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 | T5,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 |
T9,T31,T40 |
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 |
T5,T6,T7 |
0 |
0 |
1 |
Unreachable |
|
0 |
0 |
0 |
Covered |
T1,T3,T4 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T5,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 |
T5,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 |
742299542 |
587324358 |
0 |
0 |
T1 |
1736 |
1677 |
0 |
0 |
T2 |
1517 |
1437 |
0 |
0 |
T3 |
136934 |
133450 |
0 |
0 |
T4 |
2051 |
1999 |
0 |
0 |
T5 |
1954 |
1890 |
0 |
0 |
T6 |
215473 |
125114 |
0 |
0 |
T7 |
168496 |
151826 |
0 |
0 |
T8 |
27691 |
17276 |
0 |
0 |
T9 |
1072599 |
599529 |
0 |
0 |
T10 |
12903 |
8639 |
0 |
0 |
T11 |
12454 |
6227 |
0 |
0 |
T12 |
68926 |
33998 |
0 |
0 |
T13 |
25842 |
25842 |
0 |
0 |
T16 |
226592 |
226592 |
0 |
0 |
T17 |
0 |
31696 |
0 |
0 |
T25 |
554 |
288 |
0 |
0 |
T26 |
0 |
592 |
0 |
0 |
T27 |
0 |
88360 |
0 |
0 |
T29 |
0 |
32112 |
0 |
0 |
T30 |
0 |
360 |
0 |
0 |
T31 |
0 |
3632 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2868 |
2868 |
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 |
742299542 |
3882011 |
0 |
0 |
T5 |
1954 |
13 |
0 |
0 |
T6 |
125432 |
832 |
0 |
0 |
T7 |
151896 |
832 |
0 |
0 |
T8 |
17343 |
832 |
0 |
0 |
T9 |
603713 |
8138 |
0 |
0 |
T10 |
8695 |
832 |
0 |
0 |
T11 |
18602 |
832 |
0 |
0 |
T12 |
176369 |
832 |
0 |
0 |
T13 |
184390 |
832 |
0 |
0 |
T16 |
226592 |
832 |
0 |
0 |
T21 |
0 |
5655 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
4095 |
0 |
0 |
T45 |
0 |
1415 |
0 |
0 |
T47 |
515691 |
6602 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
3630 |
0 |
0 |
T50 |
0 |
219 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
0 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
742299542 |
3882011 |
0 |
0 |
T5 |
1954 |
13 |
0 |
0 |
T6 |
125432 |
832 |
0 |
0 |
T7 |
151896 |
832 |
0 |
0 |
T8 |
17343 |
832 |
0 |
0 |
T9 |
603713 |
8138 |
0 |
0 |
T10 |
8695 |
832 |
0 |
0 |
T11 |
18602 |
832 |
0 |
0 |
T12 |
176369 |
832 |
0 |
0 |
T13 |
184390 |
832 |
0 |
0 |
T16 |
226592 |
832 |
0 |
0 |
T21 |
0 |
5655 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
4095 |
0 |
0 |
T45 |
0 |
1415 |
0 |
0 |
T47 |
515691 |
6602 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
3630 |
0 |
0 |
T50 |
0 |
219 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
0 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
742299542 |
587324358 |
0 |
0 |
T1 |
1736 |
1677 |
0 |
0 |
T2 |
1517 |
1437 |
0 |
0 |
T3 |
136934 |
133450 |
0 |
0 |
T4 |
2051 |
1999 |
0 |
0 |
T5 |
1954 |
1890 |
0 |
0 |
T6 |
215473 |
125114 |
0 |
0 |
T7 |
168496 |
151826 |
0 |
0 |
T8 |
27691 |
17276 |
0 |
0 |
T9 |
1072599 |
599529 |
0 |
0 |
T10 |
12903 |
8639 |
0 |
0 |
T11 |
12454 |
6227 |
0 |
0 |
T12 |
68926 |
33998 |
0 |
0 |
T13 |
25842 |
25842 |
0 |
0 |
T16 |
226592 |
226592 |
0 |
0 |
T17 |
0 |
31696 |
0 |
0 |
T25 |
554 |
288 |
0 |
0 |
T26 |
0 |
592 |
0 |
0 |
T27 |
0 |
88360 |
0 |
0 |
T29 |
0 |
32112 |
0 |
0 |
T30 |
0 |
360 |
0 |
0 |
T31 |
0 |
3632 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
742299542 |
587324358 |
0 |
0 |
T1 |
1736 |
1677 |
0 |
0 |
T2 |
1517 |
1437 |
0 |
0 |
T3 |
136934 |
133450 |
0 |
0 |
T4 |
2051 |
1999 |
0 |
0 |
T5 |
1954 |
1890 |
0 |
0 |
T6 |
215473 |
125114 |
0 |
0 |
T7 |
168496 |
151826 |
0 |
0 |
T8 |
27691 |
17276 |
0 |
0 |
T9 |
1072599 |
599529 |
0 |
0 |
T10 |
12903 |
8639 |
0 |
0 |
T11 |
12454 |
6227 |
0 |
0 |
T12 |
68926 |
33998 |
0 |
0 |
T13 |
25842 |
25842 |
0 |
0 |
T16 |
226592 |
226592 |
0 |
0 |
T17 |
0 |
31696 |
0 |
0 |
T25 |
554 |
288 |
0 |
0 |
T26 |
0 |
592 |
0 |
0 |
T27 |
0 |
88360 |
0 |
0 |
T29 |
0 |
32112 |
0 |
0 |
T30 |
0 |
360 |
0 |
0 |
T31 |
0 |
3632 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
742299542 |
3882011 |
0 |
0 |
T5 |
1954 |
13 |
0 |
0 |
T6 |
125432 |
832 |
0 |
0 |
T7 |
151896 |
832 |
0 |
0 |
T8 |
17343 |
832 |
0 |
0 |
T9 |
603713 |
8138 |
0 |
0 |
T10 |
8695 |
832 |
0 |
0 |
T11 |
18602 |
832 |
0 |
0 |
T12 |
176369 |
832 |
0 |
0 |
T13 |
184390 |
832 |
0 |
0 |
T16 |
226592 |
832 |
0 |
0 |
T21 |
0 |
5655 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
4095 |
0 |
0 |
T45 |
0 |
1415 |
0 |
0 |
T47 |
515691 |
6602 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
3630 |
0 |
0 |
T50 |
0 |
219 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
0 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
742299542 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
742299542 |
0 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
742299542 |
3882011 |
0 |
0 |
T5 |
1954 |
13 |
0 |
0 |
T6 |
125432 |
832 |
0 |
0 |
T7 |
151896 |
832 |
0 |
0 |
T8 |
17343 |
832 |
0 |
0 |
T9 |
603713 |
8138 |
0 |
0 |
T10 |
8695 |
832 |
0 |
0 |
T11 |
18602 |
832 |
0 |
0 |
T12 |
176369 |
832 |
0 |
0 |
T13 |
184390 |
832 |
0 |
0 |
T16 |
226592 |
832 |
0 |
0 |
T21 |
0 |
5655 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
4095 |
0 |
0 |
T45 |
0 |
1415 |
0 |
0 |
T47 |
515691 |
6602 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
3630 |
0 |
0 |
T50 |
0 |
219 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
0 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
742299542 |
3882011 |
0 |
0 |
T5 |
1954 |
13 |
0 |
0 |
T6 |
125432 |
832 |
0 |
0 |
T7 |
151896 |
832 |
0 |
0 |
T8 |
17343 |
832 |
0 |
0 |
T9 |
603713 |
8138 |
0 |
0 |
T10 |
8695 |
832 |
0 |
0 |
T11 |
18602 |
832 |
0 |
0 |
T12 |
176369 |
832 |
0 |
0 |
T13 |
184390 |
832 |
0 |
0 |
T16 |
226592 |
832 |
0 |
0 |
T21 |
0 |
5655 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
4095 |
0 |
0 |
T45 |
0 |
1415 |
0 |
0 |
T47 |
515691 |
6602 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
3630 |
0 |
0 |
T50 |
0 |
219 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
0 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
742299542 |
3882011 |
0 |
0 |
T5 |
1954 |
13 |
0 |
0 |
T6 |
125432 |
832 |
0 |
0 |
T7 |
151896 |
832 |
0 |
0 |
T8 |
17343 |
832 |
0 |
0 |
T9 |
603713 |
8138 |
0 |
0 |
T10 |
8695 |
832 |
0 |
0 |
T11 |
18602 |
832 |
0 |
0 |
T12 |
176369 |
832 |
0 |
0 |
T13 |
184390 |
832 |
0 |
0 |
T16 |
226592 |
832 |
0 |
0 |
T21 |
0 |
5655 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
4095 |
0 |
0 |
T45 |
0 |
1415 |
0 |
0 |
T47 |
515691 |
6602 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
3630 |
0 |
0 |
T50 |
0 |
219 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
0 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
742299542 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
742299542 |
8 |
0 |
956 |
T34 |
286259 |
1 |
0 |
1 |
T41 |
0 |
1 |
0 |
0 |
T43 |
0 |
1 |
0 |
0 |
T67 |
201053 |
0 |
0 |
1 |
T72 |
0 |
1 |
0 |
0 |
T73 |
0 |
1 |
0 |
0 |
T74 |
0 |
3 |
0 |
0 |
T75 |
116746 |
0 |
0 |
1 |
T76 |
72674 |
0 |
0 |
1 |
T77 |
914 |
0 |
0 |
1 |
T78 |
109055 |
0 |
0 |
1 |
T79 |
1353 |
0 |
0 |
1 |
T80 |
7443 |
0 |
0 |
1 |
T81 |
3556 |
0 |
0 |
1 |
T82 |
117006 |
0 |
0 |
1 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
742299542 |
587324358 |
0 |
0 |
T1 |
1736 |
1677 |
0 |
0 |
T2 |
1517 |
1437 |
0 |
0 |
T3 |
136934 |
133450 |
0 |
0 |
T4 |
2051 |
1999 |
0 |
0 |
T5 |
1954 |
1890 |
0 |
0 |
T6 |
215473 |
125114 |
0 |
0 |
T7 |
168496 |
151826 |
0 |
0 |
T8 |
27691 |
17276 |
0 |
0 |
T9 |
1072599 |
599529 |
0 |
0 |
T10 |
12903 |
8639 |
0 |
0 |
T11 |
12454 |
6227 |
0 |
0 |
T12 |
68926 |
33998 |
0 |
0 |
T13 |
25842 |
25842 |
0 |
0 |
T16 |
226592 |
226592 |
0 |
0 |
T17 |
0 |
31696 |
0 |
0 |
T25 |
554 |
288 |
0 |
0 |
T26 |
0 |
592 |
0 |
0 |
T27 |
0 |
88360 |
0 |
0 |
T29 |
0 |
32112 |
0 |
0 |
T30 |
0 |
360 |
0 |
0 |
T31 |
0 |
3632 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
742299542 |
3882011 |
0 |
0 |
T5 |
1954 |
13 |
0 |
0 |
T6 |
125432 |
832 |
0 |
0 |
T7 |
151896 |
832 |
0 |
0 |
T8 |
17343 |
832 |
0 |
0 |
T9 |
603713 |
8138 |
0 |
0 |
T10 |
8695 |
832 |
0 |
0 |
T11 |
18602 |
832 |
0 |
0 |
T12 |
176369 |
832 |
0 |
0 |
T13 |
184390 |
832 |
0 |
0 |
T16 |
226592 |
832 |
0 |
0 |
T21 |
0 |
5655 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
4095 |
0 |
0 |
T45 |
0 |
1415 |
0 |
0 |
T47 |
515691 |
6602 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
3630 |
0 |
0 |
T50 |
0 |
219 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
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: T3 T4 T5
99 // Latch only when requests accepted
100 1/1 mask <= mask_next;
Tests: T5 T9 T26
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T3 T4 T5
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: T5 T9 T26
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: T5 T9 T26
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 | T5,T9,T26 |
1 | 0 | Covered | T5,T9,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 | T3,T4,T5 |
1 | 0 | Unreachable | |
1 | 1 | Covered | T5,T9,T26 |
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 |
T5,T9,T26 |
0 |
0 |
1 |
Unreachable |
|
0 |
0 |
0 |
Covered |
T3,T4,T5 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T5,T9,T26 |
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 |
T5,T9,T26 |
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 |
153466567 |
29255904 |
0 |
0 |
T3 |
77561 |
74128 |
0 |
0 |
T4 |
360 |
360 |
0 |
0 |
T5 |
224 |
224 |
0 |
0 |
T6 |
90041 |
0 |
0 |
0 |
T7 |
16600 |
0 |
0 |
0 |
T8 |
10348 |
0 |
0 |
0 |
T9 |
468886 |
464792 |
0 |
0 |
T10 |
4208 |
0 |
0 |
0 |
T11 |
6227 |
0 |
0 |
0 |
T12 |
34463 |
0 |
0 |
0 |
T25 |
0 |
288 |
0 |
0 |
T26 |
0 |
592 |
0 |
0 |
T27 |
0 |
88360 |
0 |
0 |
T29 |
0 |
32112 |
0 |
0 |
T30 |
0 |
360 |
0 |
0 |
T31 |
0 |
3632 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
956 |
956 |
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 |
153466567 |
709027 |
0 |
0 |
T5 |
224 |
10 |
0 |
0 |
T6 |
90041 |
0 |
0 |
0 |
T7 |
16600 |
0 |
0 |
0 |
T8 |
10348 |
0 |
0 |
0 |
T9 |
468886 |
5314 |
0 |
0 |
T10 |
4208 |
0 |
0 |
0 |
T11 |
6227 |
0 |
0 |
0 |
T12 |
34463 |
0 |
0 |
0 |
T13 |
25842 |
0 |
0 |
0 |
T16 |
226592 |
0 |
0 |
0 |
T21 |
0 |
385 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T44 |
0 |
4095 |
0 |
0 |
T45 |
0 |
1411 |
0 |
0 |
T47 |
0 |
4449 |
0 |
0 |
T49 |
0 |
1100 |
0 |
0 |
T50 |
0 |
219 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
709027 |
0 |
0 |
T5 |
224 |
10 |
0 |
0 |
T6 |
90041 |
0 |
0 |
0 |
T7 |
16600 |
0 |
0 |
0 |
T8 |
10348 |
0 |
0 |
0 |
T9 |
468886 |
5314 |
0 |
0 |
T10 |
4208 |
0 |
0 |
0 |
T11 |
6227 |
0 |
0 |
0 |
T12 |
34463 |
0 |
0 |
0 |
T13 |
25842 |
0 |
0 |
0 |
T16 |
226592 |
0 |
0 |
0 |
T21 |
0 |
385 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T44 |
0 |
4095 |
0 |
0 |
T45 |
0 |
1411 |
0 |
0 |
T47 |
0 |
4449 |
0 |
0 |
T49 |
0 |
1100 |
0 |
0 |
T50 |
0 |
219 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
29255904 |
0 |
0 |
T3 |
77561 |
74128 |
0 |
0 |
T4 |
360 |
360 |
0 |
0 |
T5 |
224 |
224 |
0 |
0 |
T6 |
90041 |
0 |
0 |
0 |
T7 |
16600 |
0 |
0 |
0 |
T8 |
10348 |
0 |
0 |
0 |
T9 |
468886 |
464792 |
0 |
0 |
T10 |
4208 |
0 |
0 |
0 |
T11 |
6227 |
0 |
0 |
0 |
T12 |
34463 |
0 |
0 |
0 |
T25 |
0 |
288 |
0 |
0 |
T26 |
0 |
592 |
0 |
0 |
T27 |
0 |
88360 |
0 |
0 |
T29 |
0 |
32112 |
0 |
0 |
T30 |
0 |
360 |
0 |
0 |
T31 |
0 |
3632 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
29255904 |
0 |
0 |
T3 |
77561 |
74128 |
0 |
0 |
T4 |
360 |
360 |
0 |
0 |
T5 |
224 |
224 |
0 |
0 |
T6 |
90041 |
0 |
0 |
0 |
T7 |
16600 |
0 |
0 |
0 |
T8 |
10348 |
0 |
0 |
0 |
T9 |
468886 |
464792 |
0 |
0 |
T10 |
4208 |
0 |
0 |
0 |
T11 |
6227 |
0 |
0 |
0 |
T12 |
34463 |
0 |
0 |
0 |
T25 |
0 |
288 |
0 |
0 |
T26 |
0 |
592 |
0 |
0 |
T27 |
0 |
88360 |
0 |
0 |
T29 |
0 |
32112 |
0 |
0 |
T30 |
0 |
360 |
0 |
0 |
T31 |
0 |
3632 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
709027 |
0 |
0 |
T5 |
224 |
10 |
0 |
0 |
T6 |
90041 |
0 |
0 |
0 |
T7 |
16600 |
0 |
0 |
0 |
T8 |
10348 |
0 |
0 |
0 |
T9 |
468886 |
5314 |
0 |
0 |
T10 |
4208 |
0 |
0 |
0 |
T11 |
6227 |
0 |
0 |
0 |
T12 |
34463 |
0 |
0 |
0 |
T13 |
25842 |
0 |
0 |
0 |
T16 |
226592 |
0 |
0 |
0 |
T21 |
0 |
385 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T44 |
0 |
4095 |
0 |
0 |
T45 |
0 |
1411 |
0 |
0 |
T47 |
0 |
4449 |
0 |
0 |
T49 |
0 |
1100 |
0 |
0 |
T50 |
0 |
219 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
0 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
709027 |
0 |
0 |
T5 |
224 |
10 |
0 |
0 |
T6 |
90041 |
0 |
0 |
0 |
T7 |
16600 |
0 |
0 |
0 |
T8 |
10348 |
0 |
0 |
0 |
T9 |
468886 |
5314 |
0 |
0 |
T10 |
4208 |
0 |
0 |
0 |
T11 |
6227 |
0 |
0 |
0 |
T12 |
34463 |
0 |
0 |
0 |
T13 |
25842 |
0 |
0 |
0 |
T16 |
226592 |
0 |
0 |
0 |
T21 |
0 |
385 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T44 |
0 |
4095 |
0 |
0 |
T45 |
0 |
1411 |
0 |
0 |
T47 |
0 |
4449 |
0 |
0 |
T49 |
0 |
1100 |
0 |
0 |
T50 |
0 |
219 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
709027 |
0 |
0 |
T5 |
224 |
10 |
0 |
0 |
T6 |
90041 |
0 |
0 |
0 |
T7 |
16600 |
0 |
0 |
0 |
T8 |
10348 |
0 |
0 |
0 |
T9 |
468886 |
5314 |
0 |
0 |
T10 |
4208 |
0 |
0 |
0 |
T11 |
6227 |
0 |
0 |
0 |
T12 |
34463 |
0 |
0 |
0 |
T13 |
25842 |
0 |
0 |
0 |
T16 |
226592 |
0 |
0 |
0 |
T21 |
0 |
385 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T44 |
0 |
4095 |
0 |
0 |
T45 |
0 |
1411 |
0 |
0 |
T47 |
0 |
4449 |
0 |
0 |
T49 |
0 |
1100 |
0 |
0 |
T50 |
0 |
219 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
709027 |
0 |
0 |
T5 |
224 |
10 |
0 |
0 |
T6 |
90041 |
0 |
0 |
0 |
T7 |
16600 |
0 |
0 |
0 |
T8 |
10348 |
0 |
0 |
0 |
T9 |
468886 |
5314 |
0 |
0 |
T10 |
4208 |
0 |
0 |
0 |
T11 |
6227 |
0 |
0 |
0 |
T12 |
34463 |
0 |
0 |
0 |
T13 |
25842 |
0 |
0 |
0 |
T16 |
226592 |
0 |
0 |
0 |
T21 |
0 |
385 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T44 |
0 |
4095 |
0 |
0 |
T45 |
0 |
1411 |
0 |
0 |
T47 |
0 |
4449 |
0 |
0 |
T49 |
0 |
1100 |
0 |
0 |
T50 |
0 |
219 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
0 |
0 |
0 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
29255904 |
0 |
0 |
T3 |
77561 |
74128 |
0 |
0 |
T4 |
360 |
360 |
0 |
0 |
T5 |
224 |
224 |
0 |
0 |
T6 |
90041 |
0 |
0 |
0 |
T7 |
16600 |
0 |
0 |
0 |
T8 |
10348 |
0 |
0 |
0 |
T9 |
468886 |
464792 |
0 |
0 |
T10 |
4208 |
0 |
0 |
0 |
T11 |
6227 |
0 |
0 |
0 |
T12 |
34463 |
0 |
0 |
0 |
T25 |
0 |
288 |
0 |
0 |
T26 |
0 |
592 |
0 |
0 |
T27 |
0 |
88360 |
0 |
0 |
T29 |
0 |
32112 |
0 |
0 |
T30 |
0 |
360 |
0 |
0 |
T31 |
0 |
3632 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
709027 |
0 |
0 |
T5 |
224 |
10 |
0 |
0 |
T6 |
90041 |
0 |
0 |
0 |
T7 |
16600 |
0 |
0 |
0 |
T8 |
10348 |
0 |
0 |
0 |
T9 |
468886 |
5314 |
0 |
0 |
T10 |
4208 |
0 |
0 |
0 |
T11 |
6227 |
0 |
0 |
0 |
T12 |
34463 |
0 |
0 |
0 |
T13 |
25842 |
0 |
0 |
0 |
T16 |
226592 |
0 |
0 |
0 |
T21 |
0 |
385 |
0 |
0 |
T26 |
0 |
31 |
0 |
0 |
T31 |
0 |
150 |
0 |
0 |
T44 |
0 |
4095 |
0 |
0 |
T45 |
0 |
1411 |
0 |
0 |
T47 |
0 |
4449 |
0 |
0 |
T49 |
0 |
1100 |
0 |
0 |
T50 |
0 |
219 |
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: T6 T7 T8
99 // Latch only when requests accepted
100 1/1 mask <= mask_next;
Tests: T40 T47 T48
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T6 T7 T8
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: T40 T47 T48
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: T40 T47 T48
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 | T40,T47,T48 |
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 | T40,T47,T48 |
1 | 0 | Covered | T40,T47,T48 |
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 | T6,T7,T8 |
1 | 0 | Unreachable | |
1 | 1 | Covered | T40,T47,T48 |
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 |
T40,T47,T48 |
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 |
T40,T47,T48 |
0 |
0 |
1 |
Unreachable |
|
0 |
0 |
0 |
Covered |
T6,T7,T8 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T40,T47,T48 |
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 |
T40,T47,T48 |
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 |
153466567 |
122788874 |
0 |
0 |
T6 |
90041 |
89778 |
0 |
0 |
T7 |
16600 |
16592 |
0 |
0 |
T8 |
10348 |
10348 |
0 |
0 |
T9 |
468886 |
0 |
0 |
0 |
T10 |
4208 |
4208 |
0 |
0 |
T11 |
6227 |
6227 |
0 |
0 |
T12 |
34463 |
33998 |
0 |
0 |
T13 |
25842 |
25842 |
0 |
0 |
T16 |
226592 |
226592 |
0 |
0 |
T17 |
0 |
31696 |
0 |
0 |
T18 |
0 |
13256 |
0 |
0 |
T25 |
554 |
0 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
956 |
956 |
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 |
153466567 |
820637 |
0 |
0 |
T21 |
0 |
5270 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
0 |
0 |
0 |
T45 |
0 |
4 |
0 |
0 |
T47 |
515691 |
2153 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
2530 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
0 |
0 |
0 |
T65 |
0 |
1034 |
0 |
0 |
T83 |
0 |
1201 |
0 |
0 |
T84 |
0 |
4 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
820637 |
0 |
0 |
T21 |
0 |
5270 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
0 |
0 |
0 |
T45 |
0 |
4 |
0 |
0 |
T47 |
515691 |
2153 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
2530 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
0 |
0 |
0 |
T65 |
0 |
1034 |
0 |
0 |
T83 |
0 |
1201 |
0 |
0 |
T84 |
0 |
4 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
122788874 |
0 |
0 |
T6 |
90041 |
89778 |
0 |
0 |
T7 |
16600 |
16592 |
0 |
0 |
T8 |
10348 |
10348 |
0 |
0 |
T9 |
468886 |
0 |
0 |
0 |
T10 |
4208 |
4208 |
0 |
0 |
T11 |
6227 |
6227 |
0 |
0 |
T12 |
34463 |
33998 |
0 |
0 |
T13 |
25842 |
25842 |
0 |
0 |
T16 |
226592 |
226592 |
0 |
0 |
T17 |
0 |
31696 |
0 |
0 |
T18 |
0 |
13256 |
0 |
0 |
T25 |
554 |
0 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
122788874 |
0 |
0 |
T6 |
90041 |
89778 |
0 |
0 |
T7 |
16600 |
16592 |
0 |
0 |
T8 |
10348 |
10348 |
0 |
0 |
T9 |
468886 |
0 |
0 |
0 |
T10 |
4208 |
4208 |
0 |
0 |
T11 |
6227 |
6227 |
0 |
0 |
T12 |
34463 |
33998 |
0 |
0 |
T13 |
25842 |
25842 |
0 |
0 |
T16 |
226592 |
226592 |
0 |
0 |
T17 |
0 |
31696 |
0 |
0 |
T18 |
0 |
13256 |
0 |
0 |
T25 |
554 |
0 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
820637 |
0 |
0 |
T21 |
0 |
5270 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
0 |
0 |
0 |
T45 |
0 |
4 |
0 |
0 |
T47 |
515691 |
2153 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
2530 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
0 |
0 |
0 |
T65 |
0 |
1034 |
0 |
0 |
T83 |
0 |
1201 |
0 |
0 |
T84 |
0 |
4 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
0 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
820637 |
0 |
0 |
T21 |
0 |
5270 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
0 |
0 |
0 |
T45 |
0 |
4 |
0 |
0 |
T47 |
515691 |
2153 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
2530 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
0 |
0 |
0 |
T65 |
0 |
1034 |
0 |
0 |
T83 |
0 |
1201 |
0 |
0 |
T84 |
0 |
4 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
820637 |
0 |
0 |
T21 |
0 |
5270 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
0 |
0 |
0 |
T45 |
0 |
4 |
0 |
0 |
T47 |
515691 |
2153 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
2530 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
0 |
0 |
0 |
T65 |
0 |
1034 |
0 |
0 |
T83 |
0 |
1201 |
0 |
0 |
T84 |
0 |
4 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
820637 |
0 |
0 |
T21 |
0 |
5270 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
0 |
0 |
0 |
T45 |
0 |
4 |
0 |
0 |
T47 |
515691 |
2153 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
2530 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
0 |
0 |
0 |
T65 |
0 |
1034 |
0 |
0 |
T83 |
0 |
1201 |
0 |
0 |
T84 |
0 |
4 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
0 |
0 |
0 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
122788874 |
0 |
0 |
T6 |
90041 |
89778 |
0 |
0 |
T7 |
16600 |
16592 |
0 |
0 |
T8 |
10348 |
10348 |
0 |
0 |
T9 |
468886 |
0 |
0 |
0 |
T10 |
4208 |
4208 |
0 |
0 |
T11 |
6227 |
6227 |
0 |
0 |
T12 |
34463 |
33998 |
0 |
0 |
T13 |
25842 |
25842 |
0 |
0 |
T16 |
226592 |
226592 |
0 |
0 |
T17 |
0 |
31696 |
0 |
0 |
T18 |
0 |
13256 |
0 |
0 |
T25 |
554 |
0 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153466567 |
820637 |
0 |
0 |
T21 |
0 |
5270 |
0 |
0 |
T40 |
231469 |
516 |
0 |
0 |
T44 |
123433 |
0 |
0 |
0 |
T45 |
0 |
4 |
0 |
0 |
T47 |
515691 |
2153 |
0 |
0 |
T48 |
0 |
783 |
0 |
0 |
T49 |
0 |
2530 |
0 |
0 |
T52 |
38700 |
0 |
0 |
0 |
T53 |
312272 |
0 |
0 |
0 |
T55 |
0 |
3524 |
0 |
0 |
T57 |
10920 |
0 |
0 |
0 |
T58 |
153752 |
0 |
0 |
0 |
T60 |
103088 |
0 |
0 |
0 |
T61 |
11280 |
0 |
0 |
0 |
T62 |
190796 |
0 |
0 |
0 |
T65 |
0 |
1034 |
0 |
0 |
T83 |
0 |
1201 |
0 |
0 |
T84 |
0 |
4 |
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: T5 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: T5 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: T5 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 | T9,T31,T40 |
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,T9,T26 |
1 | 0 | Covered | T5,T6,T7 |
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 | T5,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 |
T9,T31,T40 |
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 |
T5,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 |
T5,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 |
T5,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 |
435366408 |
435279580 |
0 |
0 |
T1 |
1736 |
1677 |
0 |
0 |
T2 |
1517 |
1437 |
0 |
0 |
T3 |
59373 |
59322 |
0 |
0 |
T4 |
1691 |
1639 |
0 |
0 |
T5 |
1730 |
1666 |
0 |
0 |
T6 |
35391 |
35336 |
0 |
0 |
T7 |
135296 |
135234 |
0 |
0 |
T8 |
6995 |
6928 |
0 |
0 |
T9 |
134827 |
134737 |
0 |
0 |
T10 |
4487 |
4431 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
956 |
956 |
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 |
435366408 |
2352347 |
0 |
0 |
T5 |
1730 |
3 |
0 |
0 |
T6 |
35391 |
832 |
0 |
0 |
T7 |
135296 |
832 |
0 |
0 |
T8 |
6995 |
832 |
0 |
0 |
T9 |
134827 |
2824 |
0 |
0 |
T10 |
4487 |
832 |
0 |
0 |
T11 |
12375 |
832 |
0 |
0 |
T12 |
141906 |
832 |
0 |
0 |
T13 |
158548 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
435366408 |
2352347 |
0 |
0 |
T5 |
1730 |
3 |
0 |
0 |
T6 |
35391 |
832 |
0 |
0 |
T7 |
135296 |
832 |
0 |
0 |
T8 |
6995 |
832 |
0 |
0 |
T9 |
134827 |
2824 |
0 |
0 |
T10 |
4487 |
832 |
0 |
0 |
T11 |
12375 |
832 |
0 |
0 |
T12 |
141906 |
832 |
0 |
0 |
T13 |
158548 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
435366408 |
435279580 |
0 |
0 |
T1 |
1736 |
1677 |
0 |
0 |
T2 |
1517 |
1437 |
0 |
0 |
T3 |
59373 |
59322 |
0 |
0 |
T4 |
1691 |
1639 |
0 |
0 |
T5 |
1730 |
1666 |
0 |
0 |
T6 |
35391 |
35336 |
0 |
0 |
T7 |
135296 |
135234 |
0 |
0 |
T8 |
6995 |
6928 |
0 |
0 |
T9 |
134827 |
134737 |
0 |
0 |
T10 |
4487 |
4431 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
435366408 |
435279580 |
0 |
0 |
T1 |
1736 |
1677 |
0 |
0 |
T2 |
1517 |
1437 |
0 |
0 |
T3 |
59373 |
59322 |
0 |
0 |
T4 |
1691 |
1639 |
0 |
0 |
T5 |
1730 |
1666 |
0 |
0 |
T6 |
35391 |
35336 |
0 |
0 |
T7 |
135296 |
135234 |
0 |
0 |
T8 |
6995 |
6928 |
0 |
0 |
T9 |
134827 |
134737 |
0 |
0 |
T10 |
4487 |
4431 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
435366408 |
2352347 |
0 |
0 |
T5 |
1730 |
3 |
0 |
0 |
T6 |
35391 |
832 |
0 |
0 |
T7 |
135296 |
832 |
0 |
0 |
T8 |
6995 |
832 |
0 |
0 |
T9 |
134827 |
2824 |
0 |
0 |
T10 |
4487 |
832 |
0 |
0 |
T11 |
12375 |
832 |
0 |
0 |
T12 |
141906 |
832 |
0 |
0 |
T13 |
158548 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
435366408 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
435366408 |
0 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
435366408 |
2352347 |
0 |
0 |
T5 |
1730 |
3 |
0 |
0 |
T6 |
35391 |
832 |
0 |
0 |
T7 |
135296 |
832 |
0 |
0 |
T8 |
6995 |
832 |
0 |
0 |
T9 |
134827 |
2824 |
0 |
0 |
T10 |
4487 |
832 |
0 |
0 |
T11 |
12375 |
832 |
0 |
0 |
T12 |
141906 |
832 |
0 |
0 |
T13 |
158548 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
435366408 |
2352347 |
0 |
0 |
T5 |
1730 |
3 |
0 |
0 |
T6 |
35391 |
832 |
0 |
0 |
T7 |
135296 |
832 |
0 |
0 |
T8 |
6995 |
832 |
0 |
0 |
T9 |
134827 |
2824 |
0 |
0 |
T10 |
4487 |
832 |
0 |
0 |
T11 |
12375 |
832 |
0 |
0 |
T12 |
141906 |
832 |
0 |
0 |
T13 |
158548 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
435366408 |
2352347 |
0 |
0 |
T5 |
1730 |
3 |
0 |
0 |
T6 |
35391 |
832 |
0 |
0 |
T7 |
135296 |
832 |
0 |
0 |
T8 |
6995 |
832 |
0 |
0 |
T9 |
134827 |
2824 |
0 |
0 |
T10 |
4487 |
832 |
0 |
0 |
T11 |
12375 |
832 |
0 |
0 |
T12 |
141906 |
832 |
0 |
0 |
T13 |
158548 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
435366408 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
435366408 |
8 |
0 |
956 |
T34 |
286259 |
1 |
0 |
1 |
T41 |
0 |
1 |
0 |
0 |
T43 |
0 |
1 |
0 |
0 |
T67 |
201053 |
0 |
0 |
1 |
T72 |
0 |
1 |
0 |
0 |
T73 |
0 |
1 |
0 |
0 |
T74 |
0 |
3 |
0 |
0 |
T75 |
116746 |
0 |
0 |
1 |
T76 |
72674 |
0 |
0 |
1 |
T77 |
914 |
0 |
0 |
1 |
T78 |
109055 |
0 |
0 |
1 |
T79 |
1353 |
0 |
0 |
1 |
T80 |
7443 |
0 |
0 |
1 |
T81 |
3556 |
0 |
0 |
1 |
T82 |
117006 |
0 |
0 |
1 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
435366408 |
435279580 |
0 |
0 |
T1 |
1736 |
1677 |
0 |
0 |
T2 |
1517 |
1437 |
0 |
0 |
T3 |
59373 |
59322 |
0 |
0 |
T4 |
1691 |
1639 |
0 |
0 |
T5 |
1730 |
1666 |
0 |
0 |
T6 |
35391 |
35336 |
0 |
0 |
T7 |
135296 |
135234 |
0 |
0 |
T8 |
6995 |
6928 |
0 |
0 |
T9 |
134827 |
134737 |
0 |
0 |
T10 |
4487 |
4431 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
435366408 |
2352347 |
0 |
0 |
T5 |
1730 |
3 |
0 |
0 |
T6 |
35391 |
832 |
0 |
0 |
T7 |
135296 |
832 |
0 |
0 |
T8 |
6995 |
832 |
0 |
0 |
T9 |
134827 |
2824 |
0 |
0 |
T10 |
4487 |
832 |
0 |
0 |
T11 |
12375 |
832 |
0 |
0 |
T12 |
141906 |
832 |
0 |
0 |
T13 |
158548 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T39 |
881 |
0 |
0 |
0 |