1 example of block copy, 1 example of block copy -21, E shown in – Cirrus Logic EP93xx User Manual
Page 285: Section 8.6.4.1

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.