Initializing a Register File

You can make assignments to one element, a slice, or the whole unpacked array. You can use an assignment pattern default to initialize a whole array.

regs = '{default:'0};

For unpacked arrays, the index order matters when copying the whole array to another array with a different ordering, or using a C interface. Copying is always from left index to right index. Bit-stream casting also uses left-to-right indexing.