Section 14 Section 14 Parallel Peripheral Interface (PPI) a - - PowerPoint PPT Presentation

section 14 section 14
SMART_READER_LITE
LIVE PREVIEW

Section 14 Section 14 Parallel Peripheral Interface (PPI) a - - PowerPoint PPT Presentation

Section 14 Section 14 Parallel Peripheral Interface (PPI) a 14-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


slide-1
SLIDE 1

1

14-1

a

Section 14 Section 14

Parallel Peripheral Interface (PPI)

slide-2
SLIDE 2

2

14-2

a

Watchdog And Timers DMA Controller UART0 IRDA Real Time Clock Programmable flags SPORTs SPI EBIU 1KB internal Boot ROM

CORE/SYSTEM BUS INTERFACE

32 Core D1 bus 64 Core I bus Core Timer JTAG/ Debug Performance Monitor Core Processor L1 Instruction Memory L1 Data Memory LD1 32 64 PPI

Peripheral Access Bus (PAB) DMA Access Bus (DAB) External Access Bus (EAB)

Power Management Event Controller 32 DMA Mastered bus

ADSP-BF533 Block Diagram

Core DA0 bus 32 32 Core D0 bus Core DA1 bus 32

Core Clock (CCLK) Domain System Clock (SCLK) Domain

LD0 32 16 16 16 16

External Port Bus (EPB) DMA Ext Bus (DEB)

16

DMA Core Bus (DCB)

16 SD32

Data Address Control

slide-3
SLIDE 3

3

14-3

a

PPI PPI -

  • What is it?

What is it?

  • Parallel Peripheral Interface

− Programmable bus width (from 8 – 16 bits in 1-bit steps) − Bidirectional (half-duplex) parallel interface − Synchronous Interface

  • Interface is driven by an external clock (“PPI_CLK”)
  • Up to 66MHz rate (SCLK/2)
  • Asynchronous to SCLK

− Includes three frame syncs to control the interface timing − Applications

  • High speed data converters
  • Video CODECs
  • Used in conjunction with a DMA channel

− Can setup 2D DMA (e.g., for video) − Can pack 8-bit bytes into 16-bit words for efficient I/O

slide-4
SLIDE 4

4

14-4

a

PPI in general purpose mode PPI in general purpose mode (For video and other high speed devices) (For video and other high speed devices)

TX_EN RX_EN DATAx RX/TX CLK

AD9975

HREF VREF FIELD LLC2

ADV7183

P[15:0]

Mixed Signal Front End NTSC/PAL Standard Video Decoder

DAB PPI CLK FS1/HSYNC/TIMER1 FS2/VSYNC/TIMER2 FS3/FIELD/PF3 PPI3-0 PAB PPI4-7/PF15-PF12 PPI8-15/PF11-PF4

slide-5
SLIDE 5

5

14-5

a

General Purpose Input/Output Modes General Purpose Input/Output Modes

  • Single Sync (FS1 only)

− Useful for Data Converter applications − “Infinite Capture” input sub-mode requires either

  • initial H/W sync to be sent, or
  • “Self Trigger” through S/W write (no need for H/W FS)
  • 3 Syncs (FS1, FS2, FS3)

− useful for video I/O with H/W signaling − “Frame Capture” mode outputs syncs from processor while data is input into processor − 2 Syncs can be used by ignoring 3rd sync where appropriate (pull FS3 to ground)

  • Modes are set in PPI_CONTROL register
slide-6
SLIDE 6

6

14-6

a

PPI General Purpose Input Mode

DAB PAB DMA Controller

FIFO

16-bit wide 16 deep

PPI_CONTROL PPI_STATUS PPI_COUNT PPI_DELAY PPI_FRAME

FS1 FS2 FS3 Data Bus

10 80 10 80…….EF 38 EE SYNC PACK GATE

  • PACK: 8->16-Bit Packing Unit
  • GATE: Data Control Unit
  • SYNC: Data Sync Unit

DMA Request

PPI_CLK

slide-7
SLIDE 7

7

14-7

a

Single Sync Input Mode Single Sync Input Mode

  • PPI_CLK, PPI_FS1, PPI_DATA are inputs
  • Programmable delay register (PPI_DELAY) inserts a time delay (in units of

PPI_CLK cycles) to start transfer after FS1 has been asserted

  • Count register (PPI_COUNT) holds the number of samples the PPI will receive
  • PPI_COUNT ignored during Infinite Capture

