|
Atari coding BBS
DSP context switch |
Posted by: dml
|
Mar,07.2014-13:36
|
Hi all,
I've got a scenario now on DSP where it would be helpful to execute a chunk of code from a few different locations if a state change is encountered. The code to be executed is complex, and the locations it will be executed from can be complex, with register state etc. all set up.
(the reason for this situation, is that I only want to flush out old state if new state really needs to be written, and this might not be known until very late into setting up and writing the new state)
So this involves tediously storing and restoring all relevant DSP registers to perform the work - of which there are many, and its ugly.
Does anyone know of a more interesting way to go about this on DSP? A sort of hardware-level 1-deep context switch or state push/pop which supports this kind of situation?
e.g. I was wondering if setting up an interrupt could work, and if the interrupt mechanism can store/restore sufficient state to be useful. I haven't tried it and it's not exactly what it's supposed to be used for but it might be a fit? I'm also not sure if a suitable exception can be triggered manually from background code. This is the sort of problem you might deal with frequently if writing audio signal processing or other time critical code with the DSP...
Just curious - otherwise I'll plod on with the obvious method!
|
[All messages in this thread] [Start new thread]
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|