Add support for user defined enums in field encode property. #29
This commit is contained in:
committed by
Alex Mykyta
parent
80f670bf30
commit
0c7e493976
12
tests/test_enum/regblock.rdl
Normal file
12
tests/test_enum/regblock.rdl
Normal file
@@ -0,0 +1,12 @@
|
||||
addrmap top {
|
||||
enum my_enum {
|
||||
val_1 = 3 {name = "Value 1";};
|
||||
val_2 = 4 {desc = "Second value";};
|
||||
};
|
||||
reg {
|
||||
field {
|
||||
encode = my_enum;
|
||||
sw=rw; hw=na;
|
||||
} f[2:0] = my_enum::val_2;
|
||||
} r0;
|
||||
};
|
||||
Reference in New Issue
Block a user