Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TMS320C2x DSP - processing may be executed in time- or process-dependent or http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
      Processing may be executed in  time- or process-dependent or
      selected way. Following a specific time or data processing path may
      then result in selecting one of several processing options.

      A simple computed GOTO can be programmed in the TMS320C2x by using
      the CALA instruction. This instruction uses the contents of the
      accumulator as the direct address of the call. Thus, the call
      address can be computed in the ALU:

*
* TASK CONTROLLER
*   This main task routine controls the order of execution
*   and scheduling of tasks.  When an interrupt occurs, the
*   interrupt service routine is executed to process the
*   input and output data samples.  After the interrupt
*   service routine has completed, the processor begins
*   execution with the instruction following the IDLE. This
*   routine selects the task appropriate for the current
*   sample cycle, calls the task as a subroutine, and branches
*   back to the IDLE to wait for the next sample interrupt
*   when the scheduled task has completed execution.
*
WAIT        IDLE              ; wait for sample interrupt
            LAC   SAMPLE      ; fetch sample count value
            SUB   ONE         ; decrement the sample count
            BGEZ  OVRSAM      ; test for end of baud interval
            LACK  15          ; init count for new baud interval
OVRSAM      SACL  SAMPLE      ; save new count value
            ADLK  TSKSEQ      ; add task table base address
            TBLR  TEMP        ; read subroutine task address
            LAC   TEMP        ; load accumulator for task call
            CALA              ; execute appropriate task
            B     WAIT
*
TSKSEQ:     .equ  $
            .word DUMMY       ; unused cycle                15
            .word DUMMY       ; unused cycle                14
            .word DUMMY       ; unused cycle                13
            .word DUMMY       ; unused cycle                12
            .word BDCLK2      ; compute energy E(11)        11
            .word DUMMY       ; unused cycle                10
            .word OUT         ; communicate with u-controller9
            .word DECODE      ; decode/get scrambled dibit   8
            .word DEMODB      ; demodulate in middle of baud 7
            .word DUMMY       ; unused cycle                 6
            .word AGCUPT      ; update AGC every 3rd baud    5
            .word DUMMY       ; unused cycle                 4
            .word BDCLK1      ; compute energy E(3)          3
            .word DUMMY       ; unused cycle                 2
            .word DUMMY       ; unused cycle                 1
            .word DUMMY       ; unused cycle                 0

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson