....
regfile regs_x_intr {
reg {
field { desc = "Example interrupt mask"; } x_ints = 0;
} mask;
...
};
regfile regs_y_intr {
reg {
field { desc = "Different interrupt mask"; } y_ints[2] = 0;
} mask;
....
};
regs_x_intr x_module;
regs_y_intr y_module
...
In the example above, regs_x_intr/regs_y_intr has mask registers, say they are different modules, yet they have irqs and mask fields but different in size, mask class is created twice, and compiler for sure complain about redefinition. simple namespacing a regfile block would help in this case.
In the example above, regs_x_intr/regs_y_intr has mask registers, say they are different modules, yet they have irqs and mask fields but different in size, mask class is created twice, and compiler for sure complain about redefinition. simple namespacing a regfile block would help in this case.