beautypg.com

Cirrus Logic EP93xx User Manual

Page 281

background image

DS785UM1

8-17

Copyright 2007 Cirrus Logic

Graphics Accelerator

EP93xx User’s Guide

8

8

8

SPEL is the starting pixel position within the word that the pixel-fill will begin with. EPEL

is the ending pixel position within the word that the pixel-fill will end with. See

Section

8.5.2

. Pixel End And Start. Use the DESTPIXELSTRT calculation in the block copy

example shown in

Section 8.6.4.1

.

3. Setup DESTLINELENGTH Register

Write the line length value to the LEN field in the

“DESTLINELENGTH”

register, where

LEN is determined by:

A. Find how many pixels occupy a 32-bit word. For example, four 8-bit pixels can

occupy a 32-bit word.

B. Find the width of the display in pixels. For example, a 640x480 display has a width

of 640 pixels.

C. 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

“DESTLINELENGTH”

register and the

“SRCLINELENGTH”

register.

4. Setup BLKDESTWIDTH Register

Write the value of ‘Stride minus 1’ to the WIDTH field in the

“BLKDESTWIDTH”

register,

where WIDTH is determined by:

A. Find how many pixels occupy a 32-bit word. For example, four 8-bit pixels can

occupy a 32-bit word.

B. Find the width of the image in pixels. For example, a 20 x 10 image has a width of 20

pixels.

C. The stride of the image is how many 32-bit words are needed to populate the width

of the image with pixels. From steps 1 and 2, the stride for this example is 20 pixels
divided by 4, where 4 is the number of 8-bit pixels that occupy a word. So, the stride
is 20 divided by 4 = 5. However, the value of WIDTH is defined as the value of stride
less 1. So, WIDTH = 5 - 1 = 4 = 0x004.

5. Setup BLKDESTHEIGHT Register

Write the desired value to the HEIGHT field in the

“BLKDESTHEIGHT”

register, where

HEIGHT = the height in lines of the fill area minus 1.

For example, a 20-pixels x 10-lines image has a height of 10 lines. So, HEIGHT = 10 - 1

= 9 = 0x9.

6. Setup BLKDESTSTRT Register

Write the word-aligned value of the SDRAM address ‘for the beginning of the block fill’

to the

“BLKDESTSTRT”

register.