DDR
了解电脑内存DDR与DDR有何区别

了解电脑内存DDR与DDR有何区别电脑内存是计算机中的重要组成部分,它负责储存和处理数据。
在选择电脑内存时,经常会听到DDR和DDR的术语。
那么,DDR和DDR之间有什么区别呢?本文将对这两种电脑内存进行详细的了解与比较。
一、DDR和DDR的定义DDR是Double Data Rate的缩写,意为双倍数据传输速率。
它是电脑内存的一种规范,用于描述内存模块的传输速率和频率。
DDR内存的传输速率是在传输周期(Clock Cycle)上升沿和下降沿都能传输数据的基础上,进行双倍数据传输,因此速度更快。
DDR是DDR SDRAM(Double Data Rate Synchronous Dynamic Random Access Memory)的简称,是在SDRAM基础上发展起来的一种内存。
DDR内存不仅会在上升沿传输数据,在下降沿也可以传输数据,因此其速度是SDRAM的两倍,为DDR SDRAM。
二、DDR和DDR的技术对比1. 传输速率差异DDR内存和DDR内存之间最主要的区别在于传输速率。
DDR内存的传输速率相对较慢,一般在100-200MHz之间;而DDR内存的传输速率要高很多,可以达到400MHz以上。
2. 频率差异DDR内存的主频一般为100-200MHz,而DDR内存的主频多为200-400MHz。
这就意味着DDR内存在进行数据处理时的效率更高。
3. 功耗差异DDR内存和DDR内存在功耗上也有一定差异。
DDR内存的功耗相对较低,因为其传输速率较慢,电流需求较小;而DDR内存的功耗相对较高,因为其传输速率较快,电流需求较高。
4. 技术发展差异DDR内存是DDR SDRAM技术的基础上发展起来的,而DDR内存则是在DDR SDRAM的基础上进一步提升速度和性能而来的。
可以说,DDR内存是DDR SDRAM技术的一种延伸和改进。
三、DDR和DDR的应用领域DDR内存和DDR内存均被广泛应用于电子设备中,包括计算机、手机、平板电脑等。
DDR内存介绍

DDR是一种继SDRAM后产生的内存技术,DDR,英文原意为“DoubleDataRate”,顾名思义,就是双数据传输模式。
之所以称其为“双”,也就意味着有“单”,我们日常所使用的SDRAM 都是“单数据传输模式”,这种内存的特性是在一个内存时钟周期中,在一个方波上升沿时进行一次操作(读或写),而DDR则引用了一种新的设计,其在一个内存时钟周期中,在方波上升沿时进行一次操作,在方波的下降沿时也做一次操作,之所以在一个时钟周期中,DDR 则可以完成SDRAM两个周期才能完成的任务,所以理论上同速率的DDR内存与SDR内存相比,性能要超出一倍,可以简单理解为100MHZ DDR=200MHZ SDR。
DDR内存不向后兼容SDRAMDDR内存采用184线结构,DDR内存不向后兼容SDRAM,要求专为DDR设计的主板与系统。
DDR-II内存将是现有DDR-I内存的换代产品,它们的工作时钟预计将为400MHz或更高(包括现代在内的多家内存商表示不会推出DDR-II 400的内存产品)。
从JEDEC组织者阐述的DDR-II标准来看,针对PC等市场的DDR-II内存将拥有400-、533、667MHz等不同的时钟频率。
高端的DDR-II内存将拥有800-、1000MHz两种频率。
DDR-II内存将采用200-、220-、240-针脚的FBGA封装形式。
最初的DDR-II内存将采用0.13微米的生产工艺,内存颗粒的电压为1.8V,容量密度为512MB。
DDR-II将采用和DDR-I内存一样的指令,但是新技术将使DDR-II内存拥有4到8路脉冲的宽度。
DDR-II将融入CAS、OCD、ODT等新性能指标和中断指令。
DDR-II标准还提供了4位、8位512MB内存1KB的寻址设置,以及16位512MB内存2KB的寻址设置。
DDR-II内存标准还包括了4位预取数(pre-fetch of 4 bits)性能,DDR-I技术的预取数位只有2位。
DDR系列基础知识讲解

特性分析
DDR 延迟锁定回路(DLL)的任务是根据外
部时钟动态修正内部时钟的延迟来实现 与外部时钟的同步; DLL有时钟频率测量法(CFM,Clock Frequency Measurement)和时钟比较法 (CC,Clock Comparator); CFM是测量外部时钟的频率周期,然后 以此周期为延迟值控制内部时钟,这样
个引脚上接有240欧姆的低公差参考电阻, 新增裸露SRT(Self-Reflash Temperature) 可编程化温度控制存储器时钟频率功能, 新增PASR(PartialArray Self-Refresh)局 部Bank刷新的功能,可以说针对整个存 储器Bank做更有效的数据读写以达到省 电功效;
在DDR SDRAM中指连续传输的周期数;
名词解析
AL:Additive Latency,附加潜伏期 (DDR2);
WL:Write Latency,写入命令发出到第一 笔数据输入的潜伏期;
tRAS:Active to Precharge Command,行有 效至预充电命令间隔周期;
tDQSS:WRITE Command to the first corresponding rising edge of DQS,DQS
和降额
tDS(total setup time)=tDS(base)+ tDS
tDH(total hold time)=tDH(base)+ tDH
未来展望
内存产品不单单是容量上的提升,未来 还将在频率上有着长足的进步。因为从 之前JEDEC固态技术协会宣布DDR4内存 标准关键技术中,可以看到未来DDR4内 存的频率将突破5000MHz.
ddr的标准

