Hi
I am trying to use array of events to capture clocking when corresponding enable is asserted. I am seeing 2 issues:
- When the enable for one is de-asserted other events are not being triggered even if their enable is asserted.
- I am not able to plot the events from the array in the waveform. I am able to plot event not declared as an array.
Below is my implementation:
module event_array;
event arr_event[int];
function automatic event new_event();
event e;
return e;
endfunction
initial begin
for(int i = 0; i < MAX; i++) begin
arr_event[i] = new_event();
end
end
generate
for(genvar i = 0; i<MAX; i++) begin
always @(posedge clk[i]) begin
->arr_event[i]
end
end
endgenerate
endmodule
Can you please help me to understand the issue with this implementation.