Home Falcon F030 Register Video - Register MFP - Register
 

5.2 DSP - Register


DSP-Register von AURA (c)



****************************************************************************
                 D S P  -  H O S T  -  I N T E R F A C E
****************************************************************************

$FFFFA200 [R/W] 76543_10 .................. Interrupt-Control-Register (ICR)
                ||||| ||
                ||||| |+-- Receive Request Interrupt: 0:disable/1:enable
                ||||| +--- Transmit Request Interrupt: 0:disable/1:enable
                ||||+----- HF0-Bit, userdef. Infobit to DSP
                |||+------ HF1-Bit, userdef. Infobit to DSP
                |++------- Host mode:
                |          %00: Interrupt Mode (DMA off)
                |          %01: DMA Mode (24 Bit transfer)
                |          %10: DMA Mode (16 Bit transfer)
                |          %11: DMA Mode ( 8 Bit transfer)
                |          NOTE: The DSP-XBIOS supports only the interrupt
                |                mode. There seems to be no DMA-channel
                |                to support the DMA-mode.
                +--------- Initialize Bit: normally used to initialize
                           (not to reset) the Host-Interface and the DSP.
                           It is not used by the DSP-XBIOS.
$FFFFA201 [R/W] 7__43210 ..................... Command-Vector-Register (CVR)
                |  |||||
                |  +++++-- 5 bit Host-Vector: determine the host command
                |          exeption address. If bit 7 is set the DSP
                |          executes the interrupt vectornumber selected by
                |          the host vector.
                +--------- Host Command: 1: the DSP performs an DSP-
                           interrupt.
$FFFFA202 [R/W] 76_43210 ................... Interrupt-Status-Register (ISR)
                || |||||
                || ||||+-- Receive Data Register full
                || ||||    Receive Byte Registers: 0:empty/1:full
                || |||+--- Transmit Data Register Empty
                || |||     Transmit Byte Registers: 0:full/1:empty
                || ||+---- Transmitter Ready
                || ||      (1:Transmit and Receive Byte Register are empty)
                || |+----- HF2-Bit, userdef. Infobit from DSP
                || +------ HF3-Bit, userdef. Infobit from DSP
                |+-------- DMA-Status: 0: Host is in interrupt mode
                |                      1: Host is in DMA mode
                +--------- Host Request (0:no host-IRQ/1: host-IRQ)
                NOTE: This is a read only register, writing it has no effect.
$FFFFA203 [R/W] 76543210 ................... Interrupt Vector Register (IVR)
                         contains the MC68030 exeption vectornumber.
                         e.g.: IVR: $0F >> MC68030-IRQ-address: $003C
                         This vector is used in interrupt mode to perform
                         an interrupt handling.
$FFFFA204 [R/W] ________ .............. unused (reserved for the 32 bit DSP)
$FFFFA205 [R/-] 76543210 .................. Receive Byte Register high (RXH)
$FFFFA206 [R/-] 76543210 ......................................... med (RXM)
$FFFFA207 [R/-] 76543210 ......................................... low (RXL)
                is used to receive data from the DSP. Reading RXL informs
                the DSP-logic that the Receive Byte Registers are now empty.
$FFFFA205 [-/W] 76543210 ................. Transmit Byte Register high (TXH)
$FFFFA206 [-/W] 76543210 ......................................... med (TXM)
$FFFFA207 [-/W] 76543210 ......................................... low (TXL)
                is used to send data to the DSP. Writing TXL informs the
                DSP-logic that the Transmit Byte Registers are now full and
                containing valid data.





----------------------------------------------------------------------------
              General information and programming technic
----------------------------------------------------------------------------


HOW to send datawords to DSP in handshaking-technic:
1. step: wait until DSP ready to receive (ISR Bit 1 turns to 1)
2. step: write data to $A204.w-$A207.w
3. step: if you want to send once again>> goto 1. step

Example: This routine corresponds to the DSP-XBIOS:
               LEA BUFFER(PC),A0           ;Buffer with DSP-Words
               MOVE.W #DSP_WORDS,D0        ;transfer max. 65535 DSP-Words
         LOOP: BTST #0,$FFFFA202.W         ;is DSP ready to receive?
               BEQ.S LOOP
4 bytes:       'MOVE.L (A0)+,$FFFFA204.W   ;transfer 4 bytes
                                           ;the highest byte will be ignored
                                           ;by the DSP
3 bytes:       'MOVE.B (A0)+,$FFFFA205.W   ;transfer
                MOVE.B (A0)+,$FFFFA206.W   ;3 bytes
                MOVE.B (A0)+,$FFFFA207.W   ;(1 DSP-Word has 24 Bit)
