covergroup xxx_cg with function sample(bit i0, bit i1,...); i0_cov : coverpoint i0 iff (i1); endcovergroup xxx_cg = new(); ... xxx_cg.sample(.i0(vif.i0),i1(vif.i1));
我有一个类似下面这样的封面组covergroupcover_routers with function sample(bit inj_val,eje_val); option.per_instance的多维动态数组实例。因为它是一个8x4数组,所以将有32个covergroupcov_routers实例,但我希望根据i和j的值排除某些实例,其中i和j是数组的二维,如果我不这样做,它将 ...
covergroup moduletb;// Declare some variables that can be "sampled" in the covergroupbit[1:0]mode;bit[2:0]cfg;// Declare a clock to act as an event that can be used to sample// coverage points within the covergroupbitclk;always#20clk=~clk;// "cg" is a covergroup that is sampled ...
classMyTest;randlogic[2:0]data;covergroupcg;option.per_instance=1;cp:coverpointdata;endgroupfunctionnew();cg=new();endfunctiontaskrun();for(inti=0;i<3;i++)beginrandomize();cg.sample();$display("data = %h",data);endendtaskendclassprogramtop;MyTestmyTest;MyTestmyTest2;initialbeginmyTest=...
As an alternative to a clocking event, a coverage group accepts a block event expression to indicate that the coverage sample is to be triggered by the start or the end of execution of a given named block, task, function, or class method. Block event expressions that specify the begin keyw...
classMyTest;localparamDAT_WIDTH=3;randlogic[DAT_WIDTH-1:0]dat[$];covergroupcgwithfunctionsample(logic[DAT_WIDTH-1:0]v);option.per_instance=1;cp:coverpointv;// Automatic bins auto[0] ... auto[7]endgroupfunctionnew();cg=new;endfunctionfunctionvoidrun();randomize()with{dat.size()inside{...