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 - syntax direct [<label>] blkp <pma>,<dma> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SYNTAX      DIRECT  [<LABEL>] BLKP <pma>,<dma>
            INDIRECT [<LABEL>] BLKP <pma>,{ind}[,<next ARP>]

OPERANDS    0 . dma1 . 65535; 0 . dma2 . 127; 0 . next ARP . 7.

EXECUTION   TMS32020

                  (PC) + 2 . TOS
                  pma . PC
                  If (repeat counter) is not equal to zero:
                        Then (pma, addressed by PC) . dma,
                             modify AR(ARP) and ARP as specified,
                             (PC) + 1 . PC,
                             (repeat counter) - 1 . repeat counter;
                        Else (pma, addressed by PC) . dma,
                             modify AR(ARP) and ARP as specified.
                  (TOS) . PC

             TMS320C25

                  (PC) + 2 . PC
                  (PFC) . MCS
                  pma . PFC
                  If (repeat counter) is not equal to zero:
                        Then (pma, addressed by PFC) . dma,
                             modify AR(ARP) and ARP as specified,
                             (PFC) + 1 . PFC,
                             (repeat counter) - 1 . repeat counter;
                        Else (pma, addressed by PFC) . dma,
                             modify AR(ARP) and ARP as specified.
                  (MCS) . PFC

DESCRIPTION Consecutive memory words are moved from a source program
            memory block to a destination data memory block. The starting
            address (lowest) of the source block is defined by the second
            word of the instruction. The starting address of the
            destination block is defined by either the dma contained in
            the opcode (for direct addressing) or the current AR (for
            indirect addressing). In the indirect addressing mode, both
            the current AR and ARP may be modified in the usual manner.
            In the direct addressing mode, dma is used as the destination
            address for the block move but is not modified upon by
            repeated executions of the instruction. Thus, the contents of
            memory at the dma address will be the same as the contents of
            memory at the last pma address in a repeat sequence. RPT and
            RPTK must be used with the BLKP instruction if more than one
            word is to be moved. The number of words to be moved is one
            greater than the number contained in the repeat counter RPTC
            at the beginning of the instruction. At the end of this
            instruction, the RPTC contains zero and, if using indirect
            addressing, AR(ARP) will be modified to contain the address
            after the end of the destination block. Note that the source
            and destination blocks do not have to be entirely on-chip or
            off-chip.

            The PC points to the instruction following BLKP after
            execution. Interrupts are inhibited during a BLKP operation.

            The BLKP instruction on the TMS32020 uses one level of stack;
            therefore, the value on the bottom of the stack is lost since
            the stack is pushed and popped during the instruction
            operation.
                      __
            If the MP/MC pin on the TMS320C25 is low at the time of the
            execution of this instruction and the program memory address
            used is less than 4096, an on-chip ROM location will be read.


WORDS       2

ENCODING    15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
            +-----------------------------------------------+
            |1  1  1  1  1  1  0  0| 0| data memory address | DIRECT
            |-----------------------------------------------|
            |             program memory address            |
            +-----------------------------------------------+

            15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
            +-----------------------------------------------+
            |1  1  1  1  1  1  0  0| 1| see indirect fields | INDIRECT
            |-----------------------------------------------|
            |             program memory address            |
            +-----------------------------------------------+

CYCLES

            +--------------------------------------------------------+
            |         Cycle Timings for a Single Instruction         |
            |--------------------------------------------------------|
            | PI/DI | PI/DE  |  PE/DI  |   PE/DE   | PR/DI  | PR/DE  |
            |--------------------------------------------------------|
      '20   |Program source internal(DI/DE refer to data destination)|
            |--------------------------------------------------------|
            |   3   |   3+d  |   3+2p  |  3+d+2p   |   -    |   -    |
            |--------------------------------------------------------|
      '20   |Program source external(DI/DE refer to data destination)|
            |--------------------------------------------------------|
            |  3+d  | 4+d+p  |   3+3p  |  4+d+3p   |   -    |   -    |
            |--------------------------------------------------------|
      'C25  |                 Table in on-chip RAM                   |
            |--------------------------------------------------------|
            |   3   |   3+d  |  4+2p   |   4+d+2p  |   4    |  4+d   |
            |--------------------------------------------------------|
      'C25  |                 Table in on-chip ROM                   |
            |--------------------------------------------------------|
            |   4   |   4+d  |   4+2p  |   4+d+2p  |   4    |  4+d   |
            |--------------------------------------------------------|
      'C25  |                 Table in external memory               |
            |--------------------------------------------------------|
            |  4+p  | 4+d+p  |   4+3p  |   4+d+3p  |  4+p   | 4+d+p  |
            |--------------------------------------------------------|
            |        Cycle Timings for a Repeat Instruction          |
            |--------------------------------------------------------|
            | PI/DI | PI/DE  |  PE/DI  |   PE/DE   | PR/DI  | PR/DE  |
            |--------------------------------------------------------|
            |Program source internal(DI/DE refer to data destination)|
            |--------------------------------------------------------|
            |  2+n  | 2+n+nd |  2+n+2p | 2+n+nd+2p |   -    |   -    |
            |--------------------------------------------------------|
      '20   |Program source external(DI/DE refer to data destination)|
            |--------------------------------------------------------|
            | 2+n+np|2+2n+nd |2+n+np+2p|2+2n+nd+np |   -    |   -    |
            |       |   +np  |         |    +2p    |        |        |
            |--------------------------------------------------------|
      'C25  |                  Table on-chip RAM                     |
            |--------------------------------------------------------|
            |  2+n  | 2+n+nd | 3+n+2p  | 3+n+nd+2p |   3+n  | 3+n+nd |
            |--------------------------------------------------------|
      'C25  |                 Table in on-chip ROM                   |
            |--------------------------------------------------------|
            |  3+n  | 3+n+nd | 3+n+2p  | 3+n+nd+2p |   3+n  | 3+n+nd |
            |--------------------------------------------------------|
      'C25  |                 Table in external memory               |
            |--------------------------------------------------------|
            | 3+n+np| 2+2n+nd| 3+n+np  | 2+2n+nd   | 3+n+np | 2+2n   |
            |       |    +np |     +2p |    +np+2p |        |  +nd+np|
            +--------------------------------------------------------+



EXAMPLE     RPTK  2
            BLKP  65120,*+    If current auxiliary register contains 2048

              BEFORE              AFTER
      pma
          pm65120 >A089       pm65120 >A089
          pm65121 >2DCE       pm65121 >2DCE
          pm65122 >3A9F       pm65122 >3A9F
      dma
           dm2048 >1234        dm2048 >A089
           dm2049 >2005        dm2049 >2DCE
           dm2050 >E98C        dm2050 >3A9F

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