2 bytes:       'MOVE.W (A0)+,D1            ;get 2 bytes
                EXT.L D1                   ;sign-extension
                MOVE.W D1,$FFFFA204.W      ;transfer 4 bytes
1 byte:        'MOVE.B #0,$FFFFA205.W      ;transfer
                MOVE.B #0,$FFFFA206.W      ;1 byte
                MOVE.B (A0)+,$FFFFA207.W
               DBRA D0,LOOP


HOW to receive datawords from DSP in handshaking-technic:
1. step: wait until DSP had send (ISR Bit 0 turns to 1)
2. step: read data from $A204.w-$A207.w
3. step: if you want to receive once again >> goto 1. step

Example: This routine corresponds to the DSP-XBIOS
               LEA BUFFER(PC),A0           ;Buffer with DSP-Words
               MOVE.W #DSP_WORDS,D0        ;transfer max. 65535 DSP-Words
         LOOP: BTST #1,$FFFFA202.W         ;had DSP send?
               BEQ.S LOOP
4 bytes:       'MOVE.L $FFFFA204.W,(A0)+   ;transfer 4 bytes
                                           ;the highest byte is zero
3 bytes:       'MOVE.B $FFFFA205.W,(A0)+   ;transfer
                MOVE.B $FFFFA206.W,(A0)+   ;3 bytes
                MOVE.B $FFFFA207.W,(A0)+   ;(1 DSP-Word has 24 Bit)
2 bytes:       'MOVE.B $FFFFA206.W,(A0)+   ;transfer
                MOVE.B $FFFFA207.W,(A0)+   ;2 bytes
1 byte:        'MOVE.B $FFFFA206.W,D1      ;dummy-read, nobody knows why.
                MOVE.B $FFFFA207.W,(A0)+   ;transfer 1 byte
               DBRA D0,LOOP


NOTE: it is possible to skip the 1. step. This mode increases the
      transfering-rate, but the DSP-program must be able to read the data
      immediately, otherwhise the data will be overwritten by the next
      one. It is important that the DSP is ready to transfer, therefor
      execute the 1. step before transfering data!
      (1. step > 2. step > 2. step > 2. step ......until end)



HOW to receive/send datawords to DSP in interrupt-technic:
- IRQ-Installation in special order:
       1.: determine your MC68030-IRQ-vecornumber,e.g.: $0F
       2.: write the IRQ-program-address in the IRQ-address,
           in this case $0F*4>>$003C
       3.: write the MC68030-IRQ-vectornumber in IVR
       4.: set bit 0/1 of ICR for receiving/sending data
  now the DSP-IRQ is installed and enabled!
- the style of the IRQ-routine:
       1.: read/write data from/to $A204.w-$A207.w
       2.: execute your process
       3.: end the IRQ-routine with a RTE
- you have two possibilities to stop the IRQ-transfer:
       1.: you clear bit 0/1 of the ICR in the main program
       2.: you clear bit 0/1 of the ICR in the IRQ-program

NOTE: You have only one exceptionnumber for sending and receiving data.
      But it is possible to send and receive data simultanously. In this
      case you have to test bit 0/1 of the ICR to get information about
      the transfering direction!


DSP installation procedure:

To reset and install the DSP execute the following steps:
- set bit 4 in Port A of the PSG to one, after 1/200s, to zero
- the DSP now demands 512 DSP-words containing the bootprogram
- after transfering the bootprogram the DSP will execute it

Example: This routine refers to the DSP-XBIOS
               MOVE.B #$0E,$FFFF8800.W     ;select Port A of the PSG
               MOVE.B $FFFF8800.W,D0
               OR.B #$10,D0                ;begin Reset
               MOVE.B D0,$FFFF8802.W
               (wait 1/200s)
               AND.B #$EF,D0               ;end reset
               MOVE.B D0,$FFFF8802.W
               LEA BUFFER(PC),A0           ;Buffer with DSP-Words
               MOVE.W #512-1,D0            ;transfer 512 DSP-Words
         LOOP:
               MOVE.B (A0)+,$FFFFA205.W    ;transfer
               MOVE.B (A0)+,$FFFFA206.W    ;3 bytes
               MOVE.B (A0)+,$FFFFA207.W    ;(1 DSP-Word has 24 Bit)
               DBRA D0,LOOP


############################################################################
################### research and documentation by AURA #####################
############################################################################






Copyright © Robert Schaffner (support@doitarchive.de)
Letzte Aktualisierung am 23. Dezember 2003
Home Falcon F030 Register Video - Register MFP - Register