Graphics Accelerator
EP93xx User's Guide
7. Setup BLOCKCTRL Register
For (example) 16-bit pixels and Mask AND Mode:
8
A. Clear the
B. Write Fill = '1', BG = '0', M = 0x1, P = 0x4, and INTEN = '1' to the
C. Write EN = '1' to the
8. Wait for an Interrupt or Poll for EN = '0' in the BLOCKCTRL Register.
When the EN bit becomes cleared to '0', the Block Fill Algorithm function is complete.
8.6.4 Block Copy Function
The following sequence describes how to set up the registers used for a Block Copy function:
1. Setup Source Memory
A. Write the desired values to the SPEL field and the EPEL field in the
SPEL is the starting pixel position within the word that the pixel-copy will begin with.
EPEL is the ending pixel position within the word that the pixel-copy will end with. See
Section
For example, if the image to be copied is at position (51, 75) and the pixel depth is 16-
bits, the value for SPEL is (51 x 16)% 32 = 16 = 0x10 and the value for EPEL is (75 x
16)% 32 = 16 = 0x10
B. Write the word-aligned value of the SDRAM address 'for the beginning of the image
C. Write the line length value to the LEN field in the
D. Write the value of the WIDTH field to the
8-18
"BLOCKCTRL"
register
"BLOCKCTRL"
"SRCPIXELSTRT"
register.
8.5.2.
that is to be copied' to the
where LEN is determined by:
(1).Find how many pixels occupy a 32-bit word. For example, four 8-bit pixels can
occupy a 32-bit word.
(2).Find the width of the display in pixels. For example, a 640x480 display has a
width of 640 pixels.
(3).The line length, LEN, is determined by the stride of the display, that is, how
many 32-bit words are needed to populate the width of the display with pixels.
From steps 1 and 2, the stride for this example is 640 pixels divided by 4,
where 4 is the number of 8-bit pixels that occupy a word. So, for this example,
line length is 640 divided by 4 = 160 = 0xA0.
Usually the same LEN value is used in both the
and the
"DESTLINELENGTH"
is the number of 32-bit words, minus 1, that are needed to contain the pixels that
Copyright 2007 Cirrus Logic
register by writing 0x0000_0000 to it
register
"BLKDESTSTRT"
register.
register.
"BLKSRCWIDTH"
"BLOCKCTRL"
"SRCLINELENGTH"
register,
"SRCLINELENGTH"
register, where WIDTH
register
DS785UM1
Need help?
Do you have a question about the EP93 Series and is the answer not in the manual?