|
发表于 2013-12-21 12:11:15
|
显示全部楼层
可以的
`define DIS "hello,world,%d,%h",'h8,5'd15
module test2;
reg clk;
program automatic test;
class cov;
rand bit[4:0] port;
endclass
cov cov1;
covergroup portcov;
coverpoint cov1.port{
bins port[]={[0 ]};
bins other[]=default;
}
endgroup
portcov portcovsample;
initial begin
portcovsample=new();
cov1=new();
repeat(1000) begin
assert(cov1.randomize());
$display("port is %d",cov1.port);
portcovsample.sample();
end
end
initial begin
$display(`DIS);
repeat(1000) begin
#10;
$display("good");
$stop;
end
end
endprogram
endmodule |
|