[SystemVerilog] typedef for array of structs

Hi All,

How can I define an array of struct types using the typedef?

Let’s say I have a struct:

typedef struct {logic v; logic vld;} bit_rec;

I need an array bit_rec_v of 32 elements of this struct. Can I define it as following?

typedef bit_rec_v bit_rec [0:31];

Thank you!

In reply to dmitryl:

Did you try it?

In reply to dave_59:

yes, it gave me a compilation error…

Here is how should it be re-written:

**typedef** bit_rec bit_rec_v  [32];

Thank you!