Forum Discussion
Branden_Allen
New Contributor
7 years agoSystemVerilog structure or struct assignment by keyword.
Description I would like to assign values to a packed structure using keywords (e.g. code snippet below) but have run into the an apparent syntax error (10170) under Quartus 18.0. I presume this me...
Branden_Allen
New Contributor
7 years agoMy Mistake:
I had a bit of code that omitted the "'" preceeding the assignment. The corrected code is included below:
typdef struct packed {
logic [15:0] data_type;
logic some_flag;
} hdr_t;
hdr_t hdr= '{
data_type : '1,
some_flag : 0
};