Suppose there is a structure declared as:
typedef logic [7:0] Data;
typedef struct packed {
logic valid;
Data data;
} MyStruct;
An array of the struct is declared as:
MyStruct foo [8];
Is there a way other than using for loop to extract a field from all the array elements and form its own array/bit-vector?
In other words, I'm hoping to do something like this, which unfortunately doesn't seem to be valid SV syntax.
assign all_valid = & foo[7:0].valid;