ddr的标准
DDR,全称为双倍数据传输率,指的是一种双倍速率同步动态随机存储器。
它是在SDRAM内存基础上发展而来,沿用了SDRAM的生产体系,使得内存厂商可以稍加改进制造普通SDRAM的设备来实现DDR内存的生产,从而有效降低成本。
DDR内存的标准可以从以下几个方面进行区分:
1. DDR标准:主流DDR内存可以根据其符合的DDR标准进行区分,如DDR3、DDR4等。
每个DDR标准都有不同的规格和性能特点。
2. 频率:DDR内存的频率是指其内部时钟的速度。
频率越高,内存的传输速度越快。
主流DDR内存的频率通常以MHz为单位进行表示,例如DDR3-1600、DDR4-2400等。
3. CL时序:CL时序是DDR内存的延迟参数之一,表示存储器处理读写命令时需要的时钟周期数。
较低的CL时序意味着内存响应更快。
主流DDR内存的CL 时序通常为CL9、CL11等。
4. 容量:DDR内存的容量是指其可以存储的数据量。
主流DDR内存的容量通
常以GB为单位进行表示,例如4GB、8GB等。
5. 电压:DDR内存的电压是指其正常工作所需的电源电压。
主流DDR内存的电压通常为1.5V或1.35V。
6. 封装:DDR内存的封装是指其物理形态和规格。
不同的封装类型决定了内存条的外观和适用平台。
主流DDR内存的封装类型包括DIMM和SO-DIMM等。
不同标准的DDR内存具有不同的性能和适用场景。
在选择DDR内存时,需要根据实际需求和平台特性进行综合考虑,以选择最适合的DDR内存规格。
ddr在高速电路设计中的作用

ddr在高速电路设计中的作用
DDR(Double Data Rate)是一种高速的电路设计技术,在高速电路设计中具有以下作用:
1. 提高数据传输速率:DDR技术可以在给定的频率下比普通的SDR(Single Data Rate)技术传输两倍的数据。
高速的数据传输速率可以提高系统的性能,在需要快速传输大数据量的应用中尤为重要。
2. 减少数据传输延迟:DDR技术在每个时钟周期中传输两次数据,可以减少数据传输的延迟。
这对于需要高速响应的应用来说非常关键,如通信系统、嵌入式系统和数据中心等。
3. 提高总线带宽:DDR技术可以通过增加每个时钟周期内传输的数据量来提高总线的带宽。
这对于需要高带宽的应用来说至关重要,如高清视频传输、图形渲染和大规模数据处理等。
4. 提高系统稳定性:DDR技术引入了预取(Prefetch)和流水线(Pipeline)技术,在保持数据传输速率的同时提高了系统的稳定性。
这可以减少数据传输中的时序问题,降低系统故障的风险。
综上所述,DDR在高速电路设计中的作用主要体现在提高数据传输速率、减少传输延迟、提高总线带宽和提高系统稳定性等方面。
这些作用使得DDR成为当今高速通信、嵌入式系统和数据中心等领域中不可或缺的关键技术。
SRAM、DRAM、Flash、DDR有什么区别

SRAM、DRAM、Flash、DDR有什么区别SRAMSRAM的全称是Static Rnadom Access Memory,翻译过来即静态随机存储器。
这⾥的静态是指这种存储器只需要保持通电,⾥⾯的数据就可以永远保持。
但是当断点之后,⾥⾯的数据仍然会丢失。
由于SRAM的成本很⾼,所以像诸如CPU的⾼速缓存,才会采⽤SRAM。
DRAMDRAM全称是Dynamic Random Access Memory,翻译过来即动态随机存取存储器,最为常见的系统内存。
DRAM 只能将数据保持很短的时间。
为了保持数据,DRAM使⽤电容存储,所以必须隔⼀段时间刷新(refresh)⼀次,如果存储单元没有被刷新,存储的信息就会丢失。
FlashFlash内存即Flash Memory,全名叫Flash EEPROM Memory,⼜名闪存,是⼀种长寿命的⾮易失性(在断电情况下仍能保持所存储的数据信息)的存储器,数据删除不是以单个的字节为单位⽽是以固定的区块为单位,区块⼤⼩⼀般为256KB到20MB。
闪存是电⼦可擦除只读存储器(EEPROM)的变种,EEPROM与闪存不同的是,EEPROM能在字节⽔平上进⾏删除和重写⽽闪存是按区块擦写,这样闪存就⽐EEPROM的更新速度快,所以被称为Flash erase EEPROM,或简称为Flash Memory。
由于其断电时仍能保存数据,闪存通常被⽤来保存设置信息,如在电脑的BIOS(基本输⼊输出程序)、PDA(个⼈数字助理)、数码相机中保存资料等。
另⼀⽅⾯,闪存不像RAM(随机存取存储器)⼀样以字节为单位改写数据,因此不能取代RAM。
NOR Flash与NAND FlashNOR Flash和NAND Flash是现在市场上两种主要的⾮易失闪存技术。
Intel于1988年⾸先开发出NOR Flash 技术,彻底改变了原先由EPROM(Erasable Programmable Read-Only-Memory电可编程序只读存储器)和EEPROM(电可擦只读存储器Electrically Erasable Programmable Read - Only Memory)⼀统天下的局⾯。
DDR

