Waiting for a change in any element in an unpacked array

Hi,
i have the following array, and i want to unblock on any change in any array element.

logic[14:0] array_of_vals[10:0];
@(array_of_vals);
//Do something

Will this work?

Thanks

In reply to dannyg:

Not according to the LRM

Event expressions shall return singular values. Aggregate types can be used in an expression provided the expression reduces to a singular value. The object members or aggregate elements can be any type as long as the result of the expression is a singular value.

In reply to dannyg:

Hi ,

Here is what you could do ::

SOLUTION 1 ::



logic [14:0] array_of_vals [10:0];

initial begin

@(array_of_vals[0],array_of_vals[1],array_of_vals[2],.....,array_of_vals[10]); // Tedious so its better to write a define Macro
$display("Change Received"); // Will get This Output

end

initial begin

#10; array_of_vals[5] = 10;

end



SOLUTION 2



logic[10:0] [14:0] array_of_vals;

initial begin

@(array_of_vals);
$display("Change Received"); // Will get This Output

end

initial begin

#10; array_of_vals[5] = 10;

end


Regards,
AGIS