Cirrus Logic EP93xx User Manual
Page 278
8-14
DS785UM1
Copyright 2007 Cirrus Logic
Graphics Accelerator
EP93xx User’s Guide
8
8
8
3. Setup DESTLINELENGTH Register
A. Determine how many pixels occupy a 32-bit word. For example, four 8-bit pixels can
occupy a 32-bit word.
B. Determine the width of the display in pixels. For example, a 640x480 display has a
width of 640 pixels.
C. The line length 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 A and
B, 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, destination line length is 640
divided by 4 = 160 = 0xA0.
D. Write 0x0000_00A0 to the
register.
4. Setup DESTPIXELSTRT Register
Write desired values to the EPEL and SPEL fields in the
register.
See
“Pixel End and Start” on page 8-9
for details.
5. Setup BLKDESTSTRT Register
Write the SDRAM address for the starting pixel of the 1st line to the ADR field in the
register.
6. Setup BACKGROUND Register
If BG = ‘1’ in the
register, write the desired background color value to
the BG field in the
register; if BG = ‘0’ in the
register,
the color value written to the
register is ignored. The ‘off’ pattern bits,
if any, will be displayed using the background color.
7. Setup BLOCKMASK Register
Write the desired foreground color value to the MASK field in the
register.
8. Setup LINEINC Register
Write the values determined below to the YINC and XINC fields in the
register:
if abs(x2 - x1) == abs(y2 -y1)
Write YINC = 0xFFF (4095)
Write XINC = 0xFFF (4095)
if abs(x2 -x1) < abs(y2 - y1)
Write YINC = 0xFFF (4095)
Write XINC = (abs(x2 - x1) / abs(y2 -y1)) * 4095). Round up to the nearest
whole integer value.
if abs(x2 -x1) > abs(y2 - y1)
Write YINC = (abs(y2 - y1) / abs(x2 - x1)) * 4095). Round to the nearest whole
integer value.
Write XINC = 0xFFF (4095)