写—读Biblioteka 间隔写写打断写操作中, 若BL=4,则不允许其他读、写操作打断。
若BL=8,允许被写操作打断,打断位置必须是写操作两个时钟后。
若本写操作带有预充电操作,则该写操作不能被打断。
预充电
定义:由于DDR寻址具有独占性,所以进行完读写操 作后,如果要对同一Bank的另一行进行寻址,就要将 原来有效(工作)行关闭,发送有效的行、列地址。 在DDR中,Bank关闭现有效工作行,准备打开新行的 操作叫做预充电。实际上,预充电是一种对工作行中 行中所有存储体进行数据重写,并对行地址进行复位, 以准备新行的工作。 将 CS、RAS、CAS、WE 的值设置为: 0 0 1 0
2、 MRS没有默认值,所以在初始化使用时必须对MR进行参数设置。 3、将 CS、RAS、CAS、WE、BA1 、BA0的值设置为:
0
0
0
0
0
0
其他参数设置如下图:
MRS
EMRS( extend mode register set )
1、EMR1用来设置enable or disable DLL、输出驱动能量级、AL (additive latency)、ODT(on die termination)、OCD编程等。
DDR读写操作
在对DDR进行读写操作时,其总的时序概括为:
1、发送Bank有效命令也就是行有效命令
2、发送列地址、读写命令
Bank Activate Command
1、将 CS、RAS、CAS、WE、 BA1 、BA0的值设置为: 0 0 1 1 0/1 0/1 2、地址线A13-A0为所需要的行地址值,BA1-BA0用来选 择Bank。 3、在发送完行有效命令后,必须要等tRCD延时才能输送有效 读/写命令,若此时,命令之间的间隔不满足tRCD,则必须由 EMRS(1)设置AL用来补足该时间间隔。 4、在关闭当前行,打开新的一行之前,必须对本行进行预充 电操作。
计算机内存DDR和DDR有何区别

