typedef struct {
Vector#(4, INDEX) index;
Vector#(2, TAG1) comp_tag1_table;
Vector#(2, TAG2) comp_tag2_table;
} Prediction_Packet deriving(Bits, Eq, FShow);
Prediction_Packet pred_pkt <- mkReg(unpack(0));
In the above BSV code, I need to assign values to comp_tag1_table
(having 2 entries of TAG1 data type) and comp_tag2_table
(having 2 entries of TAG2 data type).
I have tried using...something like...
pred_pkt.comp_tag1_table[ti] <= 8'b101
where ti can be 0 or 1 but that doesn't seem to solve the problem. It can't be an array I guess.
pred_pkt.comp_tag1_table[ti] = 8'b0101;
can be used if its a variable. Ofcourse its a variable.<=
is used in the case of assigning values to registers.