Line Coverage for Module :
flash_phy_rd_buf_dep
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 100.00 |
ALWAYS | 48 | 7 | 7 | 100.00 |
CONT_ASSIGN | 61 | 1 | 1 | 100.00 |
CONT_ASSIGN | 62 | 1 | 1 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
CONT_ASSIGN | 66 | 1 | 1 | 100.00 |
CONT_ASSIGN | 71 | 1 | 1 | 100.00 |
CONT_ASSIGN | 72 | 1 | 1 | 100.00 |
ALWAYS | 76 | 6 | 6 | 100.00 |
ALWAYS | 90 | 3 | 3 | 100.00 |
CONT_ASSIGN | 97 | 1 | 1 | 100.00 |
ALWAYS | 116 | 0 | 0 | |
47 always_comb begin
48 1/1 incr_buf_sel = '0;
Tests: T1 T2 T3
49 1/1 decr_buf_sel = '0;
Tests: T1 T2 T3
50 1/1 for (int unsigned i = 0; i < NumBuf; i++) begin
Tests: T1 T2 T3
51 1/1 if (wr_buf_i[i]) begin
Tests: T1 T2 T3
52 1/1 incr_buf_sel = buf_mux_cnt[i];
Tests: T1 T3 T5
53 end
MISSING_ELSE
54 1/1 if (rd_buf_i[i]) begin
Tests: T1 T2 T3
55 1/1 decr_buf_sel = buf_mux_cnt[i];
Tests: T1 T3 T5
56 end
MISSING_ELSE
57 end
58 end // always_comb
59
60 logic [BufDepCntWidth-1:0] curr_incr_cnt, curr_decr_cnt;
61 1/1 assign curr_incr_cnt = buf_dependency_cnt[incr_buf_sel];
Tests: T1 T2 T3
62 1/1 assign curr_decr_cnt = buf_dependency_cnt[decr_buf_sel];
Tests: T1 T2 T3
63
64 logic cnt_incr, cnt_decr;
65 1/1 assign cnt_incr = en_i & fifo_wr_i & (curr_incr_cnt < RspOrderDepth);
Tests: T1 T2 T3
66 1/1 assign cnt_decr = en_i & fifo_rd_i & (curr_decr_cnt > '0);
Tests: T1 T2 T3
67
68 //assign cnt_decr = fifo_rd_i & (rsp_fifo_vld & data_valid_o) & (curr_decr_cnt > '0);
69
70 logic fin_cnt_incr, fin_cnt_decr;
71 1/1 assign fin_cnt_incr = (incr_buf_sel == decr_buf_sel) ? cnt_incr && !cnt_decr : cnt_incr;
Tests: T1 T2 T3
72 1/1 assign fin_cnt_decr = (incr_buf_sel == decr_buf_sel) ? !cnt_incr && cnt_decr : cnt_decr;
Tests: T1 T2 T3
73
74 // This tells us which buffer currently has a dependency to an item in the rsp_order_fifo
75 always_ff @(posedge clk_i or negedge rst_ni) begin
76 1/1 if (!rst_ni) begin
Tests: T1 T2 T3
77 1/1 buf_dependency_cnt <= '0;
Tests: T1 T2 T3
78 end else begin
79 1/1 if (fin_cnt_incr) begin
Tests: T1 T2 T3
80 1/1 buf_dependency_cnt[incr_buf_sel] <= curr_incr_cnt + 1'b1;
Tests: T1 T3 T5
81 end
MISSING_ELSE
82 1/1 if (fin_cnt_decr) begin
Tests: T1 T2 T3
83 1/1 buf_dependency_cnt[decr_buf_sel] <= curr_decr_cnt - 1'b1;
Tests: T1 T3 T5
84 end
MISSING_ELSE
85 end
86 end
87
88 // per buffer dependency determination
89 always_comb begin
90 1/1 dependency_o = '0;
Tests: T1 T2 T3
91 1/1 for (int i = 0; i < NumBuf; i++) begin
Tests: T1 T2 T3
92 1/1 dependency_o[i] = |buf_dependency_cnt[i];
Tests: T1 T2 T3
93 end
94 end
95
96 // all buffer entries currently have a dependency
97 1/1 assign all_dependency_o = &dependency_o;
Tests: T1 T2 T3
98
99
100 // If there are more buffers than there are number of response fifo entries, we an never have
101 // a fully dependent condition
102 `ASSERT(BufferDepRsp_A, NumBuf > RspOrderDepth |-> ~all_dependency_o)
103
104 // We should never attempt to increment when at max value
105 `ASSERT(BufferIncrOverFlow_A, en_i & fifo_wr_i |-> curr_incr_cnt < RspOrderDepth)
106
107 // We should never attempt to decrement when at min value
108 `ASSERT(BufferDecrUnderRun_A, en_i & fifo_rd_i |-> (curr_decr_cnt > '0))
109
110 // The total number of dependent buffers cannot never exceed the size of response queue
111 `ifdef INC_ASSERT
112 //VCS coverage off
113 // pragma coverage off
114 logic [31:0] assert_cnt;
115 always_comb begin
116 unreachable assert_cnt = '0;
117 unreachable for (int unsigned i = 0; i < NumBuf; i++) begin
118 unreachable assert_cnt = assert_cnt + dependency_o[i];
Cond Coverage for Module :
flash_phy_rd_buf_dep
| Total | Covered | Percent |
Conditions | 22 | 19 | 86.36 |
Logical | 22 | 19 | 86.36 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (en_i & fifo_wr_i & (curr_incr_cnt < flash_phy_pkg::RspOrderDepth))
--1- ----2---- -----------------------3----------------------
-1- | -2- | -3- | Status | Tests |
0 | 1 | 1 | Covered | T1,T2,T3 |
1 | 0 | 1 | Covered | T1,T2,T3 |
1 | 1 | 0 | Not Covered | |
1 | 1 | 1 | Covered | T1,T3,T5 |
LINE 66
EXPRESSION (en_i & fifo_rd_i & (curr_decr_cnt > '0))
--1- ----2---- ----------3---------
-1- | -2- | -3- | Status | Tests |
0 | 1 | 1 | Not Covered | |
1 | 0 | 1 | Covered | T1,T3,T5 |
1 | 1 | 0 | Not Covered | |
1 | 1 | 1 | Covered | T1,T3,T5 |
LINE 71
EXPRESSION ((incr_buf_sel == decr_buf_sel) ? (cnt_incr && ((!cnt_decr))) : cnt_incr)
---------------1--------------
-1- | Status | Tests |
0 | Covered | T1,T3,T5 |
1 | Covered | T1,T2,T3 |
LINE 71
SUB-EXPRESSION (incr_buf_sel == decr_buf_sel)
---------------1--------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 71
SUB-EXPRESSION (cnt_incr && ((!cnt_decr)))
----1--- ------2------
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T5,T8,T9 |
1 | 1 | Covered | T1,T3,T5 |
LINE 72
EXPRESSION ((incr_buf_sel == decr_buf_sel) ? (((!cnt_incr)) && cnt_decr) : cnt_decr)
---------------1--------------
-1- | Status | Tests |
0 | Covered | T1,T3,T5 |
1 | Covered | T1,T2,T3 |
LINE 72
SUB-EXPRESSION (incr_buf_sel == decr_buf_sel)
---------------1--------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 72
SUB-EXPRESSION (((!cnt_incr)) && cnt_decr)
------1------ ----2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T5,T8,T9 |
1 | 0 | Covered | T1,T2,T3 |
1 | 1 | Covered | T1,T3,T5 |
Branch Coverage for Module :
flash_phy_rd_buf_dep
| Line No. | Total | Covered | Percent |
Branches |
|
13 |
13 |
100.00 |
TERNARY |
71 |
2 |
2 |
100.00 |
TERNARY |
72 |
2 |
2 |
100.00 |
IF |
51 |
2 |
2 |
100.00 |
IF |
54 |
2 |
2 |
100.00 |
IF |
76 |
5 |
5 |
100.00 |
71 assign fin_cnt_incr = (incr_buf_sel == decr_buf_sel) ? cnt_incr && !cnt_decr : cnt_incr;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T3,T5 |
72 assign fin_cnt_decr = (incr_buf_sel == decr_buf_sel) ? !cnt_incr && cnt_decr : cnt_decr;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T3,T5 |
51 if (wr_buf_i[i]) begin
-1-
52 incr_buf_sel = buf_mux_cnt[i];
==>
53 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T3,T5 |
0 |
Covered |
T1,T2,T3 |
54 if (rd_buf_i[i]) begin
-1-
55 decr_buf_sel = buf_mux_cnt[i];
==>
56 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T3,T5 |
0 |
Covered |
T1,T2,T3 |
76 if (!rst_ni) begin
-1-
77 buf_dependency_cnt <= '0;
==>
78 end else begin
79 if (fin_cnt_incr) begin
-2-
80 buf_dependency_cnt[incr_buf_sel] <= curr_incr_cnt + 1'b1;
==>
81 end
MISSING_ELSE
==>
82 if (fin_cnt_decr) begin
-3-
83 buf_dependency_cnt[decr_buf_sel] <= curr_decr_cnt - 1'b1;
==>
84 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T3,T5 |
0 |
0 |
- |
Covered |
T1,T2,T3 |
0 |
- |
1 |
Covered |
T1,T3,T5 |
0 |
- |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Module :
flash_phy_rd_buf_dep
Assertion Details
BufferDecrUnderRun_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
782353384 |
6556242 |
0 |
0 |
T1 |
2070 |
146 |
0 |
0 |
T2 |
3480 |
0 |
0 |
0 |
T3 |
1887 |
146 |
0 |
0 |
T4 |
4370 |
0 |
0 |
0 |
T5 |
677 |
8 |
0 |
0 |
T6 |
1297 |
0 |
0 |
0 |
T8 |
90426 |
948 |
0 |
0 |
T9 |
2812 |
10 |
0 |
0 |
T10 |
4248 |
20 |
0 |
0 |
T11 |
493 |
9 |
0 |
0 |
T12 |
0 |
63 |
0 |
0 |
T16 |
3082 |
0 |
0 |
0 |
T17 |
3250 |
0 |
0 |
0 |
T22 |
0 |
500 |
0 |
0 |
T25 |
5313 |
242 |
0 |
0 |
T30 |
0 |
538 |
0 |
0 |
T31 |
1776 |
71 |
0 |
0 |
T48 |
0 |
252 |
0 |
0 |
T61 |
0 |
6 |
0 |
0 |
T62 |
1074 |
0 |
0 |
0 |
T67 |
0 |
921 |
0 |
0 |
BufferDepRsp_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
782353384 |
780728340 |
0 |
0 |
T1 |
4140 |
3940 |
0 |
0 |
T2 |
6960 |
6762 |
0 |
0 |
T3 |
3774 |
3644 |
0 |
0 |
T4 |
8740 |
7824 |
0 |
0 |
T5 |
1354 |
1158 |
0 |
0 |
T8 |
90426 |
90302 |
0 |
0 |
T9 |
2812 |
2636 |
0 |
0 |
T10 |
4248 |
4092 |
0 |
0 |
T16 |
3082 |
2942 |
0 |
0 |
T17 |
3250 |
3084 |
0 |
0 |
BufferIncrOverFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
782353384 |
6556256 |
0 |
0 |
T1 |
2070 |
146 |
0 |
0 |
T2 |
3480 |
0 |
0 |
0 |
T3 |
1887 |
146 |
0 |
0 |
T4 |
4370 |
0 |
0 |
0 |
T5 |
677 |
8 |
0 |
0 |
T6 |
1297 |
0 |
0 |
0 |
T8 |
90426 |
948 |
0 |
0 |
T9 |
2812 |
10 |
0 |
0 |
T10 |
4248 |
20 |
0 |
0 |
T11 |
493 |
10 |
0 |
0 |
T12 |
0 |
63 |
0 |
0 |
T16 |
3082 |
0 |
0 |
0 |
T17 |
3250 |
0 |
0 |
0 |
T22 |
0 |
500 |
0 |
0 |
T25 |
5313 |
242 |
0 |
0 |
T30 |
0 |
538 |
0 |
0 |
T31 |
1776 |
71 |
0 |
0 |
T48 |
0 |
252 |
0 |
0 |
T61 |
0 |
6 |
0 |
0 |
T62 |
1074 |
0 |
0 |
0 |
T67 |
0 |
921 |
0 |
0 |
DepBufferRspOrder_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
782353386 |
16464359 |
0 |
0 |
T1 |
2070 |
178 |
0 |
0 |
T2 |
3480 |
32 |
0 |
0 |
T3 |
1887 |
178 |
0 |
0 |
T4 |
4370 |
192 |
0 |
0 |
T5 |
677 |
40 |
0 |
0 |
T6 |
1297 |
0 |
0 |
0 |
T8 |
90426 |
980 |
0 |
0 |
T9 |
2812 |
42 |
0 |
0 |
T10 |
4248 |
52 |
0 |
0 |
T11 |
493 |
4 |
0 |
0 |
T12 |
0 |
63 |
0 |
0 |
T16 |
3082 |
32 |
0 |
0 |
T17 |
3250 |
32 |
0 |
0 |
T22 |
0 |
200 |
0 |
0 |
T25 |
5313 |
39 |
0 |
0 |
T30 |
0 |
538 |
0 |
0 |
T31 |
1776 |
8 |
0 |
0 |
T48 |
0 |
252 |
0 |
0 |
T61 |
0 |
6 |
0 |
0 |
T62 |
1074 |
0 |
0 |
0 |
T67 |
0 |
921 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_eflash.gen_flash_cores[0].u_core.u_rd.u_rd_buf_dep
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 100.00 |
ALWAYS | 48 | 7 | 7 | 100.00 |
CONT_ASSIGN | 61 | 1 | 1 | 100.00 |
CONT_ASSIGN | 62 | 1 | 1 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
CONT_ASSIGN | 66 | 1 | 1 | 100.00 |
CONT_ASSIGN | 71 | 1 | 1 | 100.00 |
CONT_ASSIGN | 72 | 1 | 1 | 100.00 |
ALWAYS | 76 | 6 | 6 | 100.00 |
ALWAYS | 90 | 3 | 3 | 100.00 |
CONT_ASSIGN | 97 | 1 | 1 | 100.00 |
ALWAYS | 116 | 0 | 0 | |
47 always_comb begin
48 1/1 incr_buf_sel = '0;
Tests: T1 T2 T3
49 1/1 decr_buf_sel = '0;
Tests: T1 T2 T3
50 1/1 for (int unsigned i = 0; i < NumBuf; i++) begin
Tests: T1 T2 T3
51 1/1 if (wr_buf_i[i]) begin
Tests: T1 T2 T3
52 1/1 incr_buf_sel = buf_mux_cnt[i];
Tests: T1 T3 T5
53 end
MISSING_ELSE
54 1/1 if (rd_buf_i[i]) begin
Tests: T1 T2 T3
55 1/1 decr_buf_sel = buf_mux_cnt[i];
Tests: T1 T3 T5
56 end
MISSING_ELSE
57 end
58 end // always_comb
59
60 logic [BufDepCntWidth-1:0] curr_incr_cnt, curr_decr_cnt;
61 1/1 assign curr_incr_cnt = buf_dependency_cnt[incr_buf_sel];
Tests: T1 T2 T3
62 1/1 assign curr_decr_cnt = buf_dependency_cnt[decr_buf_sel];
Tests: T1 T2 T3
63
64 logic cnt_incr, cnt_decr;
65 1/1 assign cnt_incr = en_i & fifo_wr_i & (curr_incr_cnt < RspOrderDepth);
Tests: T1 T2 T3
66 1/1 assign cnt_decr = en_i & fifo_rd_i & (curr_decr_cnt > '0);
Tests: T1 T2 T3
67
68 //assign cnt_decr = fifo_rd_i & (rsp_fifo_vld & data_valid_o) & (curr_decr_cnt > '0);
69
70 logic fin_cnt_incr, fin_cnt_decr;
71 1/1 assign fin_cnt_incr = (incr_buf_sel == decr_buf_sel) ? cnt_incr && !cnt_decr : cnt_incr;
Tests: T1 T2 T3
72 1/1 assign fin_cnt_decr = (incr_buf_sel == decr_buf_sel) ? !cnt_incr && cnt_decr : cnt_decr;
Tests: T1 T2 T3
73
74 // This tells us which buffer currently has a dependency to an item in the rsp_order_fifo
75 always_ff @(posedge clk_i or negedge rst_ni) begin
76 1/1 if (!rst_ni) begin
Tests: T1 T2 T3
77 1/1 buf_dependency_cnt <= '0;
Tests: T1 T2 T3
78 end else begin
79 1/1 if (fin_cnt_incr) begin
Tests: T1 T2 T3
80 1/1 buf_dependency_cnt[incr_buf_sel] <= curr_incr_cnt + 1'b1;
Tests: T1 T3 T5
81 end
MISSING_ELSE
82 1/1 if (fin_cnt_decr) begin
Tests: T1 T2 T3
83 1/1 buf_dependency_cnt[decr_buf_sel] <= curr_decr_cnt - 1'b1;
Tests: T1 T3 T5
84 end
MISSING_ELSE
85 end
86 end
87
88 // per buffer dependency determination
89 always_comb begin
90 1/1 dependency_o = '0;
Tests: T1 T2 T3
91 1/1 for (int i = 0; i < NumBuf; i++) begin
Tests: T1 T2 T3
92 1/1 dependency_o[i] = |buf_dependency_cnt[i];
Tests: T1 T2 T3
93 end
94 end
95
96 // all buffer entries currently have a dependency
97 1/1 assign all_dependency_o = &dependency_o;
Tests: T1 T2 T3
98
99
100 // If there are more buffers than there are number of response fifo entries, we an never have
101 // a fully dependent condition
102 `ASSERT(BufferDepRsp_A, NumBuf > RspOrderDepth |-> ~all_dependency_o)
103
104 // We should never attempt to increment when at max value
105 `ASSERT(BufferIncrOverFlow_A, en_i & fifo_wr_i |-> curr_incr_cnt < RspOrderDepth)
106
107 // We should never attempt to decrement when at min value
108 `ASSERT(BufferDecrUnderRun_A, en_i & fifo_rd_i |-> (curr_decr_cnt > '0))
109
110 // The total number of dependent buffers cannot never exceed the size of response queue
111 `ifdef INC_ASSERT
112 //VCS coverage off
113 // pragma coverage off
114 logic [31:0] assert_cnt;
115 always_comb begin
116 unreachable assert_cnt = '0;
117 unreachable for (int unsigned i = 0; i < NumBuf; i++) begin
118 unreachable assert_cnt = assert_cnt + dependency_o[i];
Cond Coverage for Instance : tb.dut.u_eflash.gen_flash_cores[0].u_core.u_rd.u_rd_buf_dep
| Total | Covered | Percent |
Conditions | 22 | 19 | 86.36 |
Logical | 22 | 19 | 86.36 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (en_i & fifo_wr_i & (curr_incr_cnt < flash_phy_pkg::RspOrderDepth))
--1- ----2---- -----------------------3----------------------
-1- | -2- | -3- | Status | Tests |
0 | 1 | 1 | Covered | T1,T2,T3 |
1 | 0 | 1 | Covered | T1,T2,T3 |
1 | 1 | 0 | Not Covered | |
1 | 1 | 1 | Covered | T1,T3,T5 |
LINE 66
EXPRESSION (en_i & fifo_rd_i & (curr_decr_cnt > '0))
--1- ----2---- ----------3---------
-1- | -2- | -3- | Status | Tests |
0 | 1 | 1 | Not Covered | |
1 | 0 | 1 | Covered | T1,T3,T5 |
1 | 1 | 0 | Not Covered | |
1 | 1 | 1 | Covered | T1,T3,T5 |
LINE 71
EXPRESSION ((incr_buf_sel == decr_buf_sel) ? (cnt_incr && ((!cnt_decr))) : cnt_incr)
---------------1--------------
-1- | Status | Tests |
0 | Covered | T1,T3,T5 |
1 | Covered | T1,T2,T3 |
LINE 71
SUB-EXPRESSION (incr_buf_sel == decr_buf_sel)
---------------1--------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 71
SUB-EXPRESSION (cnt_incr && ((!cnt_decr)))
----1--- ------2------
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T5,T8,T9 |
1 | 1 | Covered | T1,T3,T5 |
LINE 72
EXPRESSION ((incr_buf_sel == decr_buf_sel) ? (((!cnt_incr)) && cnt_decr) : cnt_decr)
---------------1--------------
-1- | Status | Tests |
0 | Covered | T1,T3,T5 |
1 | Covered | T1,T2,T3 |
LINE 72
SUB-EXPRESSION (incr_buf_sel == decr_buf_sel)
---------------1--------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 72
SUB-EXPRESSION (((!cnt_incr)) && cnt_decr)
------1------ ----2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T5,T8,T9 |
1 | 0 | Covered | T1,T2,T3 |
1 | 1 | Covered | T1,T3,T5 |
Branch Coverage for Instance : tb.dut.u_eflash.gen_flash_cores[0].u_core.u_rd.u_rd_buf_dep
| Line No. | Total | Covered | Percent |
Branches |
|
13 |
13 |
100.00 |
TERNARY |
71 |
2 |
2 |
100.00 |
TERNARY |
72 |
2 |
2 |
100.00 |
IF |
51 |
2 |
2 |
100.00 |
IF |
54 |
2 |
2 |
100.00 |
IF |
76 |
5 |
5 |
100.00 |
71 assign fin_cnt_incr = (incr_buf_sel == decr_buf_sel) ? cnt_incr && !cnt_decr : cnt_incr;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T3,T5 |
72 assign fin_cnt_decr = (incr_buf_sel == decr_buf_sel) ? !cnt_incr && cnt_decr : cnt_decr;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T1,T3,T5 |
51 if (wr_buf_i[i]) begin
-1-
52 incr_buf_sel = buf_mux_cnt[i];
==>
53 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T3,T5 |
0 |
Covered |
T1,T2,T3 |
54 if (rd_buf_i[i]) begin
-1-
55 decr_buf_sel = buf_mux_cnt[i];
==>
56 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T3,T5 |
0 |
Covered |
T1,T2,T3 |
76 if (!rst_ni) begin
-1-
77 buf_dependency_cnt <= '0;
==>
78 end else begin
79 if (fin_cnt_incr) begin
-2-
80 buf_dependency_cnt[incr_buf_sel] <= curr_incr_cnt + 1'b1;
==>
81 end
MISSING_ELSE
==>
82 if (fin_cnt_decr) begin
-3-
83 buf_dependency_cnt[decr_buf_sel] <= curr_decr_cnt - 1'b1;
==>
84 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T3,T5 |
0 |
0 |
- |
Covered |
T1,T2,T3 |
0 |
- |
1 |
Covered |
T1,T3,T5 |
0 |
- |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_eflash.gen_flash_cores[0].u_core.u_rd.u_rd_buf_dep
Assertion Details
BufferDecrUnderRun_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
391176692 |
3604407 |
0 |
0 |
T1 |
2070 |
146 |
0 |
0 |
T2 |
3480 |
0 |
0 |
0 |
T3 |
1887 |
146 |
0 |
0 |
T4 |
4370 |
0 |
0 |
0 |
T5 |
677 |
8 |
0 |
0 |
T8 |
45213 |
556 |
0 |
0 |
T9 |
1406 |
10 |
0 |
0 |
T10 |
2124 |
20 |
0 |
0 |
T11 |
0 |
5 |
0 |
0 |
T16 |
1541 |
0 |
0 |
0 |
T17 |
1625 |
0 |
0 |
0 |
T22 |
0 |
300 |
0 |
0 |
T25 |
0 |
203 |
0 |
0 |
T31 |
0 |
63 |
0 |
0 |
BufferDepRsp_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
391176692 |
390364170 |
0 |
0 |
T1 |
2070 |
1970 |
0 |
0 |
T2 |
3480 |
3381 |
0 |
0 |
T3 |
1887 |
1822 |
0 |
0 |
T4 |
4370 |
3912 |
0 |
0 |
T5 |
677 |
579 |
0 |
0 |
T8 |
45213 |
45151 |
0 |
0 |
T9 |
1406 |
1318 |
0 |
0 |
T10 |
2124 |
2046 |
0 |
0 |
T16 |
1541 |
1471 |
0 |
0 |
T17 |
1625 |
1542 |
0 |
0 |
BufferIncrOverFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
391176692 |
3604413 |
0 |
0 |
T1 |
2070 |
146 |
0 |
0 |
T2 |
3480 |
0 |
0 |
0 |
T3 |
1887 |
146 |
0 |
0 |
T4 |
4370 |
0 |
0 |
0 |
T5 |
677 |
8 |
0 |
0 |
T8 |
45213 |
556 |
0 |
0 |
T9 |
1406 |
10 |
0 |
0 |
T10 |
2124 |
20 |
0 |
0 |
T11 |
0 |
6 |
0 |
0 |
T16 |
1541 |
0 |
0 |
0 |
T17 |
1625 |
0 |
0 |
0 |
T22 |
0 |
300 |
0 |
0 |
T25 |
0 |
203 |
0 |
0 |
T31 |
0 |
63 |
0 |
0 |
DepBufferRspOrder_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
391176692 |
8965155 |
0 |
0 |
T1 |
2070 |
178 |
0 |
0 |
T2 |
3480 |
32 |
0 |
0 |
T3 |
1887 |
178 |
0 |
0 |
T4 |
4370 |
192 |
0 |
0 |
T5 |
677 |
40 |
0 |
0 |
T8 |
45213 |
588 |
0 |
0 |
T9 |
1406 |
42 |
0 |
0 |
T10 |
2124 |
52 |
0 |
0 |
T16 |
1541 |
32 |
0 |
0 |
T17 |
1625 |
32 |
0 |
0 |
Line Coverage for Instance : tb.dut.u_eflash.gen_flash_cores[1].u_core.u_rd.u_rd_buf_dep
| Line No. | Total | Covered | Percent |
TOTAL | | 23 | 23 | 100.00 |
ALWAYS | 48 | 7 | 7 | 100.00 |
CONT_ASSIGN | 61 | 1 | 1 | 100.00 |
CONT_ASSIGN | 62 | 1 | 1 | 100.00 |
CONT_ASSIGN | 65 | 1 | 1 | 100.00 |
CONT_ASSIGN | 66 | 1 | 1 | 100.00 |
CONT_ASSIGN | 71 | 1 | 1 | 100.00 |
CONT_ASSIGN | 72 | 1 | 1 | 100.00 |
ALWAYS | 76 | 6 | 6 | 100.00 |
ALWAYS | 90 | 3 | 3 | 100.00 |
CONT_ASSIGN | 97 | 1 | 1 | 100.00 |
ALWAYS | 116 | 0 | 0 | |
47 always_comb begin
48 1/1 incr_buf_sel = '0;
Tests: T1 T2 T3
49 1/1 decr_buf_sel = '0;
Tests: T1 T2 T3
50 1/1 for (int unsigned i = 0; i < NumBuf; i++) begin
Tests: T1 T2 T3
51 1/1 if (wr_buf_i[i]) begin
Tests: T1 T2 T3
52 1/1 incr_buf_sel = buf_mux_cnt[i];
Tests: T8 T31 T25
53 end
MISSING_ELSE
54 1/1 if (rd_buf_i[i]) begin
Tests: T1 T2 T3
55 1/1 decr_buf_sel = buf_mux_cnt[i];
Tests: T8 T31 T25
56 end
MISSING_ELSE
57 end
58 end // always_comb
59
60 logic [BufDepCntWidth-1:0] curr_incr_cnt, curr_decr_cnt;
61 1/1 assign curr_incr_cnt = buf_dependency_cnt[incr_buf_sel];
Tests: T1 T2 T3
62 1/1 assign curr_decr_cnt = buf_dependency_cnt[decr_buf_sel];
Tests: T1 T2 T3
63
64 logic cnt_incr, cnt_decr;
65 1/1 assign cnt_incr = en_i & fifo_wr_i & (curr_incr_cnt < RspOrderDepth);
Tests: T1 T2 T3
66 1/1 assign cnt_decr = en_i & fifo_rd_i & (curr_decr_cnt > '0);
Tests: T1 T2 T3
67
68 //assign cnt_decr = fifo_rd_i & (rsp_fifo_vld & data_valid_o) & (curr_decr_cnt > '0);
69
70 logic fin_cnt_incr, fin_cnt_decr;
71 1/1 assign fin_cnt_incr = (incr_buf_sel == decr_buf_sel) ? cnt_incr && !cnt_decr : cnt_incr;
Tests: T1 T2 T3
72 1/1 assign fin_cnt_decr = (incr_buf_sel == decr_buf_sel) ? !cnt_incr && cnt_decr : cnt_decr;
Tests: T1 T2 T3
73
74 // This tells us which buffer currently has a dependency to an item in the rsp_order_fifo
75 always_ff @(posedge clk_i or negedge rst_ni) begin
76 1/1 if (!rst_ni) begin
Tests: T1 T2 T3
77 1/1 buf_dependency_cnt <= '0;
Tests: T1 T2 T3
78 end else begin
79 1/1 if (fin_cnt_incr) begin
Tests: T1 T2 T3
80 1/1 buf_dependency_cnt[incr_buf_sel] <= curr_incr_cnt + 1'b1;
Tests: T8 T31 T25
81 end
MISSING_ELSE
82 1/1 if (fin_cnt_decr) begin
Tests: T1 T2 T3
83 1/1 buf_dependency_cnt[decr_buf_sel] <= curr_decr_cnt - 1'b1;
Tests: T8 T31 T25
84 end
MISSING_ELSE
85 end
86 end
87
88 // per buffer dependency determination
89 always_comb begin
90 1/1 dependency_o = '0;
Tests: T1 T2 T3
91 1/1 for (int i = 0; i < NumBuf; i++) begin
Tests: T1 T2 T3
92 1/1 dependency_o[i] = |buf_dependency_cnt[i];
Tests: T1 T2 T3
93 end
94 end
95
96 // all buffer entries currently have a dependency
97 1/1 assign all_dependency_o = &dependency_o;
Tests: T1 T2 T3
98
99
100 // If there are more buffers than there are number of response fifo entries, we an never have
101 // a fully dependent condition
102 `ASSERT(BufferDepRsp_A, NumBuf > RspOrderDepth |-> ~all_dependency_o)
103
104 // We should never attempt to increment when at max value
105 `ASSERT(BufferIncrOverFlow_A, en_i & fifo_wr_i |-> curr_incr_cnt < RspOrderDepth)
106
107 // We should never attempt to decrement when at min value
108 `ASSERT(BufferDecrUnderRun_A, en_i & fifo_rd_i |-> (curr_decr_cnt > '0))
109
110 // The total number of dependent buffers cannot never exceed the size of response queue
111 `ifdef INC_ASSERT
112 //VCS coverage off
113 // pragma coverage off
114 logic [31:0] assert_cnt;
115 always_comb begin
116 unreachable assert_cnt = '0;
117 unreachable for (int unsigned i = 0; i < NumBuf; i++) begin
118 unreachable assert_cnt = assert_cnt + dependency_o[i];
Cond Coverage for Instance : tb.dut.u_eflash.gen_flash_cores[1].u_core.u_rd.u_rd_buf_dep
| Total | Covered | Percent |
Conditions | 22 | 19 | 86.36 |
Logical | 22 | 19 | 86.36 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 65
EXPRESSION (en_i & fifo_wr_i & (curr_incr_cnt < flash_phy_pkg::RspOrderDepth))
--1- ----2---- -----------------------3----------------------
-1- | -2- | -3- | Status | Tests |
0 | 1 | 1 | Covered | T144,T105,T141 |
1 | 0 | 1 | Covered | T1,T2,T3 |
1 | 1 | 0 | Not Covered | |
1 | 1 | 1 | Covered | T8,T31,T25 |
LINE 66
EXPRESSION (en_i & fifo_rd_i & (curr_decr_cnt > '0))
--1- ----2---- ----------3---------
-1- | -2- | -3- | Status | Tests |
0 | 1 | 1 | Not Covered | |
1 | 0 | 1 | Covered | T8,T31,T25 |
1 | 1 | 0 | Not Covered | |
1 | 1 | 1 | Covered | T8,T31,T25 |
LINE 71
EXPRESSION ((incr_buf_sel == decr_buf_sel) ? (cnt_incr && ((!cnt_decr))) : cnt_incr)
---------------1--------------
-1- | Status | Tests |
0 | Covered | T8,T31,T25 |
1 | Covered | T1,T2,T3 |
LINE 71
SUB-EXPRESSION (incr_buf_sel == decr_buf_sel)
---------------1--------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 71
SUB-EXPRESSION (cnt_incr && ((!cnt_decr)))
----1--- ------2------
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T8,T22,T12 |
1 | 1 | Covered | T8,T31,T25 |
LINE 72
EXPRESSION ((incr_buf_sel == decr_buf_sel) ? (((!cnt_incr)) && cnt_decr) : cnt_decr)
---------------1--------------
-1- | Status | Tests |
0 | Covered | T8,T31,T25 |
1 | Covered | T1,T2,T3 |
LINE 72
SUB-EXPRESSION (incr_buf_sel == decr_buf_sel)
---------------1--------------
-1- | Status | Tests |
0 | Covered | T1,T2,T3 |
1 | Covered | T1,T2,T3 |
LINE 72
SUB-EXPRESSION (((!cnt_incr)) && cnt_decr)
------1------ ----2---
-1- | -2- | Status | Tests |
0 | 1 | Covered | T8,T22,T12 |
1 | 0 | Covered | T1,T2,T3 |
1 | 1 | Covered | T8,T31,T25 |
Branch Coverage for Instance : tb.dut.u_eflash.gen_flash_cores[1].u_core.u_rd.u_rd_buf_dep
| Line No. | Total | Covered | Percent |
Branches |
|
13 |
13 |
100.00 |
TERNARY |
71 |
2 |
2 |
100.00 |
TERNARY |
72 |
2 |
2 |
100.00 |
IF |
51 |
2 |
2 |
100.00 |
IF |
54 |
2 |
2 |
100.00 |
IF |
76 |
5 |
5 |
100.00 |
71 assign fin_cnt_incr = (incr_buf_sel == decr_buf_sel) ? cnt_incr && !cnt_decr : cnt_incr;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T8,T31,T25 |
72 assign fin_cnt_decr = (incr_buf_sel == decr_buf_sel) ? !cnt_incr && cnt_decr : cnt_decr;
-1-
==>
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T1,T2,T3 |
0 |
Covered |
T8,T31,T25 |
51 if (wr_buf_i[i]) begin
-1-
52 incr_buf_sel = buf_mux_cnt[i];
==>
53 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T8,T31,T25 |
0 |
Covered |
T1,T2,T3 |
54 if (rd_buf_i[i]) begin
-1-
55 decr_buf_sel = buf_mux_cnt[i];
==>
56 end
MISSING_ELSE
==>
Branches:
-1- | Status | Tests |
1 |
Covered |
T8,T31,T25 |
0 |
Covered |
T1,T2,T3 |
76 if (!rst_ni) begin
-1-
77 buf_dependency_cnt <= '0;
==>
78 end else begin
79 if (fin_cnt_incr) begin
-2-
80 buf_dependency_cnt[incr_buf_sel] <= curr_incr_cnt + 1'b1;
==>
81 end
MISSING_ELSE
==>
82 if (fin_cnt_decr) begin
-3-
83 buf_dependency_cnt[decr_buf_sel] <= curr_decr_cnt - 1'b1;
==>
84 end
MISSING_ELSE
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T8,T31,T25 |
0 |
0 |
- |
Covered |
T1,T2,T3 |
0 |
- |
1 |
Covered |
T8,T31,T25 |
0 |
- |
0 |
Covered |
T1,T2,T3 |
Assert Coverage for Instance : tb.dut.u_eflash.gen_flash_cores[1].u_core.u_rd.u_rd_buf_dep
Assertion Details
BufferDecrUnderRun_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
391176692 |
2951835 |
0 |
0 |
T6 |
1297 |
0 |
0 |
0 |
T8 |
45213 |
392 |
0 |
0 |
T9 |
1406 |
0 |
0 |
0 |
T10 |
2124 |
0 |
0 |
0 |
T11 |
493 |
4 |
0 |
0 |
T12 |
0 |
63 |
0 |
0 |
T16 |
1541 |
0 |
0 |
0 |
T17 |
1625 |
0 |
0 |
0 |
T22 |
0 |
200 |
0 |
0 |
T25 |
5313 |
39 |
0 |
0 |
T30 |
0 |
538 |
0 |
0 |
T31 |
1776 |
8 |
0 |
0 |
T48 |
0 |
252 |
0 |
0 |
T61 |
0 |
6 |
0 |
0 |
T62 |
1074 |
0 |
0 |
0 |
T67 |
0 |
921 |
0 |
0 |
BufferDepRsp_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
391176692 |
390364170 |
0 |
0 |
T1 |
2070 |
1970 |
0 |
0 |
T2 |
3480 |
3381 |
0 |
0 |
T3 |
1887 |
1822 |
0 |
0 |
T4 |
4370 |
3912 |
0 |
0 |
T5 |
677 |
579 |
0 |
0 |
T8 |
45213 |
45151 |
0 |
0 |
T9 |
1406 |
1318 |
0 |
0 |
T10 |
2124 |
2046 |
0 |
0 |
T16 |
1541 |
1471 |
0 |
0 |
T17 |
1625 |
1542 |
0 |
0 |
BufferIncrOverFlow_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
391176692 |
2951843 |
0 |
0 |
T6 |
1297 |
0 |
0 |
0 |
T8 |
45213 |
392 |
0 |
0 |
T9 |
1406 |
0 |
0 |
0 |
T10 |
2124 |
0 |
0 |
0 |
T11 |
493 |
4 |
0 |
0 |
T12 |
0 |
63 |
0 |
0 |
T16 |
1541 |
0 |
0 |
0 |
T17 |
1625 |
0 |
0 |
0 |
T22 |
0 |
200 |
0 |
0 |
T25 |
5313 |
39 |
0 |
0 |
T30 |
0 |
538 |
0 |
0 |
T31 |
1776 |
8 |
0 |
0 |
T48 |
0 |
252 |
0 |
0 |
T61 |
0 |
6 |
0 |
0 |
T62 |
1074 |
0 |
0 |
0 |
T67 |
0 |
921 |
0 |
0 |
DepBufferRspOrder_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
391176694 |
7499204 |
0 |
0 |
T6 |
1297 |
0 |
0 |
0 |
T8 |
45213 |
392 |
0 |
0 |
T9 |
1406 |
0 |
0 |
0 |
T10 |
2124 |
0 |
0 |
0 |
T11 |
493 |
4 |
0 |
0 |
T12 |
0 |
63 |
0 |
0 |
T16 |
1541 |
0 |
0 |
0 |
T17 |
1625 |
0 |
0 |
0 |
T22 |
0 |
200 |
0 |
0 |
T25 |
5313 |
39 |
0 |
0 |
T30 |
0 |
538 |
0 |
0 |
T31 |
1776 |
8 |
0 |
0 |
T48 |
0 |
252 |
0 |
0 |
T61 |
0 |
6 |
0 |
0 |
T62 |
1074 |
0 |
0 |
0 |
T67 |
0 |
921 |
0 |
0 |