Line Coverage for Module :
prim_generic_ram_2p
| Line No. | Total | Covered | Percent |
TOTAL | | 21 | 21 | 100.00 |
CONT_ASSIGN | 49 | 1 | 1 | 100.00 |
CONT_ASSIGN | 60 | 1 | 1 | 100.00 |
CONT_ASSIGN | 60 | 1 | 1 | 100.00 |
CONT_ASSIGN | 60 | 1 | 1 | 100.00 |
CONT_ASSIGN | 60 | 1 | 1 | 100.00 |
CONT_ASSIGN | 61 | 1 | 1 | 100.00 |
CONT_ASSIGN | 61 | 1 | 1 | 100.00 |
CONT_ASSIGN | 61 | 1 | 1 | 100.00 |
CONT_ASSIGN | 61 | 1 | 1 | 100.00 |
ALWAYS | 76 | 6 | 6 | 100.00 |
ALWAYS | 91 | 6 | 6 | 100.00 |
48 logic unused_cfg;
49 1/1 assign unused_cfg = ^cfg_i;
Tests: T3
50
51 // Width of internal write mask. Note *_wmask_i input into the module is always assumed
52 // to be the full bit mask.
53 localparam int MaskWidth = Width / DataBitsPerMask;
54
55 logic [Width-1:0] mem [Depth];
56 logic [MaskWidth-1:0] a_wmask;
57 logic [MaskWidth-1:0] b_wmask;
58
59 for (genvar k = 0; k < MaskWidth; k++) begin : gen_wmask
60 4/4 assign a_wmask[k] = &a_wmask_i[k*DataBitsPerMask +: DataBitsPerMask];
Tests: T1 T2 T3 | T1 T2 T3 | T1 T2 T3 | T1 T2 T3
61 4/4 assign b_wmask[k] = &b_wmask_i[k*DataBitsPerMask +: DataBitsPerMask];
Tests: T1 T2 T3 | T1 T2 T3 | T1 T2 T3 | T1 T2 T3
62
63 // Ensure that all mask bits within a group have the same value for a write
64 `ASSERT(MaskCheckPortA_A, a_req_i && a_write_i |->
65 a_wmask_i[k*DataBitsPerMask +: DataBitsPerMask] inside {{DataBitsPerMask{1'b1}}, '0},
66 clk_a_i, '0)
67 `ASSERT(MaskCheckPortB_A, b_req_i && b_write_i |->
68 b_wmask_i[k*DataBitsPerMask +: DataBitsPerMask] inside {{DataBitsPerMask{1'b1}}, '0},
69 clk_b_i, '0)
70 end
71
72 // Xilinx FPGA specific Dual-port RAM coding style
73 // using always instead of always_ff to avoid 'ICPD - illegal combination of drivers' error
74 // thrown due to 'mem' being driven by two always processes below
75 always @(posedge clk_a_i) begin
76 1/1 if (a_req_i) begin
Tests: T1 T2 T3
77 1/1 if (a_write_i) begin
Tests: T2 T9 T10
78 1/1 for (int i=0; i < MaskWidth; i = i + 1) begin
Tests: T2 T9 T10
79 1/1 if (a_wmask[i]) begin
Tests: T2 T9 T10
80 1/1 mem[a_addr_i][i*DataBitsPerMask +: DataBitsPerMask] <=
Tests: T2 T9 T10
81 a_wdata_i[i*DataBitsPerMask +: DataBitsPerMask];
82 end
==> MISSING_ELSE
83 end
84 end else begin
85 1/1 a_rdata_o <= mem[a_addr_i];
Tests: T2 T9 T10
86 end
87 end
MISSING_ELSE
88 end
89
90 always @(posedge clk_b_i) begin
91 1/1 if (b_req_i) begin
Tests: T4 T8 T10
92 1/1 if (b_write_i) begin
Tests: T10 T11 T13
93 1/1 for (int i=0; i < MaskWidth; i = i + 1) begin
Tests: T10 T11 T26
94 1/1 if (b_wmask[i]) begin
Tests: T10 T11 T26
95 1/1 mem[b_addr_i][i*DataBitsPerMask +: DataBitsPerMask] <=
Tests: T10 T11 T26
96 b_wdata_i[i*DataBitsPerMask +: DataBitsPerMask];
97 end
MISSING_ELSE
98 end
99 end else begin
100 1/1 b_rdata_o <= mem[b_addr_i];
Tests: T10 T11 T13
101 end
102 end
MISSING_ELSE
Branch Coverage for Module :
prim_generic_ram_2p
| Line No. | Total | Covered | Percent |
Branches |
|
6 |
6 |
100.00 |
IF |
76 |
3 |
3 |
100.00 |
IF |
91 |
3 |
3 |
100.00 |
76 if (a_req_i) begin
-1-
77 if (a_write_i) begin
-2-
78 for (int i=0; i < MaskWidth; i = i + 1) begin
==>
79 if (a_wmask[i]) begin
80 mem[a_addr_i][i*DataBitsPerMask +: DataBitsPerMask] <=
81 a_wdata_i[i*DataBitsPerMask +: DataBitsPerMask];
82 end
83 end
84 end else begin
85 a_rdata_o <= mem[a_addr_i];
==>
86 end
87 end
MISSING_ELSE
==>
Branches:
-1- | -2- | Status | Tests |
1 |
1 |
Covered |
T2,T9,T10 |
1 |
0 |
Covered |
T2,T9,T10 |
0 |
- |
Covered |
T1,T2,T3 |
91 if (b_req_i) begin
-1-
92 if (b_write_i) begin
-2-
93 for (int i=0; i < MaskWidth; i = i + 1) begin
==>
94 if (b_wmask[i]) begin
95 mem[b_addr_i][i*DataBitsPerMask +: DataBitsPerMask] <=
96 b_wdata_i[i*DataBitsPerMask +: DataBitsPerMask];
97 end
98 end
99 end else begin
100 b_rdata_o <= mem[b_addr_i];
==>
101 end
102 end
MISSING_ELSE
==>
Branches:
-1- | -2- | Status | Tests |
1 |
1 |
Covered |
T10,T11,T26 |
1 |
0 |
Covered |
T10,T11,T13 |
0 |
- |
Covered |
T4,T8,T10 |
Assert Coverage for Module :
prim_generic_ram_2p
Assertion Details
gen_wmask[0].MaskCheckPortA_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
443673543 |
2119097 |
0 |
0 |
T2 |
1231 |
100 |
0 |
0 |
T3 |
1231 |
0 |
0 |
0 |
T4 |
8664 |
0 |
0 |
0 |
T5 |
984 |
0 |
0 |
0 |
T6 |
1927 |
0 |
0 |
0 |
T7 |
8259 |
0 |
0 |
0 |
T8 |
3152 |
0 |
0 |
0 |
T9 |
1273 |
100 |
0 |
0 |
T10 |
6964 |
17 |
0 |
0 |
T11 |
10787 |
51 |
0 |
0 |
T13 |
0 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T18 |
0 |
832 |
0 |
0 |
T19 |
0 |
832 |
0 |
0 |
T26 |
0 |
19 |
0 |
0 |
T39 |
0 |
100 |
0 |
0 |
gen_wmask[0].MaskCheckPortB_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153142285 |
1250654 |
0 |
0 |
T10 |
1399 |
41 |
0 |
0 |
T11 |
4313 |
215 |
0 |
0 |
T13 |
15838 |
0 |
0 |
0 |
T15 |
17941 |
0 |
0 |
0 |
T16 |
56586 |
0 |
0 |
0 |
T17 |
216 |
0 |
0 |
0 |
T18 |
18636 |
0 |
0 |
0 |
T19 |
125490 |
0 |
0 |
0 |
T20 |
62542 |
0 |
0 |
0 |
T26 |
1288 |
31 |
0 |
0 |
T28 |
0 |
5 |
0 |
0 |
T43 |
0 |
1393 |
0 |
0 |
T44 |
0 |
2247 |
0 |
0 |
T45 |
0 |
2472 |
0 |
0 |
T65 |
0 |
4 |
0 |
0 |
T83 |
0 |
98 |
0 |
0 |
T84 |
0 |
986 |
0 |
0 |
gen_wmask[1].MaskCheckPortA_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
443673543 |
2119097 |
0 |
0 |
T2 |
1231 |
100 |
0 |
0 |
T3 |
1231 |
0 |
0 |
0 |
T4 |
8664 |
0 |
0 |
0 |
T5 |
984 |
0 |
0 |
0 |
T6 |
1927 |
0 |
0 |
0 |
T7 |
8259 |
0 |
0 |
0 |
T8 |
3152 |
0 |
0 |
0 |
T9 |
1273 |
100 |
0 |
0 |
T10 |
6964 |
17 |
0 |
0 |
T11 |
10787 |
51 |
0 |
0 |
T13 |
0 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T18 |
0 |
832 |
0 |
0 |
T19 |
0 |
832 |
0 |
0 |
T26 |
0 |
19 |
0 |
0 |
T39 |
0 |
100 |
0 |
0 |
gen_wmask[1].MaskCheckPortB_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153142285 |
1250654 |
0 |
0 |
T10 |
1399 |
41 |
0 |
0 |
T11 |
4313 |
215 |
0 |
0 |
T13 |
15838 |
0 |
0 |
0 |
T15 |
17941 |
0 |
0 |
0 |
T16 |
56586 |
0 |
0 |
0 |
T17 |
216 |
0 |
0 |
0 |
T18 |
18636 |
0 |
0 |
0 |
T19 |
125490 |
0 |
0 |
0 |
T20 |
62542 |
0 |
0 |
0 |
T26 |
1288 |
31 |
0 |
0 |
T28 |
0 |
5 |
0 |
0 |
T43 |
0 |
1393 |
0 |
0 |
T44 |
0 |
2247 |
0 |
0 |
T45 |
0 |
2472 |
0 |
0 |
T65 |
0 |
4 |
0 |
0 |
T83 |
0 |
98 |
0 |
0 |
T84 |
0 |
986 |
0 |
0 |
gen_wmask[2].MaskCheckPortA_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
443673543 |
2119097 |
0 |
0 |
T2 |
1231 |
100 |
0 |
0 |
T3 |
1231 |
0 |
0 |
0 |
T4 |
8664 |
0 |
0 |
0 |
T5 |
984 |
0 |
0 |
0 |
T6 |
1927 |
0 |
0 |
0 |
T7 |
8259 |
0 |
0 |
0 |
T8 |
3152 |
0 |
0 |
0 |
T9 |
1273 |
100 |
0 |
0 |
T10 |
6964 |
17 |
0 |
0 |
T11 |
10787 |
51 |
0 |
0 |
T13 |
0 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T18 |
0 |
832 |
0 |
0 |
T19 |
0 |
832 |
0 |
0 |
T26 |
0 |
19 |
0 |
0 |
T39 |
0 |
100 |
0 |
0 |
gen_wmask[2].MaskCheckPortB_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153142285 |
1250654 |
0 |
0 |
T10 |
1399 |
41 |
0 |
0 |
T11 |
4313 |
215 |
0 |
0 |
T13 |
15838 |
0 |
0 |
0 |
T15 |
17941 |
0 |
0 |
0 |
T16 |
56586 |
0 |
0 |
0 |
T17 |
216 |
0 |
0 |
0 |
T18 |
18636 |
0 |
0 |
0 |
T19 |
125490 |
0 |
0 |
0 |
T20 |
62542 |
0 |
0 |
0 |
T26 |
1288 |
31 |
0 |
0 |
T28 |
0 |
5 |
0 |
0 |
T43 |
0 |
1393 |
0 |
0 |
T44 |
0 |
2247 |
0 |
0 |
T45 |
0 |
2472 |
0 |
0 |
T65 |
0 |
4 |
0 |
0 |
T83 |
0 |
98 |
0 |
0 |
T84 |
0 |
986 |
0 |
0 |
gen_wmask[3].MaskCheckPortA_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
443673543 |
2119097 |
0 |
0 |
T2 |
1231 |
100 |
0 |
0 |
T3 |
1231 |
0 |
0 |
0 |
T4 |
8664 |
0 |
0 |
0 |
T5 |
984 |
0 |
0 |
0 |
T6 |
1927 |
0 |
0 |
0 |
T7 |
8259 |
0 |
0 |
0 |
T8 |
3152 |
0 |
0 |
0 |
T9 |
1273 |
100 |
0 |
0 |
T10 |
6964 |
17 |
0 |
0 |
T11 |
10787 |
51 |
0 |
0 |
T13 |
0 |
832 |
0 |
0 |
T16 |
0 |
832 |
0 |
0 |
T18 |
0 |
832 |
0 |
0 |
T19 |
0 |
832 |
0 |
0 |
T26 |
0 |
19 |
0 |
0 |
T39 |
0 |
100 |
0 |
0 |
gen_wmask[3].MaskCheckPortB_A
Name | Attempts | Real Successes | Failures | Incomplete |
Total |
153142285 |
1250654 |
0 |
0 |
T10 |
1399 |
41 |
0 |
0 |
T11 |
4313 |
215 |
0 |
0 |
T13 |
15838 |
0 |
0 |
0 |
T15 |
17941 |
0 |
0 |
0 |
T16 |
56586 |
0 |
0 |
0 |
T17 |
216 |
0 |
0 |
0 |
T18 |
18636 |
0 |
0 |
0 |
T19 |
125490 |
0 |
0 |
0 |
T20 |
62542 |
0 |
0 |
0 |
T26 |
1288 |
31 |
0 |
0 |
T28 |
0 |
5 |
0 |
0 |
T43 |
0 |
1393 |
0 |
0 |
T44 |
0 |
2247 |
0 |
0 |
T45 |
0 |
2472 |
0 |
0 |
T65 |
0 |
4 |
0 |
0 |
T83 |
0 |
98 |
0 |
0 |
T84 |
0 |
986 |
0 |
0 |