Register Size/Definition Changes based on Mode Register Selection !! Suggestion for a better UVM Register Model ?
Hello !!
a. Have a scenario where my DUT works in two different modes. Say mode X and mode Y. And this selection is made using the mode register.
b. And based on the mode selection [either X or Y], the definition of other register changes.
For Example:
In Mode X, Register A size is 32-Bits.
Whereas in Mode Y, Register A size is 16-Bits.
In Mode X, definition of Register B is CTRL register of 32-bits in size.
Whereas in Mode Y, definition of Register B is DEBUG register of 32-bits in size with different field elements.
c. Keeping the above scenario, which would be a better way to define the UVM Register Model ? Is it better to have two separate register model one for Mode X and other for Mode Y ? Or to maintain only one register mode and internally change the register/field configurations based on the mode selection ?
Which would be a better approach and better for control-ability. Share in you inputs/suggestions !!