Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

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]

Topic Posted by  Date 
DSP context switch dml Mar,07.2014-13:36
  Re: DSP context switch sqward Mar,10.2014-02:32
    Re: DSP context switch Laurent / Thadoss Mar,14.2014-13:32
      Re: DSP context switch dml Mar,14.2014-14:52
        Re: DSP context switch Laurent / Thadoss Mar,14.2014-15:26
          Re: DSP context switch dml Mar,14.2014-16:10
    Re: DSP context switch dml Mar,14.2014-14:45


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

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.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson