In reply to cgales:
Thanks for the response cgales.
The option1 requires replacement of changing the enum name in the files used within blk1/blk2
The option2 assumes the decoding of the enum is same for both blk1 and blk2 whereas let us say only the enum name is same and not decoding. This will not work right?
The option3 again requires changing the files where enum is used and prefix them with pkg name and scope resolution operator.
What I would ideally prefer is, say I want to go with option1 but dont want to change the enum names in files where it is getting referenced. so I will add something like below in blk1/sv/file1_pkg.sv → typedef enum {A_blk1=0, B_blk1=1 } ab_e;
I would like the files in blk1 where “A” is getting referenced should automatically be interpreted as “A_blk1”. Is that possible?
something like const A = A_blk1; in file1_pkg.sv works?