There are multiple sets of reg files in one single reg block, and many reg files are sharing the same set of CSR, which is due to the multiple instances of the same module.
I assume this is normal in the project.
One way to read such register is by explicitly call read function with complete path typed.
Something like: reg_block.reg_file_0.status.read();
However I got message like “Unable to locate register ‘status’ in block …” when I tried to use get_reg_by_name(reg_file_0.status) or read_reg_by_name(reg_file_0.status) function.
Error message seems to be gone when I do get_reg_by_name(status); but this doesn’t accurately lead me to the exact register I want since I have multiple status register.
What is the correct way to use get_reg_by_name() in this case?
Thank you.