i'am using Nios II with shadow register. I'am using the directions that are discribe in Nios II Processor Reference Handbook.
If the processor is currently running in the normal register set, I use estatus.CRS and execute eret.
If the processor is running in the shadow register set I use sstatus.CRS and execute eret.
It is possible to switch into the first shadow register set (estatus.CRS = 0x400) and it is also possible to switch from the first shadow register set to the second shadow register set (sstatus.CRS=0x800). Unfortunately it's not possible to switch into normal register set (sstatus.CRS=0x0). The status register is updated but no other register is modified or restored. Did you have some excample code for using shadow register?
Thank you for your reply.
Thank you for posting in Intel community forum, hope this message find you well and apologies for the delayed in response.
Unfortunately there is no design example available yet related to shadow register.
Per my understanding the mention behavior might not be possible, please do refer to the shadow register model in page 29 here for further explanation.
Hope this message find you well and good day, unfortunately as we do not receive any response from you to the previous clarification that we have provided. This thread will now be transitioned to community support. If you have new queries or further qeury on this thread, please feel free to open a new thread or reopen this thread to get support from Intel experts. Otherwise, the community users will further help you with doubts in this thread.