Forum Discussion
9 Replies
- Altera_Forum
Honored Contributor
Even if it was possible why not use the vectored interrupt controller that already does this?
- Altera_Forum
Honored Contributor
Agree, - but just right now it would be a simple solution for me.
- Altera_Forum
Honored Contributor
In that case what are you looking to achieve? Maybe a different method would work for you using the internal interrupt controller (maybe a custom jump table for example).
- Altera_Forum
Honored Contributor
I just wanted to get a fast interrupt respons with the internal interrupt controller, - without saving all registers. But as far as I can see, I only got the wrprs and rdprs instructions, - but no instructions to actually switch to a shahow register set during the interrupt processing. - Later in our process we are adding the external interrupt controler, and then my problems will be solved.
- Altera_Forum
Honored Contributor
Can't you just write to the CRS field of the status register?
- Altera_Forum
Honored Contributor
As I see it status.CRS is read only.
- Altera_Forum
Honored Contributor
I'm sure I'd just checked the docs :-)
In that case you need to execute an 'iret' having set the approriate saved status to the required value. Actualy it is an 'eret', see page 3-28 - Altera_Forum
Honored Contributor
oh, - I see you point, - but it might as well open for interrupt again. Or maybe I can control this in the saved status? Anyway the code would not be easy to understand and need good comments.
- Altera_Forum
Honored Contributor
An interrupt entry/exit pair should leave the system in the original state - regardless as to the actual current register set. So you should only need to save enough state to restore the original set.