How to handle a struct initialization in systemverilog

In reply to zz8318:
Dynamic arrays need to be allocated using new, or a copy from an array of the same time. So you need to do

m_mem = new[4];

Before you can reference m_mem[3].

Or maybe you meant to declare an associative array instead of a dynamic array.

mem_blk m_mem[bit [15:0]];

Then a write to m_mem[3] allocates that entry.