PPI_CLK PPI_FS1 PPI_DATA PPI_DELAY 1 2 3 N-1 N PPI_COUNT

slide-8
SLIDE 8

8

14-8

a

Three Sync Input Mode Three Sync Input Mode

  • PPI_CLK, PPI_FS1/2/3, PPI_DATA are inputs
  • Coincident assertion of FS1 and FS2 with FS3 low indicates the start of a frame

− FS3 used to indicate odd/even fields. In a 2-FSx configuration, this line is pulled low.

  • PPI_FRAME register is set to the number of lines per frame (lines are delineated

by FS1 assertions)

PPI_CLK PPI_FS1 PPI_DATA PPI_DELAY 1 2 3 N-1 N PPI_COUNT PPI_FS2 PPI_FS3

slide-9
SLIDE 9

9

14-9

a

TIMER1 TIMER2

PPI General Purpose Input Mode Frame Capture

DAB PAB DMA Controller

FIFO

16-bit wide 16 deep

PPI_CONTROL PPI_STATUS PPI_COUNT PPI_DELAY PPI_FRAME

PPI_CLK Data Bus

UPACK GATE 37 ED 38 EF…80 10 C7 00 00 FF

  • UPACK: 16->8-Bit Unpacking Unit
  • GATE: Data Control Unit
  • TIMER1/2: Make use of Timers

DMA Halt

FS1 FS2

PPI_CLK

slide-10
SLIDE 10

10

14-10

a

Frame Capture Input Mode Frame Capture Input Mode

  • PPI_CLK, PPI_DATA are inputs
  • PPI_FS1, PPI_FS2 are outputs

− TIMER1_WIDTH/TIMER1_PERIOD used to set up PPI_FS1 timing − TIMER 2 set up to generate PPI_FS2 timing

  • PPI_FRAME register is set to the number of lines per frame (lines are delineated

by FS1 assertions)

PPI_CLK PPI_FS1 PPI_DATA PPI_DELAY 1 2 3 N-1 N PPI_COUNT PPI_FS2

slide-11
SLIDE 11

11

14-11

a

TIMER1 TIMER2

PPI General Purpose Output Mode

DAB PAB DMA Controller

FIFO

16-bit wide 16 deep

PPI_CONTROL PPI_STATUS PPI_COUNT PPI_DELAY PPI_FRAME

PPI_CLK Data Bus

UPACK GATE 37 ED 38 EF…80 10 C7 00 00 FF

  • UPACK: 16->8-Bit Unpacking Unit
  • GATE: Data Control Unit
  • TIMER1/2: Make use of Timers

DMA Halt

FS1 FS2 FS3/PF3

PPI_CLK

slide-12
SLIDE 12

12

14-12

a

Single Sync Output Mode Single Sync Output Mode

  • PPI_CLK is input
  • PPI_FS1 and PPI_DATA are outputs

− Timer 1 used to set up timing for FS1

  • There is a 1-cycle delay between FS1 assertion and start of PPI_DELAY
  • Count register (PPI_COUNT) holds the number of samples the PPI will output,

less one (i.e., set for N-1)

PPI_CLK PPI_FS1 PPI_DATA PPI_DELAY 1 2 3 N-1 N PPI_COUNT

slide-13
SLIDE 13

13

14-13

a

Three Sync Output Mode Three Sync Output Mode

  • PPI_CLK is input
  • PPI_FS1, PPI_FS2, PPI_FS3 and PPI_DATA are outputs

− Timer 1 used to set up timing for FS1 − Timer 2 used to set up timing for FS2 − FS3 toggles coincident with an FS1 assertion, after an FS2 assertion

PPI_CLK PPI_FS1 PPI_DATA PPI_DELAY 1 2 3 N-1 N PPI_COUNT PPI_FS2 PPI_FS3

slide-14
SLIDE 14

14

14-14

a

  • Screen Sizes

− QCIF = 176 x 144 pixels − CIF = 352 x 288 pixels − ¼ VGA = 320 x 240 pixels − VGA = 640 x 480 pixels − D1 (NTSC/PAL full screen) = 720 x 480 pixels [720 x 576 includes the unviewable portions above and below the picture]

  • Scan Types

