Hi,
I have coded a tracking logic for a certain cover point making use of events
initial
begin
forever
begin
@(posedge clk);
if(Awburst==WRAP && Awvalid)
begin
upper_boundary=(2**Awsize)*Awlen;
wrap_addr=((int'(Awaddr/upper_boundary))*upper_boundary);
wb = wrap_addr+upper_boundary;
addr_que.push_back(Awaddr);
for(int i=1;Awlen+1;i++)
begin
addr_que[i]=addr_que[i-1]+2**Awsize;
if(addr_que[i]>=wb)
begin
addr_que[i]=wrap_addr;
->wrap_event;
//[HERE]
$display("wrap event occurs.............",$time);
end
@(posedge clk);//CLKINGEVENT2
end
end
end
end
int a=1;
covergroup wrap_cg@(wrap_event);
option.per_instance =1;
wrap_cover:coverpoint a;
endgroup
- Supposingly, if I remove CLKINGEVENT2 from the code I see that ->wrap_event is thrown infinitely and the test hangs though I have it in the for loop that executes finite number of times. Why is it so?
2)If I put the CLKINGEVENT2 at //[HERE] instead I see that the event is thrown but the coverpoint doesn’t get covered…why?
Thanks