DS785UM1
8-21
Copyright 2007 Cirrus Logic
Graphics Accelerator
EP93xx User’s Guide
8
8
8
8.6.4.1 Example of Block Copy
To achieve the following display and pattern, follow Steps A to I in this section.
•
Screen Size is 640x480x16-bits/pixel
•
Screen memory starts at physical address 0x0000_0000
•
Image to be copied is at physical address 0x0000_0960
•
Image to be copied is at position (51, 75)
•
Image destination is at position (300, 115)
•
Source and destination width is 30 pixels
A. SRCPIXELSTRT = (51 * 16)% 32 = 16
B. BLKSRCSTRT = 0x960
C. SRCLINELENGTH = 640 / 2 pixels per word = 320 = 0x140
D. DESTPIXELSTRT:
SPEL = [(640 * 115) + 300] * 16% 32 = 0 = 0x0
EPEL = {[640 * (115 + 20)] + 300 +20} * 16% 32 = 0 = 0x0
E. BLKDESTSTRT =[(640 * 115) + 300] * 2 = 147800 = 0x24158
F. BLKDESTWIDTH = (30 / 2) - 1 = 14 = 0xE
G. BLKDESTHEIGHT = 20
H. BLOCKCTRL:
Write 0x0000_0000 to the BLOCKCTRL register to clear it.
Write PACKD = ‘0’ to specify that the size of the source and destination images are the
same.
Write P = 0x4 to specify 16-bits/pixel.
Write SXDIR = ‘0’, SYDIR = ‘0’, DXDIR = ‘0’, DYDIR = ‘0’ to specify that pixels are
placed into the destination image left to right and top to bottom.
Write FILL = ‘1’ to enable the block copy or Block Copy function.
Write INTEN = ‘1’ to enable the Graphics Accelerator interrupt.
Write EN = ‘1’ to initiate graphics processing
I. The final step is to wait for an interrupt or poll for EN = ‘0’. When the EN bit becomes
cleared to ‘0’, the Block Copy function is complete.
Summary of Contents for EP93 Series
Page 28: ...P 6 DS785UM1 Copyright 2007 Cirrus Logic Preface EP93xx User s Guide PP P ...
Page 162: ...5 36 DS785UM1 Copyright 2007 Cirrus Logic System Controller EP93xx User s Guide 55 5 ...
Page 576: ...15 18 DS785UM1 Copyright 2007 Cirrus Logic UART2 EP93xx User s Guide 1515 15 ...
Page 634: ...17 38 DS785UM1 Copyright 2007 Cirrus Logic IrDA EP93xx User s Guide 1717 17 ...
Page 648: ...19 6 DS785UM1 Copyright 2007 Cirrus Logic Watchdog Timer EP93xx User s Guide 1919 19 ...
Page 688: ...21 32 DS785UM1 Copyright 2007 Cirrus Logic I2S Controller EP93xx User s Guide 2121 21 ...
Page 790: ...27 20 DS785UM1 Copyright 2007 Cirrus Logic IDE Interface EP93xx User s Guide 2727 27 ...
Page 808: ...28 18 DS785UM1 Copyright 2007 Cirrus Logic GPIO Interface EP93xx User s Guide 2828 28 ...