Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

René Pihlak / IAS0440_code_covergroup

  • This project
    • Loading...
  • Sign in
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 90e0fe67 authored 2 years ago by René's avatar René
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

cg2

parent 8b732476
Show whitespace changes
Inline Side-by-side
Showing with 55 additions and 2 deletions
  • cgroup1.sv
  • cgroup2.sv
cgroup1.sv
View file @ 90e0fe67
......@@ -39,8 +39,8 @@ initial begin
wait (clk);
$display("Coverage (instance): %3.2f", cg_inst.get_inst_coverage());
$display("Coverage (pb1): %3.2f", cg_inst.pb1.get_coverage());
$display("%3.2f %%: Coverage (instance)", cg_inst.get_inst_coverage());
$display("%3.2f %%: Coverage (pb1)", cg_inst.pb1.get_coverage());
$stop;
......
This diff is collapsed. Click to expand it.
cgroup2.sv 0 → 100644
View file @ 90e0fe67
`timescale 1ps/1ps
module TB_CG1(
);
reg clk, rst;
reg [1:0] A, B;
covergroup cg @(posedge clk);
pb1: coverpoint A;
pb2: coverpoint B;
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
A = 1; B = 3;
#10
A = 3; B = 1;
#10
wait (clk);
$display("%3.2f %%: Coverage (instance)", cg_inst.get_inst_coverage());
$display("%3.2f %%: Coverage (pb1)", cg_inst.pb1.get_coverage());
$display("%3.2f %%: Coverage (pb2)", cg_inst.pb2.get_coverage());
$stop;
end
endmodule
\ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment