01.08.2013 Views

Chapter 10 Memory Subsystem.pdf

Chapter 10 Memory Subsystem.pdf

Chapter 10 Memory Subsystem.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Public Version<br />

SDRAM Controller (SDRC) <strong>Subsystem</strong> www.ti.com<br />

– The camera uses 8 * 64-bit burst size.<br />

– The display uses 8 * 32-bit burst size.<br />

– Double-indexing mode is selected.<br />

• The physical address of the buffer in external memory is 0x8030 0000.<br />

• The memory allocation for the buffer is 320 * 240- * 16-bit (or 160 * 240 * 32-bit).<br />

• The camera subsystem uses its dedicated DMA channel 0.<br />

• The display subsystem uses its video channel 1.<br />

Configuring the VRFB Through the SMS Registers<br />

The size of the page supported by the DDR32 memory is 1K byte, which is arranged as 32 * 32 bytes<br />

page (width * height).<br />

Configuring the page size:<br />

• SMS_ROT_CONTROLn[6:4] PW = 5 (where n = 1)<br />

• SMS_ROT_CONTROLn[<strong>10</strong>:8] PH = 5<br />

Configuring the image parameters:<br />

• SMS_ROT_SIZEn[<strong>10</strong>:0] IMAGEWIDTH = 160 (where n = 1)<br />

• SMS_ROT_SIZEn[26:16] IMAGEHEIGHT = 256<br />

• SMS_ROT_CONTROLn[1:0] PS = 2<br />

Physical base address and rotation angle:<br />

• SMS_ROT_PHYSICAL_BAn[30:0] PHYSICALBA = 0x8030 0000 (where n = 1).<br />

The image data is accessed at the following virtual address range for 90-degree rotation: 0x7500 0000 -<br />

0x75FF FFFF.<br />

CAUTION<br />

Image rotation using the YUV2 image format causes the stream to become<br />

untidy. The display must be specifically configured to read and reorganize the<br />

stream to conform to the YUV2 standard.<br />

Tips for Configuring Successful Rotation<br />

The following guidelines ensure optimal image rotation:<br />

• Page arrangement:<br />

Usually, the recommendation is to have a square page. If this is not possible, the longest page side<br />

should correspond to the access direction that requires the maximum bandwidth; set the longest page<br />

side to optimize the page break.<br />

Using a <strong>10</strong>24-byte page size, a 32 * 32-byte page arrangement is used as an example. With a 2K-byte<br />

page organized as a 32 * 64 byte page, depending on the read or write operation, set the longest page<br />

size to optimize the page break. If 0 is written and the 270-degree view is read, page height is greater<br />

than page width (PH > PW). Set PH to 64 bytes (PH = 6).<br />

• Virtual address memory arrangement:<br />

When accessing image data through virtual addresses, the maximum line size supported by the VRFB<br />

is 2,048 pixels.<br />

In the memory buffer, the distance between two vertically adjacent pixels is fixed at 2,048 multiplied by<br />

the pixel format in bytes. This means that when reading or writing image data through virtual<br />

addresses, there must be an offset of: (2048 - IMAGEWIDTH) * PS bytes at the end of every line.<br />

• Base address alignment:<br />

For optimization, the base address is aligned on the page size. For instance, a 1K-byte page size<br />

organized as a 32 * 32-byte page is aligned on 0x400 (to be adjusted on the base address).<br />

• To improve performance on 90° rotation consider two things:<br />

– Because a read access can appear more critical than a write access, a posted write may be<br />

2266 <strong>Memory</strong> <strong>Subsystem</strong> SPRUGN4L–May 20<strong>10</strong>–Revised June 2011<br />

Copyright © 20<strong>10</strong>–2011, Texas Instruments Incorporated

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!