Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
René Pihlak
/
IAS0440_code_covergroup
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
23b0db9e
authored
Apr 04, 2024
by
René
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024 additions
parent
8cf8d67c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
192 additions
and
0 deletions
cgroup7.sv
cgroup8.sv
cgroup9.sv
cgroup7.sv
0 → 100644
View file @
23b0db9e
`timescale
1
ps
/
1
ps
module
TB_CG6
(
)
;
reg
clk
,
rst
;
int
A
,
B
;
covergroup
cg
@
(
posedge
clk
)
;
pb1:
coverpoint
A
iff
(
!
rst
)
{
bins
fullRange
[]
=
{
[
0
:
$]
};
}
pb2:
coverpoint
B
iff
(
!
rst
)
{
bins
b0
=
{
0
};
bins
b1
=
{
1
};
bins
b2
=
{
2
};
bins
b3
=
{
3
};
}
pb1x2:
cross
pb1
,
pb2
;
endgroup
cg
cg_inst
;
initial
begin
clk
=
0
;
end
always
#
5
clk
=
~
clk
;
initial
begin
cg_inst
=
new
()
;
rst
=
1
;
A
=
0
;
B
=
0
;
#
10
rst
=
0
;
#
10
A
=
0
;
B
=
2
;
#
10
rst
=
1
;
A
=
1
;
B
=
3
;
#
10
rst
=
0
;
A
=
3
;
B
=
1
;
#
10
wait
(
clk
)
;
$
display
(
"%6.2f %%: Coverage (instance)"
,
cg_inst
.
get_inst_coverage
())
;
$
display
(
"%6.2f %%: Coverage (pb1)"
,
cg_inst
.
pb1
.
get_coverage
())
;
$
display
(
"%6.2f %%: Coverage (pb2)"
,
cg_inst
.
pb2
.
get_coverage
())
;
$
display
(
"%6.2f %%: Coverage (cross pb1,pb2)"
,
cg_inst
.
pb1x2
.
get_coverage
())
;
$
stop
;
end
endmodule
cgroup8.sv
0 → 100644
View file @
23b0db9e
`timescale
1
ps
/
1
ps
module
TB_CG6
(
)
;
reg
clk
,
rst
;
int
A
,
B
;
covergroup
cg
@
(
posedge
clk
)
;
pb1:
coverpoint
A
iff
(
!
rst
)
{
bins
one
[
2
]
=
{
[
0
:
1
]
};
bins
two
[
2
]
=
{
[
2
:
3
]
};
}
pb2:
coverpoint
B
iff
(
!
rst
)
{
bins
b0
=
{
0
};
bins
b1
=
{
1
};
bins
b2
=
{
2
};
bins
b3
=
{
3
};
}
pb1x2:
cross
pb1
,
pb2
;
endgroup
cg
cg_inst
;
initial
begin
clk
=
0
;
end
always
#
5
clk
=
~
clk
;
initial
begin
cg_inst
=
new
()
;
rst
=
1
;
A
=
0
;
B
=
0
;
#
10
rst
=
0
;
#
10
A
=
0
;
B
=
2
;
#
10
rst
=
1
;
A
=
1
;
B
=
3
;
#
10
rst
=
0
;
A
=
3
;
B
=
1
;
#
10
wait
(
clk
)
;
$
display
(
"%6.2f %%: Coverage (instance)"
,
cg_inst
.
get_inst_coverage
())
;
$
display
(
"%6.2f %%: Coverage (pb1)"
,
cg_inst
.
pb1
.
get_coverage
())
;
$
display
(
"%6.2f %%: Coverage (pb2)"
,
cg_inst
.
pb2
.
get_coverage
())
;
$
display
(
"%6.2f %%: Coverage (cross pb1,pb2)"
,
cg_inst
.
pb1x2
.
get_coverage
())
;
$
stop
;
end
endmodule
cgroup9.sv
0 → 100644
View file @
23b0db9e
`timescale
1
ps
/
1
ps
module
TB_CG6
(
)
;
reg
clk
,
rst
;
int
A
,
B
;
covergroup
cg
@
(
posedge
clk
)
;
pb1:
coverpoint
A
iff
(
!
rst
)
{
bins
one
[
1
]
=
{
[
0
]
};
bins
two
[
2
]
=
{
[
1
]
};
bins
others
=
default
;
}
pb2:
coverpoint
B
iff
(
!
rst
)
{
bins
b0
=
{
0
};
bins
b1
=
{
1
};
bins
b2
=
{
2
};
bins
b3
=
{
3
};
}
pb1x2:
cross
pb1
,
pb2
;
endgroup
cg
cg_inst
;
initial
begin
clk
=
0
;
end
always
#
5
clk
=
~
clk
;
initial
begin
cg_inst
=
new
()
;
rst
=
1
;
A
=
0
;
B
=
0
;
#
10
rst
=
0
;
#
10
A
=
0
;
B
=
2
;
#
10
rst
=
1
;
A
=
1
;
B
=
3
;
#
10
rst
=
0
;
A
=
3
;
B
=
1
;
#
10
wait
(
clk
)
;
$
display
(
"%6.2f %%: Coverage (instance)"
,
cg_inst
.
get_inst_coverage
())
;
$
display
(
"%6.2f %%: Coverage (pb1)"
,
cg_inst
.
pb1
.
get_coverage
())
;
$
display
(
"%6.2f %%: Coverage (pb2)"
,
cg_inst
.
pb2
.
get_coverage
())
;
$
display
(
"%6.2f %%: Coverage (cross pb1,pb2)"
,
cg_inst
.
pb1x2
.
get_coverage
())
;
$
stop
;
end
endmodule
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment