|
I have a packed struct that maps all the output pins of a block.
typedef struct packed {
bit⏋:0] data_bus;
bit error;
bit Ε:0] status;
} output_example_S;
data_output output_example_S;
data_output⏔:0] is a legal way to reference the structure.
I can assign data_bus = data_output.data_bus;
I want to overlay the array into the output_example_S structure.
The only way I can do this is map the array elements into the correct bit vector of the data_output in 32 bit increments.
bit ⎫:0] data_o⎠]
data_output⎫:0] = data_oΎ]
data_output⏋:32]=data_oΏ]
I want to use a method that increments the bit vector by 32 like
data_output [x:y] = data_o,
x +=32;
y+= 32;
i++;
The compile doesn't like the index of the bit vector to be variables.
The question is have you ever overlayed an array into a bit vector? |