Hello Everyone,
I’ve issues with part of the code I’m working on, please look at the code
task abc_monitor::xyz_monitor();
forever begin
@(posedge clk)
for(int j=0; j<chans; j++) begin
for(int k=0; k<subchans; k++) begin
// code to execute
end
end
//*** assertion check here ***
end
endtask: xyz_monitor
I’ve two channels and two sub channels (in each channel). At each positive edge of the clock, I need to loop through one channel and one subchannel. In the end, I need to check the assertion. But this code is checking the all the channels, one subchannel and a assertion at one clock.
I need like this:
clk
chan0
subchan0
clk
chan0
subchan1
clk
chan1
subchan0
clk
chan1
subchan1
clk
check the assertion.