− Interlaced – dual-refresh technique on alternating lines at 1/60 second rate each (e.g. 1080i = 1080 horizontal lines interlaced) − Progressive (Non-Interlaced) – single refresh technique on all lines at a 1/30 second rate (e.g. 480p = 480 horizontal lines progressive scan)

Electron gun path

Progressive (1/30 sec)

Electron gun path

Interlaced (2 x 1/60 sec=1/30 sec)

1 1 2

retrace

Video Basics Video Basics

slide-15
SLIDE 15

15

14-15

a

Blanking

Line 1 Line 2 Line 3 Line 261 Line 262 Line 263

Video

Line 1 Line 2 Line 3 Line 261 Line 263 t Video 8-16 bit BUS Blank (H)SYNC (V)SYNC (F)IELD CVBS

Video Framing Video Framing

Video Video Video Blank Blank Blank Line 262 Video Blank

slide-16
SLIDE 16

16

14-16

a

What constitutes a What constitutes a ‘ ‘pixel? pixel?’ ’

  • Black-and-white image

− Y (luminance) values only; One 8- or 10-bit Y value per pixel

  • Color image

− RGB: Three 8- or 10-bit values per pixel − YUV: Scaled and decorrelated version of RGB − Y Cr Cb

  • One Y (luminance) value per pixel (720 per line)
  • One Cr or Cb (chrominance) value per pixel (360 of each per

line)

  • 4:2:2 4 Y’s for every 2 Cr’s and 2 Cb’s

− Cb Y Cr Y Cb Y Cr Y Cb Y Cr Y Cb Y Cr Y ……

slide-17
SLIDE 17

17

14-17

a

ITU ITU-

  • 601

601

  • ITU-601 - specifies methods for digitally coding signals
  • Video coding

− RGB is an intuitive format, but channels are highly correlated − YCrCb (a scaled and offset version of YUV color space) is highly uncorrelated

  • Provides better compression characteristics

− 8-bit or 10-bit quantization − NTSC and PAL each have 720 pixels per line

  • NTSC (30 frames/sec) has 525 lines (including blanking)
  • PAL (25 frames/sec) has 625 lines (including blanking)
  • PPI supports ITU-601 through use of 3-frame-sync modes
slide-18
SLIDE 18

18

14-18

a

ITU ITU-

  • 656

656

  • ITU-656

− Defines the physical interfaces and data stream − Bit-parallel and bit-serial modes

  • Only bit-parallel supported with PPI

− 27 MHz nominal clock + 8-10 data lines (for bit-parallel mode) − Embedded hardware signaling (H, V, F) – no extra hardware lines required − Supports interlaced and progressive formats − Some OEMs support “pseudo” ITU-656

slide-19
SLIDE 19

19

14-19

a

PPI ITU PPI ITU-

  • 656 Modes

656 Modes

  • ITU-656 Input (3 Modes)

− Entire Field (H and V Blanking, Active Video and control codes) − Vertical Blanking Interval only (with associated H blanking and control codes) − Active video only. Can drop blanking for bandwidth savings

  • ITU-656 Output

− User sets up blanking and encoding info in memory

slide-20
SLIDE 20

20

14-20

a

ITU ITU-

  • 656 Mode Preamble

656 Mode Preamble

F F X Y

EAV/SAV

P0 P1 P2 P3 H V F 1 Status Word D0 D1 D2 D3 D4 D5 D6 D7 D8 D9

8-bit DATA 10-bit DATA

8bit Data Bus

  • The preamble (XY) holds the sync indicators “VSYNC, HSYNC,

Field”.

  • It also includes protection bits “P0-P3”.
  • In output mode the user must construct all preamble control codes
  • In general, the 8-bit bus is for consumer markets while 10-bit bus is

for professional markets.

slide-21
SLIDE 21

21

14-21

a

DAB PAB

FIFO

16-bit wide 16 deep

DMA Controller

PPI_CONTROL PPI_STATUS PPI_COUNT PPI_DELAY PPI_FRAME

Data Bus

FF 00 00 C7 10 80 …EF 38 EE PCHK PACK GATE

