Home

ANALOG DEVICES ADSP-21065L technology Manual

image

Contents

1. Bits Bits 7654 3210 0000 0001 0010 0011 0100 0101 0110 0111 0000 RO 0 0 LO BO FADDR USTATI 0001 R1 1 1 L1 Bl DADDR USTAT2 0010 R2 2 2 L2 B2 0011 R3 3 3 L3 B3 PC 0100 R4 4 4 L4 B4 PCSTK 0101 R5 5 5 L5 B5 PCSTKP 0110 R6 6 6 L6 B6 LADDR 0111 R7 7 7 L7 B7 CURL CNTR 000 R8 8 8 L8 B8 LCNTR 001 R9 9 9 L9 B9 IRPTL 010 R10 0 0 L10 B10 MODE2 011 R11 1 1 L11 B11 MODE1 100 R12 2 2 L12 B12 ASTAT 101 R13 3 3 L13 B13 IMASK 110 R14 4 4 L14 B14 STKY 111 R15 5 5 LTS B15 IMASKP A 26 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference Table A 10 Map 2 universal register codes Bits Bits 7654 3210 1000 1001 1010 1011 1100 1101 1110 1111 0000 1011 PX 1100 PX1 1101 PX2 TILIL ADSP 21065L SHARC DSP Technical Reference A 27 Group Instructions Compute amp Move Group I Instructions Compute amp Move Compute dreg gt DM dreg gt PM Type 1 on page A 30 Parallel data memory and program memory transfers with Register File optional compute operation e Compute Type 2 on page A 32 Compute operation optional condition e Compute ureg DMI PM register modify Type 3 on page A 33 Transfer between data or program memory and universal register optional condition optional compute operation e Compute dreg DM PM immediate modify Type 4
2. Position Latch Type Signal 71 0 SPAREO 72 SPAREO 73 TRQO 74 TROL 75 TRQ2 76 OE SPARE6 output enable 77 0 SPARE6 78 I SPARE6 79 0 RFSO 80 I RFSO 81 OE RFSO output enable 82 OE RCLKO output enable 83 OE TFSO output enable I Input O Output OE OutputEnable 1 Drive the associated signals during EXTEST and INTEST instructions 0 Disable the associated signals during EXTEST and INTEST instructions NC Do not connect D 12 ADSP 21065L SHARC DSP Technical Reference JTAG Test Access Port Table D 2 Scan path position definitions Contd Position Latch Type Signal 84 0 RCLKO 85 I RCLKO 86 I DRO_A 87 I DRO_B 88 0 TFSO 89 I TFSO 90 0 TCLKO a I TCLKO 92 OE TCLKO output enable 93 OE DTO_A output enable 94 OE DTO_B output enable 95 0 DTO_A 96 0 DTO_B I Input O Output OE OutputEnable 1 Drive the associated signals during EXTEST and INTEST instructions 0 Disable the associated signals during EXTEST and INTEST instructions NC Do not connect ADSP 21065L SHARC DSP Technical Reference D 13 Boundary R egister Table D 2 Scan path position definitions Contd Position Latch Type Signal 97 0 RFS1 98 I RFS1 99 OE RFS1 output enable 00 OE RCLK1 out
3. Bit Field Description States COMPUTE Compute operation field see Appendix B Com pute Operation Refer ence COND Status Condition codes 0 31 CI Clear interrupt code 0 Do not clear current interrupt 1 Clear current inter rupt CU Computation unit select 90 ALU codes 01 Multiplier 10 Shifter DATA Immediate data field DEC Counter decrement code 0 No counter decrement 1 Counter decrement DMD Memory access direction 0 Read 1 Write DMI Index I register num 0 7 bers DAGI DMM Modify M register 0 7 numbers DAG1 DREG Register file locations 0715 E ELSE clause code 0 No ELSE clause 1 ELSE clause A 20 ADSP 21065L SHARC DSP Technical Reference Table A 5 Opcode acronyms Contd Instruction Set Reference Bit Field Description States FC Flush cache code o cache flush 1 Cache flush G DAG Memory select 0 DAGI or Data Memory 1 DAG2 or Program Mem ory INC Counter increment code 0 o counter increment Counter increment J Jump Type 0 ondelayednondelayed Delayed LPO Loop stack pop code 0 No stack pop Stack pop LPU Loop stack push code 0 No stack push Stack push LR Loop reentry code 0 o loop reentry Loop reentry UM Interrupt vector 0 7 OPCODE Computation unit opcodes see Appendix B Compute Operation Reference PMD Memory access direction 0 Read 1 Write PMI Index I register num
4. Syntax Opcode Rn Rx Ry 0000 0001 Rn Rx Ry 0000 0010 Rn Rx Ry CI 0000 0101 Rn Rx Ry CI 1 0000 0110 Rn Rx Ry 2 0000 1001 COMP Rx Ry 0000 1010 Rn Rx CI 0010 0101 Rn Rx CI 1 0010 0110 Rn Rx 1 0010 1001 Rn Rx 1 0010 1010 Rn Rx 0010 0010 Rn ABS Rx 0011 0000 Rn PASS Rx 0010 0001 ADSP 21065L SHARC DSP Technical Reference B 3 Single Function Operations Table B 1 Fixed point ALU operations Contd Syntax Opcode Rn Rx AND Ry 0100 0000 Rn Rx OR Ry 0100 0001 Rn Rx XOR Ry 0100 0010 Rn NOT Rx 0100 0011 Rn MIN Rx Ry 0110 0001 Rn MAX Rx Ry 0110 0010 Rn CLIP Rx BY Ry 0110 0011 Table B 2 Floating point ALU operations Syntax Opcode Fn Fx Fy 000 0001 Fn Fx Fy 000 0010 Fn ABS Fx Fy 001 0001 Fn ABS Fx Fy 001 0010 Fn Fx Fy 2 000 1001 Fn COMP Fx Fy 000 1010 Fn Fx 010 0010 Fn ABS Fx 011 0000 Fn PASS Fx 010 0001 B 4 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Table B 2 Floating point ALU operations Cont d Syntax Opcode Fn RND Fx 010 010 Fn SCALB Fx BY Ry 011 110 Rn MANT Fx 010 110 Rn LOGB Fx 00
5. NC Do not connect ADSP 21065L SHARC DSP Technical Reference D 27 Device Identification Register Table D 2 Scan path position definitions Contd Position Latch Type Signal 279 OE SPARE2 output enable 280 0 SPARE2 281 I SPARE2 282 I ID1 283 I IDO 284 0 EMU This end closest to TDI scan in last I Inp O Output OE OutputEnable 1 Drive the associated signals during EXTEST and INTEST instructions 0 Disable the associated signals during EXTEST and INTEST instructions NC Do not connect Device Identification Register The ADSP 21065L does not include a device identification register Built In Self Test Instructions BIST The ADSP 12065L does not support self test functions D 28 ADSP 21065L SHARC DSP Technical Reference JTAG Test Access Port Private Instructions Loading a value of 001xx into the instruction register enables the private instructions reserved for emulation The ADSP 21065L EZ ICE emula tor uses the TAP and boundary scan to access the processor in the target system The EZ ICE emulator requires a target board connector for access to the TAP For details see EZ ICE Emulator on page 12 36 in ADSP 21065L SHARC DSP User s Manual References Bleeker Harry P van den Eijnden amp F de Jong Boundary Scan Test A Practical Approach Kluwer Academic Press 1993 Hewlett Packard Co HP Bo
6. 25 COMPUTE Bits Description COND Specifies the test condition If no condition is specified COND is true and the instruction is executed E Specifies whether or not an ELSE clause is used B Selects the branch type jump or call For calls A and CI are ignored J Determines whether the branch is layed delayed or nonde A 50 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference Bits Description A Activates loop abort CI Activates clear interrupt COMPUTE Defines a compute operation to be performed in parallel with the data access this is a NOP if no compute operation is specified in the instruction RELADDR Holds a 6 bit twos complement value that is added to the current PC value to generate the branch address PMI Specifies the I register for indirect branches The I register is premodified but not updated by the M register PMM Specifies the M register for premodifies ADSP 21065L SHARC DSP Technical Reference A 51 Group II Instructions Program Flow Control Indirect Jump or Compute dreg DM Type 10 Indirect or PC relative jump or optional compute operation with trans fer between data memory and Register File w Type 10 instructions require IF COND Syntax IF COND Jump compute DM Ia Mb dreg PC lt reladdr6 gt compute dreg DM Ia Mb Md Ic Else Function Conditional jump to the specified PC relative
7. issues Chapter 9 Serial Ports DMA Chapter 6 DMA Chapter 7 Multiprocessing Chapter 8 Host terface External port Chapter 6 DMA Chapter 7 Multiprocessing Chapter 8 Host terface High frequency design Chapter 12 System Design Host interface ter 8 Host Interface Instruction cache Memo ter 3 Program Sequencing Chapter 5 y xvi ADSP 21065L SHARC DSP Technical Reference Preface For information on See Instruction set Appendix A Instructio Appendix B Compute Operation Reference Set Reference Appendix C Numeric Formats Internal buses Chapter 5 Memory Chapter 6 DMA Chapter 8 Host Interface Interrupts JTAG test port Chapter 3 Program Sequencing Chapter 5 Memory Appendix F Interrupt Vector Addresses Chapter 12 System Design Appendix D JTAG Test Access Port emory Chapter 5 Memory ultiplier operation Chapter2 Computation Units Compute Operation Reference Appendix B ultiprocessing Chapter 7 Multiprocessing Pin definitions Chapter 12 System Design Processor Chapter 1 Introduction architecture Processor Appendix E Control and Status Registers configuration Program flow Chapter 3 Program Sequencing Programmable I 0 Chapter 11 Programmable Timers and I 0 ports Ports Programmable timers Chapter 11 Programm
8. Bit Name Description 0 FLG4 Status of the FLAG4 I O port 1 FLG5 Status of the FLAGS I O port 2 FLG6 Status of the FLAG6 I O port 3 FLG7 Status of the FLAG7 I O port 4 FLG8 Status of the FLAG8 I O port E 76 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 20 Flag Pin Values on the IOSTAT register Cont d Bit Name Description 5 FLG9 Status of the FLAG9 I 0 port 6 FLG1O Status of the FLAG10 I O port 7 FLG11 Status of the FLAG11 I 0 port 8 31 Reserved ADSP 21065L SHARC DSP Technical Reference E 77 IOP Registers RDIVx TDIVx SPORT Divisor Registers The TDIVO TDIV1 RDIVO and RDIV1 registers contain divisor values that determine the frequencies for internally generated serial port clocks and frame syncs Figure E 10 on page E 79 shows the RDIVx register bits and Figure E 11 on page E 79 shows the TDIVx register bits For details on using the RDIVx and TDIVx registers in ADSP 21065L SHARC DSP Users Manual see e Chapter 3 Program Sequencing e Chapter 9 Serial Ports In this manual see Appendix A Instruction Set Reference These four registers are memory mapped in internal memory at addresses Ox00E4 Ox00F4 0x00E6 and 0x00F6 respectively These registers are not initialized after reset E 78 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers 31 30 29 28 27 26
9. COMPUTE Type 10 Opcode with PC relative jump 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 111 D DMI DM COND RELADDR DREG z TPP ETE EE EEL COMPUTE ADSP 21065L SHARC DSP Technical Reference A 53 Group II Instructions Program Flow Control Bits Description COND Specifies the condition to test PMI Specifies the I register for indirect branches The register is premodified but not updated by the M register PMM Specifies the M register for premodifies D Selects the data memory access type read or write DREG Specifies the Register File location DMI Specifies the I register which is postmodified and updated by the M register DMM Identifies the M register for postmodifies COMPUTE Defines a compute operation to be performed in parallel with the data access this is a NOP if no compute operation is specified in the instruction RELADDR Holds a 6 bit twos complement value that is added to the current PC value to generate the branch address A 54 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference Return From Subroutine Interrupt Compute Type 11 Indirect or PC relative jump or optional compute operation with trans fer between data memory and Register File Syntax IF COND RTS DB compute LR ELSE compute DB LR IF COND RTI DB
10. F11 R12 F12 R13 F13 R14 F14 R15 F15 Figure B 4 Valid input registers for multifunction computations ADSP 21065L SHARC DSP Technical Reference B 95 Multifunction Computations Dual Add Subtract Fixed Pt The dual add subtract operation computes the sum and the difference of two inputs and returns the two results to different registers This opera tion has fixed point and floating point versions Syntax fixed point version Ra Rx Ry RS Rx Ry Compute Field PEEP EPP PP EEE EEE 0 00 0111 RS RA RX RY Function Does a dual add subtract of the fixed point fields in registers Rx and Ry The sum is placed in the fixed point field of register Ra and the difference in the fixed point field of Rs The floating point extension fields of Ra and Rs are set to all Os In saturation mode the ALU saturation mode bit in MODE set positive overflows return the maximum positive number Ox7FFF FFFF and negative overflows return the minimum negative num ber 0x8000 0000 Status Flags Flag Description AZ Set if either of the fixed point outputs is all Os otherwise cleared AU Cleared B 96 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Flag Description AN Set if the most significant output bit is 1 of either of the outputs otherwise cleared AV Set if the XOR of the carries of the two most signif icant adder stages of either of the o
11. PMODE Packing mode Specifies the internal word width for the packing mode 00 no packing unpacking Ol 16 bit amp 32 bit 0 16 bit 48 bit l 32 bit 48 bit Used with the HBW bits SYSCON which spec ify the external word width MSWF ost significant word first Specifies the word order for packing 16 bit data to 32 or 48 bit data O LSW 16 bit word first 1 16 bit word first E 58 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 16 DMACx register Contd Bit Name Description MASTER DMA master mode enable In combination with HSHAKE and EXTERN to set the DMA transfer mode 0 disable 1 enable See Table E 17 on page E 61 10 HSHAKE DMA handshake enable In combination with HSHAKE and EXTERN to set the DMA transfer mode 0 disable 1 enable See Table E 17 on page E 61 11 INTIO Single word I O interrupt enable Enables disables interrupts for individual words the external port buffers transmit or receive 0 disable ith TRAN 0 a full or partially full EPBx RX buffer generates an interrupt ith TRAN 1 an empty or partially full EPBx TX buffer generates an interrupt Single word I O interrupts are useful for implementing interrupt driven single word transfers under the control of the proces sor s core ADSP 21065L SHARC DSP Te
12. e E mail questions to dsp support analog com or dsp europe analog com European customer support What s This Book About and Who s It For The ADSP 21065L documentation set contains two manuals the ADSP 21065L SHARC DSP Users Manual and the ADSP 21065L SHARC DSP Technical Reference These manuals are reference guides for hardware and software engineers who want to develop applications using the ADSP 21065L These manuals assume that the user has a working knowledge of the ADSP 21065L s Super Harvard Architecture The ADSP 21065L SHARC DSP User s Manual describes the architecture and operation of the ADSP 21065L s individual components intercom ponent connections and access off chip connections and access and the processor s hardware software interface xiv ADSP 21065L SHARC DSP Technical Reference Preface The information in this book includes e Pin definitions and instructions for connecting the pins to external devices and peripherals in single and multiprocessor systems e Processor features and instructions for configuring the processor for specific operation options e Internal and external data paths and instructions for moving data between internal components and between the processor and exter nal devices and peripherals e Timing sequencing and throughput of control signals and data accesses The ADSP 21065L SHARC DSP Technical Reference provides detailed technical information on programming th
13. Return from subroutine or interrupt optional condition optional compute operation e Do Until Counter Expired Type 12 on page A 58 Load loop counter do loop until loop counter expired e Do Until Type 13 on page A 60 Do until termination d For all program flow control instructions except type 10 instructions IF COND is optional A 44 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference Direct Jump Call Type 8 Direct or PC relative jump call optional condition Syntax IF COND lt addr24 gt DB JUMP PC lt reladdr24 gt LA CI DB LA DB CI IF COND lt addr24 gt DB CALL PC lt reladdr24 gt Function A jump or call to the specified address or PC relative address The PC rel ative address is a 24 bit twos complement value If the delayed branch DB modifier is specified the branch is delayed otherwise it is nonde layed If the loop abort LA modifier is specified for a jump the loop stacks and PC stack are popped when the jump is executed Use the LA modifier if the jump transfers program execution outside of a loop If there is no loop or the jump address is within the loop do not use the LA modifier The clear interrupt CI modifier enables reuse of an interrupt while it is being serviced Normally the processor ignores and does not latch an interrupt that reoccurs while its service routine is already executing Locate the J
14. Table E 2 lists the effect latency and read latency for the ADSP 21065L system registers Table E 2 Read and effect latencies of the system registers Register Read latency Effect Latency ASTAT 0 1 TRPTL 0 1 IMASK 0 IMASKP 1 MODE1 0 MODE2 0 STKY 0 USTATI 0 0 USTAT2 0 0 0 Write takes effect on the cycle immediately after the write instruction executes 1 One cycle of latency System Register Bit Manipulation Instruction Application software can use the system register bit manipulation instruc tion to set clear toggle or test specific bits in the system registers An immediate field in the bit manipulation instruction specifies the affected bits For a detailed description of this instruction see Group IV Miscellaneous in Appendix A Instruction Set Reference ADSP 21065L SHARC DSP Technical Reference E 5 System Registers For example BIT SET MODE2 0x00000070 BIT TST ASTAT 0x00002000 result in BTF flag Although both the Shifter and ALU have bit manipulation capabilities these computations operate on Register File locations only System register bit manipulation instructions eliminate the overhead asso ciated with transferring system registers to and from the Register File Table E 3 lists these operations Table E 3 System register bit manipulation operations Bit Instruction Syst
15. compute ELSE compute Function A return from a subroutine RTS or return from an interrupt service rou tine RTI If the delayed branch DB modifier is specified the return is delayed otherwise it is nondelayed A return causes the processor to branch to the address stored at the top of the PC stack The difference between RTS and RTI is that the RTI instruction not only pops the return address off the PC stack but also 1 pops status stack if the ASTAT and MODE status registers have been pushed if the interrupt was IRQ 9 the timer interrupt or the VIRPT vector interrupt and 2 clears the appropriate bit in the interrupt latch register IRPTL and the interrupt mask pointer IMASKP The return is executed if a condition is specified and is true If a compute operation is specified without the ELSE it is performed in parallel with the return If a compute operation is specified with the ELSE it is per formed only if the condition is false Note that a condition must be specified if an ELSE compute clause is specified If a nondelayed call is used as one of the last three instructions of a loop the loop reentry LR modifier must be used with the RTS instruction ADSP 21065L SHARC DSP Technical Reference A 55 Group II Instructions Program Flow Control that returns from the subroutine The LR modifier assures proper reentry into the loop In counter based loops for example the termination condition is c
16. no boot mode setting IVT to 1 selects an internal vector table and setting IIVT to 0 selects an external vector table IIVT has no effect when an external source boots the proces sor while it is in other than no boot mode ADSP 21065L SHARC DSP Technical Reference F 3 Figure F 1 on page F 5 shows the bit values in the IRPTL and IMASK registers The default values are valid for the IMASK register only the processor clears IRPTL after reset For IMASK 1 unmasked enabled and 0 masked enabled F 4 ADSP 21065L SHARC DSP Technical Reference Interrupt Vector Addresses 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 User sw Ext Port Buf 0 DMA interrupt 3 EPB1I SFT2l Ext Port Buf 1 DMA User sw 3 CB7I 2 interrupt DAGI SFT1I Circular Buf 7 User sw Overflow interrupt 1 CBi5I SFTOI DAG2 User sw Circular Buf 15 interrupt 0 Overflow FLTII TMZLI Fit pt Timer Expired invalid except low priority FLTUI FIXI Fit pt FLTOI Fxd pt overflow underflow except Fit pt overflow except 15 14 1312 1110 9 8 7 6 54 3 2 1 0 SPT1I RSTI SPORT1 xmit A B Reset nonmaskable DMA chn 6 7 read only SOVFI SPTOI SPORTO xmit A B Stack Full Overflow DMA chn 4 5 TMZHI Timer Expired SPR1I Ga SPORTI rev A B high priority DMA chn 2 3 VIRPTI Multiprocessor SPROI Vector interrupt SPORTO Rev A B IRQ2I DMA chn 0 1 IRQ2 Asserted IRQOI IRQ1I IRQO Asserted IRQ1 Asserted Figure F 1 IRPTL IMASK reg
17. on page A 35 PC relative transfer between data or program memory and Register File optional condition optional compute operation e Compute ureg ureg Type 5 on page A 37 Transfer between two universal registers optional condition optional compute operation e Immediate Shift dregDM PM Type 6 on page A 39 Immediate shift operation optional condition optional transfer between data or program memory and Register File A 28 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference e Compute modify Type 7 on page A 42 Index register modify optional condition optional compute opera tion d For all compute and move modify instructions IF COND is optional ADSP 21065L SHARC DSP Technical Reference A 29 Group Instructions Compute amp Move Compute dreg DM dreg PM Type 1 Parallel data memory and program memory transfers with Register File option compute operation Syntax compute DM Ia Mb dregl dregl DM Ia Mb PM Ic Md dreg2 dreg2 PM Ic Md Function Parallel accesses to data memory and program memory from the Register File The specified I registers address data memory and program memory The I values are postmodified and updated by the specified M registers Premodify offset addressing is not supported For more information on register restrictions see Chapter 4 Data Addressing in ADSP 21065L SHARC DSP User s Manual
18. pins see Boot mode pins selecting 12 50 when IIVT 1 5 30 Boot select override see BSO boot select override Boot sequence and kernel loading 12 51 Booting 12 49 described 12 49 host boot sequence 12 58 loading an entire program 12 49 loading routine 12 49 modes see Boot modes multiprocessor systems 12 58 selecting 12 50 Branch instructions call 3 16 delayed see Delayed branches described 3 16 jump 3 16 nondelayed see Nondelayed branches parameters 3 16 program memory data accesses 3 11 RTI 3 16 RTS 3 16 Broadcast writes CS 8 23 defined 8 23 implementing 8 23 REDY 8 23 BRx BTC and 7 12 8 8 connection in a multiprocessor system 7 3 multiprocessor bus arbitration 7 10 pin definition 12 14 state after reset 12 22 system bus acquisition 7 12 BSEL 5 53 boot mode 12 50 EPROM boot mode 5 53 host booting 12 56 multiprocessor host booting 12 59 pin connection 5 53 pin definition 12 14 state after reset 12 23 BSO boot select override accessing EPROM after bootstrap 12 55 overriding BMS 12 55 writing to BMS memory space 12 56 Bstop command 10 30 defined 10 5 BSYN bus synchronization bit 7 22 7 42 8 40 BTC BRx and 7 12 8 8 bus mastership timeout and 7 18 defined 8 5 external accesses and 7 14 external bus in 7 13 multiprocessing events that trigger a 7 12 1 8 ADSP 21065L SHARC DSP User s Manual multiprocessing transfer sequence 7 13 multiprocessor bus arbitration 7 12 without CPA 7 19 BT
19. EB2WS External bank 2 number of wait states For parameter values see EBOWS parameter on page E 113 15 16 EB3WM External bank 3 wait state mode For parameter values see EBOWM parameter on page E 113 17 19 EB3WS External bank 3 number of wait states For parameter values see EBOWS parameter on page E 113 20 21 RBWM ROM boot wait mode Controls the wait mode for accesses that use the BMS pin See the BSO bit in Table E 25 on page E 101 For parameter values see EBOWM parameter on page E 113 22 24 RBWS ROM boot wait state Controls the wait state for accesses that use the BMS pin See the BSO bit in Table E 25 on page E 101 For parameter values see EBOWS parameter on page E 113 E 114 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 27 WAIT register Cont d Bit Name Description 25 28 Reserved 29 MMSWS Multiprocessor memory space wait state Single wait state for multiprocessor memory Space accesses 30 HIDMA Handshake idle cycle for DMA Single idle cycle for DMA handshake Sul Reserved Bus idle cycle an inactive bus cycle the processor automatically generates to avoid bus driving conflicts For d devices with slow disable time enable bus idle cycle generation with EBxWS pa rameter Does not apply to SDRAM accesses Hold time cycle an inactive bus cycle the processor automatically generates at the end of a read or wri
20. TPWIDTH 9 Timer counter output pulse width registers for timers 0 and 1 VIRPT Vector interrupt register WAIT External memory wait state register ADSP 21065L SHARC DSP Technical Reference E 39 IOP Registers Table E 14 lists the initialization values of the major IOP registers after reset All control and status bits are active high unless otherwise noted Bit values shown are the default values after reset If no value is shown the bit is undefined at reset or its value depends on processor inputs Make sure your application software always writes zeros 0 to reserved bits Table E 14 Initialization values of the IOP registers after reset Register Initialization after reset DMACx 0x0000 0000 DMASTAT Oxnnnn nnnn not initialized IOCTL 0x0000 0000 IOSTAT 0x0000 0000 RDIVx TDIVx Oxnnnn nnnn not initialized SRCTLX 0x0000 0000 STCTLx 0x0000 0000 SYSCON 0x0000 0020 SYSTAT 0x0000 nnno WAIT Ox200D 6B5A l Bits 11 4 depend on the value of the ID _ inputs IOP Register Access Restrictions Because the IOP registers are memory mapped you cannot write to them directly with data from memory Instead you must write data from or read data to the processor s core registers usually one of the Register File s E 40 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers general purpose registers R15 RO External devices
21. host DMA transfers 8 18 T O bus operations 6 27 incrementing and decrementing the modify register 6 28 internal to external memory transfers 6 75 internal to external transfer sequence slave mode 6 61 operating modes 6 11 operation 6 7 6 27 prioritizing external direct accesses to internal memory 6 37 prioritizing requests 6 35 prioritizing TCB chain loading 6 37 priority of I O bus accesses 6 74 redefining priority for external port channels 6 38 request and grant 6 35 request timing 6 65 rotating priority for external port channels 6 37 SPORT DMA chaining 9 85 SPORT DMA channels 6 27 9 77 9 78 system bus access deadlock resolution 8 50 system bus accesses 8 50 three cycle pipeline 6 64 DMA data packing 48 bit internal words 6 53 DATAx lines used for 32 bit DMA data 6 53 EPBx buffers DMA 6 51 LSWF packing format 6 52 MSWF packing format 6 52 PMODE and HBW combina tions summary of 6 52 flushing partially packed data 6 18 HMSWF host packing order bit 6 54 host boot mode 12 57 host data transfers 8 22 in external handshake mode DMA 6 70 multiprocessing DMA transfers 7 31 order of DMA transfers 6 17 packing sequence for download of 1 24 ADSP 21065L SHARC DSP User s Manual processor instructions from a 16 bit bus 6 53 packing sequence for download of processor instructions from a 32 bit bus 6 52 packing sequence for host to processor 8 to 48 bit words 6 54 P
22. program sequencer see Program sequencer program structures 3 1 programmable timers and 3 53 saving and restoring the status stack 3 48 software interrupts 3 49 subroutines 3 1 variation in program flow diagram of 3 3 vector interrupt feature using 3 52 Program structures 3 1 branches 3 11 IDLE 3 1 interrupts 3 1 jumps 3 1 loops 3 1 3 11 subroutines 3 1 Programmable I O and SDRAM control register see JOCTL register Programmable I O ports bitwise operations on 11 13 described 11 13 1 90 ADSP 21065L SHARC DSP User s Manual FLAGI1 4 11 13 functionality 11 13 IOSTAT register and 11 13 MODE register and 11 13 Programmable I O status register see OSTAT register Programmable timer pins see PWM_EVENTx Programmable timers 3 53 control bits and interrupt vectors 11 8 see Timer control bits and inter rupt vectors counters maximum period of 3 53 enabling 11 1 features 3 53 functions 11 1 I O pins 3 53 input output pin 11 1 interrupts and the status stack 11 9 see Timer interrupts and the sta tus stack pulse width count capture 11 1 see WIDTH _CNT timer mode pulse width waveform generation 11 1 see PWMOUT timer mode PWM_EVENT x pins 3 53 registers 11 1 TCOUNTx register 3 53 timer counter mode see PMWOUT INDEX timer counters size of 11 1 timer register default values 11 11 timer disable timing diagram of 11 2 TPERIODx register 3 53 TPWIDTH x registers 3 53 Programmin
23. wise cleared AN Set if the floating point result is negative other wise cleared AV Set if the postrounded result overflows unbiased exponent gt 127 otherwise cleared AC Cleared AS Cleared Al Set if either of the input operands is a NAN or if they are opposite signed Infinities otherwise cleared B 26 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Fn Fx Fy Function Subtracts the floating point operand in register Fy from the floating point operand in register Fx The normalized result is placed in register Fn Rounding is to nearest IEEE or by truncation to a 32 bit or to a 40 bit boundary as defined by the rounding mode and rounding boundary bits in MODE Postrounded overflow returns Infinity round to nearest or NORM MAxX round to zero Postrounded denormal returns Zero Denormal inputs are flushed to Zero A NAN input returns an all 1s result Status Flags Flag Description AZ Set if the postrounded result is a denormal unbiased exponent lt 126 or zero otherwise cleared AU Set if the postrounded result is a denormal other wise cleared AN Set if the floating point result is negative other wise cleared AV Set if the postrounded result overflows unbiased exponent gt 127 otherwise cleared AC Cleared AS Cleared Al Set if either of the input operands is a NAN or if they are like signed
24. 8 15 bers DAG2 ADSP 21065L SHARC DSP Technical Reference A 21 Opcode Notation Table A 5 Opcode acronyms Contd Bit Field Description States PMM Modify M register 8 15 numbers DAG2 PPO PC stack pop code 0 No stack pop 1 Stack pop PPU PC stack push code 0 No stack push 1 Stack push RELADDR PC relative address field SPO Status stack pop code 0 No stack pop 1 Stack pop SPU Status stack push code 9 No stack push 1 Stack push SREG System Register code 0 15 see Universal Register Codes on page A 24 TERM Termination Condition 0 31 codes U Update index 1 reg 0 Premodify no update ister 1 Postmodify with update UREG Universal Register code 0 256 see Universal Register Codes on page A 24 RA RM RN Register file loca 0 15 RS RX RY tions for compute oper ands and results A 22 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference Table A 5 Opcode acronyms Contd Bit Field Description States RXA ALU x operand Register 8 11 File location for mul tifunction operations RXM Multiplier x operand 0 3 Register File location for multifunction oper ations RYA ALU y operand Register 12 15 File location for mul tifunction operations RYM Multiplier y operand 4 7 Register File location for multifunction oper ations ADSP 21065L SHARC DSP Tec
25. A data GPTOA TITOB IMTOB 16 18 DMA channel 5 parameter registers CTOB CPTOB SPORTO transmit B data GPTOB IIT1A IMT1A 16 32 DMA channel 6 parameter registers CTIA CPT1A SPORTI transmit A data GPT1A I B IMT1B 16 32 DMA channel 7 parameter registers CTIB GPI LB SPORTI transmit B data GPT1B TIEPO IMEPO 16 32 DMA channel 8 parameter registers CEPO CPEPO external port buffer 0 GPEPO EIEPO EMEPO ECEPO IIEP1 IMEP1 16 32 DMA channel 9 parameter registers CERI CREPT external port buffer 1 GPEP1 EIEPI EMEP1 ECEP1 E 34 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 12 DMA buffer DB IOP registers Register Width Description EPBO 48 External port FIFO buffer 0 EPB1 48 External port FIFO buffer 1 DMACO 16 DMA channel 8 control register or external port buffer 0 DMAC1 16 DMA channel 9 control register or external port buffer 1 Table E 13 Serial port SP IOP registers Register Width Description STCTLO 32 SPORTO transmit control register SRCTLO 32 SPORTO receive control register TXO_A 32 SPORTO transmit data buffer A RXO_A 32 SPORTO receive data buffer A TDIVO 32 SPORTO transmit divisors RDIVO 32 SPORTO receive divisors TCSO 32 SPORTO ltichannel transmit selector RCSO 32 SPORTO ltichanne
26. B COMPUTE OPERATION REFERENCE Compute operations execute in the Multiplier the ALU and the Shifter The 23 bit compute field is like a mini instruction within the instruction and can be specified for a variety of compute operations This appendix describes each compute operation in detail including its assembly lan guage syntax and opcode field A compute operation is one of the following e Single function operations involve a single computation unit e Multifunction operations specify parallel operation of the Multi plier and the ALU or two operations in the ALU e The MR register transfer is a special type of compute operation used to access the fixed point accumulator in the Multiplier For more information see MR Rn Rn MR on page B 60 The operations in each category are described in the following sections For each operation the assembly language syntax the function and the opcode format and contents are specified For more information see Table A 1 on page A 11 ADSP 21065L SHARC DSP Technical Reference B 1 Single Function Operations Single Function Operations The compute field of a single function operation looks like PRP EPSP E PP PPE EEE PEE OQ CU OPCODE RN RX RY An operation determined by 0PCODE is executed in the computation unit specified by CU The x and the y operands are received from data registers RX and RY The result operand is returned to data register RN The CU com
27. Bits to the left of the extracted field are set to 0 in register Rn The float ing point extension field of Rn bits 7 0 of the 40 bit word is set to all Os Bit6 and len6 can take values between 0 and 63 inclusive allowing for extraction of fields ranging in length from 0 to 32 bits and from bit posi tions ranging from 0 to off scale left 39 7 0 Rx extract field bit6 starting bit position for extract referenced from LSB of 32 bit field bit6 reference point 39 7 0 i M extracted bits placed in Rn starting at LSB of 32 bit field Figure B 3 Field alignment B 82 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Example 39 31 23 5 7 0 assaz abc defghijk 1mn jerem RX len6 bits bit position bit6 from reference point 39 31 23 5 7 0 00000000 00000000 00abcdef ghijkimn 00000000 Rn Status Flags Flag Description SZ Set if the output operand is 0 otherwise cleared SV Set if any bits are extracted from the left of the 32 bit fixed point input field i e if leno bit6 gt 32 otherwise cleared SS Cleared ADSP 21065L SHARC DSP Technical Reference B 83 Shifter Operations Rn FEXT Rx BY Ry SE Rn FEXT Rx BY lt bit gt lt len gt SE Function Extracts and sign extends a field from register Rx to register Rn The output field is placed right aligned in the fixed point field of Rn Its length is determined by the Jen field in register
28. CONTENTS Sie Oe ax ccndu ania maienisrsenee Rn LSHIFT Rx BY Ry Raes LSHIFT Re BY cabs oiccicso lei iccencadidac sg ney iesauecodenze Rn Rn OR LSHIFT Rx BY Ry Rn Rn OR LSHIPT Rx BY lt cdataBs socccscccccccecsesecnae dint ia Rn ASHIFT Rx BY Ry Kn ASHIFT Re BY lt clataB se accociscdsinsisansecssedcanacnetuannsiads Rn Rn OR ASHIFT Rx BY Ry Rn Rn OR ASHIFT Rx BY lt data8 gt oo ceeceeeeceeeeeceeeeeeeeeeees Rn ROT Rx BY Ry Rive ROT Re BY lt a eera sees adeodis Rn BCLR Rx BY Ry Ras BCLR Re EY adati oe otic et ects nai ada eatedde Rn BSET Rx BY Ry Rn BSET Rx BY lt data8 gt nicorae Rn BTGL Rx BY Ry Rn BIG Re BY edata8 gt veces cdisiosinsintimeicnletasineecaeueleads BTST Rx BY Ry Biot Re ET ogee ie ees Rn FDEP Rx BY Ry Rn FDEP Rx BY lt bitG gt lt lenG gt o cee eee cece eeeeeceeeeceeeeees Rn Rn OR FDEP Rx BY Ry Rn Rn OR FDEP Rx BY lt bitG gt lt lenG gt oo eee eeeceeeceeeee Rn FDEP Rx BY Ry SE Rn FDEP Rx BY lt bit6 gt lt len6 gt SE cece eee ceeeeeecee eee Rn Rn OR EDEP Rx BY Ry SE Rn Rn OR FDEP Rx BY lt bit6 gt lt len6 gt SE wo viii ADSP 21065L SHARC DSP Technical Reference CONTENTS Rn FEXT Rx BY Ry Rive FEAT Rs BY cbt lene gicicicmeciedersnasatinoarmanss B 82 Rn FEXT Rx BY Ry SE Rn FEXT Rx BY lt bitG gt lt lenG gt SE ccccccccccevevecscnsveservesens B 84 Ris E Pe ca eh lee B 86 ee ee E A EN E EA B 87 Ras LETIA Ei e
29. Examples R7 BSET R6 BY RO DM IO M3 R5 PM 1I11 M15 R4 R8 DM 14 M1 PM 112 M12 RO Type 1 Opcode 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 DM DM DREG PMI PM PM DREG lap fo ss Oo F es tn E 21 20 19 18 17 16 15 14 13 12 11f10 9 fe 7 fe J5 l4 3 COMPUTE A 30 ADSP 21065L SHARC DSP Technical Reference Description Instruction Set Reference Bits DMD PMD DM DREG PM DREG DMI PMI DMM PMM COMPUTE Select the access types read or write Specify Register File locations Specify I reg Specify M reg ters Defines a co parallel wit no compute op tion isters for data and program memory isters used to update the I regis pute operation to be performed in the data accesses this is a NOP if eration is specified in the instruc ADSP 21065L SHARC DSP Technical Reference A 31 Group Instructions Compute amp Move Compute Type 2 Compute operation optional condition Syntax IF COND compute Function Conditional compute instruction The instruction is executed if the speci fied condition tests true Examples IF MS MRF 0 F6O F2 F3 2 Type 2 Opcode 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 000 00001 COND COMPUTE Bits Descr
30. Host Interface In this manual see Appendix A Instruction Set Reference The SYSTAT register is memory mapped in internal memory at address 0x0003 After reset all bits in SYSTAT except IDC 1 0 and CRBM 1 0 are initialized to zero 0 as shown in Figure E 19 After reset IDC 1 0 is equal to the value of the processor s ID _ inputs and CRBM 1 0 is equal to the ID of the current bus master E 106 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 141312 1110 9 8 7 6 54 3 2 1 HSTM Host Mastership BSYN Bus Synchronization CRBM Current Bus Master IDC ID Code SWPD Data Pending in Slave Write FIFO VIPD Vector Interrupt Pending HPS Host Packing Status 0 fully packed 1 partially packed Figure E 19 SYSTAT register bits ADSP 21065L SHARC DSP Technical Reference E 107 IOP Registers Table E 26 lists and describes the individual bits of the SYSTAT register Table E 26 SYSTAT register Bit Name Description 0 HSTM Host mastership Indicates whether or not the host processor is the current bus master 0 bus slave 1 bus master 1 BSYN Bus synchronization Indicates whether or not bus arbitration logic is synchronized 0 unsynchronized 1 synchronized 23 Reserved 4 5 CRBM Current bus master Identifies the ID code of the ADSP 21065L that is the current bus ma
31. Immediate Move eseseeecereeereesrsn A 62 Ureg DM PM direct addressing Type 14 eeeeeeenee A 63 Ureg lt gt DM PM indirect addressing Type 15 neeesser A 65 Immediate data DM PM Type 16 cseeceesessesseeeeseeteeees A 67 Immediate data ureg Type 17 cscssceseeseesescessereeseeseeseeneeees A 69 Group TY Instructions Miscellaneous ccc tcsisccccstccccceascessctecesecess A 70 System Register Bit Manipulation Type 18 sscnccscsccuseacecensecce A 71 Register Modity bit reverse Type 19 sccvssoisniisnrnsnetwsiensescons A 73 iv ADSP 21065L SHARC DSP Technical Reference CONTENTS Push Pop Scacks Flush Cache Type 20 scsccoisctscsssxeescasiccrscoys A 75 Popi eS II arangis A 77 Te CE nen A A 78 idele Dpr 2 acceso shee ese eit ees A 79 Jomp Rirame Type J4 acai sicchicatainadigu te ateapmsianeannaewinainednns A 81 COMPUTE OPERATION REFERENCE Sinple Function Operations sradicare asa a a B 2 ALU MeO ceopiusri a eai B 2 Ris het RY eee A N B 6 Ris Ba Py cennere AAR B 7 kes Teeny eG ap ee B 8 Ras Rro Rya eee eee B 9 Ris iBReA TEN aenn a E A B 10 COMPR RY sestiseicatiitessentanaracivedeiiaasinwiacabeeualdntsiamedoiaas B 11 Rie Rte Ci cxcoinnsaniouuiennione aoe B 12 Ris Peel l aenn cians B 13 LEN e E a EE A E E B 14 ia Toe pera meets B 15 ile Re sonaa e E E B 16 Ro SABS Ri ccncoreninonaiota tann e B 17 Ris TASS Di acai ee ee ieee B 18 Ris RAND RY censere B 19 Pets ORDF sanieren B 20 kraf a OR Ry pn E So
32. Modify Summary sccccscticsiccierssessoussaicscneres Program Flow Control Summary sacwmicetisccensecrcttetisrcenees Immediate Moye Summary ose oe ees Miscellancous Instructions Samnmaiy smserisrrsniissnsnis Reference Notation SUMMAry sescecccoeesescestenriectacesecnomeeseon A 11 R sister Types SUMMAT iaaiiai enra a NAi A 15 Memory Addressing Summary ssaricenisinesonaraenon nina A 18 eae Morio aara eee A 19 Univeral Register Codet srnrisedecrinrneina A 24 ADSP 21065L SHARC DSP Technical Reference ill CONTENTS Group I Instructions Compute amp Move siincineincrscemccciinveeteoins A 28 Compute dreg DM dreg PM Type 1 w eeeeseeceseereteeeenees A 30 Compote Type Z roresnirpenrori nnana oah A 32 Compute ureg DM PM register modify Type 3 seess A 33 Compute dreg DM PM immediate modify Type 4 A 35 Compute ureg neg CINE S ccrieiiolcemnianioieenenas A 37 Immediate Shift dreg lt DM PM Type 6 eeeeseeeseeeteeeeees A 39 Lompute miodity ly pt T ssisinscrdancmndneiaionimacsenainen A 42 Group II Instructions Program Flow Control neseser A 44 Direct Fume a Oe vectectarertieicnieene eerie A 45 Indirect Jumys Call f Compute Type J ancnssonsssassiaaa A 48 Indirect Jump or Compute dreg DM Type 10 eeeeeee A 52 Return From Subroutine Interrupt Compute Type 11 A 55 Do Until Comater Expired Type 12 scccsesassussversseoatciececsecances A 58 A E oc ee AAA eee A 60 Group III Instructions
33. SPORT 1 transmit count reg SPORT 1 receive divisor reg SPORT 1 receive count reg SPORT 1 multichannel xmit selector SPORT 1 multichn xmit compand selector y E 122 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers SPORT 1 multichn rev compand selector SPORT 1 multichn rev compand selector SPORT 1 keyword register SPORT 1 keyword mask register define MTCCS1 Oxfa define MRCCS1 Oxfb define KEYWD1 Oxfc define IMASK1 Oxfd define TXO_A Oxe2 define RXO_A Oxe3 define TX1_A Oxf2 define RX1_A Oxf3 define TXO_B Oxee define RXO_B Oxef define TX1_B Oxfe define RX1_B Oxff Aliases for TX and Rx SPORT 0 transmit data buffer A SPORT 0 receive data buffer A SPORT 1 transmit data buffer A SPORT 1 receive data buffer A SPORT 0 transmit data buffer B SPORT 0 receive data buffer B SPORT 1 transmit data buffer B SPORT 1 receive data buffer B a ADSP 21065L SHARC DSP Technical Reference E 123 SYMBOL DEFINITIONS FILE def21065L h E 124 ADSP 21065L SHARC DSP Technical Reference F INTERRUPT VECTOR ADDRESSES Table F 1 lists all processor interrupts according to their bit position in the IRPTL and IMASK registers Four memory locations separate each interrupt vector For each vector Table F 1 also lists the address mne monic not required by the assembler and priority
34. Table E 17 DMA transfer modes MASTER HSHAKE EXTERN Description 0 0 0 Slave mode The DMA controller generates a DMA request whenever an RX buffer is not empty or a TX buffer is not fulll 0 0 1 Reserved ADSP 21065L SHARC DSP Technical Reference E 61 IOP Registers Table E 17 DMA transfer modes Cont d MASTER HSHAKE EXTERN Description 0 1 0 Hand Appl cha The DMA is a data asse Shake mode jes to the EPBx buffers nels 8 and 9 only DMA controller generates a equest when the DMARx line sserted and transfers the when the DMAGx line is ted Exte Appl cha den exce fers emo al handshake mode jes to the EPBx buffers els 8 and 9 only tical to handshake mode pt the DMA controller trans the data between external y and an external device Mast The tran buf eep is eep is fer is not full in master mode er mode DMA controller attempts to sfer data whenever the DMA ter gt 0 and either the RX er is not empty or the TX DMAR1 high if DMA channel 8 DMAR2 high if DMA channel9 in master mode Rese rved E 62 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 17 DMA transfer modes Cont d MASTER HSHAKE EXTERN Description 1 1 0 Paced master mode Applies to the EPBx
35. Table E 25 SYSCON register Contd Bit Name Description 8 IMDWO Internal memory block 0 data width Specifies the data word width of internal memory block 0 0 32 bit data 1 40 bit data Applications can store 48 bit instructions in block 0 regardless of the value of this bit For details see Chapter 5 Memory in ADSP 21065L SHARC DSP User s Manual 9 IMDW1 Internal memory block 1 data width Specifies the data word width of internal memory block 1 O 32 bit data 1 40 bit data Applications can store 48 bit instructions in block 1 regardless of the value of this bit For details see Chapter 5 Memory in ADSP 21065L SHARC DSP User s Manual 10 ADREDY Active drive REDY Changes the REDY signal to an active drive output 0 open drain o d l active drive a d ADSP 21065L SHARC DSP Technical Reference E 103 IOP Registers Table E 25 SYSCON register Contd Bit Name Description 11 BHD Buffer hang disable Enables disables the hang condition that occurs when the processor s core or an exter nal device tries to read an empty buffer or write a full buffer 0 enable buffer hang 1 disabled buffer hang After reset this bit is enabled Disabling this bit is useful for debugging applica tions 12 15 Reserved 16 17 EBPR External bus priority Specifies which of the processor s three internal buses PM DM and I 0 has priority
36. bootstrapping 256 word instructions 12 52 BSEL 12 51 CS 12 51 data bus alignment 5 53 DATA 12 51 described 12 51 DMACO register 12 49 12 52 12 53 EPROM chip select 12 53 external memory space address of first instruction 12 49 external port data EPD lines 12 53 generating EPROM addresses 5 53 MSx chip select line 5 53 multiprocessing 12 51 pin configuration 12 51 pin connections 5 53 12 51 program counter address at reset 12 53 reset start up sequence 12 53 RTI instructions 12 54 see also Host booting wait states and 12 52 wait states configuration 5 53 EPROM boot select see BSEL EPROM booting accessing EPROM after bootstrap 12 55 ACK 12 52 ADDR x 12 54 BMS and 12 53 boot hold off 12 52 BSO bit 12 55 DATAx 12 54 DMA controller operation 12 54 DMA count register and 12 54 EPROM chip select 12 53 external port data EPD lines 12 53 l 34 ADSP 21065L SHARC DSP User s Manual interrupt vector table locating 12 61 loading remaining EPROM data 12 55 multiprocessing 12 59 overriding BMS 12 55 program counter address at reset 12 53 reset start up sequence 12 53 RTI instructions 12 54 writing to BMS memory space 12 56 EQ condition 3 13 Execute cycle 3 4 Executing program from external memory space 40 bit data accesses 5 52 aligning internal addresses with external memory space 5 50 data access addressing 5 52 data packing 5 49 described 5 49 example add
37. carry Bit 4 ALU X input sign ABS amp MANT ops Bit 5 ALU fltg pt invalid operation Bit 6 Multiplier result negative Bit 7 Multiplier overflow Bit 8 Multiplier flt pt underflow Bit 9 Multiplier flt pt invalid op Bit 10 ALU fltg pt op Bit 11 Shifter overflow Bit 12 Shifter result zero Bit 13 Shifter input sign Bit 18 Bit test flag for system regs Bit 19 FLAGO value ADSP 21065L SHARC DSP Technical Reference E 117 SYMBOL DEFINITIONS FILE def21065L h define FLG1 define FLG2 define FLG3 define CACCO define CACC1 define CACC2 define CACC3 define CACC4 define CACC5 define CACC6 define CACC7 STKY register define AUS define AVS define AOS define AIS define MOS define MVS define MUS define MIS define CB7S define CB15S define PCFL define PCEM define SSOV define SSEM define LSOV define LSEM 0x00100000 0x00200000 0x00400000 0x01000000 0x02000000 0x04000000 0x08000000 0x 10000000 0x20000000 0x40000000 0x80000000 0x00000001 0x00000002 0x00000004 0x00000020 0x00000040 0x00000080 0x00000100 0x00000200 0x00020000 0x00040000 0x00200000 0x00400000 0x00800000 0x01000000 0x02000000 0x04000000 Bit 20 Bit 21 Bit 22 Bit 24 Bit 28 FLAGI value FLAG value FLAG3 value Compare Accumulation Bit 0 Bit 25 Bit 26
38. channels 9 79 SDA10 pin definition 12 10 state after reset 12 23 SDCKE pin definition 12 11 state after reset 12 23 SDCLKx pin definition 12 10 state after reset 12 23 SDEN SPORT DMA enable bit 6 23 9 16 9 22 defined 9 34 I S SPORT mode 9 65 multichannel receive comparisons and 9 74 setting up DMA on SPORT channels 9 79 SDRAM 2x clock output see SDCLKx SDRAM A10 pin see SDA10 SDRAM access 10 26 A11 pin and 16M devices 10 27 DQM pin operation 10 27 mapping ADDRx bits 10 26 multiplexed 32 bit SDRAM address diagram of 10 26 INDEX SDRAM bank select bit see SDRAM configuration SDRAM burst stop command see Bstop command SDRAM clock enable see SDCKE SDRAM column access strobe see CAS SDRAM configuration 10 13 active command delay 10 21 buffering option 10 17 CAS latency value 10 18 clock enables and non SDRAM systems 10 15 clock enables for heavy clock loads 10 16 clock enables for minimal clock loads 10 15 configuration parameters summary of 10 13 DSDCK1 10 9 10 15 DSDCTL 10 9 10 15 external memory bank mapping 10 16 IOCTL control bits 10 9 IOCTL register 10 9 10 13 IOCTL register default bit values diagram of 10 12 mapping processor addresses to SDRAM addresses 10 18 number of banks 10 16 page size 10 18 page size and device organization 10 19 page size and number of banks ADSP 21065L SHARC DSP User s Manual 1 101 INDEX 10 18 power up mode 10 19 power up sequence 10 9 power u
39. define TDIV1 Oxf4 define TCNT1 Oxf5 define RDIV1 Oxf6 define RCNT1 Oxf7 define MTCS1 Oxf8 define MRCS1 Oxf9 Serial Port registers DMA channel 8 index reg DMA channel 8 modify reg DMA channel 8 count reg DMA channel 8 chain pointer reg DMA channel 8 general purpose reg DMA channel 8 external index reg DMA channel 8 external modify reg DMA channel 8 external count reg DMA channel 9 index reg DMA channel 9 modify reg DMA channel 9 count reg DMA channel 9 chain pointer reg DMA channel 9 general purpose reg DMA channel 9 external index reg DMA channel 9 external modify reg DMA channel 9 external count reg SPORT 0 transmit control reg SPORT 0 receive control reg SPORT 0 transmit data buffer SPORT 0 receive data buffer SPORT 0 transmit divisor reg SPORT 0 transmit count reg SPORT 0 receive divisor reg SPORT 0 receive count reg SPORT 0 multichannel xmit selector SPORT 0 multichannel rev selector SPORT 0 multichn xmit compand selector SPORT 0 multichn rev compand selector SPORT 0 keyword register SPORT 0 keyword mask register SPORT 1 transmit control reg SPORT 1 receive control reg SPORT 1 transmit data buffer SPORT 1 receive data buffer SPORT 1 transmit divisor reg
40. enabling and disabling DMA interrupts 6 46 restrictions 6 40 PCSTKP data values 3 24 described 3 24 empty value 3 24 overflow value 3 24 pushing and popping 3 7 reading and delayed branches 3 24 write latency 3 24 PERIOD_CNYTx timer period count enable bit 11 6 described 11 8 Pin definitions 12 3 ACK 12 7 ADSP 21065L SHARC DSP User s Manual I 83 INDEX ADDR x 12 4 asynchronous inputs 12 3 BMS 12 13 BMSTR 12 13 BRx 7 10 12 14 BSEL 12 14 CAS 12 10 CLKIN 12 14 CPA 7 11 12 16 CS 12 8 DATAx 12 4 DMAGx 12 5 DMAR x 12 5 DQM 12 10 DRx_X 12 11 DTx_X 12 11 EMU 12 19 external port 12 4 FLAGx 12 16 GND 12 20 HBG 12 8 HBR 12 9 host interface 12 7 IDx 7 10 12 16 IRQx 12 17 JTAG emulator 12 19 miscellaneous 12 20 MSx 12 5 multiprocessor bus arbitration 7 10 NC 12 20 PWM_EVENTx 12 17 RAS 12 10 RCLKx 12 12 RD 12 17 REDY 12 9 RESET 12 18 RFSx 12 12 SBTS 12 6 SDA10 12 10 SDCKE 12 11 SDCLKx 12 10 SDRAM interface 12 10 SDWE 12 11 serial port 12 11 SW 12 6 synchronous inputs 12 3 system control 12 13 TCK 12 19 TCLKx 12 12 TDI 12 19 TDO 12 20 TFSx 12 12 TMS 12 20 TRST 12 20 unused inputs 12 3 VDD 12 20 WR 12 18 XTAL 12 19 Pin operation 12 26 asynchronous inputs 12 27 CLKIN frequencies see CLKIN frequencies external interrupt and timer pins 12 28 EZ ICE emulator see EZ ICE emulator Flag inputs see FLAGx 12 31 1 84 ADSP 21065L
41. format 2 4 temporary data storage 2 2 Compute type 2 instruction described A 32 example A 32 opcode A 32 syntax summary A 4 Compute and move modify instructions compute type 2 instructions A 4 compute dreg lt gt DM PM ADSP 21065L SHARC DSP User s Manual I 13 INDEX immediate modify type 4 instructions A 5 compute ureg lt gt DMI PM register modify type 3 instructions compute uregureg type 5 instructions A 5 IF COND A 4 immediate Shift dreg 7DM PM type 6 instructions A 5 summary of A 4 Compute operation reference compute operations B 1 multifunction operations B 94 see Multifunction operations multiplier operations B 50 see Multiplier operations shifter operations B 63 see Shifter operations single function operations see Single function compute oper ations compute operation reference single function operations B 2 Compute operations described B 1 types B 1 Compute dreg DM dreg PM type 1 instruction described A 30 example A 30 opcode A 30 Compute dreg lt DM PM immediate modify type 4 instruction described A 35 example A 35 opcode A 36 syntax summary A 5 Compute modify type 7 instruction example A 42 opcode A 42 Compute ureg gt DM PM register modify type 3 instruction example A 33 opcode A 34 syntax summary A 4 Compute ureg gt ureg type 5 instruction described A 37 example A 37 opcode A 37 syntax summary A 5 Concurrent DMA accesses of external me
42. internal interrupt vector table IIVT bit 5 30 multiprocessing data transfers and 7 25 SRST 7 21 7 23 SYSTAT register address of E 106 bit definitions 8 40 E 108 BSYN 7 22 7 42 8 40 CRBM 7 42 8 40 default bit values diagram of 7 41 8 43 E 107 described E 106 HPS 7 43 8 42 INDEX HSTM 7 41 8 40 IDC 7 42 8 41 initialization value E 106 multiprocessing data transfers and 7 25 multiprocessing status information 8 40 status bits 7 40 SWPD 7 35 7 42 VIPD 3 52 7 39 7 42 8 38 8 42 System bus arbitrating for control of 8 44 arbitration unit 8 44 8 51 core accesses of 8 48 host interface with 8 44 ISA 8 44 master processor accesses of 8 46 PCI 8 44 System bus access deadlock HBR 8 49 resolving SBTS 8 49 SBTS and HBR combination 8 49 System clock cycle reference for host interface operations 8 7 frequencies of operations 12 26 System configuration register see SYSCON register System configurations for interprocessor DMA 6 70 System control ADSP 21065L SHARC DSP User s Manual 1 119 INDEX BMS 12 13 BMSTR 12 13 BRx 12 14 BSEL 12 14 CLKIN 12 14 CPA 12 16 FLAGx 12 16 IDx 12 16 IRQx 12 17 pin definitions 12 13 PWM_EVENT x 12 17 RD 12 17 RESET 12 18 WR 12 18 XTAL 12 19 System design 12 1 accessing on chip emulation features 12 34 asynchronous inputs 12 3 12 27 basic single processor system diagram of 12 2 boot modes see Boot modes booting see Booting CLKIN fre
43. or by truncation as defined by the rounding mode bit in the MODE register Status Flags Flag Description AZ Set if the fixed point output is all Os otherwise cleared AU Cleared AN Set if the most significant output bit is 1 otherwise cleared AV Cleared AC Set if the carry from the most significant adder stage is 1 otherwise cleared AS Cleared Al Cleared B 10 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference COMP Rx Ry Function Compares the fixed point field in register Rx with the fixed point field in register Ry Sets the AZ flag if the two operands are equal and the AN flag if the operand in register Rx is smaller than the operand in register Ry The ASTAT register stores the results of the previous eight ALU compare operations in bits 24 31 These bits are shifted right bit 24 is overwritten whenever a fixed point or floating point compare instruction is executed The MSB of ASTAT is set if the X operand is greater than the Y operand its value is the AND of AZ and AN otherwise it is cleared Status Flags Flag Description AZ Set if the operands in registers Rx and Ry are equal otherwise cleared AU Cleared AN Set if the operand in the Rx register is smaller than the operand in the Ry register otherwise cleared AV Cleared AC Cleared AS Cleared Al Cleared ADSP 21065L SHARC DSP Technical Reference B 11 Single Function Operatio
44. parallel accumulators use as 2 29 Register File transfers 2 30 Multiplier operations 2 27 B 50 denormal operands 2 36 described 2 27 B 50 fixed point 2 27 fixed point operand format 2 27 fixed point results 2 28 see Multiplier fixed point results floating point 2 27 floating point operating modes 2 32 see Multiplier floating point op erating modes Fn Fx Fy B 62 input output rate 2 27 MOD1 options described B 52 summary of B 53 MOD2 options described B 51 summary of B 52 MR registers and fixed point results 2 28 MR Rn Rn MR B 60 MRB 0 B 59 MRB MRB Rx Ry mod2 B 55 MRB MRB Rx Ry mod2 B 56 MRB RND MRB mod1 B 58 MRB Rx Fy mod2 B 54 MRB SAT MRB mod1 B 57 MRF 0 B 59 MRF MRF Rx Ry mod2 B 55 MRF MRF Rx Ry mod2 B 56 MRF RND MRF mod1 B 58 MRF Rx Ry mod2 B 54 MRF SAT MRF mod1 B 57 Register File 2 27 Rn MRB Rx Ry mod2 B 55 Rn MRB Rx Ry mod2 B 56 Rn MRF Rx Ry mod2 B 55 Rn MRF Rx Ry mod2 B 56 Rn RND MRB mod1 B 58 Rn RND MRF mod1 B 58 Rn Rx Ry mod2 B 54 Rn SAT MRB mod1 B 57 Rn SAT MRF mod1 B 57 status flag update 2 34 status of most recent 2 34 summary of B 50 Multiplier registers summary of A 17 Multiplier status flags 2 34 ASTAT status bits summary of 2 34 1 76 ADSP 21065L SHARC DSP User s Manual described 2 34 fixed point underflow results 2 37 floating point invalid operation 2 36 MI floating point invalid operation 2 34 MIS floating point invalid operation 2 34 MN result negative 2 34 MO
45. see RDI Vx register SPORT receive comparison mask register see IMASK register INDEX SPORT receive comparison register see KEYWDx register SPORT receive control register see SRCTLx register SPORT receive data buffer see RXx_z data buffer SPORT RESET data buffer read write results 9 7 data buffer status bits and 9 7 described 9 7 hardware method 9 8 methods 9 7 RXS receive data buffer status bits 9 7 RXx_z data buffer 9 7 software method 9 8 transmit receive operability 9 8 TXS transmit data buffer status bits 9 7 TXx_z data buffer 9 7 SPORT serial word length 9 48 described 9 48 DMA chaining and 9 49 RXx_z buffer operation 9 49 SLEN bit value 9 48 TXx_z buffer operation 9 49 SPORT single word transfers BHD buffer hang disable bit 9 86 core hang condition and 9 86 core updates of STCTLx and SRCTL register status bits 9 86 described 9 86 ADSP 21065L SHARC DSP User s Manual 1 113 INDEX interrupt driven I O implementing 9 86 interrupts 9 86 SPORT transmit clock and frame sync divisors register see TDIVx register SPORT transmit control register see STCTLx register SPORT transmit data buffer see TXx_z data buffer SPORTO receive DMA channel 0 1 interrupt 9 6 SPORTO transmit DMA channel 4 5 interrupt 9 6 SPORT1 receive DMA channel 2 3 interrupt 9 6 SPORTI transmit DMA channel 6 7 interrupt 9 6 SPROI interrupt function and priority 9 6 SPRII interrupt function and priority 9 6 SPT
46. teas active command time 10 7 bank cycle time and 10 41 tec bank cycle time 10 7 tecp RAS to CAS delay 10 8 tgp precharge time 10 8 TRST pin definition 12 20 power up procedures and 12 35 state after reset 12 25 TRUE condition 3 12 3 15 TRUNC floating point rounding mode bit 2 14 multiplier floating point operation 2 32 multiplier floating point operations 2 33 round to nearest 2 15 round to zero 2 15 treovuc switching characteristic 8 12 TUVE transmit underflow status bit 9 14 9 17 9 38 defined 9 36 described 9 39 TXS transmit data buffer status bits 9 17 9 38 defined 9 37 described 9 39 SPORT reset and 9 7 TXx_z data buffer 9 5 9 9 data formats and 9 44 described 9 13 memory mapped address and reset value 9 10 9 11 9 12 multichannel operation with DMA enabled 9 69 multichannel TFS operation 9 69 operation see TXx_z data buffer operation read write restrictions 9 15 reading writing 9 14 size of 9 13 SPORT reset and 9 7 transmit shift buffer 9 44 writes to a full buffer 9 14 TXx_z data buffer operation 9 13 architecture 9 13 described 9 13 interrupts 9 14 storage capacity 9 14 transmit underflow condition 9 14 Type 10 instruction 8 48 and core accesses of the system bus 8 48 U Unconditional instructions 1 124 ADSP 21065L SHARC DSP User s Manual IF TRUE 3 12 Uniprocessor to microprocessor bus interface 8 51 Universal registers A 15 and bit wise operations 12 29 and bitwise o
47. writes to a full slave write FIFO buffer and 8 17 Ref command 10 38 Refresh command SDRAM see Ref command Register File 2 9 access characteristics 2 9 alternate registers 2 11 see Alternate register file registers computation units and 2 9 data writes sources of 2 10 defined 5 6 fields for Shifter bit field deposit and extract operations diagram of 2 42 fields for Shifter instructions diagram of 2 42 individual data registers 2 10 see Individual register file registers MR register transfers 2 30 multifunction operation operands and 2 50 multifunction operations and B 94 multiplier fixed point results 2 28 PM data bus transfers and 5 11 shifter operations and B 63 shifter output 2 41 SPORT control registers and 9 12 structural and functional characteristics 2 9 system register bit manipulation instruction and E 6 register file ALU operations and 2 13 Register handshake message passing protocol 7 37 8 37 I 94 ADSP 21065L SHARC DSP User s Manual Register modify bit reverse type 19 instruction described A 73 example A 73 opcode with bit reverse A 74 opcode without bit reverse A 73 Register types multiplier registers A 17 summary of A 15 universal registers A 15 Register write back message passing protocol 7 38 8 38 Reinitializing DMA channels FLSH 6 18 latency 6 18 restrictions 6 18 Requesting bus lock 7 34 RESET bit write restriction 3 44 bus arbitration synchronization after 7 21 input hyste
48. 000 Rn FIX Fx BY Ry 01 100 Rn FIX Fx 00 100 Rn TRUNC Fx BY Ry 01 110 Rn TRUNC Fx 00 110 Fn FLOAT Rx BY Ry 01 1010 Fn FLOAT Rx 00 1010 Fn RECIPS Fx 00 0100 Fn RSQRTS Fx 00 0101 Fn Fx COPYSIGN Fy 10 0000 Fn MIN FX Fy 10 0001 FN MAX FX Fy 10 0010 Fn CLIP Fx BY Fy 10 0011 ADSP 21065L SHARC DSP Technical Reference B 5 Single Function Operations Rn Rx Ry Function Adds the fixed point fields in registers Rx and Ry The result is placed in the fixed point field in register Rn The floating point extension field in Rn is set to all Os In saturation mode the ALU saturation mode bit in MODE set positive overflows return the maximum positive number Ox7FFF FFFF and negative overflows return the minimum negative number 0x8000 0000 Status Flags Flag Description AZ Set if the fixed point output is all Os otherwise cleared AU Cleared AN Set if the most significant output bit is 1 otherwise cleared AV Set if the XOR of the carries of the two most signif icant adder stages is 1 otherwise cleared AC Set if the carry from the most significant adder stage is 1 otherwise cleared AS Cleared Al Cleared B 6 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Rn Rx Ry Function Subtracts the fixed point field in register Ry from the fixed point field in register Rx The result is placed in the fixed
49. 1 Bit reverse for I0 uses DMSO only define SRCU 0x00000004 Bit 2 Alt reg select for comp units define SRD1H 0x00000008 Bit 3 DAGI alt register select 7 4 define SRDIL 0x00000010 Bit 4 DAGI alt register select 3 0 define SRD2H 0x00000020 Bit 5 DAG2 alt reg select 15 12 define SRD2L 0x00000040 Bit 6 DAG2 alt register select 11 8 define SRRFH 0x00000080 Bit 7 Reg File alt select R 15 8 define SRRFL 0x00000400 Bit 0 Reg File alt select R 7 0 define NESTM 0x00000800 Bit 11 Interrupt nesting enable define IRPTEN 0x00001000 Bit 12 Global interrupt enable define ALUSAT 0x00002000 Bit 13 Enable ALU fixed pt saturation define SSE 0x00004000 Bit 14 Enable short word sign exten define TRUNC 0x00008000 Bit 15 1 flt pt trunc 0 Rnd to near define RND32 0x00010000 Bit 16 1 32b flt pt round 0 40b rnd define CSEL 0x00060000 Bit 17 18 CSelect Bus Mastership E 116 ADSP 21065L SHARC DSP Technical Reference MODE2 register define IRQOE 0x00000001 define IRQIE 0x00000002 define IRQ2E 0x00000004 define PERIOD_CNTO 0x00000008 define CADIS 0x00000010 define TIMENO 0x00000020 define BUSLK 0x00000040 define PWMOUTO 0x00000080 define INT_HIO 0x00000100 define PULSE _HI0 0x00000200 define PERIOD_CNT1 0x00000400 define TIMEN1 0x00000800 define PWMOUT1 0x00001000 define INT_HI1 0x00002000 def
50. 12 36 executing synchronous multiprocessor operations 12 40 I 38 ADSP 21065L SHARC DSP User s Manual JTAG interface and 12 36 pin connections in nontesting environments 12 38 probe 12 36 scan path diagram of 12 40 signal termination 12 39 target board connector 12 36 see EZ ICE target board connec tor EZ ICE target board connector diagram of 12 38 pin strip header 12 37 specifications 12 37 F FDEP bit field deposit instruction 2 43 bit field diagram of 2 43 example diagram of 2 44 Fetch address register 3 6 Fetch cycle 3 4 FEXT bit field extract instruction 2 43 example diagram of 2 45 FEXT Rx BY Ry operation described B 82 example B 83 shifter status flags B 83 Fixed priority for external port channels 6 38 Fixed point formats 2 7 32 bit formats diagram of C 8 64 bit signed products diagram of C 10 INDEX 64 bit unsigned products diagram of C 9 ALU data and C 9 described C 8 fractional format C 8 multiplier data C 9 types C 8 Fixed point MR register operations clear MR register 2 30 described 2 30 rounding MR register 2 30 saturate MR register 2 31 Fixed point multiplier results see Multiplier fixed point results Fixed point multiply and accumulate instructions summary of 2 51 Fixed point operations ALU inputs 2 13 ALU results 2 13 ALU single function compute Operations summary of B 3 operands and results format of 2 13 results format of 2 13 Fixed point saturation 2 14 F
51. 12 45 Series terminated transmission line 12 43 Setting DMA channel prioritization 6 35 Setting up DMA transfers 6 9 loading the C count register 6 9 see also DMA parameter registers loading the II index register 6 9 see also DMA parameter registers loading the IM modify register ADSP 21065L SHARC DSP User s Manual 1 105 INDEX 6 9 see also DMA parameter registers writing the DMA control registers 6 9 see also DMACx registers writing the DMA parameter registers 6 9 see also DMA parameter registers Setting up multiple DMA operations 6 39 Setting up SPORT DMA transfers 6 23 see SPORT DMA Shadow write FIFO 5 39 7 32 Shared bus multiprocessing 8 36 Shifter bit field deposit and extract operations 2 42 bit field definitions 2 43 described 2 42 FDEP bit field deposit instruction example diagram of 2 44 FDEP instruction 2 43 FDEP instruction bit field diagram of 2 43 FEXT bit field extract instruction 2 43 example diagram of 2 45 Register File fields for diagram of 2 42 Y input 2 42 Shifter instruction set summary 2 47 Shifter operations 2 41 bit field deposit and extract 2 42 see Shifter bit field deposit and ex tract operations BTST Rx BY data8 B 73 BTST Rx BY Ry B 73 data transfers 2 41 described B 63 FDEP field alignment diagram of B 78 FDEP diagram of B 74 FEXT field alignment diagram of B 82 FEXT Rx BY Ry B 82 Fn FUNPACK Rx B 92 instruction set summary 2 47 operand
52. 23 control registers 6 22 data transfers 6 7 6 22 and the STCTLx and SRCTLx registers 6 23 data packing 6 22 direction of 6 7 6 22 SCHEN DMaA control bit 6 23 INDEX setting up 6 23 DMaA driven data transfer mode 9 65 see DMA driven data transfer mode enabling 9 65 internal DMA request and grant 6 35 interrupt driven data transfer mode 9 65 see Interrupt driven data transfer mode interrupts 6 23 SDEN DMA control bit 6 23 SPORT DMA block transfers channel priorities 9 78 described 9 77 DMA channels 9 77 DMA interrupts with packing enabled 9 79 packing 9 78 word size 9 78 SPORT DMA chaining 9 85 chain pointer register and 9 85 described 9 85 see also DMA chaining SPORT DMA channels 9 77 SPORT DMA interrupts EPOI 6 23 EP1I 6 23 SPROI 6 23 SPRII 6 23 SPTOI 6 23 SPT1I 6 23 ADSP 21065L SHARC DSP User s Manual I 111 INDEX SPORT DMA operation 9 79 count register and interrupts 9 81 DMA chaining enabling 9 79 DMA parameter registers 9 79 see SPORT DMA parameter reg asters enabling 9 79 RX buffer transfers 9 80 SCHEN 9 79 SDEN 9 79 TX buffer transfers 9 80 SPORT DMA parameter registers 9 79 architecture 9 81 chain pointer register 9 82 count register 9 81 CPRx_X 9 80 CPTx_X 9 80 CRx_X 9 80 CTx_X 9 80 described 9 81 GPRx_X 9 80 GPTx_X 9 80 IIRx_X 9 80 IITTx_X 9 80 IMRx_X 9 80 IMTx_X 9 80 index register 9 81 internal memory data buffer and 9 81 interrupts 9 81 loadin
53. 25 VIRPT register 7 25 I 78 ADSP 21065L SHARC DSP User s Manual Multiprocessing DMA transfers 7 30 described 7 30 DMA packing 7 31 DMAGx 7 30 DMAR x 7 30 extending internal memory space access 7 30 external handshake mode DMA configuration 7 32 external port DMA channels and 7 30 handshake mode DMA configuration 7 31 slave mode DMA configuration 7 31 to on chip memory 7 30 7 31 types 7 30 Multiprocessing EPBx transfers 7 27 core hang 7 29 DEN DMA enable bit 7 29 DMA block transfers 7 27 external port buffers 7 27 FLSH DMA flush buffers and status bit 7 29 flushing the EPBx buffers 7 29 interrupts 7 29 single word transfers 7 27 7 28 single word non DMaA transfers 7 29 types 7 27 writing to a full buffer 7 28 Multiprocessing ID see Dx INDEX Multiprocessing system architecture cluster multiprocessing see Cluster multiprocessing data bandwidth bottlenecks 7 6 data flow multiprocessing see Data flow multiprocessing interprocessor communication overhead 7 6 nodes 7 6 shared global memory 7 6 Multiprocessor booting 12 58 BEL 12 59 BMS 12 59 CS 12 59 EPROM boot sequence 12 59 from one EPROM diagram of 12 60 HBR 12 59 host boot pin configuration 12 59 host boot sequence 12 59 Multiprocessor bus arbitration 7 10 acquiring the bus 7 12 BRx 7 10 BIC 7 12 bus request and read write timing diagram of 7 15 bus synchronization operation 7 11 core priority access see
54. 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 1312 1110 9 8 7 MASTER DMA Master mode O disable 1 enable HSHAKE DMA Handshake O disable 1 enable INTIO Single word Interrupts ext port FIFO O disable 1 enable EXTEN Ext Devices to Ext Mem DMA 1 ext mode FLSH Flush Ext Port FIFO 1 flush FS Ext Port FIFO Status MSWE 00 empty Most Significant Word First packing order 10 partially full O disable 11 full 1 enable Figure E 6 DMAC x register bits 5 4 3 2 1 DEN DMA Enable for ext port O disable 1 enable CHEN DMA Chaining Enable for ext port O disable 1 enable TRAN DMA chn direction O read from ext mem 1 write to ext mem PS Packing Status read only 00 packing done 01 1st stage all modes 10 2nd stage 16 to 48 mode or 32 to 48 mode DTYPE Data Type O data 1 instructions PMODE Packing Mode 00 no packing 01 16 32 10 16 48 11 32 48 ADSP 21065L SHARC DSP Technical Reference E 55 IOP Registers Table E 16 lists and describes the individual bits of the DMACx register Table E 16 DMACx register Bit Name Description 0 DEN DMA enable for external ports Enables disables DMA operations on the external port buffers 0 disable 1 enable 1 CHEN DMA chaining enable for external ports Enables disables DMA chaining operations on the external port buffers 0 disable With DEN 0 specifies both DMA and DMA chaining disabled With DEN 1
55. 34 SENDN 9 35 setting the serial clock frequency 9 60 SLEN 9 35 SPEN 9 35 SPL 9 36 TCLK 9 28 TFS 9 30 TFSR 9 36 transmit configuration 9 59 transmit control bits 9 15 TUVE 9 36 TXS 9 37 using both transmitters simultaneously 9 59 Starting a new DMA sequence 6 9 6 29 Starting address for contiguous 32 bit data 5 37 Starting address of 32 bit data equations for 5 35 Starting and stopping DMA sequences 6 48 Status stack 3 7 current values of ASTAT and MODEI 3 49 flags 3 54 programmable timer interrupts and 11 9 pushing and popping 3 7 pushing and popping ASTAT 12 34 pushing and popping IOSTAT 12 34 RTI pop of 3 16 size of 3 48 stack pointer status 3 49 Status stack empty flag 3 54 Status stack flags 3 54 access of 3 54 empty 3 55 overflow and full 3 54 setting 3 54 summary of 3 54 Status stack overflow flag 3 54 Status stack pointer moving 3 49 status stack pushes and pops of 3 49 Status stack save and restore 3 48 ASTAT register 3 48 I 116 ADSP 21065L SHARC DSP User s Manual described 3 48 FLAG3 9 bit values 3 48 interrupts that automatically push the status stack 3 48 JUMP CI instruction 3 48 MODE register 3 48 RTI instruction 3 48 status and control bit preservation 3 48 status and mode contexts 3 48 STCTL register 6 23 9 9 9 15 address of E 90 bit definitions E 94 CHNL 9 17 9 26 CKRE 9 16 9 26 control bit definitions 9 26 control bits summary of 9 1
56. 63 multichannel SPORT mode transmit data valid signal 9 69 pin definition 12 12 SPORT loopback mode 9 88 state after reset 12 24 TIMEN x timer enable bit 11 1 described 11 8 Timer control bits and interrupt vectors INT_HIcx timer interrupt vector location 11 9 PERIOD_CNT lt x timer period count enable 11 8 PULSE_HIx timer leading edge select 11 8 PWMOUTx timer mode control 11 8 TIMEN timer enable 11 8 INDEX Timer counter timer mode see PMWOUT Timer interrupts and the status stack 11 9 described 11 9 logical OR of both timer interrupts 11 9 TMZHI and 11 9 Timer pins see PWM_EVENTx Timer registers IOP register addresses of 11 12 TCOUNTx 11 11 TPERIODx 11 11 TPWIDTH x 11 11 TMS pin definition 12 20 state after reset 12 25 TPERIOD x register 11 1 PWMOUT timer mode 11 3 reset values 11 11 size of 11 1 TPWIDTHx register 11 1 PWMOUT timer mode 11 3 reset values 11 11 size of 11 1 TRAN DMA transfer direction bit 6 14 8 28 described 6 15 direction of DMA transfers 6 15 single word EPBx transfers 8 20 Transfer control block see TCB Transfer timing example multichannel SPORT mode 9 68 ADSP 21065L SHARC DSP User s Manual 1 123 INDEX Transferring data between the PM and DM buses 5 12 Transferring data to and from memory 5 7 Transmit clock TCLKx pins 9 4 Transmit frame sync TFSx pins 9 4 Transmit shift register 9 5 Transmit underflow status see TUVF transmit underflow status bit
57. 9 accesses by external devices 9 12 bit definitions 9 26 changing operation mode 9 13 control and status bit active state 9 12 core updates of status bits 9 15 IMASK 9 9 9 11 9 12 KEYWDx 9 9 9 10 9 12 memory mapped addresses and reset values summary of 9 10 MRCCSx 9 9 9 10 9 12 MRCSx 9 9 9 10 9 11 MTCCSx 9 9 9 10 9 11 MTCSx 9 9 9 10 9 11 programming 9 12 RDIVx 9 9 9 10 9 11 reading writing 9 12 SRCTLx 9 9 9 10 9 11 status bits 9 38 STCTLzx 9 9 9 10 9 11 summary of 9 9 symbolic names 9 12 TDIVx 9 9 9 10 9 11 transmit and receive 9 15 see also STCTLx register and SRCTLx register write and effect latency 9 13 SPORT data buffers 9 9 core hang condition 9 15 described 9 13 memory mapped addresses and reset values summary of 9 10 read write restrictions 9 15 reads write of 9 14 I 110 ADSP 21065L SHARC DSP User s Manual receive data buffer operation 9 14 receive shift register 9 13 RXx_z 9 9 9 10 9 11 9 12 size of 9 13 summary of 9 9 transmit data buffer operation 9 13 TXx_z 9 9 9 10 9 11 9 12 SPORT data packing and unpacking 9 47 data justification 9 47 interrupts 9 48 short word space addresses and 9 48 SPORT data word formats 9 44 companding see Companding data type 9 44 see also DTYPE data type bits SPORT divisor registers see RDIVx register and TDIVx register SPORT DMA 9 65 channel assignments 6 22 channels 6 22 connection to internal memory space 6 27 control bits 6
58. 9 4 data transfer synchronization 9 4 data transfers between SPORTs and memory see SPORT memory transfers 1 104 ADSP 21065L SHARC DSP User s Manual data transmit outputs 9 4 data type and nonmultichannel operation 9 44 data word formats 9 44 diagram of 9 3 DMA operation 9 79 driver considerations 9 88 DRx_X 12 11 DTx_X 12 11 features 9 1 frame sync logic level 9 55 frame sync options 9 52 see SPORT frame sync options frame synchronization 9 5 IS mode 9 61 see S SPORT mode internally generated clock frequencies 9 5 interrupts see SPORT interrupts loopback mode 9 88 MSB LSB data word format 9 48 multichannel mode 9 67 see Multichannel SPORT mode operation cycles 12 27 operation summary 9 5 pin definitions 12 11 pin states after reset 12 24 point to point connections on 12 45 programming examples 9 89 RCLKx 12 12 RDIV x register 9 5 receive clock signal RCLKx 9 5 receive frame sync signal RFS INDEX 9 5 receive shift register 9 5 register and control parameter symbolic names 9 37 reset see SPORT RESET RFSx 12 12 RS 232 devices and 9 5 serial data word length 9 48 SPORT data buffer read write results 9 7 standard mode see Standard SPORT mode TCLKx 12 12 TDIVx register 9 5 TFSx 12 12 transmit clock signal TCLKx 9 5 transmit frame sync signal TFS 9 5 transmit shift register 9 5 TXx_z data buffer 9 5 UARTSs and 9 5 Serial RESET see SPORT RESET Series termination resistors
59. BMAX Bus timeout maximum register DMAC p External port DMA control register for DMA channels 8 and 9 DMASTAT DMA channel status register Contains the status bits for each DMA channel IOCTL SDRAM and programmable I O port for FLAG _4 control regis ter IOSTAT Programmable I O port status register for FLAG 1_4 ADSP 21065L SHARC DSP Technical Reference E 37 IOP Registers KEYMASK o Key word mask registers for serial ports 0 and 1 KEYWD1 9 Key word registers for serial ports 0 and 1 MRCCS o Multichannel receive companding control registers for serial ports 0 and 1 MRCS Multichannel receive control registers for serial ports 0 and 1 MSG7_9 Message registers MTCCS 0 Multichannel transmit companding control registers for serial ports 0 and 1 MTCS o Multichannel transmit control registers for serial ports 0 and 1 RDIV o Receive clock divisor registers for serial ports 0 and 1 SDRDIV SDRAM refresh counter register E 38 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers SROTLig Receive control registers for serial ports 0 and 1 STCTL9 Transmit control registers for serial ports 0 and 1 SYSCON System control register SYSTAT System status register TCOUNT 9 Counter register for timers 0 and 1 T IV iG Transmit clock divisor registers for serial ports 0 and 1 TPERIOD 9 Timer count period registers for timers 0 and 1
60. CPTOB 0x0053 DA DMA chn 5 chain pointe GPTOB 0x0054 N DA DMA chn 5 general purpose Reserved 0x0055 0x0057 IIT1B 0x0058 DA DMA c 7 index SPORT1 xmit B IMT1B 0x0059 DA DMA c 7 modify CT1B Ox005A DA DMA c 7 count CPT1B 0x005B DA DMA c 7 chain ointe GPT1B Ox005C DA DMA chn 7 general purpose Reserved 0x005D 0x005F IIROA 0x0060 NI DA DMA chn 0 index SPORTO rcv A Groups DA DMA Address register DB DMA Buffer SC System Control SP Serial Port NI Not Initialized E 48 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 15 IOP register addresses reset values and groups Cont d Register Address Reset Group Description Value IMROA 0x0061 DA DMA chn 0 modify CROA 0x0062 DA DMA c 0 count CPROA 0x0063 DA DMA c 0 chain pointe GPROA 0x0064 DA DMA c 0 general purpose Reserved 0x0065 0x0067 IIRIA 0x0068 DA DMA c 2 index SPORTI rev A IMR1A 0x0069 DA DMA c 2 modify CRIA 0x006A DA DMA c 2 count CPRIA 0x006B DA DMA c 2 chain pointe GPRIA 0x006C DA DMA c 2 general purpose Reserved 0x006D 0x006F TITOA 0x0070 NI DA DMA chn 4 index SPORTO xmit A IMTOA 0x0071 NI DA DMA chn 4 modify Groups DA DMA Address register DB DMA Buffer SC System Control SP Serial Port NI Not Initialized ADSP 21065L SHARC DSP Technical Refer
61. Control and Status Registers Table E 27 lists and describes the individual bits of the WAIT register Table E 27 WAIT register Bit Name Description 0 1 EBOWM External bank 0 wait state mode 00 external acknowledge only ACK 0l internal wait states only 10 both internal and external acknowledge required 11 either internal or external acknowledge required 24 EBOWS External bank 0 number of wait states 000 0 wait states no bus idle cyclel no hold time cycle 001 1 wait state a bus idle cycle no hold time cycle 010 2 wait states a bus idle cycle no hold time cycle 011 3 wait states a bus idle cycle no hold time cycle 100 4 wait states no bus idle cycle a hold time cycle 101 5 wait states no bus idle cycle a hold time cycle 110 6 wait states no bus idle cycle a hold time cycle 111 0 wait states a bus idle cycle no hold time cycle 5 6 EB1WM External bank 1 wait state mode For parameter values see EBOWM parameter on page E 113 ADSP 21065L SHARC DSP Technical Reference E 113 IOP Registers Table E 27 WAIT register Contd Bit Name Description 7 9 EB1WS External bank 1 number of wait states For parameter values see EBOWS parameter on page E 113 10 11 EB2WM External bank 2 wait state mode For parameter values see EBOWM parameter on page E 113 12 14
62. Core priority access CPA 7 11 described 7 10 DMA transfers and 7 17 HBG 7 10 ADSP 21065L SHARC DSP User s Manual I 79 INDEX HBR 7 10 IDx 7 10 pin definitions 7 10 protocol 7 12 SDRAM and 7 17 timing diagram 7 13 Multiprocessor memory space 7 4 access address fields 5 25 access timing 5 67 5 68 address boundaries 5 19 address range of IDx processor 5 24 automatic wait state option 5 62 core accesses of internal memory space through 5 25 defined 5 5 7 5 described 5 24 diagram of 5 24 host interface and 8 6 invalid addresses 5 25 map of 5 24 multiprocessing data transfers 7 25 single wait state MMSWS 5 57 wait states and acknowledge 5 61 Multiprocessor system 7 1 BRx pins 7 3 bus arbitration see Multiprocessor bus arbitration data transfers see Multiprocessing data transfers defined 7 5 determining the current bus master 7 11 diagram of 7 2 IDx pin connections 7 3 pin connections between two processors 7 3 processor self configuration 7 11 Multiprocessor vector interrupts 3 52 described 3 52 minimum latency 3 52 VIPD bit 3 52 VIRPT 3 52 MUS multiplier underflow bit 2 34 described 2 36 MV multiplier overflow bit 2 34 described 2 35 MR register values and 2 35 MV condition 3 13 MVS multiplier floating point overflow bit 2 34 N NC pin definition 12 20 NCH number of channel slots bit 9 22 defined 9 32 described 9 71 NE condition 3 14 Nested interrupt
63. EPBx packing modes 8 19 host EPBx transfers 8 24 packing individual data words INDEX 8 19 High frequency design issues 12 42 clock distribution 12 43 clock specifications and jitter 12 42 clock with two frequency inputs diagram of 12 42 controlled impedance transmission line 12 43 crosstalk reducing 12 45 decoupling capacitors and ground planes see Decoupling capacitors and ground planes end of line termination see End of line termination oscilloscope probes see Oscilloscope probes point to point connections on serial ports see Point to point connections on serial ports propagation delay 12 43 reflections reducing 12 46 signal integrity see Signal integrity source termination see Source termination HMSWFE host packing order bit 6 54 8 27 and 48 bit DMA words 6 53 Host asynchronous accesses broadcast writes see Broadcast writes buses used for 8 16 CS 8 11 host interface buffers 8 12 ADSP 21065L SHARC DSP User s Manual I 45 INDEX in multiprocessor systems 8 14 initiating 8 16 maximum throughput reads 8 15 rate of 8 15 read cycle sequence 8 15 read write example timing diagram of 8 13 REDY see REDY timing 8 11 treoyHc switching characteristic and transfer timing 8 12 write cycle sequence 8 14 Host boot mode boot sequence and kernel loading 12 51 12 54 booting sequence 12 58 described 12 56 DMACO register 12 49 12 57 external memory space address of first instruction 12 49
64. Floating point underflow excep tion 27 0x6C FLTI FLoating point invalid exception 28 0x70 SFTO User software interrupt 0 29 0x74 SFT1 User software interrupt 1 30 0x78 SFT2 User software interrupt 2 31 0x7C SFT3 User software interrupt 3 ADSP 21065L SHARC DSP Technical Reference E 15 System Registers MODE Register The MODE register provides control of ALU and Multiplier fixed and floating point operations interrupt nesting and DAG x operation For details on using the MODE register in ADSP 21065L SHARC DSP User s Manual see e Chapter 2 Computation Units e Chapter 3 Program Sequencing e Chapter 4 Data Addressing e Chapter 5 Memory In this manual see Appendix A Instruction Set Reference After reset the MODE register is initialized to 0x0000 0000 as shown in Figure E 3 E 16 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 CSEL Condition Code Select 00 bus master condition RND32 0 round float pt data to 40 bits 1 round float pt data to 32 bits TRUNC Float Pt Rounding O round to nearest 1 truncate SSE Shrt Wrd Sign Extend O disable 1 enable ALUSAT ALU Saturation O disable 1 enable IRPTEN Interrupt Enable O disable 1 enable NESTM _ Interrupt Nesting O disable 1 enable SRRFL R7 RO Enable 0 R7 0 primary 1 R7 0 alternate SRRFH R15 R8 Enable 0
65. HBR 12 58 pin configuration 12 51 see also Host booting Host booting 12 56 BMS 12 56 boot sequence 12 58 BSEL 12 56 DATA 60 12 58 DMA controller operation 12 58 DMA data packing 12 57 DMA done interrupt 12 58 DMACO initialization after reset interrupt vector table locating 12 61 multiprocessing 12 59 pin configuration 12 56 reset boot sequence 12 56 RTI instruction 12 58 slave processor mode 12 56 writing directly to EPBO 12 58 writing to the IOP registers 12 58 Host bus acknowledge see REDY Host bus acquisition 8 8 accessing the processor 8 8 BRx 8 8 example timing diagram of 8 10 HBG 8 8 HBR 8 8 host signal buffers 8 9 HTC 8 8 restrictions 8 10 SBTS 8 11 Host bus grant see HBG Host bus mastership avoiding temporary loss of 8 10 HBG 8 8 HBR 8 8 8 10 REDY 8 8 relinquishing the bus 8 11 Host bus request see HBR Host control of processor asynchronous transfers 8 9 and SDRAM 8 9 CS 8 9 12 56 host driven signals 8 9 HBR 12 58 relinquishing the bus 8 11 1 46 ADSP 21065L SHARC DSP User s Manual Host data packing 8 24 16 to 48 bit packing 8 35 32 to 48 bit packing 8 34 32 bit data 8 31 32 bit data reads 8 31 32 bit data writes 8 33 48 bit instructions 8 34 8 to 48 bit packing 8 35 changing the value of HBW 8 26 diagram of 8 32 for all IOP register accesses except the EPBx buffers 8 24 for EPBx accesses 8 24 for non EPBx IOP registers 8 24 HBW 8 24 individual
66. In this manual see Appendix A Instruction Set Reference The DMASTAT register is memory mapped in internal memory at address 0x0037 For a particular channel the DMA controller sets the channel active status bit when DMA is enabled and the current DMA sequence has not fin ished It sets the chaining status bit if the channel is currently performing chaining operations or if a chaining operation is pending A single cycle of latency occurs between the time changes in internal status occur and the time the DMA controller updates the DMASTAT register Status does not change on the master ADSP 21065L during an external port DMA operation until the external portion has finished until the EPBx buffers are empty In chain insertion mode DEN 0 CHEN 1 a channel s chaining status will never be 1 Make sure to test channel status for readiness so your program can rewrite the channels s chain pointer CPx register E 64 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers The processor does not initialize the DMASTAT register at reset as shown in Figure E 7 31 30 29 28 27 26 2 24 23 22 21 20 19 18 17 16 DMA Channel Status Ch7 Tx1_B Ch8 EPBO 0 inactive Chain Status Chain Status 1 active DMA Chaining Stat eaaa Ch5 Tx0_B Ch9 EPB1 1 enabled Chain Status Chain Status 15 14 13 12 11 10 9 8 7 6 54 3 2 1 0 Ch3 Rx1_B ChO Rx0_A Status Chain Status Ch2 Rx1_A Sta
67. LADDR register described 3 33 loop address stack pointer and 3 33 value when loop address stack empty 3 33 LAFS late TFS RFS bit 9 16 9 22 defined 9 29 described 9 56 late frame sync mode 9 56 Late frame sync mode 9 56 described 9 56 Latencies and throughput summary of 12 65 system registers effect and read latencies E 4 Latency between DMA request and DMA grant signals handling 6 65 LCE condition 3 12 3 14 CURLCNTR current loop count and 3 12 DO UNTIL instruction 3 12 IF NOT LCE instruction and 3 13 LCNTR 3 25 3 34 CURLCNTR and 3 35 described 3 35 last loop iteration 3 35 loop counter stack and 3 35 nested loops setting up count value for 3 35 reads of 3 37 LE condition 3 13 Least significant word LSW format 5 29 Loading routine see Booting Local bus host interface and 8 6 Loop abort LA modifier 3 34 Loop address stack 3 7 described 3 32 DO UNTIL instruction and 3 33 empty state 3 33 layout 3 32 loop abort LA modifier and 3 34 overflow 3 33 PUSH LOOP instruction and 3 33 pushing and popping 3 7 stack pointer and the LADDR register 3 33 STKY register and 3 33 Loop counter stack 3 34 LCNTR value and 3 35 pushing for nested loops diagram of 3 36 see LCNTR Loop counters and stack 3 34 current loop counter see CURLCNTR loop counter stack 3 34 loop counter see LCNTR Loop instructions 3 1 counter based loops 3 28 DO FOREVER 3 12 DO UNTIL 3 11 see DO UNTIL instruction 3 25 instruction pipeline
68. Master Slave mode a P 0 TX is slave pacl 1 TX is master Figure E 16 STCTL x register bits I S mode E 92 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers 31 30 29 28 27 26 25 24 23 22 21 20 1918 17 16 LTFS TXS_A Active State TFS Status O active high TX A Data Buffer 1 active low 00 empty 10 partially full SDEN_A 11 full SPORT xmit DMA enable A TUVE A O disable Status sticky 1 enable TX A Underflow SCHEN_A CHNL SPORT xmit DMA Currently Selected Chn chaining enable A O disable MFD 1 enable Multichn Frame Delay Status is read only 15 14 1312 1110 9 8 7 6 54 3 2 1 0 DTYPE TFS Data Data Type Dependency x0 r justify fill MSB w Os 0 depend x1 r justify sign ext MSB 1 independ Ox compand u law CKRE 1x compand A law Active Clock Edge SENDN O falling edge Endian word format 1 rising edge O MSB first 1 LSB first OPMODE PACK SLEN Operation Mode 16 32 bit pack Serial Word Length 1 O non I2S mode O no pack 1 I2S mode iapeck Figure E 17 STCTLx register bits multichannel mode ADSP 21065L SHARC DSP Technical Reference E 93 IOP Registers Table E 24 lists and describes the individual bits of the STCTL x register Table E 24 STCTLx bits Bit Standard 12S Multichn Description 0 SPEN_A SPEN_A Reserved SPORT enable A 0 disable 1 enable 1 2 DTYPE 9 Reserved DTYPEy 9 D
69. Mode 0 DSP SPORT mode 1 Multichn Mode LRFS Active State RFS O active high SDEN_A 1 active low SPORT rcv DMA enable A O disable 1 enable SCHEN_A SPORT rcv DMA chaining enable A O disable 1 enable MCE IMAT Rev Compare Data O accept if false 1 accept if true 6 54 3 2 1 0 DTYPE Data Type x0 r justify fill MSB w Os x1 r justify sign ext MSB Ox compand p law 1x compand A law SENDN 16 32 bit pack O no pack 1 pack ICLK Rev Clk Source O external 1 internal Endian word format O MSB first OPMODE SLEN 1 LSB first Serial Word Length 1 Operation Mode O non I2S mode 1 I2S mode Figure E 14 SRCTLx register bits multichannel mode E 84 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 23 lists and describes the individual bits in the SRCTL x register Table E 23 SRCTLx bits Bit Standard 12S Multichn Description 0 SPEN_A SPEN_A Reserved SPORT enable A 0 disable 1 enable 1 2 DTYPE 9 Reserved DTYPEy 9 Data type 00 right justify fill MSBs w 0s Ol right justify Sign extend MSBs 10 compand with p law 11 compand with A law 3 SENDN Reserved SENDN Endian word format 0 MSB first 1 LSB first 4 8 SLEN4 g SLEN4 9 SLEN 4 9 Serial word length 1 9 PACK PACK PACK 16 to 32 bit word packing 0 disable packing l enable packing ADSP 21065L SHARC DSP Technical Referenc
70. NORM MAxX round to zero Denormal returns Zero Denormal inputs are flushed to Zero A NAN input returns an all 1s result Status Flags Flag Description AZ Set if the result is a denormal unbiased exponent lt 126 or zero otherwise cleared AU Set if the postrounded result is a denormal other wise cleared AN Set if the floating point result is negative other wise cleared AV Set if the result overflows unbiased exponent gt 127 otherwise cleared AC Cleared AS Cleared Al Set if the input is a NAN an otherwise cleared B 36 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Rn MANT Fx Function Extracts the mantissa fraction bits with explicit hidden bit excluding the sign bit from the floating point operand in Fx The unsigned magnitude result is left justified 1 31 format in the fixed point field in Rn Round ing modes are ignored and no rounding is performed because all results are inherently exact Denormal inputs are flushed to Zero A NAN or an Infinity input returns an all 1s result 1 in signed fixed point format Status Flags Flag Description AZ Set if the result is zero otherwise cleared AU Cleared AN Cleared AV Cleared AC Cleared AS Set if the input is negative otherwise cleared Al Set if the input operands is a NAN or an Infinity otherwise cleared ADSP 21065L SHARC DSP Technical Reference B
71. R11 8 R15 12 Compute Field EEEE EEEE EP EEE PEER Syntax Floating point versions Fm F3 0 F7 4 Fa F11 8 F15 12 Fs F11 8 F15 12 Compute Field Pa PPE Per E EEE PEELE 1 11 FS FM FA FXM FYM FXA FYA The Multiplier x and y operands are received from data registers RXM FXM and RYM FYM The Multiplier result operand is returned to data register RM FM The ALU x and y operands are received from data regis ters RXA FXA and RYA FYA The ALU result operands are returned to data register RA FA and RS FS B 104 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference The result operands can be returned to any registers within the Register File Each of the four input operands is restricted to a different set of four data registers as shown in Table B 11 Table B 11 Valid sources of the input operands Input Valid Sources Multiplier X R3 RO F3 FO Multiplier Y R7 R4 7 4 ALU X R11 R8 F11 F8 ALU Y R15 R12 F15 F12 ADSP 21065L SHARC DSP Technical Reference B 105 Multifunction Computations B 106 ADSP 21065L SHARC DSP Technical Reference C NUMERIC FORMATS The processor supports several numeric formats e JEEE Standard 754 854 32 bit single precision floating point format e An extended precision version of the 32 bit single precision floating point format that has eight additional bits in the mantissa 40 bits to
72. Rn MR2F MROB Rn Rn MROB MRIB Rn Rn MR1B MR2B Rn Rn MR2B Compute Field 1 00000 T AI RK The MR register is specified by Ai and the data register by Rk The direction of the transfer is determined by T O to Register File 1 to MR register Ai MR Register 0000 ROF 0001 RIF 0010 R2F 0100 ROB B 60 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Ai MR Register 0101 MR1B 0110 MR2B Status Flags Flag Description N Cleared V Cleared U Cleared I Cleared ADSP 21065L SHARC DSP Technical Reference B 61 Multiplier Operations Fn Fx Fy Function Multiplies the floating point operands in registers Fx and FY The result is placed in the register Fn Status Flags Flag Description N Set if the result is negative otherwise cleared V Set if the unbiased exponent of the result is greater than 127 otherwise cleared U Set if the unbiased exponent of the result is less than 126 otherwise cleared I Set if either input is a NAN or if the inputs are Infinity and Zero otherwise cleared Reminder The individual registers file are prefixed with an F when used in floating point computations The registers are prefixed with an R when used in fixed point computations The following instructions for example use the same registers FO Fl F2
73. Ry or by the immediate len6 field in the instruction The field is extracted from the fixed point field of Rx starting from a bit position determined by the bit field in register Ry or by the immediate bit field in the instruction The MSBs of Rn are sign extended by the MSB of the extracted field unless the MSB is extracted from off scale left The floating point extension field of Rn bits 7 0 of the 40 bit word is set to all 0s Bit6 and len6 can take values between 0 and 63 inclusive allowing for extraction of fields ranging in length from 0 to 32 bits and from bit posi tions ranging from 0 to off scale left Example 39 31 23 5 7 0 Jone Se abc defghijk 1mn eins Hee Rx len6 bits bit position bit6 from reference point 39 31 23 5 7 0 aaaaaaaa aaaaaaaa aaabcdef ghijkilmn 00000000 Rn Nei e raisin ein taint Sitar sign extension B 84 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Status Flags Flag Description SZ Set if the output operand is 0 otherwise cleared SV Set if any bits are extracted from the left of the 32 bit fixed point input field i e if len6 bit6 gt 32 otherwise cleared SS Cleared ADSP 21065L SHARC DSP Technical Reference B 85 Shifter Operations Rn EXP Rx Function Extracts the exponent of the fixed point operand in Rx The exponent is placed in the shf field in register Rn The exponent is calculated as t
74. SHARC DSP User s Manual Flag outputs see FLAGx 12 33 FLAGx 12 28 input synchronization delay 12 27 internal clock and phase lock 12 27 internal clock generation 12 26 JTAG interface pins see JTAG emulator signal recognition phase 12 27 single bit signaling 12 28 synchronization delay 12 27 XTAL and CLKIN 12 26 Pin states after reset 12 22 ACK 12 22 ADDRx 12 22 BMS 12 23 BMSTR 12 22 BRx 12 22 BSEL 12 23 bus master driven pins 12 22 CAS 12 22 CLKIN 12 23 CPA 12 23 CS 12 23 DATAx 12 23 DMAGx 12 22 DMAR x 12 23 DQM 12 22 DRx_X 12 24 DTx_X 12 24 EMU 12 25 FLAGx 12 24 HBG 12 22 INDEX HBR 12 24 IDx 12 24 IRQx 12 24 JTAG emulator 12 25 MSx 12 22 PWM_EVENTx 12 24 RAS 12 23 RCLKx 12 24 RD 12 23 REDY 12 24 RESET 12 24 RFSx 12 24 SBTS 12 24 SDA10 12 23 SDCKE 12 23 SDCLKx 12 23 SDWE 12 23 serial port pins 12 24 SW 12 23 TCK 12 25 TCLKx 12 24 TDI 12 25 TDO 12 25 TFSx 12 24 TMS 12 25 TRST 12 25 WR 12 23 XTAL 12 24 Pipelining 3 19 described 3 4 execution cycles 3 5 system register writes and 3 8 Placing all SDRAM signals in a high impedance state 10 9 ADSP 21065L SHARC DSP User s Manual I 85 INDEX Placing the SDCLK1 signal only in a high impedance state 10 9 PM bus address bits diagram of 5 8 and EPBx buffers 8 18 connection to memory 5 7 core memory accesses 5 10 data storage 5 8 data transfer destinations 5 11 data transfer t
75. The addresses in the vector table represent offsets from a base address For an interrupt vector table in internal memory the base address is 0x0000 8000 the beginning of Block 0 For an interrupt vector table in external memory the base address is 0x0002 0000 Table F 1 IRPTL IMASK interrupt vectors and priorities Bit Address Name Description Priority 0 0x00 Reserved 1 0x04 RSTI Reset read only non Highest maskable 2 0x08 Reserved 3 Ox0C SOVF Status stack or loop stack overflow or PC full 4 0x10 TMZH Timer high priority option 5 0x14 VIRPTI Vector interrupt 6 0x18 IRQ2 IRQ2 asserted 7 0x1C IRQ1 IRQI asserted ADSP 21065L SHARC DSP Technical Reference F 1 Table F 1 IRPTL IMASK interrupt vectors and priorities Contd Bit Address Name Description Priority 8 0x20 IRQOI TROO asserted 9 0x24 Reserved 0 0x28 SPRO DMA channel 0 1 SPORTO eceive A amp B 1 Ox2C SPR1 DMA channel 2 3 SPORTI eceive A amp B 2 0x30 SPTO DMA channel 4 5 SPORTO transmit A amp B 3 0x34 SPT1 DMA channel 6 7 SPORT1 transmit A amp B l4 0x38 Reserved US Ox3C Reserved 6 0x40 EPOI DMA channel 8 Ext port buffer 0 7 0x44 EP1I DMA channel 9 Ext port buffer 1 18 0x48 Reserved 19 0x4C Reserved 20 0x50 Reserved 21 0x54 CB7I Circular buffer 7 ove
76. a denormal unbiased exponent lt 126 or zero otherwise cleared AU Set if the postrounded result is a denormal other wise cleared AN Set if the floating point result is negative other wise cleared AV Set if the postrounded result overflows unbiased exponent gt 127 otherwise cleared AC Cleared AS Cleared Al Set if either of the input operands is a NAN or if they are opposite signed Infinities otherwise cleared B 30 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference COMP Fx Fy Function Compares the floating point operand in register Fx with the floating point operand in register Fy Sets the AZ flag if the two operands are equal and the AN flag if the operand in register Fx is smaller than the operand in reg ister Fy The ASTAT register stores the results of the previous eight ALU compare operations in bits 24 31 These bits are shifted right bit 24 is overwritten whenever a fixed point or floating point compare instruction is executed The MSB of ASTAT is set if the X operand is greater than the Y operand its value is the AND of AZ and AN otherwise it is cleared Status Flags Flag Description AZ Set if the operands in registers Fx and Fy are equal otherwise cleared AU Cleared AN Set if the operand in the Fx register is smaller than the operand in the Fy register otherwise cleared AV Cleared AC Cleared AS Cleared Al Set if either of
77. a mask The set operation sets all the bits in the specified sys tem register that are also set in the specified data value The clear operation clears all the bits that are set in the data value The toggle oper ation toggles all the bits that are set in the data value The test operation sets the bit test flag BTF in ASTAT if all the bits that are set in the data value are also set in the system register The XOR operation sets the bit test flag BTF in ASTAT if the system register value is the same as the data value For more information on Shifter operations see Appendix B Compute Operation Reference For more information on system registers see Appendix E Control and Status Registers Examples BIT SET MODE2 0x00000070 BIT TST ASTAT 0x00002000 ADSP 21065L SHARC DSP Technical Reference A 71 Group IV Instructions Miscellaneous Type 18 Opcode 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 10100 BOP SREG DATA 31 30 29 28 27 26 25 24 upper 8 bits DATA lower 24 bits Bits Description BOP Selects one of the five bit operations SREG Specifies the system register DATA Specifies the data value A 72 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference Register Modify bit reverse Type 19 Immediate I register modify with or without bit reverse Syntax MODIFY Ia lt data32 gt Ic lt data24 gt BITREV Ia
78. address or premodified I register value or optional compute operation in parallel with a transfer between data memory and the Register File In this instruction the IF condition and ELSE keyword are not optional and must be used If the specified condition is true the jump is executed If the specified condition is false the compute operation and data memory transfer are performed in parallel Only the compute operation is optional in this instruction The PC relative address for the jump is a 6 bit twos complement value If an I register is specified Ic it is modified by the specified M register Md to generate the branch address The I register is not affected by the modify operation Note that the delay branch DB loop abort LA and clear interrupt CI modifiers are not available for this jump instruction For the data memory access the I register Ia provides the address The I register value is postmodified by the specified M register and is updated with the modified value Premodify addressing is not available for this data memory access A 52 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference For more information on indirect branches see Chapter 4 Data Address ing in ADSP 21065L SHARC DSP User s Manual Examples IF TF JUMP M8 18 ELSE R6 DM I6 M1 IF NE JUMP PC 0x20 ELSE F12 FLOAT R10 BY R3 R6 DM 15 MOQ Type 10 Opcode with indirect jump
79. between the time the SDRAM detects the read command and the time the data is available at its outputs 00 no SDRA 01 1 cycle 10 2 cycles 11 3 cycles 18 20 SDTRAS SDRAM ta Spec in number of clock cycles 21 23 SDTRP SDRAM ty spec in number of clock cycles 24 SDPM SDRAM power up option Specifies the sequence of commands in the SDRAM power up cycle 0 precharge 8 CBR mode register set l precharge mode register set 8 CBR E 72 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 19 IOCTL register Cont d Bit Name Description 25 27 SDBS SDRAM bank select Specifies which of the ADSP 21065L s exter al memory bank connects to SDRAM 000 no SDRAM 100 bank 0 101 bank 1 110 bank 2 111 bank 3 other reserved For proper operation of the SDRAM control ler in the WAIT register set the EBxWS bits to 0 and the EBxWM bits appropriately for the external memory bank to which the SDRAM connects See Table E on page E 113 28 SDBUF SDRAM buffer Enables disables pipelining of address and control signals when using external buffer ing between the ADSP 21065L and SDRAM Sup ports multiple SDRAMs connected in parallel 0 disable 1 enable ADSP 21065L SHARC DSP Technical Reference E 73 IOP Registers Table E 19 IOCTL register Cont d Bit Name Description 29 30 SDBN SDRAM number of ban
80. buffers channels 8 and 9 only The DMARX signal paces DMA trans fers The DMA controller gener ates a DMA request when DMARx is asserted DMARx requests function the same way as in handshake mode and the DMA controller transfers the data when RD or WR is asserted The address is driven as in nor mal master mode ORing the RD DMAGx and WR DMAGx pairs requires no external gates enabling buffer access with zero wait state and no idle states Wait states and Acknowledge ACK apply to paced master mode trans fers For details see Chapter 5 Memory in ADSP 21065L SHARC DSP User s Manual il il 1 Reserved If TRAN 1 for an external read of the EPBx buffer the DMA controller fills the buffer as soon as the DEN bit is set to 1 You cannot use DMA paced master mode or external handshake mode with SDRAM transfers 3 When an external DMA channel is configured for output TRAN 1 the EPBx buffer starts to fill as soon as the channel becomes enabled whether or not DMAR x assertions or DMA slave mode DMA buffer reads have been made ADSP 21065L SHARC DSP Technical Reference E 63 IOP Registers DMASTAT DMA Channel Status Register The DMASTAT register maintains status bits for each DMA channel For details on using the DMASTAT register in ADSP 21065L SHARC DSP Users Manual see e Chapter 6 DMA e Chapter 7 Multiprocessing e Chapter 8 Host Interface e Chapter 9 Serial Ports
81. effect latency 9 70 ADSP 21065L SHARC DSP User s Manual I 65 INDEX I S SPORT mode enabling 9 62 OPMODE and 9 70 standard SPORT mode enabling 9 59 Memory 32 and 40 bit data configuration for 5 40 32 and 48 bit words using 5 30 access restrictions 5 27 access timing of multiprocessor memory space 5 67 ACK 5 47 address boundaries 5 19 address decoding table 5 20 ADDR x pin 5 44 architecture diagram of 5 2 bandwidth 5 1 boot modes 5 53 bus idle cycle see Bus idle cycle bus master accesses of external memory space 5 66 5 67 cache miss 5 10 core accesses internal memory space through multiprocessor memory space 5 25 over the PM bus 5 10 DAG operation see DAG operation data transfers 5 7 48 bit accesses of program memory 5 14 address sources 5 11 between memory and registers 5 12 between universal registers 5 12 example code for 48 bit pro gram memory access 5 14 over DM bus 5 11 over PM bus 5 11 PX register transfers diagram of 5 13 single cycle number of 5 17 with the Register File 5 11 DATAx 5 45 DM bus see DM bus dual data accesses see Dual data accesses EPROM boot mode 5 53 see EPROM boot mode executing program from external memory space 5 49 extending off chip memory accesses 5 53 external memory address space 5 44 external memory banks and SDRAM see SDRAM interface external memory banks see External memory banks external memory space access address fields 5 26 external memory sp
82. external memory space 5 52 direct 5 11 immediate 5 11 indirect 5 11 ADDRx and host accesses 8 11 EPROM booting and 12 54 external memory space interface and 5 44 generating addresses outside the address range of external memory space 6 30 parallel SDRAM refresh command 10 28 pin definition 12 4 state after reset 12 22 ADI product information sources of xix xiii ADI product literature xxiv xviii ADREDY bit active drive REDY switching between open and active drain output 8 12 ADSP 21065L block diagram 6 2 AF ALU floating point operation bit 2 16 described 2 19 Al ALU floating point invalid operation bit 2 16 described 2 19 setting 2 19 AIS ALU floating point invalid operation bit 2 17 described 2 19 setting 2 19 Alternate DAG registers 4 3 architecture 4 4 context switching and 4 3 described 4 3 diagram of 4 4 MODE control bits for 4 5 SRD1H DAG alternate register select 7 4 4 5 SRD1L DAGI alternate register select 3 0 4 5 SRD2H DAG alternate register select 15 12 4 5 SRD2L DAG alternate register select 11 8 4 5 Alternate register file registers 2 11 context switching 2 11 control bits 2 11 described 2 11 effect latency of activation 2 11 selecting the active sets 2 11 SRRFH 2 11 SRRFL 2 11 ALU data formats 2 12 described 2 1 instruction set summary 2 21 instruction types 2 12 operating modes 2 14 I 2 ADSP 21065L SHARC DSP User s Manual see ALU operating modes status flags 2
83. format the Multiplier sets the result to the maxi mum value Otherwise the MR value is unaffected The result is placed either in the fixed point field in register Rn or one of the MR accumulation registers which must be the same MR register that provided the input If Rn is specified only the portion of the result that has the same format as the inputs is transferred bits 31 0 for integers bits 63 32 for fractional The floating point extension field in Rn is set to all 0s If MRF or MRB is specified the entire 80 bit result is placed in MRF or MRB Status Flags Flag Description MN Set if the result is negative otherwise cleared MV Cleared MU Set if the upper 48 bits of a fractional result are all zeros signed or unsigned result or ones signed result and the lower 32 bits are not all zeros Inte ger results do not underflow MI Cleared ADSP 21065L SHARC DSP Technical Reference B 57 Multiplier Operations Rn Rn MRB RND MRF mod RND MRB mod MRF RND MRF mod RND MRB mod Function Rounds the specified MR value to nearest at bit 32 the MR1 MRO boundary The result is placed either in the fixed point field in register Rn or one of the MR accumulation registers which must be the same MR register that provided the input If Rn is specified only the portion of the result that has the same format as the inputs is transferred bits 31 0 for integers bits 63 32 for fractional The floating poin
84. gt DM PM direct addressing type 14 instruction A 63 ureg lt gt DM PM indirect addressing type 15 instruction A 65 Group IV miscellaneous instructions Cjump Rframe type 24 instruction A 81 IDLE type 22 instruction A 78 configuration 7 31 data source and destination selection 6 63 described 6 55 6 62 DMAGx 6 62 7 31 8 22 DMAR x 6 62 7 31 8 22 enabling 6 63 EXTERN bit 7 31 8 22 external transfers and the ECEPx register 6 63 hardware handshake signals 6 62 host data transfers to internal memory space 8 22 HSHAKE bit 7 31 8 22 MASTER bit 7 31 8 22 multiprocessing DMA accesses of internal memory 7 31 Hardware SPORT reset 9 8 HBG and host signal buffers 8 9 1 44 ADSP 21065L SHARC DSP User s Manual host interface 8 8 multiprocessor bus arbitration 7 10 pin definition 12 8 state after reset 12 22 HBR BCNT register and 7 18 host booting 12 58 host interface 8 8 maintaining host bus mastership 8 10 multiprocessor booting 12 59 multiprocessor bus arbitration 7 10 pin definition 12 9 relinquishing the bus 8 11 resolving system bus access deadlock 8 49 signal glitches avoiding 8 46 state after reset 12 24 HBW host bus width bits 8 22 8 24 8 26 changing the initialization after reset value 8 26 changing the packing mode 12 57 EPBx packing modes 6 16 external port DMA packing mode 6 51 host boot mode 12 57 host data transfers 8 24 host
85. indirect addressing using I registers The I register is premodified with an immediate value specified in the instruction The I register is not updated Data memory address modifiers are 32 bits wide 0 to 232_1 Program memory address modifiers are 24 bits wide 0 to 974 1 The ureg may not be from the same DAG that is DAG1 or DAG2 as Ia Mb or Ic Md For more information on register restrictions see Chapter 4 Data Addressing in ADSP 21065L SHARC DSP User s Manual Examples DM 24 15 TCOUNT USTATI1 PM offs 113 offs is a defined constant ADSP 21065L SHARC DSP Technical Reference A 65 Group Ill Instructions Immediate Move Type 15 Opcode 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 101 G I D UREG DATA upper 8 bits z erp EP EEE EEE DATA lower 24 bits Bits Description D Selects the access type read or write G Selects the memory type data or program UREG Specifies the number of a universal register DATA specifies the immediate modify value for the I register A 66 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference Immediate data gt gt DM PM Type 16 Immediate data write to data or program memory Syntax DM Ia Mb lt data32 gt PM Ic Md Function A write of 32 bit immediate data to data or program memory with indi rect addressing The data is placed in the most s
86. input sign ABS and MANT operations 5 AI ALU floating point invalid operation 6 N ultiplier result negative 7 V ultiplier overflow 8 U ultiplier floating point underflow 9 I ultiplier floating point invalid operation 10 AF ALU floating point operation 11 SV Shifter overflow 12 SZ Shifter result zero 13 SS Shifter input sign 14 17 Reserved 18 BTF Bit test flag for system registers 19 FLGO FLAGO value 20 FLG1 FLAGI value E 10 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 4 ASTAT register Cont d Bit Name Description 21 FLG2 FLAG2 value 22 FLG3 FLAG3 value 23 Reserved 24 31 CACC Compare accumulation shift register ADSP 21065L SHARC DSP Technical Reference E 11 System Registers IMASK and IRPTL Interrupt Mask and Latch Registers The IMASK and IRPTL registers have identical bit positions 0 through 31 that correspond to the ADSP 21065L interrupts in order of priority from highest to lowest For details on using the IMASK and IRPTL registers in ADSP 21065L SHARC DSP User s Manual see e Chapter 2 Computation Units e Chapter 3 Program Sequencing e Chapter 4 Data Addressing e Chapter 5 Memory e Chapter 6 DMA e Chapter 7 Multiprocessing e Chapter 8 Host Interface In this manual see Appendix A Instruction Set Reference After reset the IRPTL register is initialized to 0x0000 0000 and the IMASK register is initialized to 0x0000 000
87. interrupt vector table no boot mode BSEL 0 BMS 0 Specifies the location of the interrupt vec tor table when processor configured for no boot mode 0 in external memory at 0x0002 0000 1 in internal memory at 0x0000 8000 After reset initialized to zero placing the interrupt vector table in external memory for no boot mode When the processor is configured for one of the boot modes the internal interrupt vector table always resides in internal memory regardless of the value of this bit 3 Reserved ADSP 21065L SHARC DSP Technical Reference E 101 IOP Registers Table E 25 SYSCON register Contd Bit Name Description 4 5 HBW Host bus width Specifies the external word width of the host bus for host accesses to the processor s EPBx IOP registers 00 32 bit host bus 01 16 bit host bus 10 8 bit host bus 11 reserved Host accesses to all other IOP registers are always 32 bits regardless of the value of this bit 6 HMSWF Host packing order Specifies the packing order for host accesses 0 LSW first 1 MSW first This bit ignored for 32 to 48 bit packing 7 HPFLSH Host packing status flush Resets the host packing status flush packing status This bit always reads as 0 Host must not access the IOP registers while the core writes this bit E 102 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers
88. memory access 5 14 multiprocessing see Multiprocessing data transfers multiprocessing DMA 7 30 multiprocessing IOP register reads see OP register reads of 40 bit DM data bus 5 14 over DM bus 5 11 over PM bus 5 11 over the external bus 5 43 packed data 5 43 PM bus destinations 5 11 PX register data alignment 5 12 PX register transfers diagram of ADSP 21065L SHARC DSP User s Manual I 19 INDEX 5 13 single cycle number of 5 17 universal register to register 5 12 with memory 5 7 Data transmit DTx_X pins 9 4 DATAx and host accesses 8 30 EPROM boot mode and 12 51 EPROM boot sequence after reset 12 54 external memory space interface and 5 45 external port data alignment diagram of 8 31 host booting and 12 58 pin definition 12 4 state after reset 12 23 DB modifier 3 18 Decode address register 3 6 Decode cycle 3 4 Decoded memory address lines MSx 5 49 Decoding table for memory addresses 5 20 Decoupling capacitors and ground planes 12 46 power plane 12 46 VDD pins 12 46 def21065L h file 9 12 complete listing E 116 Delayed branches 3 18 call return address 3 19 DB modifier and 3 18 defined 3 19 instructions following restriction 3 20 interrupt processing and 3 23 pipelined stages of jumps calls 3 19 pipelined stages of returns 3 20 reading PC stack PC stack pointer and 3 24 DEN DMA enable bit 6 9 6 14 8 28 described 6 15 enabling disabling DMA 8 20 single word EPBx data transfer control
89. mode B 13 Rn Rx Ry fixed point operation ALU status flags B 6 described B 6 saturation mode B 6 Rn Rx Ry Cl fixed point operation ALU status flags B 8 described B 8 saturation mode B 8 Rn Rx 1 fixed point operation ALU status flags B 15 described B 15 Rn Rx Ry fixed point operation ALU status flags B 7 described B 7 saturation mode B 7 Rn Rx Ry Cl fixed point operation ALU status flags B 9 described B 9 saturation mode B 9 Rn SAT MRB mod 1 operation INDEX described B 57 multiplier status flags B 57 Rn SAT MRF mod1 operation described B 57 multiplier status flags B 57 Rn TRUNC Fx BY Ry operation ALU status flags B 40 described B 39 Rn TRUNC Fx operation ALU status flags B 40 described B 39 RND322 floating point rounding boundary bit 2 14 32 bit data in 40 bit systems using 5 41 32 bit IEEE results 2 15 40 bit results 2 15 multiplier floating point operation 2 32 2 33 vs IMDWx 5 41 ROM boot wait mode RBWM 5 56 ROM boot wait state RBWS 5 57 Rotating priority for external port DMA channels 6 37 DCPR bit 6 37 described 6 37 vs fixed priority 6 38 vs SPORT channel priorities 6 38 Rounding modes described 2 7 round toward zero 2 7 Rounding MR register 2 30 ADSP 21065L SHARC DSP User s Manual I 99 INDEX Round toward zero rounding mode 2 7 ROVE receive overflow status bit 9 22 9 38 defined 9 33 described 9 38 RTFS active state RFS bit described 9 55 RTI instruction 8
90. nearest TDO An x specifies a don t care state None of the public instructions place data registers into test modes The instruc tions affect the ADSP 21065L as defined in the 1149 1 specification The ADSP 21065L does not support the optional instructions RUNBIST IDCODE or USERCODEL Table D 1 Test instructions Bits Register 4 3 2 1 0 Name Serial Path Type IX X X X BYPASS Bypass Public 0 0 0 0 0 EXTEST Boundary Public 0 0 0 0 1 SAMPLE PRELOAD Boundary Public 0 0 0 1 0 Reserved for emulation NA Private 0 0 0 1 1 INTEST Boundary Public 0 0 1 0 0 Reserved for emulation NA Private 0 0 1 0 1 Reserved for emulation NA Private ADSP 21065L SHARC DSP Technical Reference D 3 Instruction Register Table D 1 Test instructions Bits Register 4 3 2 1 0 Name Serial Path Type 0 0 1 Reserved for emulation NA Private 0 0 1 Reserved for emulation NA Private 0 1 x Reserved for emulation NA Private The entry under Register is the serial scan path either Boundary or Bypass in this case that the instruction enabled Figure D 1 shows these register paths The single bit Bypass register is fully defined in the 1149 1 specification The Boundary register is described in the next section You do not need to write special values into any register prior to selecting any instruction As Table D 1 shows certain instructions are r
91. of 12 21 data lines EPD and EPROM boot sequence after reset 12 53 DATAx 12 4 defined 5 3 DMA data transfers 7 30 DMAGx 12 5 DMAR x 12 5 host interface and 8 2 MSx 12 5 multiprocessing data transfers 7 25 7 27 pin definitions 12 4 SBTS 12 6 SW 12 6 tions summary of 6 52 described 6 50 disabling 6 67 DMA registers 6 12 EPBx buffers 6 50 fixed channel priority 6 38 internal DMA request and grant 6 35 interrupts 6 45 master mode DMA interrupts see DMA interrupts 6 45 modes see DMA modes 6 55 non DMaA single word transfers 6 50 priority of TCB chain loading see External port buffer 0 interrupt 9 6 TCB chain loading External port buffer 1 interrupt 9 6 redefining DMA channel priority External port DMA 6 38 block data transfers 6 7 buffer size 6 50 changing DMA channel priority assignment example of 6 38 channels 6 30 6 50 clearing EPBx buffers 6 50 connection to internal memory space 6 27 control bit definitions 6 14 core read write of EPBx buffers restrictions 6 50 data packing 6 51 LSWF packing format 6 52 MSWF packing format 6 52 packing logic 6 51 PMODE and HBW combina re enabling 6 67 rotating channel priority 6 37 6 38 transfer rate 6 50 External port DMA control registers see DMACX registers External port FIFO buffers see EPBx buffers EZ ICE emulator board level testing 12 38 CLKIN connection 12 40 connection requirements 12 36 described
92. operation described B 67 shifter status flags B 67 Rn BCLR Rx BY data8 operation described B 70 shifter status flags B 70 Rn BCLR Rx BY Ry operation described B 70 shifter status flags B 70 Rn BSET Rx BY data8 operation described B 71 shifter status flags B 71 Rn BSET Rx BY Ry operation described B 71 shifter status flags B 71 Rn BTGL Rx BY data8 operation described B 72 shifter status flags B 72 Rn BTGL Rx BY Ry operation described B 72 shifter status flags B 72 Rn CLIP Rx BY Ry fixed point operation ALU status flags B 25 described B 25 Rn EXP Rx operation described B 86 shifter status flags B 86 Rn EXP Rx EX operation described B 87 shifter status flags B 87 Rn FDEP Rx BY bit6 len6 operation described B 74 example B 75 shifter status flags B 75 Rn FDEP Rx BY bit6 len6 SE operation described B 78 example B 79 shifter status flags B 79 Rn FDEP Rx BY Ry SE operation described B 78 example B 79 shifter status flags B 79 Rn FDEP Rx BY Ry operation described B 74 example B 75 shifter status flags B 75 Rn FEXT Rx BY bit6 len6 SE operation described B 84 I 96 ADSP 21065L SHARC DSP User s Manual example B 84 shifter status flags B 85 Rn FEXT Rx BY bit6 len6 operation described B 82 example B 83 shifter status flags B 83 Rn FEXT Rx BY Ry SE operation described B 84 example B 84 shifter status flags B 85 Rn FIX Fx BY Ry operation ALU status flags B 40 described B 3
93. or compute dreg gt DM type 10 instruction described A 52 example A 53 IF COND A 52 opcode with indirect jump A 53 opcode with PC relative jump A 53 syntax summary A 6 Indirect jump call compute type 9 instruction described A 48 example A 49 opcode with indirect branch ADSP 21065L SHARC DSP User s Manual I 53 INDEX A 50 opcode with PC relative branch A 50 Individual register file registers assembly language prefix identifier 2 10 described 2 10 fixed point computations 2 10 floating point computations 2 10 Input signal conditioning 12 41 input inverter and 12 41 Input synchronization delay 12 27 Inserting a high priority DMA chain in an active DMA chain 6 44 Instruction addresses 3 6 Instruction cache architecture see Instruction cache architecture cache hit 3 58 cache miss 3 58 5 10 defined 5 3 described 3 58 disable and freeze 3 61 see Instruction cache disable and freeze dual data accesses 5 9 efficiency 3 60 see Instruction cache efficiency instruction fetches 5 10 operation 3 58 5 10 operation after reset 3 62 PM bus conflict 5 10 PM data bus accesses 5 10 program memory data accesses 3 10 program sequencing 3 7 size of 3 58 three instruction pipeline and 3 58 Instruction cache architecture addressing entry sets 3 59 cache hit 3 59 cache miss 3 59 described 3 58 diagram of 3 59 entry 3 58 entry sets 3 59 entry valid bit 3 59 instruction address mapping 3 59 3 60 LRU bit 3 59
94. point field in register Rn The floating point extension field in Rn is set to all 0s In saturation mode the ALU saturation mode bit in MODE set positive overflows return the maximum positive number 0x7FFF FFFF and negative overflows return the minimum negative number 0x8000 0000 Status Flags Flag Description AZ Set if the fixed point output is all Os otherwise cleared AU Cleared AN Set if the most significant output bit is 1 otherwise cleared AV Set if the XOR of the carries of the two most signif icant adder stages is 1 otherwise cleared AC Set if the carry from the most significant adder stage is 1 otherwise cleared AS Cleared Al Cleared ADSP 21065L SHARC DSP Technical Reference B 7 Single Function Operations Rn Rx Ry Cl Function Adds with carry AC from ASTAT the fixed point fields in registers Rx and Ry The result is placed in the fixed point field in register Rn The floating point extension field in Rn is set to all 0s In saturation mode the ALU saturation mode bit in MODE set positive overflows return the maximum positive number 0x7FFF FFFF and negative overflows return the minimum negative number 0x8000 0000 Status Flags Flag Description AZ Set if the fixed point output is all Os otherwise cleared AU Cleared AN Set if the most significant output bit is 1 otherwise cleared AV Set if the XOR of the carries of the two most signif ic
95. pulsewidth generation mode PWM_EVNT pin is output 8 INT_HIO Timer 0 interrupt vector location For interrupt stat on page E 26 s values see Table E 8 9 PULSE_HIO 10 PERIOD_CNT1 Timer 0 counter leading edge select pulse width ode only 0 low high to high transition to low transition Timerl period cou ode only t enable pulse counter 0 enable width count capture enable period count capture 11 TIMEN1 Timer 1 enable 0 disable 1 enable E 24 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 7 MODE2 register Cont d Bit Name Description 12 PWMOUT1 Timer 1 mode control O enable pulse counter mode PWM_EVENT pin is input 1 enable pulsewidth generation mode PWM_EVNT pin is output 13 INT_HI1 Timer 1 interrupt vector location For interrupt status values see Table E 8 on page E 26 14 PULSE_HI1 Timer 1 leading edge select pulse width counter mode only 0 low to high transition 1 high to low transition 15 FLGOO FLAGO status O input 1 output 16 FLG10 FLAG status O input 1 output 17 FLG20 FLAG2 status 0 input 1 output 18 FLG 30 FLAG3 status 0 input 1 output ADSP 21065L SHARC DSP Technical Reference E 25 System Registers Table E 7 MODE2 registe
96. read writes 7 16 host interface 8 7 host writes to 8 16 mode 12 56 Slave write FIFO 7 26 8 15 host EPBx writes 8 18 host read delay 8 17 writes to a full 8 16 SLEN serial word length bits 9 16 9 21 defined 9 35 described 9 48 I S SPORT mode 9 63 Soft processor reset see SRST Software interrupts 3 49 activating 3 49 IRPTL register 3 49 Software SPORT reset 9 8 Source termination 12 43 diagram of 12 44 guidelines for using 12 44 SPEN SPORT enable bit 9 15 9 21 defined 9 35 SPL SPORT loopback mode bit 9 22 defined 9 36 described 9 88 SPORT clock and frame sync frequencies 9 39 CLKIN 9 41 clock divisor value equation for ADSP 21065L SHARC DSP User s Manual 1 109 INDEX calculating 9 42 frame sync divisor value limitation 9 43 maximum clock rate restrictions 9 43 number of serial clock cycles between frame sync pulses equation for calculating 9 42 serial clock frequency equation 9 42 value of frame sync divisor equation for calculating 9 42 SPORT clock signal options 9 50 CKRE 9 50 clock edge 9 50 clock source 9 50 frequency 9 50 ICLK 9 50 internal vs external clocks 9 50 see also SPORT clock source RCLKx 9 50 single clock for input and output use of 9 50 TCLKx 9 50 SPORT clock source 9 50 external 9 51 ICLK 9 50 internal clock 9 50 RCLKx 9 50 serial clock divisor value 9 50 serial clock divisors and external clock source 9 51 TCLKx 9 50 SPORT control registers 9
97. registers are initialized to 0x0000 0000 as shown in fig ures E 12 E 13 and E 14 When changing operating modes make sure you write all zeros 0 to the serial port s control register to clear it before writing the new mode Some bit definitions of the SRCTLx register depend on the mode stan dard IS or multichannel for which the serial port is configured ADSP 21065L SHARC DSP Technical Reference E 81 IOP Registers 31 30 29 28 27 26 25 24 23 22 21 20 1918 17 16 LRFS Active Low RFS RXS_A Status O active high RX A Data Buffer 1 active low 00 empty LAFS 10 partially full 11 lt full Late RFS O early ROVF_A 1 late Status sticky SDEN_A SPORT Rev RX A Overflow RXS_B DMA enable A ROVF B O disable z 1 enable SPEN Te SCHEN_A SPORT Enable B MCE SPORT Rev DMA O disable SPORT Mode chaining enable A 1 enable 0 DSP SPORT mode O disable 1 Multichn mode 1 enable SPL SDEN_B SPORT Loopback O disable SCHEN_B Status is read only 1 enable 15 14 1312 1110 9 8 7 6 54 3 2 1 0 SPEN_A RFS Source 16 32 bit pack SPORT Enable A 0 external O no pack O disable 1 internal 1 pack 1 enable RFSR ICLK micas RFS Requirement Rev Clk Source FERAE fill MSB w 0s O no RFS required O external 01 Be sign ext MSB 1 RFS required 1 internal iOeeoneecd ee CKRE OPMODE 11 compand A law Active Clock Edge Operation Mode SENDN O falling edge Q non I2S mode Endian word format t rising edge 42125
98. s Manual I 3 INDEX Fn CLIP Fx BY Fy B 49 Fn FLOAT Rx B 41 Fn FLOAT Rx BY Ry B 41 Fn Fx COPYSIGN Fy B 46 Fn Fx Fy B 26 Fn Fx Fy B 27 Fn MAX Fx Fy B 48 Fn MIN Fx Fy B 47 Fn PASS Fx B 34 Fn RECIPS Fx B 42 Fn RND Fx B 35 Fn RSQRTS Fx B 44 Fn SCALB Fx BY Ry B 36 Rn Rx B 16 Rn Rx Ry 2 B 10 Rn ABS Rx B 17 Rn CLIP Rx BY Ry B 25 Rn FIX Fx B 39 Rn FIX Fx BY Ry B 39 Rn LOGB Fx B 38 Rn MANT Fx B 37 Rn MAX Rx Ry B 24 Rn MIN Rx Ry B 23 Rn NOT Rx B 22 Rn PASS Rx B 18 Rn Rx AND Ry B 19 Rn Rx OR Ry B 20 Rn Rx XOR Ry B 21 Rn Rx Ry B 7 Rn Rx Ry Cl B 9 Rn TRUNC Fx B 39 Rn TRUNC Fx BY Ry B 39 ALU status flags 2 16 AC ALU fixed point carry 2 16 AF ALU floating point operation 2 16 Al ALU floating point invalid operation 2 16 AIS ALU floating point invalid operation 2 17 AN ALU result negative 2 16 AOS ALU fixed point overflow 2 17 AS ALU x input sign 2 16 ASTAT status bits summary of 2 16 AUS ALU floating point underflow 2 17 AV ALU overflow 2 16 AVS ALU floating point overflow 2 17 AZ ALU result 0 or floating point underflow 2 16 CACC compare accumulation register 2 16 CACC update timing 2 16 Rn Rx 1 B 14 dual add subtract fixed point Rn Rx Cl B 12 B 96 Rn Rx Cl 1 B 13 dual add subtract floating point Rn Rx Ry B 6 B 98 Rn Rx Ry Cl B 8 fixed point carry flag 2 18 Rn Rx 1 B 15 floating to fixed point 1 4 ADSP 21065L SHARC DSP User s Manual conversions
99. see DMA Cx registers cycle defined 6 28 data buffers 6 4 data packing through the EPBx buffers 6 51 data transfers see DMA data transfers disabling chaining 6 39 enabling 6 9 external port FIFO buffers EPBx see EPBx buffers flushing the request counter FLSH 6 18 grant outputs 6 3 6 64 see also DMAGx II index register overflow 6 29 interrupts 6 45 maximum number of requests without a grant 6 64 mode configurations summary of 6 56 operation 6 27 operation modes 6 11 overall throughput of multiple ADSP 21065L SHARC DSP User s Manual I 21 INDEX DMA channel memory accesses 6 74 packing sequence for download of processor instructions from a 16 bit bus 6 53 packing sequence for download of processor instructions from a 32 bit bus 6 52 packing sequence for host to processor 8 to 48 bit words 6 54 parameter registers see DMA parameter registers polling for DMA status restrictions on 6 26 request inputs 6 3 see also DMARx sequence 6 29 6 39 6 48 6 49 system configurations for interprocessor operation 6 70 summary of 6 70 TCB chain loading see TCB chain loading transfer control block TCB see TCB DMA chain insertion mode 6 15 described 6 44 restrictions 6 45 setting up 6 44 DMA chaining 6 8 active status E 65 and the CP chain pointer register 6 39 automatic 6 15 chain insertion mode see DMA chain insertion mode chain pointer register see CP c
100. see LRU least recently used bit Instruction cache disable and freeze 3 61 CADIS 3 62 CAFRZ 3 62 disabling 3 61 freezing 3 61 program memory data access restrictions and 3 62 Instruction cache efficiency 3 60 bit rate and 3 60 cache misses and 3 60 described 3 60 example of cache inefficient code 3 60 Instruction cycle 3 4 clock rate 3 4 I 54 ADSP 21065L SHARC DSP User s Manual decode 3 4 execute 3 4 fetch 3 4 pipelined execution cycles 3 5 pipelining 3 4 processing rate 3 4 Instruction fetches 5 8 5 10 dual data accesses 5 8 over the PM data bus 5 10 PM bus conflict 5 10 through the instruction cache 5 10 word width of 5 28 Instruction pipeline 3 19 DO UNTIL instruction and 3 25 instruction cache and 3 58 loop restrictions and 3 27 short loops and 3 28 Instruction set notation A 11 Instruction set reference compute and move modify A 4 see Compute and move modify instructions condition and termination codes summary of A 13 conditional instructions A 3 group I instructions see Group I compute and move instructions A 28 group II program flow control instructions see also Group II program flow control instructions summary A 44 INDEX group III immediate move instructions A 62 A 70 see Group III immediate move instructions see Group IV miscellaneous in structions group IV instructions A 9 immediate move instructions A 8 see Immediate move instructions instruction summary A 2 instruction
101. see System registers ADSP 21065L SHARC DSP User s Manual I 15 INDEX Controlled impedance transmission line 12 43 Conventions of notation global XXV Core accesses FLAGx and system bus accesses 8 48 MSx and system bus accesses 8 48 of the system bus 8 48 over the PM bus 5 10 type 10 instruction and system bus accesses 8 48 Core controlled interrupt driven I O 6 46 implementing 8 20 Core hang avoiding 9 15 BHD buffer hang disable bit 7 29 8 19 9 86 defined 8 19 reads writes of RX TX buffer and 9 86 single word data transfers 7 29 Core priority access described 7 18 pin 7 11 12 16 slave processor external bus access sequence 7 19 7 20 timing diagram 7 19 Counter based loops CURLCNTR 3 35 interrupt processing in 3 29 overhead in 3 29 pipelined one instruction three iteration 3 28 pipelined one instruction two iteration 2 cycles of overhead 3 29 restrictions 3 28 CP chain pointer register and PCI bit diagram of 6 40 memory address field 6 39 PCI program controlled interrupts bit 6 40 symbolic address restriction 6 44 CP DMA chain pointer register 6 31 disabling DMA on a channel 6 39 DMA chaining 6 39 memory address field 6 39 PCI program controlled interrupts bit 6 40 PCI bit diagram of 6 40 symbolic address restriction 6 44 CPA core priority access timing diagram of 7 19 interrupting DMA transfers 7 18 multiprocessor bus arbitration 7 11 nonmultiprocessing system 7 19 pin definition
102. state bit automatic wait state option 5 62 MN multiplier result negative bit 2 34 described 2 35 MN condition 3 13 MOD1 multiplier operations options described B 52 summary of B 53 MOD2 multiplier operations options described B 51 summary of B 52 Mode register set command SDRAM see MRS command MODE register alternate register file register control bits 2 11 alternate register file registers activating 2 11 ALU operation bits 2 14 ALUSAT 2 14 bit definitions E 18 bit reverse mode control bits 4 14 BM bus master condition 3 13 conditional instructions and 3 12 DAG register control bits summary of 4 5 default bit values diagram of E 17 described E 16 effect latency of activation of alternate register file register sets I 70 ADSP 21065L SHARC DSP User s Manual 2 11 floating point operating mode status bits summary of 2 32 floating point operation status bits 2 32 initialization value E 16 IRPTEN 3 38 nested interrupts 3 46 NESTM 3 46 preserved current values of 3 49 program sequencing interrupts and 3 38 RND32 2 14 2 32 5 41 RTI instruction and 3 16 sign extending short word addresses 5 30 sign extension enable SSE bit 5 30 5 42 SRCU 2 29 SRD1H 4 5 SRDIL 4 5 SRD2H 4 5 SRD2L 4 5 SRRFH 2 11 SRREL 2 11 status stack save and restore operations 3 48 TRUNC 2 14 2 32 zero filling short word addresses 5 30 MODE register bit definitions E 23 BUSLK 7 34 CADIS and CAFRZ
103. the input operands is a NAN other wise cleared ADSP 21065L SHARC DSP Technical Reference B 31 Single Function Operations Fn Fx Function Complements the sign bit of the floating point operand in Fx The com plemented result is placed in register Fn A denormal input is flushed to Zero A NAN input returns an all 1s result Status Flags Flag Description AZ Set if the result operand is a Zero otherwise cleared AU Cleared AN Set if the floating point result is negative other wise cleared AV Cleared AC Cleared AS Cleared Al Set if the input operand is a NAN otherwise cleared B 32 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Fn ABS Fx Function Returns the absolute value of the floating point operand in register Fx by setting the sign bit of the operand to 0 Denormal inputs are flushed to Zero A NAN input returns an all 1s result Status Flags Flag Description AZ Set if the result operand is Zero otherwise cleared AU Cleared AN Cleared AV Cleared AC Cleared AS Set if the input operand is negative otherwise cleared AI Set if the input operand is a NAN otherwise cleared ADSP 21065L SHARC DSP Technical Reference B 33 Single Function Operations Fn PASS Fx Function Passes the floating point operand in Fx through the ALU to the float ing point field in register Fn Denormal inputs are flushed to Zero A NAN i
104. types A 2 map 1 system registers A 25 map 1 universal register codes A 26 map 1 universal registers A 24 map 2 universal register codes A 25 A 27 memory addressing A 18 see Memory addressing miscellaneous instructions A 9 see Miscellaneous instructions notation summary A 11 opcode notation summary of A 19 program flow control A 6 see Program flow control instruc tions register types summary of A 15 universal register codes summary of A 24 Instructions conditional 3 12 conditional and FLAGx bit states 12 32 ADSP 21065L SHARC DSP User s Manual I 55 INDEX conditional memory writes 5 49 internal memory storage 5 50 pipeline 3 19 INT_HIk timer interrupt vector location bit described 11 9 latching timer status bits 11 9 mapping programmable timer interrupts 3 45 Interface with the system bus 8 44 accessing slave processors over the cluster bus 8 44 arbitration for control of 8 44 basic system bus cluster bus interface diagram of 8 45 bidirectional system bus interface diagram of 8 47 cluster bus 8 44 core accesses of 8 48 FLAGx 8 48 master processor accesses of 8 46 MSx 8 48 signal glitches on the HBR line 8 46 system access of slave processors 8 46 uniprocessor to microprocessor interface 8 51 Inter IC sound bus protocol 9 61 Internal buses access restrictions 5 27 and the external ADDRx data bus 5 12 control of 5 7 DM bus 5 7 5 12 I O bus 5 7 5 12 7 25 memory connection to 5 7 PM bus
105. usually another ADSP 21065L or a host can also write or read the IOP registers You cannot perform an internal DMA transfer to any of the processor s IOP registers DMA transfers occur through the IOP register s DMA buff ers only These transfers are directly controlled by the processor s DMA controller however not with addresses generated over the I O address bus During DMA transfers the DMA controller writes or reads the DMA buffer registers to internal memory over the I O data bus The DMA buffer registers include EPBO EPB1 external port data buffers 0 and 1 and TX0_x RX0_x TX1_x and RX1_x serial port data buffers IOP Register Group Access Contention The processor has four separate on chip buses that can access the mem ory mapped IOP registers independently PM bus The PMD bus connects the processor s core registers to its IOP reg isters memory and the external port data buffers DM bus The DMD bus connects the processor s core registers to its IOP reg isters memory and the external port data buffers I O bus The I O bus connects the external port s data buffers to memory and to the on chip I O processor The I O bus carries data transfer ring to or from the IOP register s DMA buffers External port bus The external port bus connects the off chip DATA3_ bus to all on chip buses ADSP 21065L SHARC DSP Technical Reference E 41 IOP Registers Each of these buses can attempt to re
106. vei ccretencateewincanntieiianeiass wiuetblacauia nani aueloiaueusiiaaanes E 6 ASTAT POLE BENS PEE aeriana E 8 IMASK and IRPTL Interrupt Mask and Latch Registers sccnisccniarrisrriuras E 12 MODEI Resister porron nan S eae E 16 MOUE PeT narn E 21 x ADSP 21065L SHARC DSP Technical Reference CONTENTS Sticky Statue Repister SUR cerere nna E 27 LOOP Bee sonia ieee E 31 PO Reristers UY acini nmin E 31 TOP Register Access Restictont cai suenaeecconne E 40 IOP Register Group Access Contention seniisnnisintiairneiis E 41 IOP Register Write Latencies gciicisssiicniiasnnieanaienion E 42 DMACx External Port DMA Control Registers siccacieesicnicrscessaseunates E 54 DMASTAT DMA Channel Staris Register cossresiireoan i n E 64 IOCTL Programmable I O and SDRAM Control Register E 68 IOSTAT Programmable VO Status Ke gitet scsisavcassvieccsnaisumssavienanvnes E 75 RDIVx TDIVx SPORT Divisor Reger erimni rei E 78 SRCTLx SPORT Receive Control Register sanosesieossansrnssais E 81 STCTLx SPORT Transmit Control Restart sacessrirereisisnnrar E 90 SYSCON System Conhg ration Regist r ecscsisirieroseiniareiniase E 99 SYSTAT Systemy Staus REZISTE enrera rar n onde E 106 WAIT External Memory Wait State Control Register 0 08 E 111 ADSP 21065L SHARC DSP Technical Reference xi CONTENTS SYMBOL DEFINITIONS FILE ePOS LEI renn INTERRUPT VECTOR ADDRESSES INDEX xii ADSP 21065L SHARC DSP Technical R
107. when accessing the external ADDR 3 9 and DATA31 0 buses The processor s internal buses are multiplexed together at the external port 00 even priority alternating core and IOP accesses Ol processor s core PM and DM buses 10 1 0 processor s I 0 bus Eliminates contention at the external port when both the processor s core and IOP try to read or write off chip during the same cycle Not related to the function of the CPA pin core priority access E 104 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 25 SYSCON register Contd Bit Name Description 18 DCPR DMA channels 8 and 9 priority Specifies how the processor prioritizes accesses of the external ADDR23 0 and DATA31 0 buses between DMA channels 8 and 9 when both attempt to read or write off chip during the same cycle 0 sequential Send entire block of data from one DMA channel before servicing the next one starting with channel 8 l rotating Send one data word per cycle alternating between each DMA channel starting with channel 8 19 31 Reserved ADSP 21065L SHARC DSP Technical Reference E 105 IOP Registers SYSTAT System Status Register The SYSTAT register provides status information on system functions primarily for multiprocessor systems For details on using the SYSTAT register in ADSP 21065L SHARC DSP User s Manual see e Chapter 7 Multiprocessing e Chapter 8
108. wise cleared AV Set if the result overflows unbiased exponent gt 127 AC Cleared AS Cleared Al Cleared ADSP 21065L SHARC DSP Technical Reference B 41 Single Function Operations RECIPS Fx Function Creates an 8 bit accurate seed for 1 Fx the reciprocal of Fx The mantissa of the seed is determined from a ROM table using the seven MSBs excluding the hidden bit of the Fx mantissa as an index The unbiased exponent of the seed is calculated as the twos complement of the unbiased Fx exponent decremented by one i e if e is the unbiased exponent of Fx then the unbiased exponent of Fn e 1 The sign of the seed is the sign of the input Zero returns Infinity and sets the overflow flag If the unbiased exponent of Fx is greater than 125 the result is Zero A NAN input returns an all 1s result The following code performs floating point division using an iterative convergence algorithm The result is accurate to one LSB in whichever format mode 32 bit or 40 bit is set The following inputs are required FO numerator F12 denominator F11 2 0 The quotient is returned in FO The two highlighted instructions can be removed if only a 1 LSB accu rate single precision result is necessary FO RECIPS F12 F F0 Get 8 bit seed RO 1 D F12 FO F12 D D RO F7 FO F7 FO F11 F12 FO R1 2 D F7 N RO F12 FO F12 F12 D D R1 F RORE e FOSFIT RIZ F7 N RO R1 F0 R2 2 D F12
109. 0 no R fixed point F floating point For mod2 codes see Table B 4 3 For mod1 codes see Table B 5 As shown in Table B 3 many Multiplier operations can include an optional modifier mod1 or mod2 Table B 4 on page B 52 lists the options and corresponding opcode values for mod2 The options enclosed in parentheses consists of three or four letters that indicate whether the x input is signed S or unsigned U whether the y input is signed or unsigned whether the inputs are in ADSP 21065L SHARC DSP Technical Reference B 51 Multiplier Operations integer I or fractional F format and whether the result is rounded to nearest R when written to the Register File Table B 4 Multiplier Mod2 Options Mod2 Opcode SST _ _ll 0_ _0 SUI _ _01 0_ _0 UST _ _10 0O_ _0 UUT _ 00 O0_ _0 SSF __l1 1__0 SUF _ _01 1__0 USF _ _10 1__0 UUF 00 1_ _0 SSFR sall le SUFR _ 01 loa USFR 10 Ioa UUFR 00 l Table B 5 on page B 53 lists the options and corresponding opcode values for mod1 The options enclosed in parentheses consist of two letters that indicate whether the input is signed S or unsigned U and whether the input is in integer 1 or fractional F format B 52 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Table B 5 Multiplier Mod1 Options Option Opcode
110. 0 oth erwise cleared SS Cleared B 66 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Rn ASHIFT Rx BY Ry Rn ASHIFT Rx BY lt data8 gt Function Arithmetically shifts the fixed point operand in register Rx by the 32 bit value in register Ry or by the 8 bit immediate value in the instruction The shifted result is placed in the fixed point field of register Rn The float ing point extension field of Rn is set to all 0s The shift values are twos complement numbers Positive values select a left shift negative val ues select a right shift The 8 bit immediate data can take values between 128 and 127 inclusive which accommodates a 32 bit field from off scale right to off scale left Status Flags Flag Description SZ Set if the shifted result is zero otherwise cleared SV Set if the input is shifted left by more than 0 oth erwise cleared SS Cleared ADSP 21065L SHARC DSP Technical Reference B 67 Shifter Operations Rn Rn OR ASHIFT Rx BY Ry Rn Rn OR ASHIFT Rx BY lt data8 gt Function Arithmetically shifts the fixed point operand in register Rx by the 32 bit value in register Ry or by the 8 bit immediate value in the instruction The shifted result is logically ORed with the fixed point field of register Rn and then written back to register Rn The floating point extension field of Rn is set to all 0s The shift values are twos complement numbers Positive val ues selec
111. 1 8 R15 12 2 Rm MRF R3 0 R7 4 SSFR Ra R11 8 R15 12 010100 B 102 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Table B 10 Parallel Multiplier ALU Computations Contd Syntax Opcode Rm MRF R3 0 R7 4 SSFR Ra R11 8 R15 12 010101 Rm MRF R3 0 R7 4 SSFR 010110 Ra R11 8 R15 12 2 Fm F3 0 F7 4 Fa Fll 8 F15 12 011000 Fm F3 0 F7 4 Fa F11 8 F15 12 011001 Fm F3 0 F7 4 Fa FLOAT R11 8 by R15 12 011010 Fm F3 0 F7 4 Fa FIX F11 8 by R15 122 011011 Fm F3 0 F7 4 Fa ABS F11 8 011101 Fm F3 0 F7 4 Fa MAX F11 8 F15 12 011110 Fm F3 0 F7 4 Fa MIN F11 8 F15 12 011111 ADSP 21065L SHARC DSP Technical Reference B 103 Multifunction Computations Parallel Multiplier and Dual Add Subtract The parallel Multiplier and dual add subtract operation performs a multi ply or multiply accumulate and computes the sum and the difference of the ALU inputs For detailed information on the Multiplier operations see the individual descriptions under Multiplier Operations on page B 50 For information on the dual add subtract operation see the individ ual Dual Add Subtract operations This operation has fixed point and floating point versions Syntax Fixed point versions Rm R3 0 R7 4 SSFR Ra R11 8 R15 12 Rs
112. 1 edge sensitive IRQIE IRQ2E PERIOD_CNTO O enable width count 1 enable period count CADIS O enable cache 1 disable cache TIMENO O disable timer 1 enable timer BUSLK O no ext bus lock 1 ext bus lock Figure E 4 MODE2 register bits Application software can use the Shifter and ALU instructions on Register File locations or the System Register Bit Manipulation instruction on sys tem registers to set individual bits See Table E 3 on page E 6 E 22 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 7 lists and describes the individual bits of the MODE2 register Table E 7 MODE2 register Bit Name Description 0 IRQOE TRQO sensitivity 0 level sensitive l edge sensitive 1 IRQ1E IRQI sensitivity 0 level sensitive l edge sensitive 2 IRQ2E IRQ2 sensitivity 0 level sensitive edge sensitive 3 PERIOD_CNTO Timer O period count enable pulse counter mode only 0 enable width count enable period count 4 CADIS Cache disable 0 enable l disable 5 TIMENO Timer 0 enable 0 disable 1 enable ADSP 21065L SHARC DSP Technical Reference E 23 System Registers Table E 7 MODE2 register Cont d Bit Name Description 6 BUSLK External tems 0 disable bus lock multiprocessor sys 1 enable 7 PWMOUTO Timer 0 mode control O enable pulse counter mode PWM_EVENT pin is input 1 enable
113. 10 0100 Rn ROT Rx BY Ry lt data8 gt 0000 1000 Rn BCLR Rx BY Ry lt data8 amp gt 1100 0100 Rn BSET Rx BY Ry lt data8 amp gt 1100 0000 Rn BTGL Rx BY Ry lt data8 amp gt 1100 1000 SE Sign extension of deposited or extracted field EX Extended exponent extract ADSP 21065L SHARC DSP Technical Reference B 63 Shifter Operations Table B 6 Summary of Shifter operations Cont d Syntax Opcode BTST Rx BY Ry lt data8 gt 1100 1 Rn FDEP Rx BY Ry lt bit6 gt lt len6 gt 0100 0 Rn Rn OR FDEP Rx BY Ry lt bit6 gt lt len gt 0110 0 Rn FDEP Rx BY Ry lt bit6 gt lt len6 gt SE 0100 1 Rn Rn OR FDEP Rx BY Ry lt bit6 gt lt len6 gt SE 0110 1 Rn FEXT RX BY Ry lt bit6 gt lt len6 gt 0100 00 Rn FEXT Rx BY Ry lt bit6 gt lt len6 gt SE 0100 10 Rn EXP Rx 1000 00 Rn EXP Rx EX 1000 01 Rn LEFTZ Rx 1000 10 Rn LEFTO Rx 1000 11 Rn FPACK Fx 1001 00 Fn FUNPACK Rx 1001 01 SE Sign extension of deposited or extracted field EX Extended exponent extract B 64 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Rn LSHIFT Rx BY Ry Rn LSHIFT Rx BY lt data8 amp gt Function Logically shifts the fixed point operand in register Rx by the 32 bit value in register Ry or by the 8 bit immediate value in the instruction The shifted r
114. 1065L SHARC DSP Technical Reference Instruction Set Reference Return From Subroutine Interrupt Compute Type 11 on page A 55 IF COND RTS DB compute LR ELSE compute DB LR ELSE compute IF COND RTI DB compute Do Until Counter Expired Type 12 on page A 58 LCNTR aa DO lt addr24 gt UNTIL LCE ureg lt PC reladdr24 gt Do Until Type 13 on page A 60 DO lt addr24 gt UNTIL termination PC lt reladdr24 gt ADSP 21065L SHARC DSP Technical Reference A 7 Instruction Summary Immediate Move Summary Immediate move instructions are classed as Group III instructions and they provide memory and register access services For a complete descrip tion of these instructions see the noted pages Ureg lt gt DM PM direct addressing Type 14 on page A 63 DM lt addr32 gt ureg PM lt addr24 gt ureg DM lt addr32 gt PM lt addr24 gt Ureg lt gt DM PM indirect addressing Type 15 on page A 65 DM lt data32 gt Ia ureg PM lt data24 gt Ic ureg DM lt data32 gt Ia PM lt data24 gt Ic Immediate data gt DM PM Type 16 on page A 67 DM Ia Mb lt data32 gt PM Ic Md Immediate dataureg Type 17 on page A 69 ureg lt data32 gt A 8 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference Miscellaneous Instructions Summary Miscellaneous instructions are classed as Gro
115. 12 16 state after reset 12 23 CRBM current bus master bit 7 11 7 42 8 40 conditional instructions and 7 12 Crosstalk reducing 12 45 I 16 ADSP 21065L SHARC DSP User s Manual Crystal oscillator terminal see XTAL CS accessing a processor 8 11 EPROM boot mode 12 51 implementing broadcast writes 8 23 multiprocessor booting 12 59 pin definition 12 8 state after reset 12 23 CURLCNTR 3 12 3 34 decrementing 3 34 described 3 34 LCNTR and 3 35 reading the 3 34 value while no loop executing 3 35 write restrictions 3 35 writing to 3 35 Current loop count see CURLNCTR Current loop counter see CURLCNTR Cycles CLKIN frequencies and 12 26 D DAG address output and modification 4 6 address offset modifier 4 6 immediate modifier value 4 6 immediate modifiers 4 8 M DAG modify registers 4 6 modify instructions 4 7 INDEX postmodify operations 4 6 premodify operations 4 6 DAG modify instructions 4 7 DAG operation 4 6 address output and modification 4 6 see DAG address output and modification bit reversal and 4 13 bit reverse instruction 4 14 see Bit reverse instruction bit reverse mode 4 13 see Bit reverse mode circular buffer addressing 4 9 see Circular buffer addressing dual data accesses and PM and DM bus addresses 5 8 generating internal bus addresses 5 26 generating memory addresses 5 11 indirect addressing 5 11 short word addresses and 4 6 summary of operations 4 6 DAG register transfers 4 15 be
116. 12 26 interprocessor messages 7 36 8 36 interrupt service routine 8 36 IOP registers 7 4 7 5 master processor 7 5 multichannel SPORT mode and 9 71 multiprocessor memory space 7 4 7 5 multiprocessor system 7 5 operation cycles 12 26 pin connections between two processors 7 3 SDRAM accesses and bus arbitration 7 17 SDRAM operation 10 25 shared bus 8 36 sharing a common boot EPROM 12 51 sharing the DMAGx signal 6 68 single word data transfers 7 5 slave processor 7 5 SYSTAT register status bits 7 40 see also SYSTAT register system architecture see Multiprocessing system architecture system clock rate 7 5 system configuration for interprocessor DMA 6 70 Multiprocessing bus requests 7 10 12 14 Multiprocessing data transfers 7 25 ACK 7 26 addressing 7 25 communication with slave processor s core 7 25 data 7 25 DMA operations 7 25 DMA transfers see Multiprocessing DMA transfers DMACx registers 7 25 EPBx buffer writes see EPBx buffers EPBx transfers see Multiprocessing EPBx transfers external port 7 25 internal I O bus 7 25 IOP register reads see JOP register reads IOP register writes see JOP register writes IOP registers 7 25 MSGR x registers 7 25 multiprocessor memory space accesses and wait states 7 25 shadow write FIFO 7 32 slave processor configuration 7 25 slave write FIFO 7 26 SYSCON register 7 25 SYSTAT register 7 25 types 7 25 vector interrupts and 7
117. 12 56 ADSP 21065L SHARC DSP User s Manual I 87 INDEX Program counter stack pointer see PCSTKP Program counter stack see PC stack Program counter see PC stack Program execution 40 bit data accesses 5 52 address generation scheme 5 51 aligning internal addresses with external memory space 5 50 data access addressing 5 52 data packing 5 49 described 5 49 example addresses for 5 50 generating instruction addresses in external memory space 5 50 invalid data segment addresses 5 52 invalid program segment addresses 5 52 mapping 64K memory space to 128K memory space 5 51 multiple program segments using 5 51 PM bus address restriction 5 52 program segment alignment in external memory space 5 51 stalls 12 66 storing instructions in internal memory space 5 50 Program flow control instructions direct jump call type 8 instructions A 6 do until type 13 instructions A 7 do until counter expired type 12 instructions A 7 indirect jump or compute dreg gt DM type 10 instructions A 6 summary of A 6 Program memory data accesses 3 10 branch instructions see Branch instructions instruction cache 3 10 loop instructions see Loop instructions Program segments alignment in external memory space 5 51 invalid external memory addresses 5 52 multiple using 5 51 Program sequencer architecture see Program sequencer architecture conditional instructions and loop termination conditions evaluation 3 7 defined 5 5 generatin
118. 16 see ALU status flags ALU fixed point saturation mode 2 14 ALU overflow flag and 2 15 described 2 14 negative overflows 2 15 positive overflows 2 14 ALU floating point rounding boundary 2 15 32 bit IEEE results 2 15 40 bit results 2 15 fixed to floating point conversion 2 15 floating point results format of 2 15 ALU floating point rounding modes 2 15 round to nearest 2 15 round to zero 2 15 ALU instruction set summary of 2 21 ALU operating modes 2 14 ALUSAT ALU saturation mode bit 2 14 fixed point saturation mode 2 14 see ALU fixed point saturation mode MODE control bits 2 14 RND322 floating point rounding boundary bit 2 14 TRUNC floating point rounding mode bit 2 14 INDEX ALU operation CACC status flag updates 2 16 compare accumulate operations 2 19 fixed to floating point conversion 2 15 fixed point results 2 13 floating point rounding boundary 2 15 see ALU floating point rounding boundary floating point rounding modes 2 15 see ALU floating point rounding modes status flag updating 2 17 ALU operations and the register file 2 13 fixed point inputs 2 13 fixed point results storing 2 13 instruction set summary 2 21 operands 2 13 ALU single function compute operations COMP Fx Fy B 31 COMP Rx Ry B 11 described B 2 fixed point summary of B 3 floating point summary of B 4 Fn Fx B 32 Fn Fx Fy 2 B 30 Fn ABS Fx Fy B 28 Fn ABS Fx Fy B 29 Fn ABS Fx B 33 ADSP 21065L SHARC DSP User
119. 25 24 23 22 21 20 19 18 17 16 DERE RFSDIV Receive Frame Sync Divisor 15 14 1312 1110 9 8 7 6 54 3 2 1 0 RCLKDIV Receive Clock Divisor Figure E 10 RDIVx register bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 TFSDIV Transmit Frame Sync Divisor 15 14 1312 1110 9 8 7 6 54 3 2 1 0 LTT TT Titty tit T TCLKDIV Transmit Clock Divisor Figure E 11 TDIVx register bits ADSP 21065L SHARC DSP Technical Reference E 79 IOP Registers Tables E 22 and E 21 list and describe the individual bits of the RDIVx and TDIVx registers Table E 21 RDIVx bits Bits Name Description 15 0 RCLKDIV Recv clock divisor 31 16 RFSDIV Recv frame sync divisor Table E 22 TDIVx bits Bits Name Description 15 0 TCLKDIV Xmit clock divisor 31 16 TFSDIV Xmit frame sync divisor xCLKDIV oe ENN ey serial clock frequency xFSDIV serial clock frequency 4 frame sync frequency E 80 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers SRCTLx SPORT Receive Control Register SRCTLO and SRCTLI are the receive control registers for SPORTO and SPORT1 respectively For details on using the SRCTL x register in ADSP 21065L SHARC DSP User s Manual see Chapter 9 Serial Ports In this manual see Appendix A Instruction Set Reference SRCTLO is memory mapped at address 0x00E1 and SRCTL1 is mem ory mapped at address 0x00F1 After reset these
120. 3 Group Instructions Compute amp Move Type 3 Opcode 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 010 U I M COND G D UREG 18 17 16 15 14 13 12 11 10 9 fe COMPUTE Bits Description COND Specifies the test condition If no condition is specified COND is TRUE and the instruction is executed D Selects the access type read or write G Selects data memory or program memory UREG Specifies the universal register I Specifies the I register M Specifies the M register U Selects either premodify without update or post modify with update COMPUTE Defines a compute operation to be performed in parallel with the data access this is a no opera tion if no compute operation is specified in the instruction A 34 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference Compute dreg DM PM immediate modify Type 4 PC relative transfer between data or program memory and Register File optional condition optional compute operation Syntax IF COND compute DM Ia lt data6 gt dreg PM Ic lt data6 gt DM lt data6 gt Ia dreg PM lt data6 gt Ic dreg DM Ia lt data6 gt PM Ic lt data6 gt dreg DM lt data6 gt Ia PM lt data6 gt Ic Function Access between data memory or program memory and the Register File The specified I regi
121. 3 Figure E 2 shows the default values of the IMASK register bits only with bit values 0 bit masked disabled and 1 bit unmasked enabled E 12 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 interrupt 3 SFT2I User sw interrupt 2 SFT1I User sw interrupt 1 SFTOI User sw interrupt 0 FLTII Fit pt invalid except FLTUI Fit pt FLTOI underflow except Fit pt overflow except 15 14 13 12 11 10 9 8 7 6 5 4 3 2 SPT1I SPORT1 xmit A B DMA chn 6 7 SPTOI SPORTO xmit A B DMA chn 4 5 SPR1I SPORT1 rcv A B DMA chn 2 3 SPROI SPORTO Rev A B DMA chn 0 1 IRQOI IRQO Asserted Figure E 2 IMASK and IRPTL register bits Ext Port Buf 0 DMA EPB1I Ext Port Buf 1 DMA CB7I DAG1 Circular Buf 7 Overflow CB151 DAG2 Circular Buf 15 Overflow TMZLI Timer Expired low priority FIXI Fxd pt overflow 1 0 RSTI Reset nonmaskable read only SOVFI Stack Full Overflow TMZHI Timer Expired high priority VIRPTI Multiprocessor Vector interrupt IRQ2I TRQ2 Asserted IRQ1I IRQ1 Asserted Vector addresses of individual bits in Table E 5 are the offsets from 0x0000 8000 the base address of the interrupt vector table in internal ADSP 21065L SHARC DSP Technical Reference E 13 System Registers memory The base address of the interrupt vector table in external me
122. 3 27 1 64 ADSP 21065L SHARC DSP User s Manual JUMP LA and automatic loop abort 3 17 loop address stack see Loop address stack loop counters and stack 3 34 noncounter based loops 3 29 program memory data accesses 3 11 restrictions 3 27 3 28 3 29 see also General loop restrictions 3 27 short loops 3 27 3 28 simple loop example code 3 25 termination conditions 3 33 Loop stacks empty flag 3 54 flags 3 54 overflow flag 3 54 Loop termination instructions 3 12 LRFS active state RFS bit 9 21 defined 9 30 LRU least recently used bit described 3 59 values 3 59 LSEM bit 3 54 LSOV bit 3 54 LSWF packing format 6 52 LT condition 3 13 LTFS active state TFS bit 9 16 defined 9 30 described 9 55 M M DAG modify registers 4 2 INDEX circular buffer addressing and 4 9 circular data buffers and 4 11 postmodify addressing operations 4 7 premodify addressing operations 4 6 MASTER DMA master mode enable bit 6 14 6 30 8 21 8 22 described 6 19 DMA memory transfers 7 31 7 32 DMA transfers to on chip memory 7 31 Master mode DMA 6 21 6 30 6 55 described 6 55 6 58 initiating transfers 6 55 operation examples 6 58 placing a channel in 6 58 Master processor accesses and operation cycles 12 26 accesses of the system bus 8 46 data transfers with the slave processor 7 25 defined 7 5 8 6 external bus arbitration 7 16 host interface and 8 6 MCE multichannel mode enable bit 9 22 defined 9 31 described 9 70
123. 37 Single Function Operations Rn LOGB Fx Function Converts the exponent of the floating point operand in register Fx to an unbiased twos complement fixed point integer The result is placed in the fixed point field in register Rn Unbiasing is done by subtracting 127 from the floating point exponent in Fx If saturation mode is not set a Infinity input returns a floating point Infinity and a Zero input returns a float ing point Infinity If saturation mode is set a Infinity input returns the maximum positive value 0x7FFF FFFF and a Zero input returns the maximum negative value 0x8000 0000 Denormal inputs are flushed to Zero A NAN input returns an all 1s result Status Flags Flag Description AZ Set if the fixed point result is zero otherwise cleared AU Cleared AN Set if the result is negative otherwise cleared AV Set if the input operand is an Infinity or a Zero otherwise cleared AC Cleared AS Cleared Al Set if the input is a NAN otherwise cleared B 38 ADSP 21065L SHARC DSP Technical Reference Rn Rn Rn Rn Compute Operation Reference FIX Fx TRUNC Fx FIX Fx BY Ry TRUNC Fx BY Ry Function Converts the floating point operand in Fx to a twos complement 32 bit fixed point integer result If the MODE1 register TRUNC bit 1 the FIX oper ation truncates the mantissa towards Infinity If the TRUNC bit 0 the FIX operation rounds the mantissa towards the nearest integer The T
124. 38 ASTAT register and 3 16 described 3 16 EPROM booting 12 54 host booting 12 58 IMASKP register and 3 16 IRPTL register and 3 16 MODE register and 3 16 nested interrupts 3 47 program sequencing interrupts and 3 38 status stack pop and 3 16 status stack restore of ASTAT 3 48 status stack restore of MODE1 3 48 RTS instruction described 3 16 LR modifier and reusing the current interrupt 3 50 RXS receive data buffer status bits 9 22 9 38 defined 9 33 described 9 38 SPORT reset and 9 7 RXx_z data buffer 9 9 data formats and 9 44 described 9 13 interrupts 9 14 memory mapped address and reset value 9 10 9 11 9 12 operation see RXx_z data buffer operation read write restrictions 9 15 reading writing 9 14 reads of an empty buffer 9 14 receive overflow condition ROVF receive overflow status bit 9 14 receive shift buffer 9 13 9 44 size of 9 13 SPORT reset and 9 7 RXx_z data buffer operation 9 14 architecture 9 14 described 9 14 storage capacity 9 14 S Saturate MR register 2 31 valid maximum saturation values 2 31 SBTS suspend bus three state host bus acquisition 8 11 pin definition 12 6 state after reset 12 24 system bus access deadlock resolving 8 49 SBTS and HBR combination applying 8 49 restrictions 8 49 I 100 ADSP 21065L SHARC DSP User s Manual SCHEN SPORT DMA chaining bit 6 23 9 16 9 22 defined 9 34 enabling chaining on a SPORT DMA channel 9 85 setting up DMA on SPORT
125. 5 core updates of status bits 9 15 default bit values IS mode diagram of 9 19 E 92 default bit values multichannel mode diagram of 9 20 E 93 default bit values standard mode diagram of 9 18 E 91 described E 90 DITES 9 16 9 26 DTYPE 9 15 9 27 9 44 effect latency 9 13 FS_BOTH 9 17 9 28 9 59 I S mode control bits 9 15 9 62 ICLK 9 16 initialization value E 90 ITFS 9 16 9 29 L_FIRST 9 16 9 30 INDEX LAFS 9 16 9 29 LTFS 9 16 9 30 memory mapped address and reset value 9 10 9 11 MED 9 16 9 31 9 71 MSTR 9 16 9 31 multichannel mode control bits 9 15 9 69 OPMODE 9 16 9 32 PACK 9 16 9 32 SCHEN 9 16 9 34 SDEN 9 16 9 34 SENDN 9 15 9 35 setting up SPORT DMA transfers 6 23 SLEN 9 16 9 35 SPEN 9 15 9 35 SPORT DMA chaining enable SCHEN bit 6 23 SPORT DMA control bits 6 23 SPORT DMA enable SDEN bit 6 23 standard mode control bits 9 15 status bits 9 38 TCLK 9 28 TFSR 9 16 9 36 TUVE 9 17 9 36 TXS 9 17 9 37 write latency 9 13 Sticky bit defined E 29 Sticky status register see STKY register STKY register 2 16 ADSP 21065L SHARC DSP User s Manual I 117 INDEX AIS 2 17 ALU status flags summary of 2 17 AOS 2 17 arithmetic exception interrupts and 3 42 arithmetic interrupts priority of 3 45 AUS 2 17 AVS 2 17 bit definitions E 29 circular buffer overflow interrupts and 4 13 CNT_EXPx 11 6 CNT_OVFx 11 6 default bit values d
126. 5 7 5 12 Internal clock generator 12 26 enabling 12 27 multiprocessing and 12 26 phase lock 12 27 Internal interrupt vector table IIVT bit 5 30 Internal memory block data width see IMDWx internal memory block data width bit Internal memory map IOP registers 5 23 normal word 5 24 short word 5 24 Internal memory space address boundaries 5 19 address regions 5 23 concurrent DMA accesses of 6 74 defined 5 4 described 5 23 diagram of 5 23 DMA transfers and DMAGx 8 21 and DMAR x 8 21 extending DMA access to 7 30 external port connection 6 27 handshake mode DMA accesses 7 31 host data transfers through the EPBx buffers 8 18 host DMA transfers 8 21 I 56 ADSP 21065L SHARC DSP User s Manual interrupt vector table address of 5 24 low level organization 5 35 map of 5 17 multiprocessor DMA transfers to 7 30 prioritizing external DMA accesses 6 37 reserved addresses 5 19 setting up host DMA transfers 8 21 slave mode DMA accesses 7 31 SPORT connection 6 27 unusable locations 5 24 Interprocessor communications overhead 7 6 see Interprocessor messages Interprocessor messages 7 36 7 37 8 36 described 7 36 host vector interrupts see Host vector interrupts immediate high priority interrupt 8 36 interrupt service routines 7 38 7 39 8 36 IOP registers 8 36 message passing see Message passing MSGR x registers 7 36 8 36 types 8 36 vector interrupts 7 36 7 38 8 36 VIRPT register 7 36
127. 6 monitoring results from multiple operations with STKY flags 2 7 Floating point operations ALU single function compute operations summary of B 4 exception handling 2 6 extended precision 2 5 FLSH DMA flush buffers and status bit 6 14 clearing extra DMA requests 6 64 described 6 18 flushing the EPBx buffers 6 51 7 29 restriction 8 19 Fn Fx floating point operation 1 40 ADSP 21065L SHARC DSP User s Manual ALU status flags B 32 described B 32 Fn Fx Fy 2 floating point operation ALU status flags B 30 described B 30 Fn ABS Fx Fy floating point operation ALU status flags B 28 described B 28 Fn ABS Fx Fy floating point operation ALU status flags B 29 described B 29 Fn ABS Fx floating point operation ALU status flags B 33 described B 33 Fn CLIP Fx BY Fy operation ALU status flags B 49 described B 49 Fn FLOAT Rx BY Ry operation ALU status flags B 41 described B 41 Fn FLOAT Rx operation ALU status flags B 41 described B 41 Fn FUNPACK Rx operation described B 92 gradual underflow B 92 results of B 92 shifter status flags B 93 Fn Fx COPYSIGN Fy operation ALU status flags B 46 INDEX described B 46 Fn Fx Fy operation described B 62 multiplier status flags B 62 Fn Fx Fy floating point operation ALU status flags B 26 described B 26 Fn Fx Fy floating point operation ALU status flags B 27 described B 27 Fn MAX Fx Fy operation ALU status flags B 48 described B 48 Fn MIN Fx Fy operati
128. 65L SHARC DSP Technical Reference Instruction Set Reference Many instructions can be conditional These instructions are prefaced by IF COND for example If COND compute DM Ia Mb ureg In a conditional instruction the execution of the entire instruction is based on the specified condition ADSP 21065L SHARC DSP Technical Reference A 3 Instruction Summary Compute and Move Modify Summary Compute and move modify instructions are classed as Group I instruc tions and they provide math conditional memory or register access services For a complete description of these instructions see the noted pages d For all compute and move modify instructions IF COND is optional Compute dreg DM dreg lt gt PM Type 1 page A 30 compute DM Ia Mb dregl dregl DM Ia Mb dreg2 PM Ic Md PM Ic Md dreg2 Compute Type 2 on page A 32 IF COND compute Compute uregDM PM register modify Type 3 on page A 33 IF COND compute DM Ia Mb ureg PM Ic Md DM Mb Ta ureg PM Md Ic ureg Ia Mb Ic Md ureg DM Mb Ia PM Md Ic A 4 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference Compute dregDM PM immediate modify Type 4 on page A 35 IF COND compute DM Ia lt data6 gt dreg PM Ic lt data6 gt DM lt data6 gt Ia dreg PM lt data6 gt Ic dreg DM Ia lt data6 gt P
129. 68 Rn Rn OR FDEP Rx BY bit6 len6 SE operation described B 80 example B 80 shifter status flags B 81 Rn Rn OR FDEP Rx BY bit6 len6 operation described B 76 example B 76 shifter status flags B 77 Rn Rn OR FDEP Rx BY Ry SE operation described B 80 example B 80 shifter status flags B 81 Rn Rn OR FDEP Rx BY Ry operation described B 76 example B 76 shifter status flags B 77 Rn Rn OR LSHIFT Rx BY Ry operation described B 66 shifter status flags B 66 Rn Rn OR LSHIFT Rx BY data8 operation described B 66 shifter status flags B 66 Rn RND MRB mod1 operation described B 58 multiplier status flags B 58 Rn RND MRF mod operation described B 58 multiplier status flags B 58 Rn ROT Rx BY data8 operation described B 69 shifter status flags B 69 Rn ROT Rx BY Ry operation described B 69 shifter status flags B 69 Rn Rx AND Ry fixed point operation ALU status flags B 19 described B 19 Rn Rx OR Ry fixed point operation ALU status flags B 20 described B 20 Rn Rx XOR Ry fixed point operation ALU status flags B 21 described B 21 Rn Rx Ry mod2 operation multiplier status flags B 54 Rn Rx Ry mode2 operation described B 54 I 98 ADSP 21065L SHARC DSP User s Manual Rn Rx 1 fixed point operation ALU status flags B 14 described B 14 Rn Rx Cl fixed point operation ALU status flags B 12 described B 12 saturation mode B 12 Rn Rx Cl 1 fixed point operation ALU status flags B 13 described B 13 saturation
130. 7 36 35 34 33 32 31 30 29 28 27 26 25 24 000 01111 UREG DATA upper 8 bits AEP ee PP EEE ELEP DATA lower 24 bits Bits Description UREG Specifies the number of a universal register DATA Specifies the immediate modify value for the I register ADSP 21065L SHARC DSP Technical Reference A 69 Group IV Instructions Miscellaneous Group IV Instructions Miscellaneous e System Register Bit Manipulation Type 18 on page A 71 System register bit manipulation e Register Modify bit reverse Type 19 on page A 73 Immediate I register modify with or without bit reverse e Push Pop Stacks Flush Cache Type 20 on page A 75 Push or Pop of loop and or status stacks e Nop Type 21 on page A 77 No Operation NOP e Idle Type 22 on page A 78 Idle e Idle16 Type 23 on page A 79 Idle16 e Cjump Rframe Type 24 on page A 81 CJUMP RFRAME Compiler generated instruction A 70 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference System Register Bit Manipulation Type 18 System register bit manipulation Syntax BIT SET sreg lt data32 gt CLR TGL S XOR Function A bit manipulation operation on a system register This instruction can set clear toggle or test specified bits or compare XOR the system regis ter with a specified data value In the first four operations the immediate data value is
131. 7 9 38 defined 9 26 described 9 38 9 71 Circular buffer addressing address wraparound 4 9 architecture of circular data buffers 4 9 buffer overflow interrupts 4 12 see Circular buffer overflow inter rupts circular buffer operation 4 10 see Circular buffer operation circular buffer registers 4 11 see Circular buffer registers index I registers and 4 9 modify M registers 4 9 postmodify addressing 4 9 premodify addressing 4 9 stepping through each buffer location 4 9 Circular buffer operation 4 10 B register loading 4 10 data overflows 3 38 first postmodify access 4 10 I index register value updating 4 10 initializing buffer size number of locations 4 10 initializing I index register value INDEX 4 10 L locations register initialization 4 10 loading base address of buffer 4 10 set up in assembly language 4 10 Circular buffer overflow interrupts 4 12 address wraparound 4 12 implementing routines that swap I O buffer pointers 4 12 instructions that generate 4 12 masking 4 13 source of 4 12 STKY register and 4 13 summary of 4 12 Circular buffer registers 4 11 B DAG base address registers 4 11 I DAG index registers 4 11 L DAG locations registers 4 11 M DAG modify registers 4 11 Circular data buffers 4 1 addressing 4 9 see Circular buffer addressing architecture 4 9 assembly language set up 4 10 base address 4 2 4 9 diagram of 4 9 number of locations in 4 2 operation 4 10 see Circular buffer ope
132. 7 programmable timer I O 3 53 PWMOUT timer mode 11 3 state after reset 12 24 task on demand control 12 28 WIDTH_CNT timer mode 11 5 PWMOUT timer mode 11 1 avoiding unpredictable results from the PWM_EVENTx signal 11 3 described 11 3 PWM_EVENTx operation 11 3 PWM_EVENT lt x timer pin and 11 3 PWMOUTx timer mode control bit 11 3 selecting 11 3 timer flow diagram 11 4 timer interrupts 11 3 TPERIODx register and 11 3 TPWIDTHkx register and 11 3 PWMOUTx timer mode control bit described 11 8 PWMOUT timer mode 11 3 WIDTH_CNT timer mode 11 5 PX bus connection 5 5 5 11 PX data transfers 40 bit DM data bus 5 14 48 bit accesses of program memory 5 14 between DM data bus and external memory 5 14 between DM data bus and I 92 ADSP 21065L SHARC DSP User s Manual internal memory 5 14 between memory and registers 5 12 between PM and DM data buses 5 11 between PX1 and PM data bus 5 12 5 14 between PX2 and DM data bus 5 14 between PX2 and PM data bus 5 12 data alignment 5 12 diagram of 5 13 example code for 48 bit program memory access 5 14 universal register to register 5 12 PX registers 40 bit data accesses with 48 bit words 5 40 architecture 5 12 bus connection 5 5 diagram of 5 12 PX1 alignment 5 12 PX2 alignment 5 12 subregister alignment 5 12 using 5 12 word width of internal bus accesses 5 28 R RAS pin definition 12 10 state after reset 12 23 RAS to CAS delay 10 41 INDEX RB
133. 7 29 single word non DMA EPBx transfers 7 29 8 20 Denormal operands 2 36 Design recommendations 12 45 crosstalk reducing 12 45 reflections reducing 12 46 Design resource references 12 47 Direct addressing 5 11 absolute address A 18 PC relative address A 18 Direct jump call type 8 instruction described A 45 example A 46 opcode with direct branch A 46 opcode with PC relative branch A 47 syntax summary A 6 Direction of DMA data transfers 6 15 EXTERN 6 16 I 20 ADSP 21065L SHARC DSP User s Manual TRAN 6 16 Disable SDCLKO bit see DSDCTL bit Disable SDCLK1 bit see DSDCK1 bit DITFS data independent TFS bit 9 16 continuous TFS and 9 58 defined 9 26 described 9 57 DM bus address bits diagram of 5 8 and EPBx buffers 8 18 data storage 5 8 data transfer destinations 5 11 data transfer types 5 11 data transfers 5 7 defined 5 3 generating addresses for 5 11 5 26 memory accesses 5 27 memory connection 5 7 PX register accesses 5 28 transferring data to the PM bus 5 12 transfers with DAG registers 4 15 DMA address generators 6 75 asynchronous requests and DMARx 6 66 C count register initialization 6 29 chain insertion 6 44 channel active status 6 24 6 26 INDEX channel chaining status 6 24 channel data buffers 6 28 channel parameter registers 6 28 channel status 6 24 channels 6 4 concurrent DMA accesses of on chip memory space 6 74 control and data paths diagram of 6 3 control registers
134. 8 36 Interrupt controller 3 7 INDEX Interrupt latch register see RPTL register Interrupt latency 3 40 branch and following cycle 3 43 branching to the vector cycles 3 40 first cycle in fetch decode of first instruction in interrupt service routine 3 44 first two cycles of a program memory data access 3 43 interrupt priority and 3 43 IRQx and multiprocessor vector standard 3 43 last iteration of one instruction loop 3 43 multicycle operations 3 43 pipelined delayed branch 3 42 pipelined program memory data access with cache miss 3 41 pipelined single cycle instruction 3 40 processor access of external memory space during a host bus grant or while bus slave 3 44 recognition cycle 3 40 synchronization and latching cycle 3 40 third to last iteration of one instruction loop 3 43 wait states for external memory space accesses 3 44 writes to IRPTL 3 40 ADSP 21065L SHARC DSP User s Manual I 57 INDEX Interrupt mask and latch registers see IMASK register and RPTL register Interrupt mask pointer register see IMASKP register Interrupt masking and control 3 46 IMASK register 3 46 see also IMASK register IMASKP register 3 46 see also IMASKP register Interrupt priority 3 45 arithmetic interrupts 3 45 described 3 45 INT_HIkx bit and programmable timer interrupts 3 45 nested interrupts and 3 45 programmable timer interrupts 3 45 ranking 3 45 STKY flags and 3 45 Interrupt request lines see 7RQx I
135. 8 42 interprocessor messages 7 39 multiprocessor vector interrupts 3 52 VIRPT register 6 47 8 36 host booting and 12 58 host interface and 7 36 host interrupt service routines 8 38 host vector interrupts and 8 38 generating 8 38 servicing 8 38 initialization at reset 8 38 interprocessor messages 7 36 7 39 8 36 interrupt service routine 8 38 interrupt vector table and 3 44 minimum latency 3 43 multiprocessing data transfers 7 25 multiprocessor vector interrupts 3 52 shared bus multiprocessing 8 36 status of 3 52 8 38 vector interrupts 7 36 7 38 VIPD 8 38 W WAIT register address of E 111 bit definitions 5 56 E 113 default bit values diagram of 5 58 E 112 described E 111 EBxWM 5 56 5 61 EBxWS 5 56 5 60 extending access to off chip memory 5 54 HIDMA 5 57 initialization value 5 55 E 111 MMSWS 5 57 5 62 RBWM 5 56 12 52 RBWS 5 57 12 52 wait state configuration features 393 Wait state modes 5 61 Wait states DMA transfers between processor s internal and external memory 6 74 EPROM booting 12 52 multiprocessing data transfers 7 25 programming clock cycles 12 27 Wait states and acknowledge automatic wait state option 5 62 bus hold time cycle 5 60 5 61 bus idle cycle 5 58 5 59 5 60 external memory banks and 5 48 external memory space 5 53 IOP control registers 5 53 I 126 ADSP 21065L SHARC DSP User s Manual multiprocessor memory space 5 61 off chip memory access
136. 9 Rn FIX Fx operation ALU status flags B 40 described B 39 Rn FPACK Fx operation described B 90 gradual underflow B 90 results of B 90 shifter status flags B 91 short float data format B 90 Rn LEFT0 Rx operation described B 89 shifter status flags B 89 Rn LEFTZ Rx operation described B 88 shifter status flags B 88 Rn LOGB Fx operation ALU status flags B 38 described B 38 Rn LSHIFT Rx BY data8 operation INDEX described B 65 shifter status flags B 65 Rn LSHIFT Rx BY Ry operation described B 65 shifter status flags B 65 Rn MANT Fx operation ALU status flags B 37 described B 37 Rn MAX Rx Ry fixed point operation ALU status flags B 24 described B 24 Rn MIN Rx Ry fixed point operation ALU status flags B 23 described B 23 Rn MRB Rx Rry mod2 operation described B 55 Rn MRB Rx Ry mod2 operation multiplier status flags B 55 Rn MRB Rx Ry mod2 operation described B 56 multiplier status flags B 56 Rn MRF Rx Ry mod2 operation described B 55 multiplier status flags B 55 Rn MRF Rx Ry mod2 operation described B 56 multiplier status flags B 56 Rn NOT Rx fixed point operation ALU status flags B 22 described B 22 ADSP 21065L SHARC DSP User s Manual 1 97 INDEX Rn PASS Rx fixed point operation ALU status flags B 18 described B 18 Rn Rn OR ASHIFT Rx BY data8 operation described B 68 shifter status flags B 68 Rn RN OR ASHIET Rx BY Ry operation described B 68 shifter status flags B
137. 9 I DATA13 220 OE SPARES output enable 221 0 SPARE5 222 I SPARE5 223 OE SPARE4 output enable 224 0 SPARE4 225 I SPARE4 220 0 DATA14 I Input 0 Output OE OutputEnable 1 Drive the associated signals during EXTEST and INTEST instructions 0 Disable the associated signals during EXTEST and INTEST instructions NC Do not connect ADSP 21065L SHARC DSP Technical Reference D 23 Boundary Register Table D 2 Scan path position definitions Contd Position Latch Type Signal 227 I DATA14 228 0 DATAL5 229 I DATA15 230 0 DATA16 231 I DATA16 232 0 DATAL7 233 I DATAL7 234 0 DATA18 235 I DATA18 236 0 DATA19 237 I DATA19 238 0 DATA20 239 I DATA20 I Input O Output OE OutputEnable 1 Drive the associated signals during EXTEST and INTEST instructions 0 Disable the associated signals during EXTEST and INTEST instructions NC Do not connect D 24 ADSP 21065L SHARC DSP Technical Reference JTAG Test Access Port Table D 2 Scan path position definitions Contd Position Latch Type Signal 240 OE SPARE3 output enable 241 0 SPARE3 242 I SPARE3 243 OE DATA31 14 output enable 244 0 DATA21 245 I DATA21 246 0 DATA22 247 I DATA22 248 0 DATA23 249 I DATA23 250 0 DATA24 251 I DATA24 252 0 DATA25 I Input O Output OE Ou
138. ADDR19 6 0 ADDRi 3 7 I ADDRig 8 0 ADDR17 9 I ADDR17 Input O Output OE OutputEnable 1 Drive the associated signals during EXTEST and INTEST instructions 0 Disable the associated signals during EXTEST and INTEST instructions NC Do not connect ADSP 21065L SHARC DSP Technical Reference D 7 Boundary Register Table D 2 Scan path position definitions Contd Position Latch Type Signal 20 0 ADDR16 2l I ADDRi 22 0 ADDRis5 23 I ADDRis5 24 0 ADDR44 25 I ADDRi4 26 0 ADDR 3 27 I ADDR 3 28 0 ADDRy gt 29 I ADDR 30 0 ADDR11 31 I ADDR 11 I Input O Output OE OutputEnable 1 Drive the associated signals during EXTEST and INTEST instructions 0 Disable the associated signals during EXTEST and INTEST instructions NC Do not connect ADSP 21065L SHARC DSP Technical Reference JTAG Test Access Port Table D 2 Scan path position definitions Contd Position Latch Type Signal 32 0 ADDRig 33 I ADDRig 34 0 ADDRg 35 I ADDRg 36 OE ADDR output enable 37 0 ADDRe 38 I ADDRg 39 0 ADDR 40 I ADDR 41 0 ADDR 42 I ADDR 43 0 ADDRs 44 I ADDRs Input O Output OE OutputEnable 1 Drive the associated signals during EXTEST and INTEST instructions 0 Disable the associated signals during EXTEST and INTEST instructions NC Do not
139. ADSP 21065L SHARC DSP Technical Reference Revision 2 0 July 2003 Part Number 82 001903 01 Analog Devices Inc One Technology Way gt ANALOG Norwood Mass 02062 9106 DEVICES Copyright Information 2003 Analog Devices Inc ALL RIGHTS RESERVED This document may not be reproduced in any form without prior express written consent from Analog Devices Inc Printed in the USA Disclaimer Analog Devices Inc reserves the right to change this product without prior notice Information furnished by Analog Devices is believed to be accurate and reliable However no responsibility is assumed by Analog Devices for its use nor for any infringement of patents or other rights of third parties which may result from its use No license is granted by implication or otherwise under the patent rights of Analog Devices Inc Trademark and Service Mark Notice The Analog Devices logo the SHARC logo EZ ICE and SHARC are registered trademarks of Analog Devices Inc VisualDSP is a trademark of Analog Devices Inc All other brand and product names are trademarks or service marks of their respective owners CONTENTS PREFACE For Additional Information About Analog Products 0 0 0 0 Por Techintesl ot Cstomer SUpport scene eee What s This Book About and Who s It For eee eeeeeeeeeceeeeeceneee INSTRUCTION SET REFERENCE Denac PN oes tests creed cic ta Ss ag peanaes agutagt seid gdetngtaues Compute and Move
140. ADSP 21065L SHARC DSP Technical Reference E 99 IOP Registers 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 EBPR Ext Bus Priority 00 even 01 core processor 10 I 0 processor DCPR DMA Chn 8 9 Priority 1 rotating 0 sequential 15 14 1312 1110 9 8 7 6 5 4 3 2 1 0 SRST Software Reset BSO Boot Select Override IVT Int Interrupt Vector Table no boot mode Buffer Hang Disable 0 enable 1 disable ADREDY Active Drive REDY O open drain 0 p 1 active drive a d HBW IMDW1 Host Bus Width Int Mem BIk1 00 32 bits Data Width 01 16 bits 0 32 bit data 10 8 bits 1 40 bit data 11 reserved IMDWo HMSWF Int Mem BIkO Host Packing Order Data Width MSW First 0 32 bit data 0 LSW 1 40 bit data 1 MSW HPFLSH Host Packing Status Flush Figure E 18 SYSCON register bits E 100 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 25 lists and describes the individual bits of the SYSCON register Table E 25 SYSCON register Bit Name Description 0 SRST Software reset Causes a software reset Has the same effect as the RESET pin 1 BSO Boot select override l Activate BMS to read from boot EPROM Activated only during external port DMA transfers Deactivates the MS3 9 lines Enables pro cessor to read its boot EPROM when no longer in boot mode and to read additional code or data from its EPROM after complet ing booting 2 IIVT Internal
141. Bit 27 Compare Accumulation Bit 4 Bit 29 Bit 30 Bit 31 Compare Accumulation Bit 1 Compare Accumulation Bit 2 Compare Accumulation Bit 3 Compare Accumulation Bit 5 Compare Accumulation Bit 6 Compare Accumulation Bit 7 Bit 0 ALU fit pt underflow Bit 1 ALU fit pt overflow Bit 2 ALU fixed pt overflow Bit 5 ALU fit pt invalid operation Bit 6 Multipl Bit 7 Multipl Bit 8 Multipl Bit 9 Multipl ier fixed pt overflow ier flt pt overflow ier flt pt underflow ier flt pt invalid op Bit 17 DAGI circular buffer 7 overflow Bit 18 DAG2 circular buffer 15 ovrflw Bit 21 PC stack full Bit 22 PC stack empty Bit 23 Status Bit 24 Status stack overflow MODE1 amp ASTAT stack empty Bit 25 Loop stack overflow Bit 26 Loop stack empty IRPTL and IMASK and IMASKP registers define RSTI 0x00000002 Bit 1 Offset 04 Reset define SOVFI 0x00000008 Bit 3 Offset Oc Stack overflow define TMZHI 0x00000010 Bit 4 Offset 10 Timer 0 high prir define VIRPTI 0x00000020 Bit 5 Offset 14 Vector interrupt define IRQ2I 0x00000040 Bit 6 Offset 18 IRQ2 asserted define IRQII 0x00000080 Bit 7 Offset 1c IRQ1 asserted define IRQOI 0x00000100 Bit 8 Offset 20 IRQO asserted define SPROI 0x00000400 Bit 10 Offset 28 SPORTO
142. C DSPs VisualDSP 3 0 Linker and Utilities Manual for SHARC DSPs VisualDSP 3 0 Assembler and Preprocessor Manual for SHARC DSPs VisualDSP 3 0 Kernel VDK User s Guide VisualDSP 3 0 Component Software Engineering Users Guide Conventions of Notation The following conventions apply to all chapters within this manual Addi tional conventions that apply to specific chapters only are documented at the beginning of the chapter in which they appear font This notation Denotes Letter Gothic Code software or command line options or key words input you must enter from the keyboard Ttalics d Special terminology titles of books A hint or tip M A warning or caution ADSP 21065L SHARC DSP Technical Reference xix Conventions of Notation XX ADSP 21065L SHARC DSP Technical Reference A INSTRUCTION SET REFERENCE Appendix A and B describe the processor s instruction set This appendix explains each instruction type including the assembly language syntax and opcodes which result from instruction assembly Many instructions opcodes contain a COMPUTE field that specifies a com pute operation using the ALU Multiplier or Shifter Because a large number of options are available for computations their descriptions appear in Appendix B Because data moves between the MR registers and the Register File are considered Multiplier operations their descriptions appe
143. C Timer 0 output pulse width TCOUNTO Ox002A SC Timer 0 counter TPERIOD1 0x002B SC Timer count period TPWIDTH1 0x002C SC Timer output pulse width TCOUNTI 0x002D SC Timer 1 counter LOCEL 0x002E 0x0000 0000 SC General purpose FLG11 4 1 0 and SDRAM control OSTAT 0x002F 0x0000 0000 SC General purpose FLG11 4 I 0 status I ROB 0x0030 DA DMA c index SPORTO rcv B MROB 0x0031 DA DMA ch modify CROB 0x0032 DA DMA c count CPROB 0x0033 DA DMA c chain pointe Groups DA DMA Address register DB DMA Buffer SC System Control SP Serial Port NI Not Initialized ADSP 21065L SHARC DSP Technical Reference E 45 IOP Registers Table E 15 IOP register addresses reset values and groups Contd Register Address Reset Group Description Value GPROB 0x0034 NI DA DMA chn 1 general purpose Reserved 0x0035 0x0036 DMASTAT 0x0037 N SC DMA channel status IIRI1B 0x0038 N DA DMA chn 3 index SPORT1 rcv B IMR1B 0x0039 DA DMA chn 3 modify CRIB 0x003A DA DMA chn 3 count CPR1B 0x003B DA DMA chn 3 chain pointe GPR1B 0x003C DA DMA c 3 general purpose Reserved 0x003D 0x003F IIEPO 0x0040 DA DMA c 8 index EPBO IMEPO 0x0041 DA DMA chn 8 modify CEPO 0x0042 DA DMA chn 8 count CPEPO 0x0043 DA DMA chn 8 chain pointe Groups DA DMA Address register DB DMA Buffer SC Syst
144. CLKO RAS CAS DQM SDCKE SDA10 output enable 132 0 SDCLKO 133 I SDCLKO 34 I DMAR 135 I DMAR2 Input O Output OE OutputEnable 1 Drive the associated signals during EXTEST and INTEST instructions 0 Disable the associated signals during EXTEST and INTEST instructions NC Do not connect D 16 ADSP 21065L SHARC DSP Technical Reference JTAG Test Access Port Table D 2 Scan path position definitions Contd Position Latch Type Signal 36 I HBR 37 0 RAS 38 I RAS 39 0 CAS 40 I CAS 41 0 SDWE 42 I SDWE 43 0 DOM 44 0 SDCKE 45 I SDCKE 46 0 SDA10 47 OE HBG output enable 48 0 DMAG1 Input O Output OE OutputEnable 1 Drive the associated signals during EXTEST and INTEST instructions 0 Disable the associated signals during EXTEST and INTEST instructions NC Do not connect ADSP 21065L SHARC DSP Technical Reference D 17 Boundary Register Table D 2 Scan path position definitions Contd Position Latch Type Signal 149 0 DMAG2 150 0 HBG 151 I HBG 152 0 BMSTR 153 OE RD WR DMAG1 DMAG2 MS SW output enable 154 I CS 155 I STBS 56 I Reserved2 157 0 WR 158 I WR 159 0 RD 160 I RD 161 OE REDY output enable Inpu O Output OE OutputEnable 1 ive the associated signals during EXTEST and INTEST instru
145. CSO Ox00E9 SP SPORTO multichn rcv select TCCSO OxOOEA SP SPORTO multichn xmit compand select RCCSO OxO0EB SP SPORTO multichn rev compand select KEYWDO OxOOEC SP SPORTO keyword IMASKO OxOOED SP SPORTO keyword mask TXO_B OxOOEE SP SPORTO transmit data buffer B Groups DA DMA Address register DB DMA Buffer SC System Control SP Serial Port NI Not Initialized ADSP 21065L SHARC DSP Technical Reference E 51 IOP Registers Table E 15 IOP register addresses reset values and groups Contd Register Address Reset Group Description Value RXO_B OxOOEF NI SP SPORTO receive data buffer B STCTL1 0x00F0 0x0000 0000 SP SPORT1 transmit con tro SRCTL1 0x00F1 0x0000 0000 SP SPORT eceive con tro TX1_A Ox00F2 SP SPORT1 transmit data buffer A RX1_A Ox00F3 SP SPORT eceive data buffer A TDIVI Ox00F4 SP SPORT1 transmit divi sor Reserved 0x00F5 RDIVI Ox00F6 NI SP SPORTI receive divi sor Reserved 0x00F7 TCS1 Ox00F8 SP SPORT ultichn xmit select RCS1 0x00F9 SP SPORT ultichn rcv select TCCS1 OxOOFA SP SPORT ultichn xmit compand select Groups DA DMA Address register DB DMA Buffer SC Syste Control SP Serial Port NI Not Initialized E 52 AD
146. Chapter 11 Programmable Timers and I O Ports In this manual see Appendix A Instruction Set Reference IOCTL is memory mapped in internal memory at address 0x002E After reset the IOCTL register is initialized to 0x0000 0000 as shown in Figure E 8 E 68 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 SDPSS SDCL SDRAM SDRAM Power Up Seq CAS Latency Write 7 to start 01 1 clk cycle 10 2 clk cycles SDBN 11 3 clk cycles SDRAM of banks SDTRAS 00 2 banks SDRAM tRAS Spec 01 4 banks 1x reserved SDBUF clk cycles SDTRP SDRAM tRP Spec SDBS Ext SDRAM SDRAM Ext clk cycles ctrl addr Buffer Bank Select 0 No buffer i SDPM 000 None 1 With buffer 100 Bank 0 SDRAM 101 B nk 1 Power Up Mode Thence 2 O prechg 8 CBR refs 11 E 3 mode reg set 15 14 13 12 11 10 9 8 7 6 54 3 2 SDSFR SDRAM 1 prechg mode reg set 8 CBR refs FLG40 Gen Purpose I O Self Refresh User defined O disable O input 1 enable 1 output SDPGS SDRAM Page Size 000 1024 words 001 512 words 010 256 words others reserved DSDCK1 DSDCTL SDCLK1 Disable SDCLKO Disable ELGIO O enable O enable 1 disable 1 disable FLG100 Figure E 8 IOCTL register bits FLG110 ADSP 21065L SHARC DSP Technical Reference E 69 IOP Registers Table E 19 lists and describes the bits of the IOCTL register Table E 19 IOCTL
147. DEX SDCLKO 10 4 SDCLK1 10 4 SDWE 10 4 SDRAM parallel refresh command 10 27 SDRAM pins see SDRAM interface pin definitions SDRAM refresh counter register see SDRDIV register SDRAM row access strobe see RAS SDRAM timing requirements 10 17 SDRAM timing specifications 10 41 bank cycle time 10 41 RAS to CAS delay 10 41 SDRAM write enable see SDWE SDRDIV register 10 7 10 13 refresh counter equation variables 10 14 SDRAM power up sequence and 10 20 setting the refresh counter value 10 14 setting the value 10 14 SDWE pin definition 12 11 state after reset 12 23 Self refresh command SDRAM see Sref command Semaphore described 7 34 SENDN endian data word format bit 9 15 9 21 defined 9 35 described 9 48 Sequential program flow 3 10 Serial communication synchronization 9 4 Serial port connections data receive DRx_X pins 9 4 data transmit DTx_X pins 9 4 pins summary of 9 4 receive clock RCLKx pins 9 4 receive frame sync RFSx pins 9 4 transmit clock TCLKx pins 9 4 transmit frame sync TFSx pins 9 4 Serial ports 9 1 clock and frame sync frequencies 9 39 clock signal options see SPORT clock signal options companding see Companding connections see Serial port connections control register status bits 9 38 control registers 9 9 see also SPORT control registers data buffers 9 9 see also SPORT data buffers data packing and unpacking 9 47 see also SPORT data packing and unpacking data receive inputs
148. E SHIFTOP Bits Description COND Specifies the test condition If no condition is specified COND is TRUE and the instruction is executed SHIFTOP Specifies the Shifter operation DATA Specifies an 8 bit immediate shift value For Shifter operations requiring two 6 bit values a shift value and a length value the DATAEX field adds 4 MSBs to the DATA field creating a 12 bit immediate value The six LSBs are the shift value and the six MSBs are the length value A 40 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference Bits Description D Selects the access type read or write if a mem ory access is specified G Selects data memory or program memory DREG Specifies the Register File location I Specifies the I register which is postmodified and updated by the M register M Identifies the M register for postmodify ADSP 21065L SHARC DSP Technical Reference A 41 Group Instructions Compute amp Move Compute modify Type 7 Index register modify optional condition optional compute operation Syntax IF COND compute MODIFY Ia Mb Ic Md Function Update of the specified I register by the specified M register If a compute operation is specified it is performed in parallel with the data access If a condition is specified it affects entire instruction For more information on register restrictions see Chapter 4 Data Addressing in ADSP 21065L S
149. F MRF Rx Ry mod2 MRB MRB Rx Ry mod2 Function Multiplies the fixed point fields in registers Rx and Ry and adds the prod uct to the specified MR register value If rounding is specified fractional data only the result is rounded The result is placed either in the fixed point field in register Rn or one of the MR accumulation registers which must be the same MR register that provided the input If Rn is speci fied only the portion of the result that has the same format as the inputs is transferred bits 31 0 for integers bits 63 32 for fractional The float ing point extension field in Rn is set to all Os If MRF or MRB is specified the entire 80 bit result is placed in MRF or MRB Status Flags Flag Description MN Set if the result is negative otherwise cleared MV Set if the upper bits are not all zeros signed or unsigned result or ones signed result Number of upper bits depends on format For a signed result fractional 33 integer 49 For an unsigned result fractional 32 integer 48 MU Set if the upper 48 bits of a fractional result are all zeros signed or unsigned result or ones signed result and the lower 32 bits are not all zeros Inte ger results do not underflow MI Cleared ADSP 21065L SHARC DSP Technical Reference B 55 Multiplier Operations Rn MRF Rx Ry mod2 Rn MRB Rx Ry mod2 MRF MRF Rx Ry mod2 MRB MRB Rx Ry mod2 Function Multiplies
150. F bit test flag bit conditional instruction use E 7 system register bit manipulation instruction E 6 test operation results E 6 XOR operation results E 7 BIST Rx BY data8 operation described B 73 shifter status flags B 73 BTST Rx BY Ry operation described B 73 shifter status flags B 73 Buffer hang disable bit see BHD buffer hang disable bit Burst stop command SDRAM see Bstop command burst type SDRAM defined 10 5 Bus arbitration synchronization after reset 7 21 BSYN bit 7 22 bus synchronization scheme 7 21 described 7 21 individual processor reset 7 23 multiprocessor configuration 7 21 processor ID1 operation during 7 23 SRST 7 21 synchronization sequence 7 22 INDEX Bus arbitration multiprocessing 7 10 7 12 Bus connections EPBx buffers 8 18 on chip memory 5 7 Bus hold time cycle described 5 60 diagram of 5 61 Bus idle cycle described 5 58 diagram of 5 59 EBxWS bit values 5 60 with following SDRAM access 5 59 Bus lock and semaphores 7 34 bus lock feature 7 34 BUSLK bus lock bit requesting bus lock 7 34 current bus master identifying 7 34 read write modify operations 7 35 read write modify operations on semaphores 7 34 requesting bus lock 7 34 semaphore locations 7 34 semaphore described 7 34 SWPD bit 7 35 Bus lock feature 7 18 7 34 Bus master condition see BM condition Bus mastership timeout BCNT register 7 18 BMAX register 7 17 ADSP 21065L SHARC DSP User s Manual I 9 INDEX B
151. F0 F12 F12 D D R2 F7 FO F7 FO F11 F12 F7 N RO RI R2 FO R3 2 D FO FO F7 F7 N RO RI R2 R3 Note that this code segment can be made into a subroutine by adding an RTS DB clause to the third to last instruction Cavanagh J 1984 Digital Computer Arithmetic McGraw Hill Page 284 B 42 ADSP 21065L SHARC DSP Technical Reference Status Flags Compute Operation Reference Flag Description AZ Set if the floating point result is Zero unbiased exponent of Fx is greater than 125 otherwise cleared AU Cleared AN Set if the input operand is negative otherwise cleared AV Set if the input operand is Zero otherwise cleared AC Cleared AS Cleared Al Set if the input operand is a NAN otherwise cleared ADSP 21065L SHARC DSP Technical Reference B 43 Single Function Operations Fn RSQRTS Fx Function Creates a 4 bit accurate seed for 1 VFx the reciprocal square root of Fx The mantissa of the seed is determined from a ROM table using the LSB of the biased exponent of Fx concatenated with the six MSBs excluding the hidden bit of the mantissa of Fx as an index The unbiased exponent of the seed is calculated as the twos complement of the unbiased Fx expo nent shifted right by one bit and decremented by one that is if e is the unbiased exponent of Fx then the unbiased exponent of Fn INT e 2 1 The sign of the seed is the sign of the input The input Zero returns Infinity and set
152. HARC DSP User s Manual Examples IF NOT FLAG2_IN R4 R6 R12 SUF MODIFY 110 M8 IF NOT LCE MODIFY 1I3 M1 Type 7 Opcode 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 000 00100 G COND I M ajap e e e e e e COMPUTE A 42 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference Bits Description COND Specifies the test condition If no condition is specified COND is TRUE and the instruction is executed G Selects DAG1 or DAG2 I Specifies the I register M Specifies the M register COMPUTE Defines a compute operation to be performed in parallel with the data access this is a no opera tion if no compute operation is specified in the instruction ADSP 2 1065L SHARC DSP Technical Reference A 43 Group II Instructions Program Flow Control Group II Instructions Program Flow Control e Direct Jump Call Type 8 on page A 45 Direct or PC relative jump call optional condition e Indirect Jump Call Compute Type 9 on page A 48 Indirect or PC relative jump call optional condition optional compute operation e Indirect Jump or Compute dreg DM Type 10 on page A 52 Indirect or PC relative jump or optional compute operation with transfer between data memory and Register File e Return From Subroutine Interrupt Compute Type 11 on page A 55
153. HBG 8 3 HBR 8 3 REDY 8 4 summary of 8 3 ADSP 21065L SHARC DSP User s Manual I 49 INDEX Host interface signals chip select 8 3 host bus acknowledge 8 4 host bus grant 8 3 host bus request 8 3 summary of 8 3 Host to processor 8 to 48 bit word packing 6 54 Host transition cycle see HTC Host vector interrupts 8 38 generating 8 38 interrupt service routine 8 38 interrupt service routines 8 38 servicing 8 38 Host defined 8 5 HPFLSH host packing status flush bit 8 27 HPS host packing status bit 7 43 8 42 HSHAKE DMA handshake mode enable bit 6 14 8 21 8 22 described 6 19 DMA transfers to on chip memory 7 31 7 32 HSTM host mastership bit 7 41 8 40 HTC 8 8 8 9 defined 8 6 Hysteresis described 12 41 RESET 12 41 I I DAG index registers 4 2 bit reverse instruction and 4 14 circular buffer addressing and 4 9 circular data buffers and 4 11 immediate modifiers 4 8 postmodify addressing operations 4 7 using without a circular data buffer but with circular buffer overflow interrupts enabled 4 13 I O bus and DMA operations 6 27 and the EPBx buffers 8 18 data transfers with memory 5 7 defined 5 4 generating addresses for 32 bit addresses 5 26 memory accesses 5 27 I O interrupts causes of 6 47 I O processor 7 26 see JOP registers I S SPORT mode control bits 9 62 data word length and the frame sync divisor 9 63 data word length capability 9 63 default bit values diagram of 9 19 9 24 defau
154. Host Bus Width 32bit define HBWO1 0x00000010 Host Bus Width 16bit define HBW 10 0x00000020 Host Bus Width 8bit define HMSWF 0x00000040 Host packing order O LSW first 1 MSW define HPFLSH 0x00000080 Host pack flush define IMDWOX 0x00000100 Int memory blk0 extended data 40b define IMDW1X 0x00000200 Int memory blk1 extended data 40b define EBPROO 0x00000000 Ext bus priority Even define EBPRO1 0x00010000 Ext bus priority Core has priority define EBPR10 0x00020000 Ext bus priority IO has priority define DCPR 0x00040000 Sel rotating access prir DMA8 DMA9 SYSTAT Register define SYSTAT 0x03 Memory mapped System Status Register define HSTM 0x00000001 Host is the Bus Master define BSYN 0x00000002 Bus arbitration logic is synchronized define CRBM 0x00000030 Current ADSP21065L Bus Master define IDC 0x00000300 ADSP21065L ID Code define SWPD 0x00001000 Slave write FIFO data pending define VIPD 0x00002000 Vector interrupt pending 1 pending define HPS 0x00004000 Host pack status i SYSTEM registers define SYSCON 0x00 System configuration register define VIRPT 0x01 Vector interrupt table define WAIT 0x02 Wait state config for ext memory define SYSTAT 0x03 System status register ADSP 21065L SHARC DSP Technical Reference E 119 SYMBOL DEFINITIONS F
155. ILE def21065L h DMA BUFFER registers define EPBO 0x04 External port DMA buffer 0 define EPB1 0x05 External port DMA buffer 1 MESSAGE registers define MSGRO 0x08 Message register 0 define MSGR1 0x09 Message register 1 define MSGR2 0x0a Message register 2 define MSGR3 0x0b Message register 3 define MSGR4 0x0c Message register 4 define MSGR5 0x0d Message register 5 define MSGR6 Ox0e Message register 6 define MSGR7 Ox0f Message register 7 MISCELLANEOUS registers define BMAX 0x18 Bus timeout maximum define BCNT 0x19 Bus timeout counter DMAC registers define DMACO Oxlc DMA 8 control register define DMAC1 Oxld DMA 9 control register i SDRAM amp Timer registers define SDRDIV 0x20 SDRAM refresh counter specification define TPERIODO 0x28 Timer 0 period register define TPWIDTHO 0x29 Timer 0 pulse width register define TCOUNTO 0x2a Timer 0 counter define TPERIOD1 0x2b Timer 1 period register define TPWIDTH1 0x2c Timer 1 pulse width register define TCOUNTI 0x2d Timer 1 counter define IOCTL 0x2e SDRAM and gen purpose I O control reg define IOSTAT 0x2f Gen purpose I O status register DMA ADDRESS registers define IROA 0x60 DMA channel 0 index reg define IMROA 0x61 DMA channel 0 modify reg define CROA 0x62 DMA chan
156. Infinities otherwise cleared ADSP 21065L SHARC DSP Technical Reference B 27 Single Function Operations Fn ABS Fx Fy Function Adds the floating point operands in registers Fx and Fy and places the absolute value of the normalized result in register Fn Rounding is to near est IEEE or by truncation to a 32 bit or to a 40 bit boundary as defined by the rounding mode and rounding boundary bits in MODE1 Pos trounded overflow returns Infinity round to nearest or NORM MAX round to zero Postrounded denormal returns Zero Denormal inputs are flushed to Zero A NAN input returns an all 1s result Status Flags Flag Description AZ Set if the postrounded result is a denormal unbiased exponent lt 126 or zero otherwise cleared AU Set if the postrounded result is a denormal other wise cleared AN Cleared AV Set if the postrounded result overflows unbiased exponent gt 127 otherwise cleared AC Cleared AS Cleared Al Set if either of the input operands is a NAN or if they are opposite signed Infinities otherwise cleared B 28 ADSP 21065L SHARC DSP Technical Reference Compute Operation Reference Fn ABS Fx Fy Function Subtracts the floating point operand in Fy from the floating point oper and in Fx and places the absolute value of the normalized result in register Fn Rounding is to nearest IEEE or by truncation to a 32 bit or toa 40 bit boundary as defined by the rou
157. L8 L15 DAG2 length registers B8 B15 DAG2 base registers Bus Exchange PX1 PMD DMD bus exchange 1 16 bits PX2 PMD DMD bus exchange 2 32 bits PX 48 bit combination of PX1 and PX2 System Regis MODE1 ode control and status ters core MODE2 ode control and status IRPTL Interrupt latch IMASK Interrupt mask IMASKP Interrupt mask pointer for nesting ASTAT Arithmetic status flags bit test flag etc A 16 ADSP 21065L SHARC DSP Technical Reference Instruction Set Reference Table A 3 Universal registers UREG Contd Type Subregisters Function System STKY Sticky arithmetic status Registers flags stack status flags etc Cont d USTAT1 User status register 1 USTAT2 User status register 2 Table A 4 Multiplier registers Registers Function MR MRO MR2 Multiplier results MRF MROF MR2F Multiplier results foreground MRB MROB MR2B Multiplier results background ADSP 21065L SHARC DSP Technical Reference A 17 Instruction Summary Memory Addressing Summary The processor supports the following types of addressing Direct Addressing Absolute address Instruction Types 8 12 13 14 dm Ox000015F0 astat if ne jump label2 label2 is an address label PC relative address Instruction Types 8 9 10 12 13 call pc 10 r0 r6 r3 do pc length until sz length is a variable Indirect Addressing using DAG regi
158. M Ic lt data6 gt PM lt data6 gt Ic dreg DM lt data6 gt Ia Compute ureg ureg Type 5 on page A 37 IF COND compute uregl ureg2 Immediate Shift dreg gt DM PM Type 6 on page A 39 IF COND shiftimm DM Ia Mb dreg PM Ic Md dreg DM Ia Mb PM Ic Md Compute modify Type 7 on page A 42 IF COND compute MODIFY Ia Mb ADSP 21065L SHARC DSP Technical Reference A 5 Instruction Summary Program Flow Control Summary Program flow control instructions are classed as Group II instructions and they provide control of program execution flow For a complete description of these instructions see the noted pages d For all program flow control instructions except type 10 instructions IF COND is optional Direct Jump Call Type 8 on page A 45 IF COND lt addr24 gt DB JUMP PC lt reladdr24 gt LA CI DB LA DB CI IF COND lt addr24 gt DB CALL PC lt reladdr24 gt Indirect Jump Call Compute Type 9 on page A 48 IF COND Md Ic DB compute JUMP PC lt reladdr6 gt LA ELSE compute CI DB LA DB CI IF COND Md Ic DB compute CALL PC lt reladdr6 gt ELSE compute Indirect Jump or Compute dreg DM Type 10 on page A 52 IF COND Md Ic Else compute DM Ia Mb dreg Jump PC lt reladdr6 gt compute dreg DM Ia Mb A 6 ADSP 2
159. MODE bit 6 17 6 51 7 31 SPORT DMA data transfers 6 22 status 6 54 status PS 6 16 DMA data transfers 6 7 address generation 6 28 6 55 between external devices and external memory 6 8 between host and on chip memory 8 21 between processors 7 30 blocked EPBx buffers 6 67 chaining 6 8 clock cycles per transfer 6 74 concurrent DMA accesses of on chip memory space 6 74 data packing see DMA data packing data source and destination selection in handshake mode 6 63 DATAx lines for 32 bit data 6 53 direction of 6 15 SPORT transfers 6 22 EPBx buffers DMA 8 22 external handshake mode see INDEX External handshake mode DMA external port block data 6 7 external to internal transfer sequence in slave mode DMA 6 60 external transfers and the ECEPx register 6 63 external transfers and the MSx lines 6 63 from internal to external memory space 6 75 hardware handshake signals 6 62 host block data 8 18 host EPBx transfers 8 22 host interface and 8 5 host transfers and data packing 8 22 I O transfer rate see DMA I O transfer rate initiating with chaining enabled 6 39 internal to external transfer sequence in slave mode 6 61 multiprocessing 7 25 7 27 7 30 non DMA single word through the external port 6 50 overall throughput of multiple DMA channel memory accesses 6 74 packing order MSWF 6 17 packing status 6 16 priority of DMA channel accesses of the I O bus 6 74 request timing 6 65 ADS
160. OI interrupt function and priority 9 6 SPT 1I interrupt function and priority 9 6 SRCTL register 6 23 9 9 9 15 address of E 81 bit definitions E 85 CKRE 9 21 9 26 control bit definitions 9 26 control bits summary of 9 21 core updates of status bits 9 15 default bit values IS mode diagram of 9 24 E 83 default bit values multichannel mode diagram of 9 25 E 84 default bit values standard mode diagram of 9 23 E 82 described E 81 DTYPE 9 21 9 27 9 44 effect latency 9 13 I S mode control bits 9 21 9 62 ICLK 9 21 IMAT 9 22 9 28 9 74 IMODE 9 21 9 29 9 74 initialization value E 81 IRFS 9 21 9 29 L_FIRST 9 21 9 30 LAEFS 9 22 9 29 LREFS 9 21 9 30 MCE 9 22 9 31 memory mapped address and reset value 9 11 MSTR 9 21 9 31 multichannel control bits 9 69 multichannel mode control bits 9 21 NCH 9 22 9 32 OPMODE 9 21 9 32 PACK 9 21 9 32 receive comparison control bits 9 74 RFSR 9 21 9 33 ROVE 9 22 9 33 RXS 9 22 9 33 SCHEN 9 22 9 34 SDEN 9 22 9 34 1 114 ADSP 21065L SHARC DSP User s Manual SENDN 9 21 9 35 setting up SPORT DMA data transfers 6 23 SLEN 9 21 9 35 SPEN 9 21 9 35 SPL 9 22 9 36 SPORT DMA chaining enable SCHEN bit 6 23 SPORT DMA control bits 6 23 SPORT DMA enable SDEN bit 6 23 SRCTLO memory mapped address and reset value 9 10 standard mode control bits 9 21 status bits 9 38 TCLK 9 28 write latency 9 13 INDEX SRREL register f
161. P 21065L SHARC DSP Technical Reference Numeric Formats Table C 2 Results of the FPACK and FUNPACK operations Contd Operation Condition Result FUNPACK 0 lt exp lt 15 Exponent is the 3 LSBs of the source exponent prefixed by the MSB of the source exponent and four copies of the complement of the MSB The unpacked fraction is the source fraction with 12 zeros appended exp 0 Exponent is 120 N where N is the number of leading zeros in the source fraction The unpacked fraction is the remainder of the source fraction with zeros 0s appended to pad it and the hidden stripped away exp source exponent sign bit remains the same in all cases The short float type supports gradual underflow which sacrifices precision for dynamic range When packing a number that would have under flowed the processor sets the exponent to zero 0 and right shifts the mantissa including the hidden 1 the appropriate amount The packed result is a denormal which you can unpack into a normal IEEE float ing point number During the FPACK operation an overflow condition sets the SV flag and a nonoverflow condition clears it During the FUNPACK operation the Shifter clears the SV flag For both instructions the Shifter clears the SZ and SS flags For details see Chapter 2 Computation Units in ADSP 21065L SHARC DSP User s Manual ADSP 21065L SHARC DSP Technical Reference C 7 Fix
162. P 21065L SHARC DSP User s Manual I 25 INDEX request grant latency handling 6 65 responding to DMAGx 6 65 SDRAM controller commands and 10 36 SDRAM operation 10 24 serial port transfers 6 22 see SPORT DMA setting up 6 9 setting up host DMA transfers to on chip memory 8 21 8 22 SPORT DMA block transfers 9 77 SPORT DMA channels 9 77 starting a DMA chain 6 43 through the host interface 8 5 transfer rate 6 65 types 6 7 word width of 6 16 DMA done interrupt 12 58 DMA grant x see DMAGx DMA handshake mode asynchronous requests and 6 66 described 6 62 DMAGx 6 62 DMAR x 6 62 6 63 enabling 6 63 handshake timing 6 63 hardware handshake signals 6 62 DMA handshake single wait state HIDMA 5 57 DMA hardware interface 6 72 DMA I O transfer rate and uncompleted external transfers 6 74 external port DMA channels 6 74 serial port DMA channels 6 74 DMA interrupts 6 9 8 20 and non DMaA I O port transfers 6 46 C count register 6 45 C and ECEPx count registers and 6 9 causes 6 47 core controlled interrupt driven I O 6 46 DEN DMA enable bit 6 17 7 29 described 6 45 disabling 6 40 disabling in external handshake mode DMA 6 69 ECEP external count register 6 45 enabling and disabling with chaining enabled 6 46 EPBx single word transfers 6 17 generation 6 45 7 29 8 20 IMASK register 6 40 6 45 7 29 INTIO DMA single word interrupt enable bit 6 17 7 29 IRPTL register 6 9 6 45 7 29 mas
163. Port NI Not Initialized ADSP 21065L SHARC DSP Technical Reference E 43 IOP Registers Table E 15 IOP register addresses reset values and groups Contd Register Address Reset Group Description Value SGR2 0x000A SC essage register 2 SGR3 0x000B SC essage register 3 SGR4 0x000C Sc essage register 4 SGR5 0x000D SC essage register 5 SGR6 0x000E SE essage register 6 SGR7 0x000F Sc essage register 7 Reserved 0x0010 0x0017 BMAX 0x0018 0x0000 0000 SC Bus timeout maximum BCNT 0x0019 0x0000 0000 SC BUs timeout counter Reserved 0x001A 0x001B DMACO Ox001C 0x0000 0000 DB DMA chn 8 control register Ext port buffer 0 DMAC1 0x001D 0x0000 0000 DB DMA chn 9 control register Ext port buffer 1 Reserved 0x001E 0x001F SDRDIV 0x0020 NI Sc SDRAM refresh counter Groups DA DMA Address register DB DMA Buffer SC System Control SP Serial Port NI Not Initialized E 44 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 15 IOP register addresses reset values and groups Cont d Register Address Reset Group Description Value Reserved 0x0021 0x0027 TPERIODO 0x0028 SC Timer 0 count period TPWIDTHO 0x0029 S
164. R15 8 primary 1 R15 8 alternate SRD2L DAG2 Altrn Reg 11 8 Select O enable as primary 1 enable as alternate Figure E 3 MODE register bits BR8 amp 18 Bit Reverse DAG2 O disable 1 enable BRO 10 Bit Reverse DAG1 0 disable SRCU 1 enable Altrn Reg Select for Comp Units O enable MR primary 1 enable MR alternate SRD1H DAG1 Altrn Reg 7 4 Select O enable as primary SRDIL 1 enable as alternate DAG1 Altrn Reg 3 0 Select O enable as primary 1 enable as alternate SRD2H DAG2 Altrn Reg 15 12 Select O enable as primary 1 enable as alternate ADSP 21065L SHARC DSP Technical Reference E 17 System Registers Application software can use the Shifter and ALU instructions on Register File locations or the System Register Bit Manipulation instruction on sys tem registers to set individual bits See Table E 3 on page E 6 Table E 6 lists and describes the individual bits of the MODE register Table E 6 MODE register Bit Name Description 0 BR8 Bit reversing for 18 DAG2 0 disable 1 enable 1 BRO Bit reversing for 10 DAG1 0 disable 1 enable 2 SRCU Alternate register select for computation units 0 enable as primary 1 enable as alternate 3 SRD1H DAG alternate register select 7 4 0 enable as primary 1 enable as alternate 4 SRDIL DAG alternate register select 3 0 0 enable as primary 1 enable as alternate 5 S
165. RD2H DAG2 alternate register select 15 12 0 enable as primary 1 enable as alternate E 18 ADSP 21065L SHARC DSP Technical Reference Control and Status Registers Table E 6 MODE register Cont d Bit Name Description 6 SRD2L DAG2 alternate register select 11 8 0 enable as primary 1 enable as alternate 7 SRRFH Register file alternate select for R15 R8 0 enable as primary 1 enable as alternate 8 9 Reserved 10 SRRFL Register file alternate select for R RO 0 enable as primary 1 enable as alternate D1 NESTM Interrupt nesting enable 0 disable 1 enable 12 IRPTEN Global interrupt enable 0 disable 1 enable 13 ALUSAT ALU saturation enable full scale in fixed point 0 disable 1 enable 14 SSE1 Short word sign extension enable 0 disable 1 enable ADSP 21065L SHARC DSP Technical Reference E 19 System Registers Table E 6 MODE register Cont d Bit Name Description 15 TRUNC Floating point data rounding enable 0 round to nearest 1 truncate 16 RND32 Floating point data rounding length 0 round to 40 bits 1 round to 32 bits 17 18 CSEL Condition code select 00 bus master condition Ug 3 Reserved Does not apply to PX register writes The bus master condition BM indicates whether the ADSP 21065L is the current bus master in a multi
166. RUNC operation always truncates toward 0 The TRUNC bit does not influence operation of the TRUNC instruction If a scaling factor Ry is specified the fixed point twos complement inte ger in Ry is added to the exponent of the floating point operand in Fx before the conversion The result of the conversion is right justified 32 0 format in the fixed point field in register Rn The floating point extension field in Rn is set to all Os In saturation mode the ALU saturation mode bit in MODE set positive overflows and Infinity return the maximum positive number 0x7FFF FFFF and negative overflows and Infinity return the minimum negative number 0x8000 0000 For the FIX operation rounding is to nearest IEEE or by truncation as defined by the rounding mode bit in MODE1 A NAN input returns a floating point all 1s result If saturation mode is not set an Infinity input or a result that overflows returns a floating point result of all 1s All posi tive underflows return zero 0 Negative underflows that are rounded to nearest return zero 0 and negative underflows that are rounded by truncation return 1 OxFF FFFF FFOO ADSP 21065L SHARC DSP Technical Reference B 39 Single Function Operations Status Flags Flag Description AZ Set if the fixed point result is Zero otherwise cleared AU Set if the pre rounded result is a denormal other wise cleared AN Set if the fixed point result is
167. S fixed point overflow 2 34 MR register values and 2 35 MU underflow 2 34 MUS underflow 2 34 MV overflow 2 34 MVS floating point overflow 2 34 negative flag 2 35 overflow flags 2 35 STKY status bits summary of 2 34 underflow flags 2 36 updating 2 34 Multiplier unit 2 26 described 2 1 2 26 fixed point instructions 2 26 floating point instructions 2 26 instruction set summary 2 38 instruction types summary of 2 26 multifunction computations and 2 26 operations 2 26 operations see Multiplier operations INDEX status flags see Multiplier status flags Multiprocessing 7 1 ACK 12 52 basic system diagram of 7 2 BM condition and 3 13 BMS and 12 51 booting see Multiprocessor booting broadcast writes see Broadcast writes BRx pins 7 3 bus arbitration see Multiprocessor bus arbitration bus lock and semaphores see Bus lock and semaphores bus master 7 1 clock skew 12 43 configurations for interprocessor DMA summary of 6 70 data transfers see Multiprocessing data transfers DMACx registers 7 4 emulating synchronous operations with CLKIN 12 40 EPBx buffers 7 4 EPROM boot mode and 12 51 external bus 7 1 7 4 features 7 1 host accesses of both processors 8 14 host interface 8 6 host interface with the system bus 8 44 IDx pin connections 7 3 ADSP 21065L SHARC DSP User s Manual I 77 INDEX immediate high priority interrupt 8 36 internal clock generation and
168. SI for SAT only 0 1 UI for SAT only Sates eisee 1 610 SF eee ee al sa UF See ee lips 220 ADSP 21065L SHARC DSP Technical Reference B 53 Multiplier Operations Rn Rx Ry mod2 MRF Rx Ry mod2 MRB Rx Ry mod2 Function Multiplies the fixed point fields in registers Rx and Ry If rounding is spec ified fractional data only the result is rounded The result is placed either in the fixed point field in register Rn or one of the MR accumulation registers If Rn is specified