I am facing an issue while trying to create a lookup table. The current way I am doing is:
I have an enum and creating a LUT using an array created via localparam:
enum {Index_0, Index_1, Index_2} index_t;
logic {7:0] result;
localparam [7:0] LUT [0:2] = '{ 10 , 64, 127};
//While looking up using the index_t enum
assign result = LUT[Index_2];
//The result is always taking the value of 64, instead it must take 127.
Any idea why this might be happening ? Could someone please help me with a better solution