F F X Y 8 1 8 1 8 1 F F X Y C B Y C R Y C B Y C B Y F F

EAV SAV EAV 4 268 4 1440 Blanking Active Video

  • PCHK: Preamble Check Unit
  • PACK: 8->16-Bit Packing Unit
  • GATE: Data Control Unit

8bit Data Bus DMA Request

PPI_CLK

PPI ITU-656 Input Mode

slide-22
SLIDE 22

22

14-22

a

PPI ITU-656 Output Mode

DAB PAB DMA Controller

FIFO

16-bit wide 16 deep

PPI_CONTROL PPI_STATUS PPI_COUNT PPI_DELAY PPI_FRAME

Data Bus

UPACK GATE 37 ED 38 EF…80 10 C7 00 00 FF

  • UPACK: 16->8-Bit Unpacking Unit
  • GATE: Data Control Unit

DMA Halt

PPI_CLK

slide-23
SLIDE 23

23

14-23

a

PORT_CFG[1:0] (Port Config.)

In input mode: 00 = 1 frame sync input 01 = frame capture, FS1, FS2 output 10 = 3 frame syncs 11 = infinite mode, 1 frame sync not repeated In output mode: 00 = 1 sync 01 = 3 syncs

PORT_DIR (Direction)

0 = PPI receive mode 1 = PPI transmit mode

XFR_TYPE[1:0] (Transfer Type)

In input mode: 00 = Active field only 01 = Entire field 10 = Vertical Blanking only 11 = GP Input mode In output mode: 00, 01, 10 = ITU-656 Output Mode 11 = GP Output Mode

DLEN[2:0] (Data Length)

000 = 8-bit 001 = 10-bit . . 110 = 15-bit 111 = 16-bit

POL[1:0] (Polarity)

00 = Nothing inverted 01 = PPI_CLK inv., PPI_FS1 and PPI_FS2 not inv. 10 = PPI_FS1 and PPI_FS2 inv., PPI_CLK not inverted 11 = PPI_FS1, PPI_FS2, and PPI_CLK inv.

PORT_EN (Enable)

0 = PPI disable 1 = PPI enable

FLD_SEL (Active Field Select)

In ITU-656 input mode: 0 = Field 1 1 = Fields 1 and 2 In GP input mode: 0 = External frame sync trigger 1 = PPI self-trigger

PACK_EN (Packing Mode)

0 = Disable 1 = Enable

SKIP_EO (Skip Even Odd)

0 = Skip odd number of elem. 1 = Skip even number of elem.

Reserved SKIP_EN (Skip Enable)

0 = Disable 1 = Enable 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Addr: 0XFFC0 1000

PPI Control Register (PPI_Control) PPI Control Register (PPI_Control)

slide-24
SLIDE 24

24

14-24

a

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

PPI Status Register (PPI_STATUS)

FLD (Field Indicator)

0 = Field 1 1 = Field 2

UNDR (PPI FIFO Underrun)

0 = No interrupt 1 = FIFO Underrun error interrupt occurred

ERR_NCOR (Error not corrected)

ITU-656 Mode: 0 = Preamble error detected and corrected 1 = Preamble error detected but not corrected

ERR_DET (Error Detected)

ITU-656 Mode: 0 = No preamble error detected 1 = Preamble error detected

OVR (PPI FIFO Overflow)

0 = No interrupt 1 = FIFO Overflow Error interrupt occurred

FT_ERR (Frame Track Error)

0 = No interrupt 1 = Frame Track error interrupt occurred Addr: 0XFFC0 1004

Reserved Read to clear

slide-25
SLIDE 25

25

14-25

a

Transfer Count Register (PPI_COUNT)

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

PPI_COUNT[15:0]

In GP input mode: One less than the number of samples to read in to the PPI per line In GP output mode: One less than the number of samples to write out through the PPI per line Addr: 0XFFC0 1008 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

PPI_DELAY[15:0]

Number of PPI clock cycles to delay after assertation of PPI_FS1 before latching in data Addr: 0XFFC0 100C

Delay Count Register (PPI_DELAY)

slide-26
SLIDE 26

26

14-26

a

Lines Per Frame Register (PPI_FRAME)

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

PPI_FRAME[15:0]

Holds the number of lines expected per frame of data Addr: 0XFFC0 1000