section 5 section 5
play

Section 5 Section 5 Addressing Modes a 5-1 1 ADSP-BF533 Block - PowerPoint PPT Presentation

Section 5 Section 5 Addressing Modes a 5-1 1 ADSP-BF533 Block Diagram L1 Core Instruction Timer 64 Memory Performance Core LD0 32 Monitor Processor L1 Data LD1 32 Memory JTAG/ Debug SD32 Core D0 bus Core I bus DMA Mastered


  1. Section 5 Section 5 Addressing Modes a 5-1 1

  2. ADSP-BF533 Block Diagram L1 Core Instruction Timer 64 Memory Performance Core LD0 32 Monitor Processor L1 Data LD1 32 Memory JTAG/ Debug SD32 Core D0 bus Core I bus DMA Mastered 32 Core DA0 bus Core D1 bus Core DA1 bus 64 32 32 32 32 bus Core Clock (CCLK) Domain CORE/SYSTEM BUS INTERFACE System Clock (SCLK) Domain 16 DMA Core Bus (DCB) 16 Data Watchdog Event Power DMA Controller EBIU Address Real Time Clock 16 And Timers Controller Management Control DMA Ext Bus External Port Bus (DEB) (EPB) 16 16 16 Peripheral Access Bus (PAB) DMA Access Bus (DAB) External Access Bus (EAB) Programmable UART0 1KB internal SPORTs SPI PPI flags IRDA Boot ROM a 5-2 2

  3. ADSP- -BF533 Core BF533 Core ADSP Addressing Arithmetic Unit Addressing Arithmetic Unit Data Arithmetic Unit Data Arithmetic Unit FP FP SP SP P5 P5 P4 P4 16 16 16 16 I3 I3 L3 L3 B3 B3 M3 M3 P3 P3 8 8 8 8 8 8 8 8 I2 I2 L2 L2 B2 B2 M2 M2 P2 P2 R7 R7 I1 I1 L1 L1 B1 B1 M1 M1 P1 P1 R6 R6 B0 B0 M0 M0 I0 I0 L0 L0 DAG0 DAG0 DAG1 DAG1 P0 P0 R5 R5 R4 R4 barrel barrel 40 40 40 40 shifter shifter R3 R3 R2 R2 R1 R1 acc0 acc0 acc1 acc1 R0 R0 LD0 LD0 32 32 Memory Memory LD1 LD1 32 32 Management Management Core Registers Core Registers Core Registers DA0 DA0 DA1 DA1 SD SD 32 32 32 32 32 32 LC0 LC0 LC0 LT0 LT0 LT0 LB0 LB0 LB0 Program Program LC1 LC1 LC1 LT1 LT1 LT1 LB1 LB1 LB1 32 32 IAB IAB Dcache/SRAM Dcache/SRAM 4KB SRAM 4KB SRAM L1 Instruction Memory L1 Instruction Memory Sequencer Sequencer ASTAT ASTAT ASTAT RETS RETS RETS 64 64 IDB IDB SRAM/Cache SRAM/Cache SYSCFG SYSCFG SYSCFG RETI RETI RETI L1 Data Memory L1 Data Memory SEQSTAT SEQSTAT SEQSTAT RETX RETX RETX RETN RETN RETN Core D0 bus Core D0 bus Core I bus Core I bus 32 32 64 64 32 32 RETF RETF RETF Core D1 bus Core D1 bus System Bus Interface Unit System Bus Interface Unit a 5-3 3

  4. Address Registers • One set of 32 bit general purpose Pointer registers • P0-P5, SP and FP • One set of 32 bit DSP addressing Index registers • I0-I3, B0-B3, L0-L3, M0-M3 • All addresses are byte addresses into a 4 GB address space 0 31 P0 Address P1 Registers P2 P3 P4 SP points to supervisor stack in P5 Supervisor mode and user stack in FP User mode SP USP is accessible in supervisor USP 31 0 31 0 31 0 31 0 mode only – Allows access to user I0 L0 B0 M0 stack location while in Supervisor I1 L1 B1 M1 mode I2 L2 B2 M2 I3 L3 B3 M3 a 5-4 4

  5. Addressing Methods Addressing Methods • Register Indirect Addressing − Index Registers (32-bit and 16-bit accesses) − Pointer Registers P0 – P5 (32-bit, 16-bit, and 8-bit accesses) − Stack and Frame Pointer Registers (32-bit accesses) • Types of address pointer modify − Modify/Post-Modify • Linear addressing • Circular buffering/modulo addressing − Enables automatic maintenance of pointers to stay within bounds of a circular buffer • Bit Reversal (Modify only) − Pre-Modify with update (using Stack Pointer) − Pre-Modify without update a 5-5 5

  6. Indirect Memory Access Indirect Memory Access • Indirect Addressing − Square brackets ‘[‘ and ‘]’ denote the use of Index, Pointer and Stack/Frame Pointer Registers as address pointers in data fetches • Loads are of the general form: dreg = [preg] ; // Where the preg points to some location in memory dreg = [ireg] ; // Where the ireg points to some location in memory • Stores are of the general form: [preg]=dreg ; // Where the preg points to some location in memory [ireg] =dreg ; // Where the ireg points to some location in memory a 5-6 6

  7. Indirect Addressing Indirect Addressing • Pointer Registers (P0-P5) support additional 16-bit (W) and 8-bit (B) options of the form: − Dreg_lo_hi = W[preg]; //loads 16-bit value pointed to by preg and loads into hi or lo half of dreg − Dreg = B[preg] (z); //loads 8-bit value pointed to by preg and loads into dreg Analogous store instructions also exist • Index Registers (I0-I3) support an additional 16-bit (W) option of the form: − W[ireg]= Dreg_lo_hi; //stores 16-bit value in dreg to location pointed to by ireg Analogous load instructions also exist • When an 8 or 16-bit value is transferred to a 32-bit register, an extension option must be used to specify sign (X) or zero (Z) extension For example: − R0=W[P0] (Z); // Loads 16 bit value into 32-bit register and zero //extends result a 5-7 7

  8. Post- -Modify Operations Modify Operations Post 2. update 1. output Address Pointer + Modifier • Post-Modify Instructions AP + M − 32-bit accesses R0 = [P0++]; /* Increments the value of P0 by 4 after the read */ R0 = [P1 ++ P2]; /* Increments P1 by P2 after reading 32-bit word from P1 only */ − 16-bit accesses R0.l = W[I0--]; /* Decrements the value of I0 by 2 after the read */ R0.h = W[I2++M2]; /* Increments the value of I2 by M2 after reading 16-bit word from I2 only */ − 8-bit accesses R0 = B[P0++](z); /* Increments the value of P0 by 1 after the read */ R2 = B[P4 ++P5](x); /* Increments P4 by P5 after reading 8-bit word from P4 only */ • Analogous store instructions exist a 5-8 8

  9. Pre- -Modify Operations Modify Operations Pre 1. update 2. output Address Pointer + Modifier AP + M • The only pre-modify instruction with update supported uses the Stack Pointer − [ -- SP ] = R0; /* Decrements current value in SP by 4, and then writes the value in R0 to the updated value in SP */ a 5-9 9

  10. Indexed Addressing with Immediate Offset Indexed Addressing with Immediate Offset • Pointer Registers may be modified by an immediate value. • These operations provide a pre-modify without update operation P0 = [P1 + 0x10]; /* loads P0 with value that P1 + 0x10 points to */ [P0 + 0x20] = R0; /* stores r0 in to the location that P0 + 0x20 points to */ Address Pointer + Modifier Output only AP + M (No Update) a 5-10 10

  11. Modifying DAG and Pointer Registers Modifying DAG and Pointer Registers • Direct modification of Index and Pointer Registers − Pointer registers use a P-register as modifier P0 += P1; /* P0 is modified by P1. */ − Index registers use an M-register as modifier I0 += M1; /* I0 is modified by M1. */ • Modify-Decrement supported as well as Modify-Increment Update only (No fetch) Example Address Pointer − P0 -= P4; +/- Modifier AP + M a 5-11 11

  12. Stack Instructions Stack Instructions • Push Instruction: [--SP] = src_reg; − The push instruction stores the contents of a specified register or registers in the stack − The instruction pre-decrements the stack pointer to the next available location in the stack first − Push multiple instruction allows multiple registers to be placed on the stack with single instruction a 5-12 12

  13. Stack Instructions (Continued) • Pop Instruction: dest_reg= [SP++]; − The pop instruction loads the contents of the stack indexed by the current stack pointer into a specified register − The instruction post-increments the stack pointer to the next occupied location in the stack before concluding − Pop multiple instruction allows multiple registers to be popped from the stack with single instruction a 5-13 13

  14. Stack Instructions (Continued) Stack Instructions (Continued) a 5-14 14

  15. Circular Buffering Circular Buffering • Only used with Index Registers − Index (I) registers holds the address sent out on the address bus. − Base (B) registers contain the starting address of the circular buffer. − Length (L) registers specify the length of the buffer. − Modify (M) registers contain the value (positive or negative) that will be added to the I registers at the end of each memory access. • The size of the modify value must be less than or equal to the length of the circular buffer. • On a Post-Modify access, the address pointed to by the Index register automatically wraps to the circular buffer defined by the corresponding Base address and Length registers. • Note: L registers must be initialized to 0 when not using circular buffering a 5-15 15

  16. Circular Buffer Example Circular Buffer Example Address 1 st Access 0x00000001 0x00000001 0 4th Access 0x00000002 0x00000002 4 0x00000003 0x00000003 8 0x00000004 0x00000004 C 0x00000005 0x00000005 2nd Access 10 5th Access 0x00000006 0x00000006 14 0x00000007 0x00000007 18 0x00000008 0x00000008 1C 3rd Access 0x00000009 0x00000009 20 0x0000000A 0x0000000A 24 0x0000000B 0x0000000B 28 • Base address and Starting Index Address = 0 • Buffer length L = 44 • There are 11 data elements and each data element is 4 bytes • Modify value M = 16 (4 elements * 4 bytes/element) a 5-16 16

  17. Circular Buffers (Modulo Addressing) Circular Buffers (Modulo Addressing) a 5-17 17

  18. Bit Reverse Addressing Bit Reverse Addressing • Bit Reverse Carry Adder (BREV) : − When this option is specified, the carry bit propagates from left to right. − Used to support operand addressing for FFT, DCT, and DFT algorithms • Only supported with Modify-Increment instruction − Preg += Preg (BREV); − Ireg += Mreg (BREV); • With the Index Register version of this instruction, circular buffering is disabled I0 += M0 (brev); Pointer register example P3 += P0 (brev); a 5-18 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend