Texas Instruments TMS320C642x DSP manual Endianness Support, Bit External Memory

Page 21

www.ti.com

Peripheral Architecture

2.6Endianness Support

The DDR2 memory controller supports both big-endian and little-endian operating modes. The endianness mode selection at the time of an access determines the order in which data on the internal data bus is written to or read from devices that are not as wide as the internal data bus. However, the DDR2 memory controller maintains the natural order of endian operations. That is, a stream of data starting at any address N within any endian environment will always be accessed in the correct or incrementing data order. The DDR2 memory controller will always access address N prior to N + 1 in all endian modes and in any data width. Table 6 and Table 7 show operation of the DDR2 memory controller for both 16-bit and 32-bit external memory in both big-endian and little-endian modes. See the device-specific data manual for the memory widths that are supported.

Since the endianness mode must be determined prior to bootloading, the endian mode selection is latched in the Boot Configuration (BOOTCFG) register when the device is reset. This endianness mode selection is also reflected in the BE bit in the SDRAM status register (SDRSTAT).

Table 6. 16-Bit External Memory

 

Big-Endian Mode

Little-Endian Mode

Internal Data (64-Bit)

DDR_A[2:1]

DDR_D[15:0]

DDR_A[2:1]

DDR_D[15:0]

0123 4567 89AB CDEFh

00

0123h

00

CDEFh

0123 4567 89AB CDEFh

01

4567h

01

89ABh

0123 4567 89AB CDEFh

10

89ABh

10

4567h

0123 4567 89AB CDEFh

11

CDEFh

11

0123h

Table 7. 32-Bit External Memory

 

Big-Endian Mode

Little-Endian Mode

Internal Data (64-Bit)

DDR_A[2]

DDR_D[31:0]

DDR_A[2]

DDR_D[31:0]

0123 4567 89AB CDEFh

0

89AB CDEFh

0

89AB CDEFh

0123 4567 89AB CDEFh

1

0123 4567h

1

0123 4567h

SPRUEM4A–November 2007

DDR2 Memory Controller

21

Submit Documentation Feedback

 

 

Image 21
Contents Users Guide Submit Documentation Feedback Contents List of Figures List of Tables Read This First Purpose of the Peripheral FeaturesFunctional Block Diagram Supported Use Case StatementIndustry Standards Compliance Statement Clock Source Clock ControlPLLC2 Configuration Clock ConfigurationMemory Map 3 DDR2 Memory Controller Internal Clock DomainsDDR2 Memory Controller Signal Descriptions Signal DescriptionsClock enable Active high Pin Type DescriptionTruth Table for DDR2 Sdram Commands DDR2 Sdram CommandsCommand Function Protocol DescriptionsRefresh Command Refresh ModeDeactivation Dcab and Deac Dcab CommandDeac Command Activation Actv Actv CommandDDR2 Read Command Read CommandDDR2 WRT Command Write WRT CommandDDR2 MRS and Emrs Command Mode Register Set MRS and EmrsAddressable Memory Ranges Memory Width and Byte AlignmentBit External Memory Endianness SupportBank Configuration Register Fields for Address Mapping Address MappingBit Field Bit Value Bit Description Logical Address-to-DDR2 Sdram Address Map for 16-bit Sdram Logical Address-to-DDR2 Sdram Address Map for 32-Bit SdramLogical Address-to-DDR2 Sdram Address Map DDR2 Sdram Column, Row, and Bank Access DDR2 Memory Controller Fifo Description DDR2 Memory Controller InterfaceCommand Ordering and Scheduling, Advanced Concept Possible Race Condition Command StarvationRefresh Scheduling Self-Refresh ModeRefresh Urgency Levels Urgency Level DescriptionReset Considerations Reset SourcesReset Signal Reset Source Auto-Initialization Sequence VTP IO Buffer CalibrationDDR2 Sdram Configuration by EMRS1 Command DDR2 Sdram Configuration by MRS CommandInitializing Configuration Registers DDR2 Memory ControllerPeripheral Architecture Power Management Interrupt SupportDMA Event Support Emulation Considerations Supported Use Cases Connecting the DDR2 Memory Controller to DDR2 MemoryConnecting DDR2 Memory Controller for 32-Bit Connection Sdram Bank Configuration Register Sdbcr Configuration Configuring Sdram Bank Configuration Register SdbcrConfiguring Sdram Refresh Control Register Sdrcr DDR2 Memory Refresh SpecificationSdram Timing Register Sdtimr Configuration Configuring Sdram Timing Registers Sdtimr and SDTIMR2Sdram Timing Register 2 SDTIMR2 Configuration DDR2 Data Register Field Manual Data Manual FormulaConfiguring DDR PHY Control Register Ddrphycr DDR PHY Control Register Ddrphycr ConfigurationRegister Field Name Description D31-0 Mode D63-32Acronym Register Description DDR VTP RegisterSdram Status Register Sdrstat Sdram Status Register Sdrstat Field DescriptionsBit Field Sdram Bank Configuration Register Sdbcr Sdram Bank Configuration Register Sdbcr Field DescriptionsBit Field Value Description Reserved Reserved. Always write a 0 to this bit Sdram Refresh Control Register Sdrcr Field Descriptions Sdram Refresh Control Register SdrcrSdram Timing Register Sdtimr Field Descriptions Sdram Timing Register SdtimrSdram Timing Register 2 SDTIMR2 Field Descriptions Sdram Timing Register 2 SDTIMR2Peripheral Bus Burst Priority Register Pbbpr Peripheral Bus Burst Priority Register PbbprInterrupt Raw Register IRR Field Descriptions Interrupt Raw Register IRRInterrupt Masked Register IMR Field Descriptions Interrupt Masked Register IMRInterrupt Mask Set Register Imsr Field Descriptions Interrupt Mask Set Register ImsrInterrupt Mask Clear Register Imcr Field Descriptions Interrupt Mask Clear Register ImcrDDR PHY Control Register Ddrphycr Field Descriptions DDR PHY Control Register DdrphycrVTP IO Control Register Vtpiocr Field Descriptions VTP IO Control Register VtpiocrDDR VTP Enable Register Ddrvtper Field Descriptions DDR VTP Enable Register DdrvtperDDR VTP Register Ddrvtpr DDR VTP Register Ddrvtpr Field DescriptionsAdditions/Modifications/Deletions Table A-1. Document Revision HistoryImportant Notice