Line Coverage for Module :
prim_arbiter_ppc ( parameter N=3,DW=109,EnDataPort=1,IdxW=2 )
Line Coverage for Module self-instances :
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T2 T3
104 end
MISSING_ELSE
105 end
106
107 if (EnDataPort == 1) begin: gen_datapath
108 always_comb begin
109 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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Line Coverage for Module :
prim_arbiter_ppc ( parameter N=2,DW=109,EnDataPort=1,IdxW=1 )
Line Coverage for Module self-instances :
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T2 T3
104 end
MISSING_ELSE
105 end
106
107 if (EnDataPort == 1) begin: gen_datapath
108 always_comb begin
109 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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Module :
prim_arbiter_ppc ( parameter N=3,DW=109,EnDataPort=1,IdxW=2 )
Cond Coverage for Module self-instances :
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T2,T3 |
Cond Coverage for Module :
prim_arbiter_ppc ( parameter N=2,DW=109,EnDataPort=1,IdxW=1 )
Cond Coverage for Module self-instances :
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T2,T3 |
Branch Coverage for Module :
prim_arbiter_ppc
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T2,T3 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Module :
prim_arbiter_ppc
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
2147483647 |
0 |
0 |
T1 |
49704 |
48480 |
0 |
0 |
T2 |
316728 |
315360 |
0 |
0 |
T3 |
84576 |
84048 |
0 |
0 |
T7 |
320856 |
318072 |
0 |
0 |
T8 |
94680 |
93720 |
0 |
0 |
T9 |
48144 |
47064 |
0 |
0 |
T10 |
33864 |
33720 |
0 |
0 |
T11 |
659880 |
659568 |
0 |
0 |
T12 |
434448 |
433248 |
0 |
0 |
T13 |
99504 |
98160 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
21600 |
21600 |
0 |
0 |
T1 |
24 |
24 |
0 |
0 |
T2 |
24 |
24 |
0 |
0 |
T3 |
24 |
24 |
0 |
0 |
T7 |
24 |
24 |
0 |
0 |
T8 |
24 |
24 |
0 |
0 |
T9 |
24 |
24 |
0 |
0 |
T10 |
24 |
24 |
0 |
0 |
T11 |
24 |
24 |
0 |
0 |
T12 |
24 |
24 |
0 |
0 |
T13 |
24 |
24 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
7823991 |
0 |
0 |
T1 |
49704 |
445 |
0 |
0 |
T2 |
316728 |
407 |
0 |
0 |
T3 |
84576 |
377 |
0 |
0 |
T7 |
320856 |
462 |
0 |
0 |
T8 |
94680 |
2318 |
0 |
0 |
T9 |
48144 |
440 |
0 |
0 |
T10 |
33864 |
395 |
0 |
0 |
T11 |
659880 |
3369 |
0 |
0 |
T12 |
434448 |
7488 |
0 |
0 |
T13 |
99504 |
302 |
0 |
0 |
T14 |
0 |
2353 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
7823991 |
0 |
0 |
T1 |
49704 |
445 |
0 |
0 |
T2 |
316728 |
407 |
0 |
0 |
T3 |
84576 |
377 |
0 |
0 |
T7 |
320856 |
462 |
0 |
0 |
T8 |
94680 |
2318 |
0 |
0 |
T9 |
48144 |
440 |
0 |
0 |
T10 |
33864 |
395 |
0 |
0 |
T11 |
659880 |
3369 |
0 |
0 |
T12 |
434448 |
7488 |
0 |
0 |
T13 |
99504 |
302 |
0 |
0 |
T14 |
0 |
2353 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
2147483647 |
0 |
0 |
T1 |
49704 |
48480 |
0 |
0 |
T2 |
316728 |
315360 |
0 |
0 |
T3 |
84576 |
84048 |
0 |
0 |
T7 |
320856 |
318072 |
0 |
0 |
T8 |
94680 |
93720 |
0 |
0 |
T9 |
48144 |
47064 |
0 |
0 |
T10 |
33864 |
33720 |
0 |
0 |
T11 |
659880 |
659568 |
0 |
0 |
T12 |
434448 |
433248 |
0 |
0 |
T13 |
99504 |
98160 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
2147483647 |
0 |
0 |
T1 |
49704 |
48480 |
0 |
0 |
T2 |
316728 |
315360 |
0 |
0 |
T3 |
84576 |
84048 |
0 |
0 |
T7 |
320856 |
318072 |
0 |
0 |
T8 |
94680 |
93720 |
0 |
0 |
T9 |
48144 |
47064 |
0 |
0 |
T10 |
33864 |
33720 |
0 |
0 |
T11 |
659880 |
659568 |
0 |
0 |
T12 |
434448 |
433248 |
0 |
0 |
T13 |
99504 |
98160 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
7823991 |
0 |
0 |
T1 |
49704 |
445 |
0 |
0 |
T2 |
316728 |
407 |
0 |
0 |
T3 |
84576 |
377 |
0 |
0 |
T7 |
320856 |
462 |
0 |
0 |
T8 |
94680 |
2318 |
0 |
0 |
T9 |
48144 |
440 |
0 |
0 |
T10 |
33864 |
395 |
0 |
0 |
T11 |
659880 |
3369 |
0 |
0 |
T12 |
434448 |
7488 |
0 |
0 |
T13 |
99504 |
302 |
0 |
0 |
T14 |
0 |
2353 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
465886571 |
0 |
0 |
T1 |
49704 |
558 |
0 |
0 |
T2 |
316728 |
15850 |
0 |
0 |
T3 |
84576 |
5526 |
0 |
0 |
T7 |
320856 |
15152 |
0 |
0 |
T8 |
94680 |
240 |
0 |
0 |
T9 |
48144 |
545 |
0 |
0 |
T10 |
33864 |
356 |
0 |
0 |
T11 |
659880 |
43636 |
0 |
0 |
T12 |
434448 |
14267 |
0 |
0 |
T13 |
99504 |
5715 |
0 |
0 |
T14 |
0 |
6433 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
7823991 |
0 |
0 |
T1 |
49704 |
445 |
0 |
0 |
T2 |
316728 |
407 |
0 |
0 |
T3 |
84576 |
377 |
0 |
0 |
T7 |
320856 |
462 |
0 |
0 |
T8 |
94680 |
2318 |
0 |
0 |
T9 |
48144 |
440 |
0 |
0 |
T10 |
33864 |
395 |
0 |
0 |
T11 |
659880 |
3369 |
0 |
0 |
T12 |
434448 |
7488 |
0 |
0 |
T13 |
99504 |
302 |
0 |
0 |
T14 |
0 |
2353 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
7823991 |
0 |
0 |
T1 |
49704 |
445 |
0 |
0 |
T2 |
316728 |
407 |
0 |
0 |
T3 |
84576 |
377 |
0 |
0 |
T7 |
320856 |
462 |
0 |
0 |
T8 |
94680 |
2318 |
0 |
0 |
T9 |
48144 |
440 |
0 |
0 |
T10 |
33864 |
395 |
0 |
0 |
T11 |
659880 |
3369 |
0 |
0 |
T12 |
434448 |
7488 |
0 |
0 |
T13 |
99504 |
302 |
0 |
0 |
T14 |
0 |
2353 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
34240674 |
0 |
0 |
T1 |
49704 |
501 |
0 |
0 |
T2 |
316728 |
876 |
0 |
0 |
T3 |
84576 |
903 |
0 |
0 |
T7 |
320856 |
1139 |
0 |
0 |
T8 |
94680 |
4154 |
0 |
0 |
T9 |
48144 |
495 |
0 |
0 |
T10 |
33864 |
439 |
0 |
0 |
T11 |
659880 |
7743 |
0 |
0 |
T12 |
434448 |
9438 |
0 |
0 |
T13 |
99504 |
705 |
0 |
0 |
T14 |
0 |
3312 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
44534 |
0 |
21600 |
T12 |
36204 |
29 |
0 |
2 |
T13 |
8292 |
0 |
0 |
2 |
T14 |
129390 |
1 |
0 |
2 |
T15 |
27408 |
29 |
0 |
2 |
T16 |
127636 |
2 |
0 |
2 |
T17 |
261342 |
1 |
0 |
2 |
T18 |
0 |
20 |
0 |
0 |
T19 |
0 |
1 |
0 |
0 |
T20 |
0 |
8 |
0 |
0 |
T21 |
0 |
3 |
0 |
0 |
T22 |
0 |
3 |
0 |
0 |
T23 |
0 |
7 |
0 |
0 |
T24 |
0 |
32 |
0 |
0 |
T25 |
359630 |
0 |
0 |
2 |
T26 |
5370 |
0 |
0 |
2 |
T27 |
5858 |
0 |
0 |
2 |
T28 |
24334 |
0 |
0 |
2 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
2147483647 |
0 |
0 |
T1 |
49704 |
48480 |
0 |
0 |
T2 |
316728 |
315360 |
0 |
0 |
T3 |
84576 |
84048 |
0 |
0 |
T7 |
320856 |
318072 |
0 |
0 |
T8 |
94680 |
93720 |
0 |
0 |
T9 |
48144 |
47064 |
0 |
0 |
T10 |
33864 |
33720 |
0 |
0 |
T11 |
659880 |
659568 |
0 |
0 |
T12 |
434448 |
433248 |
0 |
0 |
T13 |
99504 |
98160 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
2147483647 |
7823991 |
0 |
0 |
T1 |
49704 |
445 |
0 |
0 |
T2 |
316728 |
407 |
0 |
0 |
T3 |
84576 |
377 |
0 |
0 |
T7 |
320856 |
462 |
0 |
0 |
T8 |
94680 |
2318 |
0 |
0 |
T9 |
48144 |
440 |
0 |
0 |
T10 |
33864 |
395 |
0 |
0 |
T11 |
659880 |
3369 |
0 |
0 |
T12 |
434448 |
7488 |
0 |
0 |
T13 |
99504 |
302 |
0 |
0 |
T14 |
0 |
2353 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_29.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T2 T3
104 end
MISSING_ELSE
105 end
106
107 if (EnDataPort == 1) begin: gen_datapath
108 always_comb begin
109 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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_29.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T2,T3 |
Branch Coverage for Instance : tb.dut.u_sm1_29.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T2,T3 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_29.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
883679 |
0 |
0 |
T1 |
2071 |
55 |
0 |
0 |
T2 |
13197 |
43 |
0 |
0 |
T3 |
3524 |
47 |
0 |
0 |
T7 |
13369 |
43 |
0 |
0 |
T8 |
3945 |
100 |
0 |
0 |
T9 |
2006 |
41 |
0 |
0 |
T10 |
1411 |
61 |
0 |
0 |
T11 |
27495 |
351 |
0 |
0 |
T12 |
18102 |
817 |
0 |
0 |
T13 |
4146 |
36 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
883679 |
0 |
0 |
T1 |
2071 |
55 |
0 |
0 |
T2 |
13197 |
43 |
0 |
0 |
T3 |
3524 |
47 |
0 |
0 |
T7 |
13369 |
43 |
0 |
0 |
T8 |
3945 |
100 |
0 |
0 |
T9 |
2006 |
41 |
0 |
0 |
T10 |
1411 |
61 |
0 |
0 |
T11 |
27495 |
351 |
0 |
0 |
T12 |
18102 |
817 |
0 |
0 |
T13 |
4146 |
36 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
883679 |
0 |
0 |
T1 |
2071 |
55 |
0 |
0 |
T2 |
13197 |
43 |
0 |
0 |
T3 |
3524 |
47 |
0 |
0 |
T7 |
13369 |
43 |
0 |
0 |
T8 |
3945 |
100 |
0 |
0 |
T9 |
2006 |
41 |
0 |
0 |
T10 |
1411 |
61 |
0 |
0 |
T11 |
27495 |
351 |
0 |
0 |
T12 |
18102 |
817 |
0 |
0 |
T13 |
4146 |
36 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
12145216 |
0 |
0 |
T1 |
2071 |
40 |
0 |
0 |
T2 |
13197 |
308 |
0 |
0 |
T3 |
3524 |
346 |
0 |
0 |
T7 |
13369 |
266 |
0 |
0 |
T8 |
3945 |
82 |
0 |
0 |
T9 |
2006 |
33 |
0 |
0 |
T10 |
1411 |
46 |
0 |
0 |
T11 |
27495 |
2483 |
0 |
0 |
T12 |
18102 |
607 |
0 |
0 |
T13 |
4146 |
249 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
883679 |
0 |
0 |
T1 |
2071 |
55 |
0 |
0 |
T2 |
13197 |
43 |
0 |
0 |
T3 |
3524 |
47 |
0 |
0 |
T7 |
13369 |
43 |
0 |
0 |
T8 |
3945 |
100 |
0 |
0 |
T9 |
2006 |
41 |
0 |
0 |
T10 |
1411 |
61 |
0 |
0 |
T11 |
27495 |
351 |
0 |
0 |
T12 |
18102 |
817 |
0 |
0 |
T13 |
4146 |
36 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
883679 |
0 |
0 |
T1 |
2071 |
55 |
0 |
0 |
T2 |
13197 |
43 |
0 |
0 |
T3 |
3524 |
47 |
0 |
0 |
T7 |
13369 |
43 |
0 |
0 |
T8 |
3945 |
100 |
0 |
0 |
T9 |
2006 |
41 |
0 |
0 |
T10 |
1411 |
61 |
0 |
0 |
T11 |
27495 |
351 |
0 |
0 |
T12 |
18102 |
817 |
0 |
0 |
T13 |
4146 |
36 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
2606750 |
0 |
0 |
T1 |
2071 |
71 |
0 |
0 |
T2 |
13197 |
63 |
0 |
0 |
T3 |
3524 |
93 |
0 |
0 |
T7 |
13369 |
54 |
0 |
0 |
T8 |
3945 |
119 |
0 |
0 |
T9 |
2006 |
50 |
0 |
0 |
T10 |
1411 |
77 |
0 |
0 |
T11 |
27495 |
599 |
0 |
0 |
T12 |
18102 |
1028 |
0 |
0 |
T13 |
4146 |
140 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
883679 |
0 |
0 |
T1 |
2071 |
55 |
0 |
0 |
T2 |
13197 |
43 |
0 |
0 |
T3 |
3524 |
47 |
0 |
0 |
T7 |
13369 |
43 |
0 |
0 |
T8 |
3945 |
100 |
0 |
0 |
T9 |
2006 |
41 |
0 |
0 |
T10 |
1411 |
61 |
0 |
0 |
T11 |
27495 |
351 |
0 |
0 |
T12 |
18102 |
817 |
0 |
0 |
T13 |
4146 |
36 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_31.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T2 T3
104 end
MISSING_ELSE
105 end
106
107 if (EnDataPort == 1) begin: gen_datapath
108 always_comb begin
109 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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_31.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T2,T3 |
Branch Coverage for Instance : tb.dut.u_sm1_31.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T2,T3 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_31.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
853031 |
0 |
0 |
T1 |
2071 |
44 |
0 |
0 |
T2 |
13197 |
37 |
0 |
0 |
T3 |
3524 |
41 |
0 |
0 |
T7 |
13369 |
54 |
0 |
0 |
T8 |
3945 |
987 |
0 |
0 |
T9 |
2006 |
48 |
0 |
0 |
T10 |
1411 |
53 |
0 |
0 |
T11 |
27495 |
372 |
0 |
0 |
T12 |
18102 |
811 |
0 |
0 |
T13 |
4146 |
40 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
853031 |
0 |
0 |
T1 |
2071 |
44 |
0 |
0 |
T2 |
13197 |
37 |
0 |
0 |
T3 |
3524 |
41 |
0 |
0 |
T7 |
13369 |
54 |
0 |
0 |
T8 |
3945 |
987 |
0 |
0 |
T9 |
2006 |
48 |
0 |
0 |
T10 |
1411 |
53 |
0 |
0 |
T11 |
27495 |
372 |
0 |
0 |
T12 |
18102 |
811 |
0 |
0 |
T13 |
4146 |
40 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
853031 |
0 |
0 |
T1 |
2071 |
44 |
0 |
0 |
T2 |
13197 |
37 |
0 |
0 |
T3 |
3524 |
41 |
0 |
0 |
T7 |
13369 |
54 |
0 |
0 |
T8 |
3945 |
987 |
0 |
0 |
T9 |
2006 |
48 |
0 |
0 |
T10 |
1411 |
53 |
0 |
0 |
T11 |
27495 |
372 |
0 |
0 |
T12 |
18102 |
811 |
0 |
0 |
T13 |
4146 |
40 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
11968093 |
0 |
0 |
T1 |
2071 |
33 |
0 |
0 |
T2 |
13197 |
307 |
0 |
0 |
T3 |
3524 |
290 |
0 |
0 |
T7 |
13369 |
360 |
0 |
0 |
T8 |
3945 |
99 |
0 |
0 |
T9 |
2006 |
35 |
0 |
0 |
T10 |
1411 |
43 |
0 |
0 |
T11 |
27495 |
2741 |
0 |
0 |
T12 |
18102 |
612 |
0 |
0 |
T13 |
4146 |
303 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
853031 |
0 |
0 |
T1 |
2071 |
44 |
0 |
0 |
T2 |
13197 |
37 |
0 |
0 |
T3 |
3524 |
41 |
0 |
0 |
T7 |
13369 |
54 |
0 |
0 |
T8 |
3945 |
987 |
0 |
0 |
T9 |
2006 |
48 |
0 |
0 |
T10 |
1411 |
53 |
0 |
0 |
T11 |
27495 |
372 |
0 |
0 |
T12 |
18102 |
811 |
0 |
0 |
T13 |
4146 |
40 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
853031 |
0 |
0 |
T1 |
2071 |
44 |
0 |
0 |
T2 |
13197 |
37 |
0 |
0 |
T3 |
3524 |
41 |
0 |
0 |
T7 |
13369 |
54 |
0 |
0 |
T8 |
3945 |
987 |
0 |
0 |
T9 |
2006 |
48 |
0 |
0 |
T10 |
1411 |
53 |
0 |
0 |
T11 |
27495 |
372 |
0 |
0 |
T12 |
18102 |
811 |
0 |
0 |
T13 |
4146 |
40 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
2400805 |
0 |
0 |
T1 |
2071 |
56 |
0 |
0 |
T2 |
13197 |
50 |
0 |
0 |
T3 |
3524 |
67 |
0 |
0 |
T7 |
13369 |
65 |
0 |
0 |
T8 |
3945 |
1876 |
0 |
0 |
T9 |
2006 |
62 |
0 |
0 |
T10 |
1411 |
64 |
0 |
0 |
T11 |
27495 |
701 |
0 |
0 |
T12 |
18102 |
1011 |
0 |
0 |
T13 |
4146 |
98 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
853031 |
0 |
0 |
T1 |
2071 |
44 |
0 |
0 |
T2 |
13197 |
37 |
0 |
0 |
T3 |
3524 |
41 |
0 |
0 |
T7 |
13369 |
54 |
0 |
0 |
T8 |
3945 |
987 |
0 |
0 |
T9 |
2006 |
48 |
0 |
0 |
T10 |
1411 |
53 |
0 |
0 |
T11 |
27495 |
372 |
0 |
0 |
T12 |
18102 |
811 |
0 |
0 |
T13 |
4146 |
40 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_33.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T3 T9 T10
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_33.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T3,T9,T10 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T3,T9,T10 |
Branch Coverage for Instance : tb.dut.u_sm1_33.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T3,T9,T10 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_33.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
215780 |
0 |
0 |
T1 |
2071 |
18 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
17 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
16 |
0 |
0 |
T11 |
27495 |
84 |
0 |
0 |
T12 |
18102 |
196 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
131 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
215780 |
0 |
0 |
T1 |
2071 |
18 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
17 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
16 |
0 |
0 |
T11 |
27495 |
84 |
0 |
0 |
T12 |
18102 |
196 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
131 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
215780 |
0 |
0 |
T1 |
2071 |
18 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
17 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
16 |
0 |
0 |
T11 |
27495 |
84 |
0 |
0 |
T12 |
18102 |
196 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
131 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
2953879 |
0 |
0 |
T1 |
2071 |
19 |
0 |
0 |
T2 |
13197 |
74 |
0 |
0 |
T3 |
3524 |
80 |
0 |
0 |
T7 |
13369 |
81 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
16 |
0 |
0 |
T11 |
27495 |
564 |
0 |
0 |
T12 |
18102 |
186 |
0 |
0 |
T13 |
4146 |
90 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
215780 |
0 |
0 |
T1 |
2071 |
18 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
17 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
16 |
0 |
0 |
T11 |
27495 |
84 |
0 |
0 |
T12 |
18102 |
196 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
131 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
215780 |
0 |
0 |
T1 |
2071 |
18 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
17 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
16 |
0 |
0 |
T11 |
27495 |
84 |
0 |
0 |
T12 |
18102 |
196 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
131 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
565259 |
0 |
0 |
T1 |
2071 |
18 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
22 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
16 |
0 |
0 |
T10 |
1411 |
17 |
0 |
0 |
T11 |
27495 |
118 |
0 |
0 |
T12 |
18102 |
207 |
0 |
0 |
T13 |
4146 |
10 |
0 |
0 |
T14 |
0 |
180 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
215780 |
0 |
0 |
T1 |
2071 |
18 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
17 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
16 |
0 |
0 |
T11 |
27495 |
84 |
0 |
0 |
T12 |
18102 |
196 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
131 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_34.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T3 T11
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_34.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T3,T11 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T3,T11 |
Branch Coverage for Instance : tb.dut.u_sm1_34.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T3,T11 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_34.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
204542 |
0 |
0 |
T1 |
2071 |
17 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
89 |
0 |
0 |
T12 |
18102 |
218 |
0 |
0 |
T13 |
4146 |
17 |
0 |
0 |
T14 |
0 |
121 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
204542 |
0 |
0 |
T1 |
2071 |
17 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
89 |
0 |
0 |
T12 |
18102 |
218 |
0 |
0 |
T13 |
4146 |
17 |
0 |
0 |
T14 |
0 |
121 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
204542 |
0 |
0 |
T1 |
2071 |
17 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
89 |
0 |
0 |
T12 |
18102 |
218 |
0 |
0 |
T13 |
4146 |
17 |
0 |
0 |
T14 |
0 |
121 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
3014577 |
0 |
0 |
T1 |
2071 |
16 |
0 |
0 |
T2 |
13197 |
79 |
0 |
0 |
T3 |
3524 |
88 |
0 |
0 |
T7 |
13369 |
65 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
8 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
690 |
0 |
0 |
T12 |
18102 |
202 |
0 |
0 |
T13 |
4146 |
141 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
204542 |
0 |
0 |
T1 |
2071 |
17 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
89 |
0 |
0 |
T12 |
18102 |
218 |
0 |
0 |
T13 |
4146 |
17 |
0 |
0 |
T14 |
0 |
121 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
204542 |
0 |
0 |
T1 |
2071 |
17 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
89 |
0 |
0 |
T12 |
18102 |
218 |
0 |
0 |
T13 |
4146 |
17 |
0 |
0 |
T14 |
0 |
121 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
541765 |
0 |
0 |
T1 |
2071 |
19 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
14 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
150 |
0 |
0 |
T12 |
18102 |
235 |
0 |
0 |
T13 |
4146 |
17 |
0 |
0 |
T14 |
0 |
145 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
204542 |
0 |
0 |
T1 |
2071 |
17 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
89 |
0 |
0 |
T12 |
18102 |
218 |
0 |
0 |
T13 |
4146 |
17 |
0 |
0 |
T14 |
0 |
121 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_36.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T3 T7
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_36.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T3,T7 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T3,T7 |
Branch Coverage for Instance : tb.dut.u_sm1_36.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T3,T7 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_36.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
203399 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
14 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
14 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
101 |
0 |
0 |
T12 |
18102 |
190 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
135 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
203399 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
14 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
14 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
101 |
0 |
0 |
T12 |
18102 |
190 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
135 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
203399 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
14 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
14 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
101 |
0 |
0 |
T12 |
18102 |
190 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
135 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
4891121 |
0 |
0 |
T1 |
2071 |
65 |
0 |
0 |
T2 |
13197 |
135 |
0 |
0 |
T3 |
3524 |
57 |
0 |
0 |
T7 |
13369 |
181 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
64 |
0 |
0 |
T10 |
1411 |
24 |
0 |
0 |
T11 |
27495 |
918 |
0 |
0 |
T12 |
18102 |
2700 |
0 |
0 |
T13 |
4146 |
91 |
0 |
0 |
T14 |
0 |
1629 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
203399 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
14 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
14 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
101 |
0 |
0 |
T12 |
18102 |
190 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
135 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
203399 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
14 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
14 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
101 |
0 |
0 |
T12 |
18102 |
190 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
135 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
881614 |
0 |
0 |
T1 |
2071 |
18 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
13 |
0 |
0 |
T7 |
13369 |
31 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
16 |
0 |
0 |
T11 |
27495 |
183 |
0 |
0 |
T12 |
18102 |
417 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
197 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
203399 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
14 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
14 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
101 |
0 |
0 |
T12 |
18102 |
190 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
135 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_38.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T2 T7
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_38.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T7 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T2,T7 |
Branch Coverage for Instance : tb.dut.u_sm1_38.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T2,T7 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_38.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219054 |
0 |
0 |
T1 |
2071 |
15 |
0 |
0 |
T2 |
13197 |
14 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
18 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
83 |
0 |
0 |
T12 |
18102 |
214 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
119 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219054 |
0 |
0 |
T1 |
2071 |
15 |
0 |
0 |
T2 |
13197 |
14 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
18 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
83 |
0 |
0 |
T12 |
18102 |
214 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
119 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219054 |
0 |
0 |
T1 |
2071 |
15 |
0 |
0 |
T2 |
13197 |
14 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
18 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
83 |
0 |
0 |
T12 |
18102 |
214 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
119 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
5483610 |
0 |
0 |
T1 |
2071 |
74 |
0 |
0 |
T2 |
13197 |
248 |
0 |
0 |
T3 |
3524 |
86 |
0 |
0 |
T7 |
13369 |
84 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
80 |
0 |
0 |
T10 |
1411 |
40 |
0 |
0 |
T11 |
27495 |
535 |
0 |
0 |
T12 |
18102 |
1699 |
0 |
0 |
T13 |
4146 |
89 |
0 |
0 |
T14 |
0 |
1133 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219054 |
0 |
0 |
T1 |
2071 |
15 |
0 |
0 |
T2 |
13197 |
14 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
18 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
83 |
0 |
0 |
T12 |
18102 |
214 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
119 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219054 |
0 |
0 |
T1 |
2071 |
15 |
0 |
0 |
T2 |
13197 |
14 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
18 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
83 |
0 |
0 |
T12 |
18102 |
214 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
119 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
1247672 |
0 |
0 |
T1 |
2071 |
23 |
0 |
0 |
T2 |
13197 |
34 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
20 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
22 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
112 |
0 |
0 |
T12 |
18102 |
405 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
139 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219054 |
0 |
0 |
T1 |
2071 |
15 |
0 |
0 |
T2 |
13197 |
14 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
18 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
83 |
0 |
0 |
T12 |
18102 |
214 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
119 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_40.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T3 T9 T10
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_40.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T3,T9,T10 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T3,T9,T10 |
Branch Coverage for Instance : tb.dut.u_sm1_40.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T3,T9,T10 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_40.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219349 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
16 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
236 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
102 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219349 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
16 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
236 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
102 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219349 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
16 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
236 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
102 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
4889712 |
0 |
0 |
T1 |
2071 |
78 |
0 |
0 |
T2 |
13197 |
820 |
0 |
0 |
T3 |
3524 |
95 |
0 |
0 |
T7 |
13369 |
168 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
67 |
0 |
0 |
T10 |
1411 |
37 |
0 |
0 |
T11 |
27495 |
386 |
0 |
0 |
T12 |
18102 |
4204 |
0 |
0 |
T13 |
4146 |
72 |
0 |
0 |
T14 |
0 |
962 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219349 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
16 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
236 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
102 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219349 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
16 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
236 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
102 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
1090414 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
16 |
0 |
0 |
T3 |
3524 |
79 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
24 |
0 |
0 |
T10 |
1411 |
16 |
0 |
0 |
T11 |
27495 |
91 |
0 |
0 |
T12 |
18102 |
1051 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
150 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219349 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
16 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
236 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
102 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_42.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T7 T11
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_42.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T7,T11 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T7,T11 |
Branch Coverage for Instance : tb.dut.u_sm1_42.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T7,T11 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_42.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
223788 |
0 |
0 |
T1 |
2071 |
8 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
10 |
0 |
0 |
T7 |
13369 |
21 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
3 |
0 |
0 |
T11 |
27495 |
101 |
0 |
0 |
T12 |
18102 |
230 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
129 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
223788 |
0 |
0 |
T1 |
2071 |
8 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
10 |
0 |
0 |
T7 |
13369 |
21 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
3 |
0 |
0 |
T11 |
27495 |
101 |
0 |
0 |
T12 |
18102 |
230 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
129 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
223788 |
0 |
0 |
T1 |
2071 |
8 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
10 |
0 |
0 |
T7 |
13369 |
21 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
3 |
0 |
0 |
T11 |
27495 |
101 |
0 |
0 |
T12 |
18102 |
230 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
129 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
5742192 |
0 |
0 |
T1 |
2071 |
45 |
0 |
0 |
T2 |
13197 |
750 |
0 |
0 |
T3 |
3524 |
137 |
0 |
0 |
T7 |
13369 |
614 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
45 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
427 |
0 |
0 |
T12 |
18102 |
1234 |
0 |
0 |
T13 |
4146 |
149 |
0 |
0 |
T14 |
0 |
2709 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
223788 |
0 |
0 |
T1 |
2071 |
8 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
10 |
0 |
0 |
T7 |
13369 |
21 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
3 |
0 |
0 |
T11 |
27495 |
101 |
0 |
0 |
T12 |
18102 |
230 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
129 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
223788 |
0 |
0 |
T1 |
2071 |
8 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
10 |
0 |
0 |
T7 |
13369 |
21 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
3 |
0 |
0 |
T11 |
27495 |
101 |
0 |
0 |
T12 |
18102 |
230 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
129 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
1237020 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
10 |
0 |
0 |
T7 |
13369 |
97 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
3 |
0 |
0 |
T11 |
27495 |
122 |
0 |
0 |
T12 |
18102 |
358 |
0 |
0 |
T13 |
4146 |
37 |
0 |
0 |
T14 |
0 |
410 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
223788 |
0 |
0 |
T1 |
2071 |
8 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
10 |
0 |
0 |
T7 |
13369 |
21 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
3 |
0 |
0 |
T11 |
27495 |
101 |
0 |
0 |
T12 |
18102 |
230 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
129 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_43.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T3 T8
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_43.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T3,T8 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T3,T8 |
Branch Coverage for Instance : tb.dut.u_sm1_43.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T3,T8 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_43.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219253 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
18 |
0 |
0 |
T3 |
3524 |
16 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
969 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
113 |
0 |
0 |
T12 |
18102 |
196 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219253 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
18 |
0 |
0 |
T3 |
3524 |
16 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
969 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
113 |
0 |
0 |
T12 |
18102 |
196 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219253 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
18 |
0 |
0 |
T3 |
3524 |
16 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
969 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
113 |
0 |
0 |
T12 |
18102 |
196 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
3025571 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
137 |
0 |
0 |
T3 |
3524 |
110 |
0 |
0 |
T7 |
13369 |
93 |
0 |
0 |
T8 |
3945 |
42 |
0 |
0 |
T9 |
2006 |
8 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
880 |
0 |
0 |
T12 |
18102 |
192 |
0 |
0 |
T13 |
4146 |
44 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219253 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
18 |
0 |
0 |
T3 |
3524 |
16 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
969 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
113 |
0 |
0 |
T12 |
18102 |
196 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219253 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
18 |
0 |
0 |
T3 |
3524 |
16 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
969 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
113 |
0 |
0 |
T12 |
18102 |
196 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
582820 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
18 |
0 |
0 |
T3 |
3524 |
19 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
1897 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
13 |
0 |
0 |
T11 |
27495 |
171 |
0 |
0 |
T12 |
18102 |
201 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219253 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
18 |
0 |
0 |
T3 |
3524 |
16 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
969 |
0 |
0 |
T9 |
2006 |
7 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
113 |
0 |
0 |
T12 |
18102 |
196 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_44.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T2 T3 T9
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_44.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T2,T3,T9 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T2,T3,T9 |
Branch Coverage for Instance : tb.dut.u_sm1_44.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T2,T3,T9 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_44.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
222072 |
0 |
0 |
T1 |
2071 |
10 |
0 |
0 |
T2 |
13197 |
15 |
0 |
0 |
T3 |
3524 |
15 |
0 |
0 |
T7 |
13369 |
7 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
10 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
80 |
0 |
0 |
T12 |
18102 |
218 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
123 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
222072 |
0 |
0 |
T1 |
2071 |
10 |
0 |
0 |
T2 |
13197 |
15 |
0 |
0 |
T3 |
3524 |
15 |
0 |
0 |
T7 |
13369 |
7 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
10 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
80 |
0 |
0 |
T12 |
18102 |
218 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
123 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
222072 |
0 |
0 |
T1 |
2071 |
10 |
0 |
0 |
T2 |
13197 |
15 |
0 |
0 |
T3 |
3524 |
15 |
0 |
0 |
T7 |
13369 |
7 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
10 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
80 |
0 |
0 |
T12 |
18102 |
218 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
123 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
3010818 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
141 |
0 |
0 |
T3 |
3524 |
109 |
0 |
0 |
T7 |
13369 |
44 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
9 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
574 |
0 |
0 |
T12 |
18102 |
208 |
0 |
0 |
T13 |
4146 |
35 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
222072 |
0 |
0 |
T1 |
2071 |
10 |
0 |
0 |
T2 |
13197 |
15 |
0 |
0 |
T3 |
3524 |
15 |
0 |
0 |
T7 |
13369 |
7 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
10 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
80 |
0 |
0 |
T12 |
18102 |
218 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
123 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
222072 |
0 |
0 |
T1 |
2071 |
10 |
0 |
0 |
T2 |
13197 |
15 |
0 |
0 |
T3 |
3524 |
15 |
0 |
0 |
T7 |
13369 |
7 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
10 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
80 |
0 |
0 |
T12 |
18102 |
218 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
123 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
629431 |
0 |
0 |
T1 |
2071 |
10 |
0 |
0 |
T2 |
13197 |
27 |
0 |
0 |
T3 |
3524 |
23 |
0 |
0 |
T7 |
13369 |
7 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
12 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
155 |
0 |
0 |
T12 |
18102 |
229 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
175 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
222072 |
0 |
0 |
T1 |
2071 |
10 |
0 |
0 |
T2 |
13197 |
15 |
0 |
0 |
T3 |
3524 |
15 |
0 |
0 |
T7 |
13369 |
7 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
10 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
80 |
0 |
0 |
T12 |
18102 |
218 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
123 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_45.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T2 T7
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_45.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T7 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T2,T7 |
Branch Coverage for Instance : tb.dut.u_sm1_45.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T2,T7 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_45.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
224083 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
6 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
73 |
0 |
0 |
T12 |
18102 |
214 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
122 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
224083 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
6 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
73 |
0 |
0 |
T12 |
18102 |
214 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
122 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
224083 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
6 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
73 |
0 |
0 |
T12 |
18102 |
214 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
122 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
3023400 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
83 |
0 |
0 |
T3 |
3524 |
93 |
0 |
0 |
T7 |
13369 |
52 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
11 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
580 |
0 |
0 |
T12 |
18102 |
200 |
0 |
0 |
T13 |
4146 |
33 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
224083 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
6 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
73 |
0 |
0 |
T12 |
18102 |
214 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
122 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
224083 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
6 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
73 |
0 |
0 |
T12 |
18102 |
214 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
122 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
633647 |
0 |
0 |
T1 |
2071 |
14 |
0 |
0 |
T2 |
13197 |
14 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
16 |
0 |
0 |
T10 |
1411 |
13 |
0 |
0 |
T11 |
27495 |
88 |
0 |
0 |
T12 |
18102 |
229 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
180 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
224083 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
6 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
12 |
0 |
0 |
T11 |
27495 |
73 |
0 |
0 |
T12 |
18102 |
214 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
122 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_46.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T9 T10 T11
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_46.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T9,T10,T11 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T9,T10,T11 |
Branch Coverage for Instance : tb.dut.u_sm1_46.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T9,T10,T11 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_46.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
213498 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
9 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
13 |
0 |
0 |
T11 |
27495 |
96 |
0 |
0 |
T12 |
18102 |
223 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
115 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
213498 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
9 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
13 |
0 |
0 |
T11 |
27495 |
96 |
0 |
0 |
T12 |
18102 |
223 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
115 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
213498 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
9 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
13 |
0 |
0 |
T11 |
27495 |
96 |
0 |
0 |
T12 |
18102 |
223 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
115 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
3020839 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
69 |
0 |
0 |
T3 |
3524 |
63 |
0 |
0 |
T7 |
13369 |
87 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
12 |
0 |
0 |
T10 |
1411 |
13 |
0 |
0 |
T11 |
27495 |
731 |
0 |
0 |
T12 |
18102 |
215 |
0 |
0 |
T13 |
4146 |
41 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
213498 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
9 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
13 |
0 |
0 |
T11 |
27495 |
96 |
0 |
0 |
T12 |
18102 |
223 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
115 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
213498 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
9 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
13 |
0 |
0 |
T11 |
27495 |
96 |
0 |
0 |
T12 |
18102 |
223 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
115 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
563836 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
9 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
14 |
0 |
0 |
T11 |
27495 |
137 |
0 |
0 |
T12 |
18102 |
232 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
146 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
213498 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
9 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
13 |
0 |
0 |
T10 |
1411 |
13 |
0 |
0 |
T11 |
27495 |
96 |
0 |
0 |
T12 |
18102 |
223 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
115 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_47.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T3 T7 T10
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_47.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T3,T7,T10 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T3,T7,T10 |
Branch Coverage for Instance : tb.dut.u_sm1_47.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T3,T7,T10 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_47.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
210392 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
16 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
6 |
0 |
0 |
T11 |
27495 |
92 |
0 |
0 |
T12 |
18102 |
245 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
133 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
210392 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
16 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
6 |
0 |
0 |
T11 |
27495 |
92 |
0 |
0 |
T12 |
18102 |
245 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
133 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
210392 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
16 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
6 |
0 |
0 |
T11 |
27495 |
92 |
0 |
0 |
T12 |
18102 |
245 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
133 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
2984580 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
72 |
0 |
0 |
T3 |
3524 |
97 |
0 |
0 |
T7 |
13369 |
106 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
18 |
0 |
0 |
T10 |
1411 |
6 |
0 |
0 |
T11 |
27495 |
760 |
0 |
0 |
T12 |
18102 |
233 |
0 |
0 |
T13 |
4146 |
89 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
210392 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
16 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
6 |
0 |
0 |
T11 |
27495 |
92 |
0 |
0 |
T12 |
18102 |
245 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
133 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
210392 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
16 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
6 |
0 |
0 |
T11 |
27495 |
92 |
0 |
0 |
T12 |
18102 |
245 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
133 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
574458 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
15 |
0 |
0 |
T7 |
13369 |
22 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
140 |
0 |
0 |
T12 |
18102 |
258 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
167 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
210392 |
0 |
0 |
T1 |
2071 |
11 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
16 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
6 |
0 |
0 |
T11 |
27495 |
92 |
0 |
0 |
T12 |
18102 |
245 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
133 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_48.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T7 T11
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_48.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T7,T11 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T7,T11 |
Branch Coverage for Instance : tb.dut.u_sm1_48.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T7,T11 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_48.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219024 |
0 |
0 |
T1 |
2071 |
15 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
15 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
105 |
0 |
0 |
T12 |
18102 |
195 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
113 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219024 |
0 |
0 |
T1 |
2071 |
15 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
15 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
105 |
0 |
0 |
T12 |
18102 |
195 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
113 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219024 |
0 |
0 |
T1 |
2071 |
15 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
15 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
105 |
0 |
0 |
T12 |
18102 |
195 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
113 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
2985689 |
0 |
0 |
T1 |
2071 |
15 |
0 |
0 |
T2 |
13197 |
85 |
0 |
0 |
T3 |
3524 |
46 |
0 |
0 |
T7 |
13369 |
140 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
18 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
822 |
0 |
0 |
T12 |
18102 |
189 |
0 |
0 |
T13 |
4146 |
41 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219024 |
0 |
0 |
T1 |
2071 |
15 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
15 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
105 |
0 |
0 |
T12 |
18102 |
195 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
113 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219024 |
0 |
0 |
T1 |
2071 |
15 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
15 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
105 |
0 |
0 |
T12 |
18102 |
195 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
113 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
597290 |
0 |
0 |
T1 |
2071 |
16 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
20 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
173 |
0 |
0 |
T12 |
18102 |
202 |
0 |
0 |
T13 |
4146 |
14 |
0 |
0 |
T14 |
0 |
142 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
219024 |
0 |
0 |
T1 |
2071 |
15 |
0 |
0 |
T2 |
13197 |
11 |
0 |
0 |
T3 |
3524 |
7 |
0 |
0 |
T7 |
13369 |
15 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
105 |
0 |
0 |
T12 |
18102 |
195 |
0 |
0 |
T13 |
4146 |
6 |
0 |
0 |
T14 |
0 |
113 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_49.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T7 T11
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_49.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T7,T11 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T7,T11 |
Branch Coverage for Instance : tb.dut.u_sm1_49.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T7,T11 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_49.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
204598 |
0 |
0 |
T1 |
2071 |
17 |
0 |
0 |
T2 |
13197 |
7 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
22 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
9 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
91 |
0 |
0 |
T12 |
18102 |
224 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
117 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
204598 |
0 |
0 |
T1 |
2071 |
17 |
0 |
0 |
T2 |
13197 |
7 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
22 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
9 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
91 |
0 |
0 |
T12 |
18102 |
224 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
117 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
204598 |
0 |
0 |
T1 |
2071 |
17 |
0 |
0 |
T2 |
13197 |
7 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
22 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
9 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
91 |
0 |
0 |
T12 |
18102 |
224 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
117 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
2962868 |
0 |
0 |
T1 |
2071 |
16 |
0 |
0 |
T2 |
13197 |
55 |
0 |
0 |
T3 |
3524 |
88 |
0 |
0 |
T7 |
13369 |
143 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
10 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
625 |
0 |
0 |
T12 |
18102 |
208 |
0 |
0 |
T13 |
4146 |
47 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
204598 |
0 |
0 |
T1 |
2071 |
17 |
0 |
0 |
T2 |
13197 |
7 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
22 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
9 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
91 |
0 |
0 |
T12 |
18102 |
224 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
117 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
204598 |
0 |
0 |
T1 |
2071 |
17 |
0 |
0 |
T2 |
13197 |
7 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
22 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
9 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
91 |
0 |
0 |
T12 |
18102 |
224 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
117 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
556534 |
0 |
0 |
T1 |
2071 |
19 |
0 |
0 |
T2 |
13197 |
7 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
46 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
9 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
137 |
0 |
0 |
T12 |
18102 |
241 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
135 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
204598 |
0 |
0 |
T1 |
2071 |
17 |
0 |
0 |
T2 |
13197 |
7 |
0 |
0 |
T3 |
3524 |
11 |
0 |
0 |
T7 |
13369 |
22 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
9 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
91 |
0 |
0 |
T12 |
18102 |
224 |
0 |
0 |
T13 |
4146 |
8 |
0 |
0 |
T14 |
0 |
117 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_50.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T7 T9 T11
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_50.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T7,T9,T11 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T7,T9,T11 |
Branch Coverage for Instance : tb.dut.u_sm1_50.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T7,T9,T11 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_50.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
211569 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
8 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
243 |
0 |
0 |
T13 |
4146 |
10 |
0 |
0 |
T14 |
0 |
131 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
211569 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
8 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
243 |
0 |
0 |
T13 |
4146 |
10 |
0 |
0 |
T14 |
0 |
131 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
211569 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
8 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
243 |
0 |
0 |
T13 |
4146 |
10 |
0 |
0 |
T14 |
0 |
131 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
2932144 |
0 |
0 |
T1 |
2071 |
14 |
0 |
0 |
T2 |
13197 |
106 |
0 |
0 |
T3 |
3524 |
65 |
0 |
0 |
T7 |
13369 |
61 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
14 |
0 |
0 |
T10 |
1411 |
11 |
0 |
0 |
T11 |
27495 |
636 |
0 |
0 |
T12 |
18102 |
232 |
0 |
0 |
T13 |
4146 |
94 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
211569 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
8 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
243 |
0 |
0 |
T13 |
4146 |
10 |
0 |
0 |
T14 |
0 |
131 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
211569 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
8 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
243 |
0 |
0 |
T13 |
4146 |
10 |
0 |
0 |
T14 |
0 |
131 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
541365 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
8 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
31 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
106 |
0 |
0 |
T12 |
18102 |
255 |
0 |
0 |
T13 |
4146 |
10 |
0 |
0 |
T14 |
0 |
158 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
211569 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
8 |
0 |
0 |
T3 |
3524 |
5 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
15 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
243 |
0 |
0 |
T13 |
4146 |
10 |
0 |
0 |
T14 |
0 |
131 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_51.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T2 T3
104 end
MISSING_ELSE
105 end
106
107 if (EnDataPort == 1) begin: gen_datapath
108 always_comb begin
109 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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_51.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T2,T3 |
Branch Coverage for Instance : tb.dut.u_sm1_51.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T2,T3 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_51.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
230893 |
0 |
0 |
T1 |
2071 |
24 |
0 |
0 |
T2 |
13197 |
13 |
0 |
0 |
T3 |
3524 |
15 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
8 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
92 |
0 |
0 |
T12 |
18102 |
192 |
0 |
0 |
T13 |
4146 |
15 |
0 |
0 |
T14 |
0 |
189 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
230893 |
0 |
0 |
T1 |
2071 |
24 |
0 |
0 |
T2 |
13197 |
13 |
0 |
0 |
T3 |
3524 |
15 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
8 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
92 |
0 |
0 |
T12 |
18102 |
192 |
0 |
0 |
T13 |
4146 |
15 |
0 |
0 |
T14 |
0 |
189 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
230893 |
0 |
0 |
T1 |
2071 |
24 |
0 |
0 |
T2 |
13197 |
13 |
0 |
0 |
T3 |
3524 |
15 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
8 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
92 |
0 |
0 |
T12 |
18102 |
192 |
0 |
0 |
T13 |
4146 |
15 |
0 |
0 |
T14 |
0 |
189 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
3082136 |
0 |
0 |
T1 |
2071 |
22 |
0 |
0 |
T2 |
13197 |
96 |
0 |
0 |
T3 |
3524 |
119 |
0 |
0 |
T7 |
13369 |
97 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
9 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
642 |
0 |
0 |
T12 |
18102 |
185 |
0 |
0 |
T13 |
4146 |
102 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
230893 |
0 |
0 |
T1 |
2071 |
24 |
0 |
0 |
T2 |
13197 |
13 |
0 |
0 |
T3 |
3524 |
15 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
8 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
92 |
0 |
0 |
T12 |
18102 |
192 |
0 |
0 |
T13 |
4146 |
15 |
0 |
0 |
T14 |
0 |
189 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
230893 |
0 |
0 |
T1 |
2071 |
24 |
0 |
0 |
T2 |
13197 |
13 |
0 |
0 |
T3 |
3524 |
15 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
8 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
92 |
0 |
0 |
T12 |
18102 |
192 |
0 |
0 |
T13 |
4146 |
15 |
0 |
0 |
T14 |
0 |
189 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
549373 |
0 |
0 |
T1 |
2071 |
27 |
0 |
0 |
T2 |
13197 |
25 |
0 |
0 |
T3 |
3524 |
24 |
0 |
0 |
T7 |
13369 |
15 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
8 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
114 |
0 |
0 |
T12 |
18102 |
200 |
0 |
0 |
T13 |
4146 |
23 |
0 |
0 |
T14 |
0 |
240 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
230893 |
0 |
0 |
T1 |
2071 |
24 |
0 |
0 |
T2 |
13197 |
13 |
0 |
0 |
T3 |
3524 |
15 |
0 |
0 |
T7 |
13369 |
11 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
8 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
92 |
0 |
0 |
T12 |
18102 |
192 |
0 |
0 |
T13 |
4146 |
15 |
0 |
0 |
T14 |
0 |
189 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_52.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T2 T3 T9
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_52.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T2,T3,T9 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T2,T3,T9 |
Branch Coverage for Instance : tb.dut.u_sm1_52.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T2,T3,T9 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_52.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
211723 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
16 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
11 |
0 |
0 |
T10 |
1411 |
5 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
202 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
116 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
211723 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
16 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
11 |
0 |
0 |
T10 |
1411 |
5 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
202 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
116 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
211723 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
16 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
11 |
0 |
0 |
T10 |
1411 |
5 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
202 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
116 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
2959589 |
0 |
0 |
T1 |
2071 |
8 |
0 |
0 |
T2 |
13197 |
165 |
0 |
0 |
T3 |
3524 |
81 |
0 |
0 |
T7 |
13369 |
58 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
11 |
0 |
0 |
T10 |
1411 |
6 |
0 |
0 |
T11 |
27495 |
620 |
0 |
0 |
T12 |
18102 |
194 |
0 |
0 |
T13 |
4146 |
29 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
211723 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
16 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
11 |
0 |
0 |
T10 |
1411 |
5 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
202 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
116 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
211723 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
16 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
11 |
0 |
0 |
T10 |
1411 |
5 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
202 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
116 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
596992 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
23 |
0 |
0 |
T3 |
3524 |
13 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
12 |
0 |
0 |
T10 |
1411 |
5 |
0 |
0 |
T11 |
27495 |
134 |
0 |
0 |
T12 |
18102 |
211 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
136 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
211723 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
16 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
10 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
11 |
0 |
0 |
T10 |
1411 |
5 |
0 |
0 |
T11 |
27495 |
86 |
0 |
0 |
T12 |
18102 |
202 |
0 |
0 |
T13 |
4146 |
7 |
0 |
0 |
T14 |
0 |
116 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_53.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T3 T7 T10
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_53.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T3,T7,T10 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T3,T7,T10 |
Branch Coverage for Instance : tb.dut.u_sm1_53.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T3,T7,T10 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_53.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
216601 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
19 |
0 |
0 |
T3 |
3524 |
16 |
0 |
0 |
T7 |
13369 |
19 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
16 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
96 |
0 |
0 |
T12 |
18102 |
190 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
130 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
216601 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
19 |
0 |
0 |
T3 |
3524 |
16 |
0 |
0 |
T7 |
13369 |
19 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
16 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
96 |
0 |
0 |
T12 |
18102 |
190 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
130 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
216601 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
19 |
0 |
0 |
T3 |
3524 |
16 |
0 |
0 |
T7 |
13369 |
19 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
16 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
96 |
0 |
0 |
T12 |
18102 |
190 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
130 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
2983361 |
0 |
0 |
T1 |
2071 |
8 |
0 |
0 |
T2 |
13197 |
159 |
0 |
0 |
T3 |
3524 |
110 |
0 |
0 |
T7 |
13369 |
169 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
17 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
705 |
0 |
0 |
T12 |
18102 |
175 |
0 |
0 |
T13 |
4146 |
44 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
216601 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
19 |
0 |
0 |
T3 |
3524 |
16 |
0 |
0 |
T7 |
13369 |
19 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
16 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
96 |
0 |
0 |
T12 |
18102 |
190 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
130 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
216601 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
19 |
0 |
0 |
T3 |
3524 |
16 |
0 |
0 |
T7 |
13369 |
19 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
16 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
96 |
0 |
0 |
T12 |
18102 |
190 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
130 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
584129 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
19 |
0 |
0 |
T3 |
3524 |
36 |
0 |
0 |
T7 |
13369 |
45 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
16 |
0 |
0 |
T10 |
1411 |
9 |
0 |
0 |
T11 |
27495 |
167 |
0 |
0 |
T12 |
18102 |
206 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
156 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
216601 |
0 |
0 |
T1 |
2071 |
7 |
0 |
0 |
T2 |
13197 |
19 |
0 |
0 |
T3 |
3524 |
16 |
0 |
0 |
T7 |
13369 |
19 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
16 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
96 |
0 |
0 |
T12 |
18102 |
190 |
0 |
0 |
T13 |
4146 |
5 |
0 |
0 |
T14 |
0 |
130 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_54.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T7 T9 T11
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_54.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T7,T9,T11 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T7,T9,T11 |
Branch Coverage for Instance : tb.dut.u_sm1_54.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T7,T9,T11 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_54.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
225157 |
0 |
0 |
T1 |
2071 |
20 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
19 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
103 |
0 |
0 |
T12 |
18102 |
208 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
79 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
225157 |
0 |
0 |
T1 |
2071 |
20 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
19 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
103 |
0 |
0 |
T12 |
18102 |
208 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
79 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
225157 |
0 |
0 |
T1 |
2071 |
20 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
19 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
103 |
0 |
0 |
T12 |
18102 |
208 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
79 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
3023890 |
0 |
0 |
T1 |
2071 |
21 |
0 |
0 |
T2 |
13197 |
77 |
0 |
0 |
T3 |
3524 |
85 |
0 |
0 |
T7 |
13369 |
93 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
18 |
0 |
0 |
T10 |
1411 |
8 |
0 |
0 |
T11 |
27495 |
795 |
0 |
0 |
T12 |
18102 |
198 |
0 |
0 |
T13 |
4146 |
71 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
225157 |
0 |
0 |
T1 |
2071 |
20 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
19 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
103 |
0 |
0 |
T12 |
18102 |
208 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
79 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
225157 |
0 |
0 |
T1 |
2071 |
20 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
19 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
103 |
0 |
0 |
T12 |
18102 |
208 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
79 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
643725 |
0 |
0 |
T1 |
2071 |
20 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
30 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
21 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
146 |
0 |
0 |
T12 |
18102 |
219 |
0 |
0 |
T13 |
4146 |
19 |
0 |
0 |
T14 |
0 |
82 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
225157 |
0 |
0 |
T1 |
2071 |
20 |
0 |
0 |
T2 |
13197 |
10 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
12 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
19 |
0 |
0 |
T10 |
1411 |
7 |
0 |
0 |
T11 |
27495 |
103 |
0 |
0 |
T12 |
18102 |
208 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
79 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_55.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T3 T11 T12
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_55.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T3,T11,T12 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T3,T11,T12 |
Branch Coverage for Instance : tb.dut.u_sm1_55.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T3,T11,T12 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_55.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
217152 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
12 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
19 |
0 |
0 |
T10 |
1411 |
4 |
0 |
0 |
T11 |
27495 |
116 |
0 |
0 |
T12 |
18102 |
207 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
119 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
217152 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
12 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
19 |
0 |
0 |
T10 |
1411 |
4 |
0 |
0 |
T11 |
27495 |
116 |
0 |
0 |
T12 |
18102 |
207 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
119 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
217152 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
12 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
19 |
0 |
0 |
T10 |
1411 |
4 |
0 |
0 |
T11 |
27495 |
116 |
0 |
0 |
T12 |
18102 |
207 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
119 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
2943519 |
0 |
0 |
T1 |
2071 |
13 |
0 |
0 |
T2 |
13197 |
81 |
0 |
0 |
T3 |
3524 |
45 |
0 |
0 |
T7 |
13369 |
108 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
20 |
0 |
0 |
T10 |
1411 |
5 |
0 |
0 |
T11 |
27495 |
833 |
0 |
0 |
T12 |
18102 |
200 |
0 |
0 |
T13 |
4146 |
62 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
217152 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
12 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
19 |
0 |
0 |
T10 |
1411 |
4 |
0 |
0 |
T11 |
27495 |
116 |
0 |
0 |
T12 |
18102 |
207 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
119 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
217152 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
12 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
19 |
0 |
0 |
T10 |
1411 |
4 |
0 |
0 |
T11 |
27495 |
116 |
0 |
0 |
T12 |
18102 |
207 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
119 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
540941 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
12 |
0 |
0 |
T3 |
3524 |
9 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
19 |
0 |
0 |
T10 |
1411 |
4 |
0 |
0 |
T11 |
27495 |
182 |
0 |
0 |
T12 |
18102 |
215 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
173 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
217152 |
0 |
0 |
T1 |
2071 |
12 |
0 |
0 |
T2 |
13197 |
12 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
13 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
19 |
0 |
0 |
T10 |
1411 |
4 |
0 |
0 |
T11 |
27495 |
116 |
0 |
0 |
T12 |
18102 |
207 |
0 |
0 |
T13 |
4146 |
9 |
0 |
0 |
T14 |
0 |
119 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_56.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T1 T2 T7
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_56.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T7 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T1,T2,T7 |
Branch Coverage for Instance : tb.dut.u_sm1_56.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T1,T2,T7 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_56.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
217948 |
0 |
0 |
T1 |
2071 |
9 |
0 |
0 |
T2 |
13197 |
12 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
17 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
21 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
89 |
0 |
0 |
T12 |
18102 |
200 |
0 |
0 |
T13 |
4146 |
16 |
0 |
0 |
T14 |
0 |
129 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
217948 |
0 |
0 |
T1 |
2071 |
9 |
0 |
0 |
T2 |
13197 |
12 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
17 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
21 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
89 |
0 |
0 |
T12 |
18102 |
200 |
0 |
0 |
T13 |
4146 |
16 |
0 |
0 |
T14 |
0 |
129 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
217948 |
0 |
0 |
T1 |
2071 |
9 |
0 |
0 |
T2 |
13197 |
12 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
17 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
21 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
89 |
0 |
0 |
T12 |
18102 |
200 |
0 |
0 |
T13 |
4146 |
16 |
0 |
0 |
T14 |
0 |
129 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
2940267 |
0 |
0 |
T1 |
2071 |
9 |
0 |
0 |
T2 |
13197 |
85 |
0 |
0 |
T3 |
3524 |
51 |
0 |
0 |
T7 |
13369 |
134 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
21 |
0 |
0 |
T10 |
1411 |
11 |
0 |
0 |
T11 |
27495 |
720 |
0 |
0 |
T12 |
18102 |
192 |
0 |
0 |
T13 |
4146 |
89 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
217948 |
0 |
0 |
T1 |
2071 |
9 |
0 |
0 |
T2 |
13197 |
12 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
17 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
21 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
89 |
0 |
0 |
T12 |
18102 |
200 |
0 |
0 |
T13 |
4146 |
16 |
0 |
0 |
T14 |
0 |
129 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
217948 |
0 |
0 |
T1 |
2071 |
9 |
0 |
0 |
T2 |
13197 |
12 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
17 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
21 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
89 |
0 |
0 |
T12 |
18102 |
200 |
0 |
0 |
T13 |
4146 |
16 |
0 |
0 |
T14 |
0 |
129 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
596278 |
0 |
0 |
T1 |
2071 |
10 |
0 |
0 |
T2 |
13197 |
14 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
24 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
22 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
111 |
0 |
0 |
T12 |
18102 |
209 |
0 |
0 |
T13 |
4146 |
31 |
0 |
0 |
T14 |
0 |
201 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
900 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
217948 |
0 |
0 |
T1 |
2071 |
9 |
0 |
0 |
T2 |
13197 |
12 |
0 |
0 |
T3 |
3524 |
8 |
0 |
0 |
T7 |
13369 |
17 |
0 |
0 |
T8 |
3945 |
0 |
0 |
0 |
T9 |
2006 |
21 |
0 |
0 |
T10 |
1411 |
10 |
0 |
0 |
T11 |
27495 |
89 |
0 |
0 |
T12 |
18102 |
200 |
0 |
0 |
T13 |
4146 |
16 |
0 |
0 |
T14 |
0 |
129 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_28.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T2 T3 T7
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_28.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T2,T3,T7 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T2,T3,T7 |
Branch Coverage for Instance : tb.dut.u_sm1_28.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T2,T3,T7 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_28.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
877825 |
0 |
0 |
T1 |
2071 |
46 |
0 |
0 |
T2 |
13197 |
39 |
0 |
0 |
T3 |
3524 |
45 |
0 |
0 |
T7 |
13369 |
52 |
0 |
0 |
T8 |
3945 |
125 |
0 |
0 |
T9 |
2006 |
31 |
0 |
0 |
T10 |
1411 |
55 |
0 |
0 |
T11 |
27495 |
406 |
0 |
0 |
T12 |
18102 |
829 |
0 |
0 |
T13 |
4146 |
30 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
877825 |
0 |
0 |
T1 |
2071 |
46 |
0 |
0 |
T2 |
13197 |
39 |
0 |
0 |
T3 |
3524 |
45 |
0 |
0 |
T7 |
13369 |
52 |
0 |
0 |
T8 |
3945 |
125 |
0 |
0 |
T9 |
2006 |
31 |
0 |
0 |
T10 |
1411 |
55 |
0 |
0 |
T11 |
27495 |
406 |
0 |
0 |
T12 |
18102 |
829 |
0 |
0 |
T13 |
4146 |
30 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
877825 |
0 |
0 |
T1 |
2071 |
46 |
0 |
0 |
T2 |
13197 |
39 |
0 |
0 |
T3 |
3524 |
45 |
0 |
0 |
T7 |
13369 |
52 |
0 |
0 |
T8 |
3945 |
125 |
0 |
0 |
T9 |
2006 |
31 |
0 |
0 |
T10 |
1411 |
55 |
0 |
0 |
T11 |
27495 |
406 |
0 |
0 |
T12 |
18102 |
829 |
0 |
0 |
T13 |
4146 |
30 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
11319148 |
0 |
0 |
T1 |
2071 |
1 |
0 |
0 |
T2 |
13197 |
254 |
0 |
0 |
T3 |
3524 |
281 |
0 |
0 |
T7 |
13369 |
317 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
1 |
0 |
0 |
T10 |
1411 |
1 |
0 |
0 |
T11 |
27495 |
2564 |
0 |
0 |
T12 |
18102 |
1 |
0 |
0 |
T13 |
4146 |
139 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
877825 |
0 |
0 |
T1 |
2071 |
46 |
0 |
0 |
T2 |
13197 |
39 |
0 |
0 |
T3 |
3524 |
45 |
0 |
0 |
T7 |
13369 |
52 |
0 |
0 |
T8 |
3945 |
125 |
0 |
0 |
T9 |
2006 |
31 |
0 |
0 |
T10 |
1411 |
55 |
0 |
0 |
T11 |
27495 |
406 |
0 |
0 |
T12 |
18102 |
829 |
0 |
0 |
T13 |
4146 |
30 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
877825 |
0 |
0 |
T1 |
2071 |
46 |
0 |
0 |
T2 |
13197 |
39 |
0 |
0 |
T3 |
3524 |
45 |
0 |
0 |
T7 |
13369 |
52 |
0 |
0 |
T8 |
3945 |
125 |
0 |
0 |
T9 |
2006 |
31 |
0 |
0 |
T10 |
1411 |
55 |
0 |
0 |
T11 |
27495 |
406 |
0 |
0 |
T12 |
18102 |
829 |
0 |
0 |
T13 |
4146 |
30 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
2284159 |
0 |
0 |
T1 |
2071 |
46 |
0 |
0 |
T2 |
13197 |
56 |
0 |
0 |
T3 |
3524 |
82 |
0 |
0 |
T7 |
13369 |
76 |
0 |
0 |
T8 |
3945 |
125 |
0 |
0 |
T9 |
2006 |
31 |
0 |
0 |
T10 |
1411 |
55 |
0 |
0 |
T11 |
27495 |
769 |
0 |
0 |
T12 |
18102 |
829 |
0 |
0 |
T13 |
4146 |
52 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
18140 |
0 |
900 |
T12 |
18102 |
14 |
0 |
1 |
T13 |
4146 |
0 |
0 |
1 |
T14 |
64695 |
1 |
0 |
1 |
T15 |
13704 |
19 |
0 |
1 |
T16 |
63818 |
2 |
0 |
1 |
T17 |
130671 |
0 |
0 |
1 |
T18 |
0 |
13 |
0 |
0 |
T20 |
0 |
6 |
0 |
0 |
T21 |
0 |
1 |
0 |
0 |
T22 |
0 |
1 |
0 |
0 |
T23 |
0 |
5 |
0 |
0 |
T24 |
0 |
17 |
0 |
0 |
T25 |
179815 |
0 |
0 |
1 |
T26 |
2685 |
0 |
0 |
1 |
T27 |
2929 |
0 |
0 |
1 |
T28 |
12167 |
0 |
0 |
1 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
877825 |
0 |
0 |
T1 |
2071 |
46 |
0 |
0 |
T2 |
13197 |
39 |
0 |
0 |
T3 |
3524 |
45 |
0 |
0 |
T7 |
13369 |
52 |
0 |
0 |
T8 |
3945 |
125 |
0 |
0 |
T9 |
2006 |
31 |
0 |
0 |
T10 |
1411 |
55 |
0 |
0 |
T11 |
27495 |
406 |
0 |
0 |
T12 |
18102 |
829 |
0 |
0 |
T13 |
4146 |
30 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_sm1_30.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 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 | 6 | 6 | 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: T1 T2 T3
101 1/1 end else if (valid_o && !ready_i) begin
Tests: T1 T2 T3
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 1/1 mask <= ppc_out;
Tests: T2 T3 T7
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: T1 T2 T3
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: T1 T2 T3
128 end
MISSING_ELSE
Cond Coverage for Instance : tb.dut.u_sm1_30.gen_arb_ppc.u_reqarb
| Total | Covered | Percent |
Conditions | 13 | 12 | 92.31 |
Logical | 13 | 12 | 92.31 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 76
EXPRESSION (((|gen_normal_case.masked_req)) ? gen_normal_case.masked_req : req_i)
---------------1---------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 84
EXPRESSION (gen_normal_case.ppc_out[(i - 1)] | gen_normal_case.arb_req[i])
----------------1--------------- -------------2------------
-1- | -2- | Status | Tests |
0 | 0 | Covered | T1,T2,T3 |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T1,T2,T3 |
LINE 90
EXPRESSION (ready_i ? gen_normal_case.winner : '0)
---1---
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 98
EXPRESSION (valid_o && ready_i)
---1--- ---2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T2,T3,T7 |
1 | 1 | Covered | T1,T2,T3 |
LINE 101
EXPRESSION (valid_o && ((!ready_i)))
---1--- ------2-----
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Not Covered | |
1 | 1 | Covered | T2,T3,T7 |
Branch Coverage for Instance : tb.dut.u_sm1_30.gen_arb_ppc.u_reqarb
| Line No. | Total | Covered | Percent |
Branches |
|
12 |
12 |
100.00 |
TERNARY |
76 |
2 |
2 |
100.00 |
TERNARY |
90 |
2 |
2 |
100.00 |
IF |
96 |
4 |
4 |
100.00 |
IF |
126 |
2 |
2 |
100.00 |
IF |
111 |
2 |
2 |
100.00 |
76 assign arb_req = (|masked_req) ? masked_req : req_i;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
90 assign gnt_o = (ready_i) ? winner : '0;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
96 if (!rst_ni) begin
-1-
97 mask <= '0;
==>
98 end else if (valid_o && ready_i) begin
-2-
99 // Latch only when requests accepted
100 mask <= mask_next;
==>
101 end else if (valid_o && !ready_i) begin
-3-
102 // Downstream isn't yet ready so, keep current request alive. (First come first serve)
103 mask <= ppc_out;
==>
104 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T2,T3,T7 |
0 |
0 |
0 |
Covered |
T1,T2,T3 |
126 if (winner[i]) begin
-1-
127 idx_o = i[IdxW-1:0];
==>
128 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
111 if (winner[i]) begin
-1-
112 data_o = data_i[i];
==>
113 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_sm1_30.gen_arb_ppc.u_reqarb
Assertion Details
CheckHotOne_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
CheckNGreaterZero_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
900 |
900 |
0 |
0 |
T1 |
1 |
1 |
0 |
0 |
T2 |
1 |
1 |
0 |
0 |
T3 |
1 |
1 |
0 |
0 |
T7 |
1 |
1 |
0 |
0 |
T8 |
1 |
1 |
0 |
0 |
T9 |
1 |
1 |
0 |
0 |
T10 |
1 |
1 |
0 |
0 |
T11 |
1 |
1 |
0 |
0 |
T12 |
1 |
1 |
0 |
0 |
T13 |
1 |
1 |
0 |
0 |
GntImpliesReady_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
879581 |
0 |
0 |
T1 |
2071 |
35 |
0 |
0 |
T2 |
13197 |
44 |
0 |
0 |
T3 |
3524 |
36 |
0 |
0 |
T7 |
13369 |
51 |
0 |
0 |
T8 |
3945 |
137 |
0 |
0 |
T9 |
2006 |
51 |
0 |
0 |
T10 |
1411 |
49 |
0 |
0 |
T11 |
27495 |
378 |
0 |
0 |
T12 |
18102 |
790 |
0 |
0 |
T13 |
4146 |
24 |
0 |
0 |
GntImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
879581 |
0 |
0 |
T1 |
2071 |
35 |
0 |
0 |
T2 |
13197 |
44 |
0 |
0 |
T3 |
3524 |
36 |
0 |
0 |
T7 |
13369 |
51 |
0 |
0 |
T8 |
3945 |
137 |
0 |
0 |
T9 |
2006 |
51 |
0 |
0 |
T10 |
1411 |
49 |
0 |
0 |
T11 |
27495 |
378 |
0 |
0 |
T12 |
18102 |
790 |
0 |
0 |
T13 |
4146 |
24 |
0 |
0 |
GrantKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IdxKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
IndexIsCorrect_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
879581 |
0 |
0 |
T1 |
2071 |
35 |
0 |
0 |
T2 |
13197 |
44 |
0 |
0 |
T3 |
3524 |
36 |
0 |
0 |
T7 |
13369 |
51 |
0 |
0 |
T8 |
3945 |
137 |
0 |
0 |
T9 |
2006 |
51 |
0 |
0 |
T10 |
1411 |
49 |
0 |
0 |
T11 |
27495 |
378 |
0 |
0 |
T12 |
18102 |
790 |
0 |
0 |
T13 |
4146 |
24 |
0 |
0 |
LockArbDecision_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
NoReadyValidNoGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
361600352 |
0 |
0 |
T1 |
2071 |
1 |
0 |
0 |
T2 |
13197 |
11464 |
0 |
0 |
T3 |
3524 |
2904 |
0 |
0 |
T7 |
13369 |
11631 |
0 |
0 |
T8 |
3945 |
1 |
0 |
0 |
T9 |
2006 |
1 |
0 |
0 |
T10 |
1411 |
1 |
0 |
0 |
T11 |
27495 |
22405 |
0 |
0 |
T12 |
18102 |
1 |
0 |
0 |
T13 |
4146 |
3571 |
0 |
0 |
ReadyAndValidImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
879581 |
0 |
0 |
T1 |
2071 |
35 |
0 |
0 |
T2 |
13197 |
44 |
0 |
0 |
T3 |
3524 |
36 |
0 |
0 |
T7 |
13369 |
51 |
0 |
0 |
T8 |
3945 |
137 |
0 |
0 |
T9 |
2006 |
51 |
0 |
0 |
T10 |
1411 |
49 |
0 |
0 |
T11 |
27495 |
378 |
0 |
0 |
T12 |
18102 |
790 |
0 |
0 |
T13 |
4146 |
24 |
0 |
0 |
ReqAndReadyImplyGrant_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
879581 |
0 |
0 |
T1 |
2071 |
35 |
0 |
0 |
T2 |
13197 |
44 |
0 |
0 |
T3 |
3524 |
36 |
0 |
0 |
T7 |
13369 |
51 |
0 |
0 |
T8 |
3945 |
137 |
0 |
0 |
T9 |
2006 |
51 |
0 |
0 |
T10 |
1411 |
49 |
0 |
0 |
T11 |
27495 |
378 |
0 |
0 |
T12 |
18102 |
790 |
0 |
0 |
T13 |
4146 |
24 |
0 |
0 |
ReqImpliesValid_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
13194397 |
0 |
0 |
T1 |
2071 |
35 |
0 |
0 |
T2 |
13197 |
406 |
0 |
0 |
T3 |
3524 |
322 |
0 |
0 |
T7 |
13369 |
464 |
0 |
0 |
T8 |
3945 |
137 |
0 |
0 |
T9 |
2006 |
51 |
0 |
0 |
T10 |
1411 |
49 |
0 |
0 |
T11 |
27495 |
2937 |
0 |
0 |
T12 |
18102 |
790 |
0 |
0 |
T13 |
4146 |
168 |
0 |
0 |
ReqStaysHighUntilGranted0_M
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
0 |
0 |
0 |
RoundRobin_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
26394 |
0 |
900 |
T12 |
18102 |
15 |
0 |
1 |
T13 |
4146 |
0 |
0 |
1 |
T14 |
64695 |
0 |
0 |
1 |
T15 |
13704 |
10 |
0 |
1 |
T16 |
63818 |
0 |
0 |
1 |
T17 |
130671 |
1 |
0 |
1 |
T18 |
0 |
7 |
0 |
0 |
T19 |
0 |
1 |
0 |
0 |
T20 |
0 |
2 |
0 |
0 |
T21 |
0 |
2 |
0 |
0 |
T22 |
0 |
2 |
0 |
0 |
T23 |
0 |
2 |
0 |
0 |
T24 |
0 |
15 |
0 |
0 |
T25 |
179815 |
0 |
0 |
1 |
T26 |
2685 |
0 |
0 |
1 |
T27 |
2929 |
0 |
0 |
1 |
T28 |
12167 |
0 |
0 |
1 |
ValidKnown_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
430092490 |
0 |
0 |
T1 |
2071 |
2020 |
0 |
0 |
T2 |
13197 |
13140 |
0 |
0 |
T3 |
3524 |
3502 |
0 |
0 |
T7 |
13369 |
13253 |
0 |
0 |
T8 |
3945 |
3905 |
0 |
0 |
T9 |
2006 |
1961 |
0 |
0 |
T10 |
1411 |
1405 |
0 |
0 |
T11 |
27495 |
27482 |
0 |
0 |
T12 |
18102 |
18052 |
0 |
0 |
T13 |
4146 |
4090 |
0 |
0 |
gen_data_port_assertion.DataFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
430217806 |
879581 |
0 |
0 |
T1 |
2071 |
35 |
0 |
0 |
T2 |
13197 |
44 |
0 |
0 |
T3 |
3524 |
36 |
0 |
0 |
T7 |
13369 |
51 |
0 |
0 |
T8 |
3945 |
137 |
0 |
0 |
T9 |
2006 |
51 |
0 |
0 |
T10 |
1411 |
49 |
0 |
0 |
T11 |
27495 |
378 |
0 |
0 |
T12 |
18102 |
790 |
0 |
0 |
T13 |
4146 |
24 |
0 |
0 |