In reply to dave_59:
In reply to UVM_LOVE:
I think you have hit the XY Problem.
Please explain what you are looking to accomplish without involving an enum.
Sir, I’m trying to find what I want it while resolving.
Actually, I didn’t realize that enum need to be as a unique value
in C language, we can use the same enum value used in C code as the below.
include <stdio.h>
enum index { A = 0xa3, B = 0x18, C = 0x18 };
int main() {
index i = { A, B, C };
for (int j = 0; j < 3; j++)
printf("%X ", i[j]);
}
but can’t in systemverilog. so I’m trying to find a way.