A string literal can be
assigned to a character, or a packed array
an integral type, as in Verilog-2001. If the
size differs, it is right justified.
A string literal can be
assigned to an unpacked array of characters, and a
zero termination is added like in C. If
the
size differs, it is left justified bytes.
struct
{int
X,Y,Z;} XYZ = {3{1}};
typedef
struct {int
a,b[4];} ab_t;
int a,b,c;
ab_t v1[1:0] [2:0];
v1 = {2{{3{{a,{2{b,c}}}}}}};
// expands to
{{3{{a,{2{b,c}}}}}, {3{{a,{2{b,c}}}}}}
// expands to {{{a,{2{b,c}}},{a,{2{b,c}}},{a,{2{b,c}}}}, {{a,{2{b,c}}},{a,{2{b,c}}},{a,{2{b,c}}}
} }
// expands to {{{a,{b,c,b,c}},{a,{b,c,b,c}},{a,{b,c,b,c}}},
{{a,{b,c,b,c}},{a,{b,c,b,c}},{a,{b,c,b,c}}}}