计算机内存DDR和DDR有何区别计算机内存是计算机系统中至关重要的组成部分,其中DDR(双倍数据率)和DDR(双倍数据率)是最常见的两种内存类型。
虽然它们听起来相似,但实际上有着明显的区别。
本文将全面解释DDR和DDR之间的差异,帮助读者更好地理解和选择适合自己需求的内存。
1. 内存类型名称DDR内存是指第一代双倍数据率内存,而DDR2、DDR3和DDR4是后续版本,每个版本都有一些改进和更新。
因此,DDR内存和DDR2、DDR3、DDR4等属于不同的内存类型。
2. 带宽和频率DDR和DDR之间最明显的区别是其带宽和频率。
DDR内存的带宽通常较低,频率也相对较低,而DDR2、DDR3和DDR4内存的带宽和频率则随着新一代内存的推出而不断提高。
DDR2内存较DDR内存拥有更高的带宽和频率,而DDR3和DDR4内存在此基础上进一步提升。
3. 电压和能效DDR内存与DDR2、DDR3和DDR4内存之间还存在着电压和能效的差异。
DDR内存通常工作在较高电压下,消耗更多的能量,而DDR2、DDR3和DDR4内存则不同程度上降低了电压,并提高了能效,进而减少了功耗和热量产生。
4. 物理接口除了性能和能效方面的差异,DDR内存与DDR2、DDR3和DDR4内存之间的物理接口也有所不同。
每个内存版本都采用了不同的物理设计和插槽,不可互相兼容。
因此,在购买内存时,您需要确认计算机主板所支持的内存类型,并选择相应的内存版本。
总结起来,DDR和DDR之间的区别主要体现在内存类型名称、带宽和频率、电压和能效以及物理接口等方面。
虽然DDR内存在某些方面有一定的局限性,但它仍然可以在一些较老的计算机系统中发挥作用。
而DDR2、DDR3和DDR4内存则适用于大多数现代计算机,并提供了更好的性能、能效和兼容性。
综上所述,选择适合自己计算机系统的内存类型非常重要。
通过了解DDR和DDR之间的区别,读者可以更好地理解它们之间的差异,并在购买内存时做出明智的选择。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
TMS320C642x DSP DDR2Memory ControllerUser's GuideLiterature Number:SPRUEM4ANovember20072SPRUEM4A–November2007Submit Documentation FeedbackPreface (6)1Introduction (7)1.1Purpose of the Peripheral (7)1.2Features (7)1.3Functional Block Diagram (8)1.4Supported Use Case Statement (8)1.5Industry Standard(s)Compliance Statement (8)2Peripheral Architecture (9)2.1Clock Control (9)2.2Memory Map (10)2.3Signal Descriptions (11)2.4Protocol Description(s) (12)2.5Memory Width and Byte Alignment (20)2.6Endianness Support (21)2.7Address Mapping (22)2.8DDR2Memory Controller Interface (26)2.9Refresh Scheduling (29)2.10Self-Refresh Mode (29)2.11Reset Considerations (30)2.12VTP IO Buffer Calibration (31)2.13Auto-Initialization Sequence (31)2.14Interrupt Support (34)2.15DMA Event Support (34)2.16Power Management (34)2.17Emulation Considerations (35)3Supported Use Cases (36)3.1Connecting the DDR2Memory Controller to DDR2Memory (36)3.2Configuring Memory-Mapped Registers to Meet DDR2-400Specification (36)4DDR2Memory Controller Registers (41)4.1SDRAM Status Register(SDRSTAT) (42)4.2SDRAM Bank Configuration Register(SDBCR) (43)4.3SDRAM Refresh Control Register(SDRCR) (45)4.4SDRAM Timing Register(SDTIMR) (46)4.5SDRAM Timing Register2(SDTIMR2) (47)4.6Peripheral Bus Burst Priority Register(PBBPR) (48)4.7Interrupt Raw Register(IRR) (49)4.8Interrupt Masked Register(IMR) (50)4.9Interrupt Mask Set Register(IMSR) (51)4.10Interrupt Mask Clear Register(IMCR) (52)4.11DDR PHY Control Register(DDRPHYCR) (53)4.12VTP IO Control Register(VTPIOCR) (54)4.13DDR VTP Register(DDRVTPR) (55)4.14DDR VTP Enable Register(DDRVTPER) (55)Appendix A Revision History (56)SPRUEM4A–November2007Table of Contents3 Submit Documentation Feedback1Data Paths to DDR2Memory Controller (8)2DDR2Memory Controller Clock Block Diagram (9)3DDR2Memory Controller Signals (11)4Refresh Command (13)5DCAB Command (14)6DEAC Command (15)7ACTV Command (16)8DDR2READ Command (17)9DDR2WRT Command (18)10DDR2MRS and EMRS Command (19)11Byte Alignment(Little-Endian Mode) (20)12Logical Address-to-DDR2SDRAM Address Map (24)13DDR2SDRAM Column,Row,and Bank Access (25)14DDR2Memory Controller FIFO Block Diagram (26)15DDR2Memory Controller Reset Block Diagram (30)16DDR2Memory Controller Power Sleep Controller Diagram (34)17Connecting DDR2Memory Controller for32-Bit Connection (37)18Connecting DDR2Memory Controller for16-Bit Connection (37)19SDRAM Status Register(SDRSTAT) (42)20SDRAM Bank Configuration Register(SDBCR) (43)21SDRAM Refresh Control Register(SDRCR) (45)22SDRAM Timing Register(SDTIMR) (46)23SDRAM Timing Register2(SDTIMR2) (47)24Peripheral Bus Burst Priority Register(PBBPR) (48)25Interrupt Raw Register(IRR) (49)26Interrupt Masked Register(IMR) (50)27Interrupt Mask Set Register(IMSR) (51)28Interrupt Mask Clear Register(IMCR) (52)29DDR PHY Control Register(DDRPHYCR) (53)30VTP IO Control Register(VTPIOCR) (54)31DDR VTP Register(DDRVTPR) (55)32DDR VTP Enable Register(DDRVTPER) (55)4List of Figures SPRUEM4A–November2007Submit Documentation Feedback1PLLC2Configuration (10)2DDR2Memory Controller Signal Descriptions (11)3DDR2SDRAM Commands (12)4Truth Table for DDR2SDRAM Commands (12)5Addressable Memory Ranges (20)616-Bit External Memory (21)732-Bit External Memory (21)8Bank Configuration Register Fields for Address Mapping (22)9Logical Address-to-DDR2SDRAM Address Map for32-Bit SDRAM (23)10Logical Address-to-DDR2SDRAM Address Map for16-bit SDRAM (23)11DDR2Memory Controller FIFO Description (26)12Refresh Urgency Levels (29)13Reset Sources (30)14DDR2SDRAM Configuration by MRS Command (32)15DDR2SDRAM Configuration by EMRS(1)Command (32)16SDRAM Bank Configuration Register(SDBCR)Configuration (38)17DDR2Memory Refresh Specification (38)18SDRAM Refresh Control Register(SDRCR)Configuration (38)19SDRAM Timing Register(SDTIMR)Configuration (39)20SDRAM Timing Register2(SDTIMR2)Configuration (39)21DDR PHY Control Register(DDRPHYCR)Configuration (40)22DDR2Memory Controller Registers Relative to Base Address20000000h (41)23DDR2Memory Controller Registers Relative to Base Address01C42000h (41)24DDR2Memory Controller Registers Relative to Base Address01C40000h (41)25SDRAM Status Register(SDRSTAT)Field Descriptions (42)26SDRAM Bank Configuration Register(SDBCR)Field Descriptions (43)27SDRAM Refresh Control Register(SDRCR)Field Descriptions (45)28SDRAM Timing Register(SDTIMR)Field Descriptions (46)29SDRAM Timing Register2(SDTIMR2)Field Descriptions (47)30Peripheral Bus Burst Priority Register(PBBPR)Field Descriptions (48)31Interrupt Raw Register(IRR)Field Descriptions (49)32Interrupt Masked Register(IMR)Field Descriptions (50)33Interrupt Mask Set Register(IMSR)Field Descriptions (51)34Interrupt Mask Clear Register(IMCR)Field Descriptions (52)35DDR PHY Control Register(DDRPHYCR)Field Descriptions (53)36VTP IO Control Register(VTPIOCR)Field Descriptions (54)37DDR VTP Register(DDRVTPR)Field Descriptions (55)38DDR VTP Enable Register(DDRVTPER)Field Descriptions (55)A-1Document Revision History (56)SPRUEM4A–November2007List of Tables5 Submit Documentation FeedbackPrefaceSPRUEM4A–November2007About This ManualThis document describes the DDR2memory controller in the TMS320C642x Digital Signal Processor(DSP).Notational ConventionsThis document uses the following conventions.•Hexadecimal numbers are shown with the suffix h.For example,the following number is40 hexadecimal(decimal64):40h.•Registers in this document are shown in figures and described in tables.–Each register figure shows a rectangle divided into fields that represent the fields of the register.Each field is labeled with its bit name,its beginning and ending bit numbers above,and itsread/write properties below.A legend explains the notation used for the properties.–Reserved bits in a register figure designate a bit that is used for future device expansion.Related Documentation From Texas InstrumentsThe following documents describe the Signal Processor(DSP).Copies of these documents are available on the Internet at Tip:Enter the literature number in the search boxprovided at .The current documentation that describes the C642x and other technicalcollateral,is available in the C6000DSP product folder at:—TMS320C642x DSP Peripherals Overview Reference Guide.Provides an overview anddescribes the peripherals available on the TMS320C642x Digital Signal Processor(DSP).—TMS320C64x to TMS320C64x+CPU Migration Guide.Describes migrating from theInstruments TMS320C64x digital signal processor(DSP)to the TMS320C64x+DSP.The objective of this document is to indicate differences between the two cores.Functionality in thedevices that is identical is not included.—TMS320C64x/C64x+DSP CPU and Instruction Set Reference Guide.Describes the CPUpipeline,instruction set,and interrupts for the TMS320C64x and TMS320C64x+digital signal processors(DSPs)of the TMS320C6000DSP family.The C64x/C64x+DSP generationcomprises fixed-point devices in the C6000DSP platform.The C64x+DSP is an enhancement ofthe C64x DSP with added functionality and an expanded instruction set.—TMS320C64x+DSP Megamodule Reference Guide.Describes the TMS320C64x+digitalprocessor(DSP)megamodule.Included is a discussion on the internal direct memory access (IDMA)controller,the interrupt controller,the power-down controller,memory protection,bandwidthmanagement,and the memory and cache.6Preface SPRUEM4A–November2007Submit Documentation Feedback1Introduction1.1Purpose of the Peripheral1.2FeaturesUser's GuideSPRUEM4A–November 2007This document describes the DDR2memory controller in the TMS320C642x Digital Signal Processor (DSP).The DDR2memory controller is used to interface with JESD79D-2A standard compliant DDR2SDRAM devices.Memories types such as DDR1SDRAM,SDR SDRAM,SBSRAM,and asynchronous memories are not supported.The DDR2memory controller is the major memory location for program and data storage.The DDR2memory controller supports the following features:•JESD79D-2A standard compliant DDR2SDRAM •256Mbyte memory space•Data bus width of 32or 16bits (see the device-specific data manual for the mode(s)that are supported)•CAS latencies:2,3,4,and 5•Internal banks:1,2,4,and 8•Burst length:8•Burst type:sequential •1CS signal•Page sizes:256,512,1024,and 2048•SDRAM autoinitialization •Self-refresh mode •Prioritized refresh•Programmable refresh rate and backlog counter •Programmable timing parameters•Big-endian and little-endian operating modesSPRUEM4A–November 2007DDR2Memory Controller 7Submit Documentation Feedback1.3Functional Block DiagramDSP Master peripheralsEDMA VPSS1.4Supported Use Case Statement1.5Industry Standard(s)Compliance StatementIntroductionThe DDR2memory controller is the main interface to external DDR2memory.Figure 1displays the general data paths to on-chip peripherals and external DDR2SDRAM.Master peripherals,EDMA,the ARM processor,and DSP can access the DDR2memory controller through the switched central resource (SCR).Figure 1.Data Paths to DDR2Memory ControllerThe DDR2memory controller supports JESD79D-2A DDR2-400SDRAM memories utilizing either 32-bit or 16-bit of the DDR2memory controller data bus.See Section 3for more details.The DDR2memory controller is compliant with the JESD79D-2A DDR2SDRAM standard with the exception of the following feature list:•On Die Termination (ODT).The DDR2memory controller does not include any on-die terminating resistors.Furthermore,the on-die terminating resistors of the DDR2SDRAM device must be disabled by tying the ODT input pin of the DDR2SDRAM to ground.•Differential DQS.The DDR2memory controller supports single ended DQS signals.DDR2Memory Controller8SPRUEM4A–November 2007Submit Documentation Feedback2Peripheral Architecture2.1Clock Control2.1.1Clock SourceDDR_CLK Peripheral ArchitectureThis section describes the architecture of the DDR2memory controller as well as how it is structured and how it works within the context of the system-on-a-chip.The DDR2memory controller can gluelesslyinterface to most standard DDR2SDRAM devices and supports such features as self-refresh mode and prioritized refresh.In addition,it provides flexibility through programmable parameters such as the refresh rate,CAS latency,and many SDRAM timing parameters.The following sections include details on how to interface and properly configure the DDR2memory controller to perform read and write operations toexternally-connected DDR2SDRAM devices.Also,Section3provides a detailed example of interfacing the DDR2memory controller to a common DDR2The DDR2memory controller receives two input clocks from internal clock sources,SYSCLK2andPLL2_SYSCLK1(Figure2).SYSCLK2is a divided-down version of the DSP clock.PLL2_SYSCLK1should be at the frequency of the desired data rate,or stated similarly,it shouldoperate at twice the frequency of the desired DDR2memory clock.DDR_CLK and DDR_CLK are the two output clocks of the DDR2memory controller providing the interface clock to the DDR2SDRAM memory.These two clocks operate at a frequency of PLL2_SYSCLK1/2.SYSCLK2and PLL2_SYSCLK1are sourced from two independent PLLs(Figure2).SYSCLK2is sourced from PLL controller1(PLLC1)and PLL2_SYSCLK1is sourced from PLL2(PLLC2).SYSCLK2is clocked at a fixed divider ratio of PLL1.This divider is fixed at3,meaning SYSCLK2isclocked at a frequency of PLL1/3.Once inside the DDR2memory controller,this signal is called VCLK.PLLC2has a programmable divider that is used to divide-down the output clock of PLL2.This dividershould be configured such that PLLC2supplies the PLL2_SYSCLK1at the desired frequency.Forexample,if a150-MHZ DDR2interface clock(DDR_CLK)is desired,then PLLC2must be configured to generate a300-MHZ clock on PLL2_SYSCLK1.Once inside the DDR2memory controller,PLL2_SYSCLK1is called X2_CLK.Figure2.DDR2Memory Controller Clock Block DiagramSPRUEM4A–November2007DDR2Memory Controller9 Submit Documentation Feedback2.1.2Clock Configuration2.1.3DDR2Memory Controller Internal Clock Domains2.2Memory MapPeripheral ArchitectureThe frequency of PLL2_SYSCLK1is configured by selecting the appropriate PLL multiplier anddivider ratio.The PLL multiplier and divider ratio are selected by programming registers within PLLC2.Table 1shows a list of PLL multiplier and divider settings to achieve certain DDR2frequencies.The Table 1is derived by assuming a 27-MHZ reference clock.See the device-specific data manual for the supported.See the TMS320C642x DSP Phase-Locked Loop Controller (PLLC)User's Guide for information on the PLL controller.Note:PLLC2should be configured and a stable clock present on PLL2_SYSCLK1before releasing the DDR2memory controller from reset.Table 1.PLLC2ConfigurationPLL Multiplier PLL Frequency (MHZ)Divider Ratio X2_CLK Frequency (MHZ)DDR2Clock Frequency (MHZ)287563252126195132256.6128.3297833261130.5205402270135318373279139.5215672283.5141.8328643288144225942297148.5236212310155.3246482324162256752337.5168.8There are two clock domains within the DDR2memory controller.The two clock domains are driven by VCLK and a divided-down by 2version of X2_CLK called MCLK.The command FIFO,write FIFO,and read FIFO described in Section 2.8are all on the VCLK domain.From this,you can see that VCLK drives the interface to the The MCLK domain consists of the DDR2memory controller state machine and memory-mapped registers.This clock domain is clocked at the rate of the external DDR2memory,X2_CLK/2.To conserve power within the DDR2memory controller,VCLK,MCLK,and X2_CLK may be stopped.See Section 2.16for proper clock stop procedures.See the device-specific data manual for information describing the device memory-map.DDR2Memory Controller10SPRUEM4A–November 2007Submit Documentation Feedback2.3Signal DescriptionsPeripheral ArchitectureThe DDR2memory controller signals are shown in Figure3and described in Table2.The following features are included:•The maximum data bus is32-bits wide.•The address bus is13-bits wide with an additional3bank address pins.•Two differential output clocks driven by internal clock sources.•Command signals:Row and column address strobe,write enable strobe,data strobe,and data mask.•One chip select signal and one clock enable signal.Figure3.DDR2Memory Controller SignalsTable2.DDR2Memory Controller Signal DescriptionsPin Type DescriptionDDR_CLK,O/Z Clock:Differential clock outputs.DDR_CLKDDR_CKE O/Z Clock enable:Active high.DDR_CS O/Z Chip select:Active low.DDR_WE O/Z Write enable strobe:Active low,command output.DDR_RAS O/Z Row address strobe:Active low,command output.DDR_CAS O/Z Column address strobe:Active low,command output.DDR_DQM[3:0]O/Z Data mask:Output mask signal for write data.DDR_DQS[3:0]I/O/Z Data strobe:Active high,bi-directional signals.Output with write data,input with read data. DDR_BA[2:0]O/Z Bank address:Output,defining which bank a given command is applied.DDR_A[12:0]O/Z Address:Address bus.DDR_D[31:0]I/O/Z Data:Bi-directional data bus.Input for read data,output for write data.DDR_ZN,O Output impedance control:Required to set the DDR2output impedance.Connected by way of DDR_ZP a200-ohm resistor to power and ground(see Figure3).The resistor should be chosen to be4times the desired impedance of the output changing the size of the resistor,theDDR2outputs can be tuned to match the board load,if necessary. Peripheral Architecture2.4Protocol Description(s)The DDR2memory controller supports the DDR2SDRAM commands listed in Table3.Table4shows the signal truth table for the DDR2SDRAM commands.Table3.DDR2SDRAM CommandsCommand FunctionACTV Activates the selected bank and row.DCAB Precharge all command.Deactivates(precharges)all banks.DEAC Precharge single command.Deactivates(precharges)a single bank.DESEL Device Deselect.EMRS Extended Mode Register set.Allows altering the contents of the mode register.MRS Mode register set.Allows altering the contents of the mode register.NOP No operation.Power Down Power down mode.READ Inputs the starting column address and begins the read operation.READ with Inputs the starting column address and begins the read operation.The read operation is followed by aautoprecharge precharge.REFR Autorefresh cycle.SLFREFR Self-refresh mode.WRT Inputs the starting column address and begins the write operation.WRT with Inputs the starting column address and begins the write operation.The write operation is followed by aautoprecharge precharge.Table4.Truth Table for DDR2SDRAM CommandsDDR2SDRAM:CKE CS RAS CAS WE BA[2:0]A[12:11,9:0]A10 DDR2memorycontroller:DDR_CKE DDR_CS DDR_RAS DDR_CAS DDR_WE DDR_BA[2:0]DDR_A[12:11,9:0]DDR_A[10] PreviousCycles Current CycleACTV H H L L H H Bank Row AddressDCAB H H L L H L X X LDEAC H H L L H L Bank X LMRS H H L L L L BA OP CodeEMRS H H L L L L BA OP CodeREAD H H L H L H BA Column Address LREAD with H H L H L H BA Column Address HprechargeWRT H H L H L L BA Column Address LWRT with H H L H L L BA Column Address LprechargeREFR H H L L L H X X XSLFREFR H L L L L H X X XentrySLFREFR L H H X X X X X XexitL H H H X X X NOP H X L H H H X X XDESEL H X H X X X X X XPower Down H L H X X X X X XentryL H H H X X X Power Down L H H X X X X X XexitL H H H X X X12DDR2Memory Controller SPRUEM4A–November20072.4.1RefreshModeDDR_CLK DDR_CKE DDR_CS DDR_RAS DDR_CAS DDR_WE DDR_A[12:0]DDR_BA[2:0]DDR_DQM[3:0]DDR_CLK Peripheral ArchitectureThe DDR2memory controller issues refresh commands to the DDR2SDRAM memory (Figure 4).REFR is automatically preceded by a DCAB command,ensuring the deactivation of all CE banks selected.Following the DCAB command,the DDR2memory controller begins performing refreshes at a rate defined by the refresh rate (RR)bit in the SDRAM refresh control register (SDRCR).Page information is always invalid before and after a REFR command;thus,a refresh cycle always forces a page miss.This type of refresh cycle is often called autorefresh.Autorefresh commands may not be disabled within the DDR2memory controller.See Section 2.9for more details on REFR command scheduling.Figure 4.Refresh Command2.4.2Deactivation (DCAB andDEAC)DDR_CLK DDR_CKE DDR_CS DDR_RAS DDR_WEDDR_A[12,11, 9:0]DDR_BA[2:0]DDR_DQM[3:0]DDR_A[10]DDR_CAS DDR_CLK Peripheral ArchitectureThe precharge all banks command (DCAB)is performed after a reset to the DDR2memory controller or following the initialization sequence.DDR2SDRAMs also require this cycle prior to a refresh (REFR)and mode set register commands (MRS and EMRS).During a DCAB command,DDR_A[10]is driven high to ensure the deactivation of all banks.Figure 5shows the timing diagram for a DCAB command.Figure 5.DCAB Command14DDR2Memory ControllerSPRUEM4A–November 2007DDR_CLK DDR_CKE DDR_CS DDR_RAS DDR_WEDDR_A[12,11, 9:0]DDR_BA[2:0]DDR_DQM[3:0]DDR_A[10]DDR_CAS DDR_CLK Peripheral ArchitectureThe DEAC command closes a single bank of memory specified by the bank select signals.Figure 6shows the timings diagram for a DEAC command.Figure 6.DEAC Command2.4.3Activation(ACTV)DDR_CLK DDR_CKE DDR_CS DDR_RAS DDR_WEDDR_BA[2:0]DDR_DQM[3:0]DDR_A[12:0]DDR_CAS DDR_CLK Peripheral ArchitectureThe DDR2memory controller automatically issues the activate (ACTV)command before a read or write to a closed row of memory.The ACTV command opens a row of memory,allowing future accesses (reads or writes)with minimum latency.The value of DDR_BA[2:0]selects the bank and the value of A[12:0]selects the row.When the DDR2memory controller issues an ACTV command,a delay of t RCD is incurred before a read or write command is issued.Figure 7shows an example of an ACTV command.Reads or writes to the currently active row and bank of can achieve much higher throughput than reads or writes to random areas because every time a new row is accessed,the ACTV command must be issued and a delay of t RCD incurred.Figure 7.ACTV CommandDDR2Memory Controller16SPRUEM4A–November 20072.4.4READ CommandDDR_CLK DDR_CKE DDR_CS DDR_WE DDR_CAS DDR_DQM[3:0]DDR_D[31:0]DDR_A[12:0]DDR_RAS DDR_DQS[3:0]DDR_A[10]DDR_BA[2:0]DDR_CLK Peripheral ArchitectureFigure 8shows the DDR2memory controller performing a read burst from DDR2SDRAM.The READ initiates a burst read operation to an active row.During the READ command,DDR_CAS drives low,DDR_WE and DDR_RAS remain high,the column address is driven on DDR_A[12:0],and the bank address is driven on DDR_BA[2:0].The DDR2memory controller uses a burst length of 8,and has a programmable CAS latency of 2,3,4,or 5.The CAS latency is three cycles in Figure 8.Read latency is equal to CAS latency plus additive latency.The DDR2memory controller always the memory to have an additive latency of 0,so read latency equals CAS latency.Since the default burst size is 8,the DDR2memory controller returns 8pieces of data for every read command.If additional accesses are not pending to the DDR2memory controller,the read burst completes and the unneeded data is disregarded.If additional accesses are pending,depending on the scheduling result,the DDR2memory controller can terminate the read burst and start a new read burst.Furthermore,the DDR2memory controller does not issue a DAB/DEAC command until page information becomes invalid.Figure 8.DDR2READ Command2.4.5Write (WRT)CommandDDR_CLK DDR_CKEDDR_CSDDR_WE DDR_CAS DDR_DQM[3:0]DDR_D[31:0]DDR_A[12:0]DDR_RASDDR_DQS[3:0]DDR_A[10]DDR_BA[2:0]DDR_CLKPeripheral ArchitecturePrior to a WRT command,the desired bank and row are activated by the ACTV command.Following the WRT command,a write latency is incurred.Write latency is equal to CAS latency minus 1.All writes have a burst length of 8.The use of the DDR_DQM outputs allows byte and halfword writes to be executed.Figure 9shows the timing for a write on the DDR2memory controller.If the transfer request is for less than 8words,depending on the scheduling result and the pending commands,the DDR2memory controller can:•Mask out the additional data using DDR_DQM outputs •Terminate the write burst and start a new write burstThe DDR2memory controller does not perform the DEAC command until page information becomes invalid.Figure 9.DDR2WRT CommandDDR2Memory Controller18SPRUEM4A–November 20072.4.6Mode Register Set (MRS and EMRS)DDR_CLK DDR_CKE DDR_CSDDR_RAS DDR_WEDDR_BA[2:0]DDR_A[12:0]DDR_CAS DDR_CLK Peripheral ArchitectureDDR2SDRAM contains mode and extended mode registers that configure the DDR2memory foroperation.These registers control burst type,burst length,CAS latency,DLL enable/disable (on DDR2device),single-ended strobe,etc.The DDR2memory controller programs the mode and extended mode registers of the DDR2memory by issuing MRS and EMRS commands.When the MRS or EMRS command is executed,the value on DDR_BA[1:0]selects the mode register to be written and the data on DDR_A[12:0]is loaded into the register.Figure 10shows the timing for an MRS and EMRS command.The DDR2memory controller only issues MRS and EMRS commands during the DDR2memory controller initialization sequence.See Section 2.13for more information.Figure 10.DDR2MRS and EMRS Command2.5Memory Width and Byte AlignmentDDR2 memory controller data busDDR_D[31:24]DDR_D[23:16]DDR_D[15:8]DDR_D[7:0]32-bit memory device16-bit memory devicePeripheral ArchitectureThe DDR2memory controller supports memory widths of 16bits and 32bits.Table 5summarizes the addressable memory ranges on the DDR2memory controller.See the data manual for the memory widths that are supported.Both big-endian and little-endian formats are supported.Figure 11shows the byte lanes used on the DDR2memory controller.The external memory is always on the data bus.Table 5.Addressable Memory RangesMemory Width Maximum addressable bytes per CS space Description ×16128Mbytes Halfword address ×32256MbytesWord addressFigure 11.Byte Alignment (Little-Endian Mode)DDR2Memory Controller20SPRUEM4A–November 2007Peripheral Architecture 2.6Endianness SupportThe DDR2memory 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 iswritten to or read from devices that are not as wide as the internal data bus.However,the DDR2memory controller maintains the natural order of endian operations.That is,a stream of data starting at anyaddress N within any endian environment will always be accessed in the correct or incrementing dataorder.The DDR2memory controller will always access address N prior to N+1in all endian modes and in any data width.Table6and Table7show operation of the DDR2memory controller for both16-bit and 32-bit external both 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).Table6.16-Bit External MemoryBig-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] 0123456789AB CDEFh000123h00CDEFh0123456789AB CDEFh014567h0189ABh0123456789AB CDEFh1089ABh104567h0123456789AB CDEFh11CDEFh110123hTable7.32-Bit External MemoryBig-Endian Mode Little-Endian Mode Internal Data(64-Bit)DDR_A[2]DDR_D[31:0]DDR_A[2]DDR_D[31:0] 0123456789AB CDEFh089AB CDEFh089AB CDEFh 0123456789AB CDEFh101234567h101234567h Peripheral Architecture2.7Address MappingThe DDR2memory controller views external DDR2SDRAM as one continuous block of memory.Thisstatement is true regardless of the number of external physical devices mapped to a given chip selectspace.The DDR2memory controller receives DDR2memory access requests along with a32-bit logical address from the rest of the system.In turn,the DDR2memory controller uses the logical address togenerate a row/page,column,and bank address for the DDR2SDRAM.The number of column and bank address bits used is determined by the IBANK and PAGESIZE fields in the SDRAM bank configuration register(SDBCR)(see Table8).Table8.Bank Configuration Register Fields for Address Mapping Bit Field Bit Value Bit DescriptionIBANK Defines the number of internal banks on the external DDR2memory.01bank1h2banks2h4banks3h8banksPAGESIZE Defines the page size of each page of the external DDR2memory.0256words(requires8column address bits)1h512words(requires9column address bits)2h1024words(requires10column address bits)3h2048words(requires11column address bits)As stated in Table8,the IBANK and PAGESIZE fields of SDBCR control the mapping of the logical,source DDR2memory controller to the DDR2SDRAM row,column,and bank address bits.The DDR2memory controller logical address always contains13row address bits,whereas the number of column and bank bits are determined by the IBANK and PAGESIZE fields.Table9and Table10show how the logical address bits map to the DDR2SDRAM row,column,and for of IBANK and PAGESIZE values.The same DDR2memory controller pins provide the row and columnaddress to the DDR2SDRAM,thus the DDR2memory controller appropriately shifts the address during row and column address selection.Figure12shows how this address-mapping scheme organizes the DDR2SDRAM rows,columns,and the device memory map.Note that during a linear access,the DDR2memory controller increments the column address as the logical address increments.When the DDR2memory controller reaches a page/row boundary,it moves onto the same page/row in the next bank.This movementcontinues until the same page has been accessed in all banks.To the DDR2SDRAM,this process looks as shown in Figure13.By traversing across banks while remaining on the same row/page,the DDR2memory controllermaximizes the number of activated banks for a linear access.This results in the maximum number ofopen pages when performing a linear access being equal to the number of banks.Note that the DDR2 memory controller never opens more than one page per bank.Ending the current access is not a condition that forces the active DDR2SDRAM row to be closed.The DDR2memory controller leaves the active row open until it becomes necessary to close it.This decreases the deactivate-reactivate overhead.22DDR2Memory Controller SPRUEM4A–November2007。