|
|
|
|
|
|
|
|
|
|
|
|
Cross Coverage
|
|
|
A coverage group can specify cross coverage between two or more coverage points or variables. Cross coverage is specified using the cross construct. When verifying complex systems it is important that combination of functional points are verified. |
|
|
|
|
|
Example |
|
|
|
|
|
- cross cmd (READ/WRITE) and addres for memory component
- cross packet type and packet length for a networking component
|
|
|
|
|
|
Auto cross coverage points
|
|
|
Typically cross coverage is defined like auto bin points. Syntax for doing so is as below |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example : auto cross bins
|
|
|
|
|
|
1 module test();
2
3 logic [2:0] addr;
4 logic [1:0] cmd;
5 reg ce;
6
7 covergroup address_cov () @ (posedge ce);
8 ADDRESS : coverpoint addr {
9 bins addr0 = {0};
10 bins addr1 = {1};
11 bins addr2 = {2};
12 bins addr3 = {3};
13 }
14 CMD : coverpoint cmd {
15 bins READ = {0};
16 bins WRITE = {1};
17 bins IDLE = {2};
18 }
19 CRS_ADDR_CMD : cross ADDRESS, CMD;
20 endgroup
21
22 address_cov my_cov = new();
23
24 initial begin
25 ce <= 0;
26 $monitor("ce %b addr 8'h%x cmd %x",ce,addr,cmd);
27 repeat (10) begin
28 ce <= 1;
29 addr <= $urandom_range(0,5);
30 cmd <= $urandom_range(0,2);
31 #10 ;
32 ce <= 0;
33 #10 ;
34 end
35 end
36
37 endmodule
You could download file auto_cross_bin.sv here
|
|
|
|
|
|
Simulation : auto cross bins
|
|
|
|
|
|
ce 1 addr 8'h2 cmd 2
ce 0 addr 8'h2 cmd 2
ce 1 addr 8'h1 cmd 0
ce 0 addr 8'h1 cmd 0
ce 1 addr 8'h1 cmd 2
ce 0 addr 8'h1 cmd 2
ce 1 addr 8'h4 cmd 0
ce 0 addr 8'h4 cmd 0
ce 1 addr 8'h0 cmd 2
ce 0 addr 8'h0 cmd 2
ce 1 addr 8'h5 cmd 2
ce 0 addr 8'h5 cmd 2
ce 1 addr 8'h2 cmd 2
ce 0 addr 8'h2 cmd 2
ce 1 addr 8'h5 cmd 0
ce 0 addr 8'h5 cmd 0
ce 1 addr 8'h2 cmd 2
ce 0 addr 8'h2 cmd 2
ce 1 addr 8'h4 cmd 2
ce 0 addr 8'h4 cmd 2
|
|
|
|
|
|
Report : auto cross bins
|
|
|
|
|
|
===========================================================
Group : test::address_cov
===========================================================
SCORE WEIGHT GOAL
58.33 1 100
-----------------------------------------------------------
Summary for Group test::address_cov
CATEGORY EXPECTED UNCOVERED COVERED PERCENT
Variables 7 2 5 70.83
Crosses 12 8 4 33.33
Variables for Group test::address_cov
VARIABLE EXPECTED UNCOVERED COVERED PERCENT GOAL WEIGHT
ADDRESS 4 1 3 75.00 100 1
CMD 3 1 2 66.67 100 1
Crosses for Group test::address_cov
CROSS EXPECTED UNCOVERED COVERED PERCENT GOAL WEIGHT
CRS_ADDR_CMD 12 8 4 33.33 100 1
-----------------------------------------------------------
Summary for Variable ADDRESS
CATEGORY EXPECTED UNCOVERED COVERED PERCENT
User Defined Bins 4 1 3 75.00
User Defined Bins for ADDRESS
Uncovered bins
NAME COUNT AT LEAST NUMBER
addr3 0 1 1
Covered bins
NAME COUNT AT LEAST
addr2 3 1
addr1 2 1
addr0 1 1
-----------------------------------------------------------
Summary for Variable CMD
CATEGORY EXPECTED UNCOVERED COVERED PERCENT
User Defined Bins 3 1 2 66.67
User Defined Bins for CMD
Uncovered bins
NAME COUNT AT LEAST NUMBER
WRITE 0 1 1
Covered bins
NAME COUNT AT LEAST
IDLE 7 1
READ 3 1
-----------------------------------------------------------
Summary for Cross CRS_ADDR_CMD
Samples crossed: ADDRESS CMD
CATEGORY EXPECTED UNCOVERED COVERED PERCENT MISSING
Automatically Generated Cross Bins 12 8 4 33.33 8
Automatically Generated Cross Bins for CRS_ADDR_CMD
Element holes
ADDRESS CMD COUNT AT LEAST NUMBER
[addr3] * -- -- 3
Uncovered bins
ADDRESS CMD COUNT AT LEAST NUMBER
[addr2] [WRITE , READ] -- -- 2
[addr1] [WRITE] 0 1 1
[addr0] [WRITE , READ] -- -- 2
Covered bins
ADDRESS CMD COUNT AT LEAST
addr1 IDLE 1 1
addr1 READ 1 1
addr2 IDLE 3 1
addr0 IDLE 1 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Copyright © 1998-2014 |
Deepak Kumar Tala - All rights reserved |
Do you have any Comment? mail me at:deepak@asic-world.com
|
|