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 />

NOTE: PASR Setting Before Entering Self-Refresh Mode:<br />

Partial array self-refresh (PASR) allows memory accesses to all banks when the attached<br />

memory is not in self-refresh. Software must ensure that after a self-refresh mode with PASR<br />

field enabled on banks, only accesses to the refreshed parts of the memory are performed.<br />

Failure to do so may result in fetching corrupted data.<br />

<strong>10</strong>.2.5 SDRC <strong>Subsystem</strong> Basic Programming Model<br />

This section contains programming guides on setting up the SMS and SDRC registers according to the<br />

required application.<br />

<strong>10</strong>.2.5.1 SMS Basic Programming Model<br />

<strong>10</strong>.2.5.1.1 SMS Firewall Usage<br />

Because region 0 always has level 0 priority, it can be masked by any protected region.<br />

To configure a region:<br />

1. Set the SMS.SMS_RG_ATTi register (where i is the region index from 0 to 7).<br />

2. Set the SMS.SMS_RG_RDPERMi register.<br />

3. Set the SMS.SMS_RG_WRPERMi register.<br />

4. Set the SMS.SMS_RG_STARTj register (except for region 0. j is the region index from 1 to 7).<br />

5. Set the SMS.SMS_RG_ENDj register (except for region 0. j is the region index from 1 to 7).<br />

Region 0 is always active. There are no start and an end address for region 0. As soon as the<br />

SMS.SMS_RG_STARTj[30:16] STARTADDRESS and SMS.SMS_RG_ENDj[30:16] ENDADDRESS<br />

registers (where j = 1 to 7) are programmed, the firewall is activated. To prevent unexpected violations,<br />

ensure that the protection regions do not overlap.<br />

Region 1 ensures the proper dynamic programming of protection for regions 2 through 7. For example, the<br />

protected region A is set and currently accessed, but it must be enlarged. To avoid deactivating region A<br />

and exposing its content to unwanted leakage, region 1 can be used to mask this whole area during<br />

reprogramming. When region A is correctly reprogrammed, region 1 can be deactivated.<br />

When all the required regions are programmed, the locking mechanism allows freezing the configuration,<br />

thus ensuring no further reprogramming.<br />

<strong>10</strong>.2.5.1.2 VRFB Context Configuration<br />

Using the RE requires several initialization programming steps. After an RE context is set up, an<br />

application can use it transparently, as if addressing a frame buffer object with a standard raster-based<br />

memory arrangement.<br />

1. Define the page configuration. This operation usually depends only on the external memory device.<br />

The same page settings are then applied to any newly created rotated frame buffer.<br />

Consider an SDRAM device with <strong>10</strong>24-byte pages. The page can be defined as a 16 * 64 array. The<br />

page is not necessarily a square (32 * 32 is also a suitable value). It is recommended that the longest<br />

side corresponds to the access direction requiring the maximum bandwidth.<br />

In terms of register settings, in any context that uses that page size:<br />

Page (page) width = 2 pw bytes (that is, pw = 6)<br />

Page (page) height = 2 ph rows (that is, ph = 4)<br />

2. The application must allocate the appropriate amount of memory in the SDRAM address space, as<br />

required by the size of the frame buffer object.<br />

Example: Create a 400 x 300 frame buffer, 16 bits per pixel<br />

• Pixel size = 2 ps bytes (that is ps = 1)<br />

• Number of pages per line: 400 * 2/64 = 12.5, rounded up to 13<br />

• Number of pages per column: 300/16 = 18.75, rounded up to 19<br />

In terms of register settings, the image size parameters correspond to the enlarged image, and are<br />

2246 <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!