[go: up one dir, main page]

CN102522113A - SDRAM bridge circuit - Google Patents

SDRAM bridge circuit Download PDF

Info

Publication number
CN102522113A
CN102522113A CN2011103021383A CN201110302138A CN102522113A CN 102522113 A CN102522113 A CN 102522113A CN 2011103021383 A CN2011103021383 A CN 2011103021383A CN 201110302138 A CN201110302138 A CN 201110302138A CN 102522113 A CN102522113 A CN 102522113A
Authority
CN
China
Prior art keywords
sdram
module
phy
controller
ddr3
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011103021383A
Other languages
Chinese (zh)
Other versions
CN102522113B (en
Inventor
魏先锋
王斐昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201110302138.3A priority Critical patent/CN102522113B/en
Publication of CN102522113A publication Critical patent/CN102522113A/en
Application granted granted Critical
Publication of CN102522113B publication Critical patent/CN102522113B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Dram (AREA)

Abstract

本发明涉及一种SDRAM桥接电路。该电路包括第一模块,第二模块和PHY模块;其中,第一模块解析控制器送来的SDRAM访问命令,第二模块把SDRAM访问命令转换为PHY模块可接受的命令,PHY模块利用所述PHY模块可接受的命令访问存储器,其中存储器和控制器具有不同的SDRAM类型。本发明可以让SDRAM控制器通过该桥接电路,实现对DDR3 SDRAM的访问,进行数据存取;相比更换或重新开发集成SDRAM控制器的芯片,电路改动小,开发周期短,成本低,而且与原有系统很好的兼容。

The invention relates to an SDRAM bridge circuit. The circuit includes a first module, a second module and a PHY module; wherein, the first module parses the SDRAM access command sent by the controller, and the second module converts the SDRAM access command into an acceptable command of the PHY module, and the PHY module uses the The commands accepted by the PHY module access the memory, where the memory and the controller have different SDRAM types. The invention allows the SDRAM controller to realize access to the DDR3 SDRAM and perform data access through the bridging circuit; compared with replacing or redeveloping a chip integrated with the SDRAM controller, the circuit changes are small, the development cycle is short, and the cost is low, and it is compatible with The original system is well compatible.

Description

一种SDRAM桥接电路A SDRAM bridge circuit

技术领域 technical field

本发明涉及同步动态随机存取存储器的访问控制。The invention relates to access control of synchronous dynamic random access memory.

背景技术 Background technique

同步动态随机存取存储器(SDRAM)广泛应用于各种电子产品,同时也在不断的更新换代。至今为止,大量商用的历代产品有SDRAM、DDR SDRAM、DDR2SDRAM和DDR3SDRAM(DDR的全称为Double Data Rate,意即双数据速率)。比较早期的SDRAM已经退出主流甚至停产,越来越多的产品使用新一代的存储器如DDR3SDRAM。Synchronous Dynamic Random Access Memory (SDRAM) is widely used in various electronic products, and is constantly being updated. So far, a large number of commercial products of successive generations include SDRAM, DDR SDRAM, DDR2SDRAM and DDR3SDRAM (the full name of DDR is Double Data Rate, which means double data rate). The earlier SDRAM has withdrawn from the mainstream or even ceased production, and more and more products use a new generation of memory such as DDR3SDRAM.

SDRAM接受SDRAM控制器的访问,DDR/DDR2/DDR3 SDRAM接受控制器和PHY(Physical Interface,物理层接口)的访问,实现数据存取。每一代存储器都只能与对应的控制器或PHY进行物理连接,各代之间不能通用,比如SDRAM只能连接SDRAM控制器,不能连接DDR3PHY。SDRAM accepts access from the SDRAM controller, and DDR/DDR2/DDR3 SDRAM accepts access from the controller and PHY (Physical Interface, physical layer interface) to realize data access. Each generation of memory can only be physically connected to the corresponding controller or PHY, and the generations cannot be used universally. For example, SDRAM can only be connected to the SDRAM controller and cannot be connected to the DDR3PHY.

需要外挂存储器的芯片,一般通过集成相应的存储控制器或PHY,实现对存储器的访问。当存储器更新换代时,原有的存储控制器或PHY也面临更换问题,而更换控制器或PHY就需要更换或重新开发芯片。Chips that require an external memory generally implement access to the memory by integrating a corresponding memory controller or PHY. When the memory is updated, the original memory controller or PHY also faces the problem of replacement, and the replacement of the controller or PHY requires replacement or redevelopment of the chip.

对现有芯片更换或修改集成新的PHY时,会“牵一发而动全身”,导致电路改动量大,开发周期长,费用高昂,且不能与原有系统兼容。比如需要把外挂SDRAM的中央处理器CPU更换为外挂DDR3SDRAM的CPU时,操作系统也面临更换,软件全部重新开发;当芯片规模庞大,重新开发时整体工作量巨大,费用高昂。When replacing or modifying an existing chip to integrate a new PHY, it will "touch the whole body", resulting in a large amount of circuit changes, a long development cycle, high costs, and incompatibility with the original system. For example, when the central processing unit CPU with external SDRAM needs to be replaced with a CPU with external DDR3 SDRAM, the operating system will also be replaced, and all software will be redeveloped; when the scale of the chip is large, the overall workload of redevelopment will be huge and the cost will be high.

发明内容Contents of the invention

本发明的目的是提供能够解决上述问题的方案。The object of the present invention is to provide a solution to the above-mentioned problems.

为实现上述目的,本发明提供了一种SDRAM桥接电路。该电路包括第一模块,第二模块和PHY模块;其中,第一模块解析控制器送来的SDRAM访问命令,第二模块把SDRAM访问命令转换为PHY模块可接受的命令,PHY模块利用所述PHY模块可接受的命令访问存储器,其中存储器和控制器具有不同的SDRAM类型。To achieve the above object, the present invention provides an SDRAM bridge circuit. The circuit includes a first module, a second module and a PHY module; wherein, the first module parses the SDRAM access command sent by the controller, and the second module converts the SDRAM access command into a command acceptable to the PHY module, and the PHY module uses the The commands accepted by the PHY module access the memory, where the memory and the controller have different SDRAM types.

本发明通过设计一种SDRAM桥接电路,可以让SDRAM控制器通过该桥接电路,实现对DDR3SDRAM的访问,进行数据存取;相比更换或重新开发集成SDRAM控制器的芯片,电路改动小,开发周期短,成本低,而且与原有系统很好的兼容。By designing an SDRAM bridge circuit, the present invention allows the SDRAM controller to access the DDR3 SDRAM and perform data access through the bridge circuit; compared with replacing or redeveloping the integrated SDRAM controller chip, the circuit changes are small and the development cycle is short. Short, low cost, and very good compatibility with the original system.

附图说明 Description of drawings

下面通过附图和实施例,对本发明的技术方案做进一步的详细描述。附图中:The technical solutions of the present invention will be described in further detail below with reference to the accompanying drawings and embodiments. In the attached picture:

图1为本发明实施例的SDRAM桥接电路的示意图;Fig. 1 is the schematic diagram of the SDRAM bridging circuit of the embodiment of the present invention;

图2示意了第一模块110的接口信号情况;FIG. 2 illustrates the interface signal situation of the first module 110;

图3示意了第二模块120进行转换的示意图;FIG. 3 illustrates a schematic diagram of conversion performed by the second module 120;

图4是SDRAM读取数据转接示意图;Figure 4 is a schematic diagram of SDRAM read data transfer;

图5是SDRAM写入数据转接示意图;Fig. 5 is a schematic diagram of SDRAM writing data transfer;

图6是一对一转接的情况下的示意图;Fig. 6 is a schematic diagram in the case of one-to-one transfer;

图7是写入命令处理占用时间过长影响到下一个读取命令的转接的示意图;Fig. 7 is a schematic diagram of the transfer of the next read command affected by the long time taken by the write command processing;

图8是一对二转接的情况下的示意图;Fig. 8 is a schematic diagram in the case of one-to-two transfer;

图9示意了利用两套PHY转接进行读写的示意图;Figure 9 shows a schematic diagram of reading and writing using two sets of PHY switches;

图10是状态转移表;Figure 10 is a state transition table;

图11是增大位宽降低BL减少数据传输时间;Figure 11 is to increase the bit width and reduce the BL to reduce the data transmission time;

图12是减少位宽增大BL的示意图;FIG. 12 is a schematic diagram of reducing bit width and increasing BL;

图13为本发明另一实施例的SDRAM桥接电路的示意图。FIG. 13 is a schematic diagram of an SDRAM bridge circuit according to another embodiment of the present invention.

具体实施方式 Detailed ways

图1为本发明实施例的SDRAM桥接电路的示意图。如图1所示,SDRAM桥接电路包括第一模块110,第二模块120和DDR3物理接口(下称PHY)模块130。三个模块共同实现将SDRAM控制器访问命令转换为存取DDR3SDRAM存储器的过程。FIG. 1 is a schematic diagram of an SDRAM bridge circuit according to an embodiment of the present invention. As shown in FIG. 1 , the SDRAM bridge circuit includes a first module 110 , a second module 120 and a DDR3 physical interface (hereinafter referred to as PHY) module 130 . The three modules jointly realize the process of converting SDRAM controller access commands into accessing DDR3 SDRAM memory.

第一模块110,也可称为SDRAM访问命令解析与数据收发模块,负责解析SDRAM控制器送来的访问命令,和外部SDRAM控制器之间的信号收发。具体地说,模块110解析访问命令,并且将解析后的访问命令和待写入的数据送给命令与数据转换模块120;同时,接收第二模块120送来的读出数据,并且将之发送给外部SDRAM控制器。The first module 110, also called the SDRAM access command analysis and data transceiving module, is responsible for analyzing the access command sent by the SDRAM controller, and transmitting and receiving signals between the external SDRAM controller. Specifically, the module 110 parses the access command, and sends the parsed access command and the data to be written to the command and data conversion module 120; at the same time, receives the read data sent by the second module 120, and sends it to the external SDRAM controller.

第二模块120,也可称为命令与数据转换模块,负责把SDRAM访问命令与数据转换为DDR3 PHY可接受的格式和时序。具体地说,命令与数据转换模块120把SDRAM的访问命令和写入数据,转换为DDR3 PHY的格式和时序,送给DDR3 PHY模块130;同时,接收DDR3 PHY模块130送来的读取数据,转换为SDRAM控制器的数据格式与时序,送给SDRAM访问命令解析与数据收发模块110。The second module 120, also known as the command and data conversion module, is responsible for converting the SDRAM access command and data into a format and timing acceptable to the DDR3 PHY. Specifically, the command and data conversion module 120 converts the SDRAM access command and write data into the format and timing of DDR3 PHY, and sends it to the DDR3 PHY module 130; at the same time, it receives the read data sent by the DDR3 PHY module 130, The converted data format and timing of the SDRAM controller are sent to the SDRAM access command analysis and data transceiving module 110 .

DDR3 PHY模块130集成DDR3 PHY,负责控制DDR3 SDRAM存储器。具体地说,接收第二模块120送来的命令和写入数据,送给外部DDR3 SDRAM存储器;同时接收从外部DDR3 SDRAM存储器读取的数据,发送给第二模块120。根据应用场景不同,DDR3 PHY模块130可集成一个或多个。在图中,DDR3 PHY模块130分为一套DDR3 PHY和二套DDR3 PHY(还包括内部缓存)两种应用情况。The DDR3 PHY module 130 integrates the DDR3 PHY and is responsible for controlling the DDR3 SDRAM memory. Specifically, receive commands and write data sent by the second module 120, and send them to the external DDR3 SDRAM memory; receive data read from the external DDR3 SDRAM memory, and send them to the second module 120. According to different application scenarios, one or more DDR3 PHY modules can be integrated. In the figure, the DDR3 PHY module 130 is divided into two applications: one set of DDR3 PHY and two sets of DDR3 PHY (including internal cache).

图2示意了第一模块110的接口信号情况。如图2所示,第一模块110根据SDRAM控制器送来的同步随路时钟CLK,对所有来自SDRAM控制器的接收信号进行输入采样,对送给SDRAM控制器的发送信号进行输出并且为SDRAM控制器准备从DDR3 SDRAM存储器读取的数据。FIG. 2 schematically shows interface signals of the first module 110 . As shown in Figure 2, the first module 110 performs input sampling on all received signals from the SDRAM controller according to the synchronous channel clock CLK sent by the SDRAM controller, and outputs the transmitted signals sent to the SDRAM controller and is an SDRAM Controller prepares data for reading from DDR3 SDRAM memory.

来自SDRAM控制器的信号包括SDRAM控制信号CKE、CS#、WE#、CAS#、RAS#,地址信号A、BA,数据IO屏蔽信号DQM,数据信号是DQ(写入/读出)。CKE是片内时钟使能信号,CS#禁止或使能CLK、CKE和DQM外的所有输入信号。WE#是写使能信号。CAS#、RAS#分别是列和行地址锁存信号。地址信号A是地址总线,BA是组地址选择。DQM在读模式下控制输出缓冲,在写模式下屏蔽输入数据。Signals from the SDRAM controller include SDRAM control signals CKE, CS#, WE#, CAS#, RAS#, address signals A, BA, data IO mask signal DQM, and the data signal is DQ (write/read). CKE is an on-chip clock enable signal, and CS# disables or enables all input signals other than CLK, CKE and DQM. WE# is a write enable signal. CAS#, RAS# are column and row address latch signals respectively. The address signal A is the address bus, and BA is the group address selection. The DQM controls output buffering in read mode and masks input data in write mode.

第一模块110将上述控制信号根据SDRAM真值表进行命令解析,转换为SDRAM访问命令,即ACTIVE(激活行)、READ(读)、WRITE(写)、PRECHARGE(预充电)、REFRESH(刷新)命令信号。转换后的命令信号送给第二模块120。另外,写入和读出的数据总线也做了分离。The first module 110 analyzes the above-mentioned control signal according to the SDRAM truth table, and converts it into an SDRAM access command, that is, ACTIVE (activation row), READ (read), WRITE (write), PRECHARGE (precharge), REFRESH (refresh) command signal. The converted command signal is sent to the second module 120 . In addition, the data bus for writing and reading is also separated.

图3示意了第二模块120进行转换的示意图。如图3所示,第二模块120负责SDRAM访问命令、数据与DDR3 PHY单元之间的转换。在一个例子中,根据第二模块120的工作时钟和SDRAM控制器送来的同步随路时钟CLK之间的相位关系,将访问命令ACTIVE、READ、WRITE、PRECHARGE、REFRESH转换为DDR3PHY命令信号,同时转换相关的数据。第二模块的工作时钟是DDR3 PHY单元规定的接口时钟,可以通过采集SDRAM控制器送来的同步随路时钟CLK的跳变沿来确定二者之间的相位关系,以确保数据采集的正确性。一般情况下,PHY单元规定的接口时钟具有高于同步随路时钟的频率。DDR3 PHY单元是提供存储控制器和DDR3存储器设备之间的连接性的IP(知识产权模块)。PHY单元在存储器接口侧提供标准DDR PHY接口总线,在本地侧提供内部总线接口。内部总线接口定义了DDR3 PHY和相应的DDR3 SDRAM控制器之间的信号、时序。FIG. 3 shows a schematic diagram of conversion performed by the second module 120 . As shown in Figure 3, the second module 120 is responsible for the conversion between SDRAM access command, data and DDR3 PHY unit. In one example, according to the phase relationship between the working clock of the second module 120 and the synchronous accompanying clock CLK sent by the SDRAM controller, the access commands ACTIVE, READ, WRITE, PRECHARGE, REFRESH are converted into DDR3PHY command signals, and at the same time Transform related data. The working clock of the second module is the interface clock specified by the DDR3 PHY unit. The phase relationship between the two can be determined by collecting the jump edge of the synchronous clock CLK sent by the SDRAM controller to ensure the correctness of data collection. . Generally, the interface clock specified by the PHY unit has a higher frequency than the synchronous associated clock. The DDR3 PHY unit is an IP (intellectual property block) that provides connectivity between the memory controller and the DDR3 memory device. The PHY unit provides a standard DDR PHY interface bus on the memory interface side and an internal bus interface on the local side. The internal bus interface defines the signals and timing between the DDR3 PHY and the corresponding DDR3 SDRAM controller.

在本发明中,SDRAM控制器发出各种访问命令,SDRAM桥接电路正确解析和转换访问命令,实现数据正确写入DDR3 SDRAM存储器和从其中读出。In the present invention, the SDRAM controller issues various access commands, and the SDRAM bridge circuit correctly parses and converts the access commands, so that data can be correctly written into and read from the DDR3 SDRAM memory.

图4是SDRAM读取数据转接示意图。当SDRAM控制器发起读操作请求时,SDRAM桥接电路中的第一模块和第二模块将读操作请求转换为对DDR3 SDRAM的逻辑读取命令,DDR3 PHY模块依据该逻辑读取命令读取DDR3 SDRAM。在本发明实施例中,第二模块120接收DDR3 PHY模块所送来的所读取DDR3 SDRAM的数据;然后,第一模块110送出读取数据给SDRAM控制器,完成读取过程。在一个例子中,第二模块在约定的DDR3侧CL(CAS latency,列地址选通脉冲延迟,大约6-7个PHY时钟)时间内完成读取DDR3 SDRAM;第一模块在自读取命令起的约定的控制器侧CL(一般为2、3个时钟)时间内将读取数据送给SDRAM控制器。Figure 4 is a schematic diagram of SDRAM read data transfer. When the SDRAM controller initiates a read operation request, the first module and the second module in the SDRAM bridge circuit convert the read operation request into a logical read command for DDR3 SDRAM, and the DDR3 PHY module reads the DDR3 SDRAM according to the logical read command . In the embodiment of the present invention, the second module 120 receives the data of the read DDR3 SDRAM sent by the DDR3 PHY module; then, the first module 110 sends the read data to the SDRAM controller to complete the reading process. In one example, the second module finishes reading DDR3 SDRAM within the agreed DDR3 side CL (CAS latency, column address strobe delay, about 6-7 PHY clocks); The read data is sent to the SDRAM controller within the agreed controller side CL (generally 2 or 3 clocks).

图5是SDRAM写入数据转接示意图。当SDRAM控制器发起写操作请求时,SDRAM桥接电路将写操作请求转换为DDR3 SDRAM的写命令。此外,在突发模式下,SDRAM桥接电路通常要接收到完整或部分写入数据,才能送给DDR3 PHY模块,然后写入DDR3 SDRAM。因此,写入DDR3 SDRAM数据完成的时间,可能要比常规的SDRAM写入过程时间长,占用了SDRAM控制器写入命令后的一部分时间。FIG. 5 is a schematic diagram of SDRAM writing data transfer. When the SDRAM controller initiates a write operation request, the SDRAM bridge circuit converts the write operation request into a DDR3 SDRAM write command. In addition, in burst mode, the SDRAM bridge circuit usually receives complete or partial write data before sending it to the DDR3 PHY module and then writing it into DDR3 SDRAM. Therefore, the time to complete writing DDR3 SDRAM data may be longer than the conventional SDRAM writing process, which takes up a part of the time after the SDRAM controller writes the command.

当SDRAM控制器发起写入数据,接着又发起读取数据时,根据写入DDR3SDRAM命令处理占用时间是否会影响到SDRAM读取命令转接,可以产生如下两种转接方式:(1)一对一转接;(2)一对二转接。When the SDRAM controller initiates writing data and then initiates reading data, according to whether the time taken to process the DDR3 SDRAM command will affect the SDRAM read command transfer, the following two transfer methods can be generated: (1) A pair One transfer; (2) One-to-two transfer.

图6是一对一转接的情况下的示意图。当写入DDR3 SDRAM命令处理占用时间不会影响到SDRAM控制器的下一个读取命令的转接时,采用一套DDR3 PHY外挂DDR3 SDRAM就能完成SDRAM控制器访问转接。此时,SDRAM控制器发出写入数据命令后,一定会间隔足够的时间再发起读取命令。在另一种情况下,如果SDRAM控制器的读取地址可以预测,就可以提前读取DDR3 SDRAM数据,将其存放在PHY模块中的缓存准备好。当PHY模块向DDR3 SDRAM写数据的同时,PHY模块基于读请求将缓存中存放的数据通过第二模块120、第一模块110发送给SDRAM控制器。Fig. 6 is a schematic diagram in the case of one-to-one transfer. When the time taken to write DDR3 SDRAM command processing will not affect the transfer of the next read command of the SDRAM controller, a set of DDR3 PHY plug-in DDR3 SDRAM can complete the SDRAM controller access transfer. At this time, after the SDRAM controller issues the command to write data, it must wait a sufficient time before initiating the command to read. In another case, if the read address of the SDRAM controller can be predicted, the DDR3 SDRAM data can be read in advance, and the cache stored in the PHY module is ready. When the PHY module writes data to the DDR3 SDRAM, the PHY module sends the data stored in the cache to the SDRAM controller through the second module 120 and the first module 110 based on the read request.

具体地说,第二模块120把第一模块110送来的命令和数据,转换为DDR3PHY的命令信号格式和时序,送给DDR 3PHY模块130,同时接收DDR3 PHY模块130送来的读取数据,转换为SDRAM控制器的格式和时序,送给第一模块110。Specifically, the second module 120 converts the command and data sent by the first module 110 into the command signal format and timing of DDR3PHY, and sends it to the DDR3PHY module 130, while receiving the read data sent by the DDR3PHY module 130, It is converted into the format and timing of the SDRAM controller and sent to the first module 110 .

若写入DDR3 SDRAM命令处理占用时间过长,会影响到SDRAM控制器的下一个读取命令的转接(参见图7)。此时,采用二套DDR3 PHY外挂DDR3 SDRAM和内部缓存结合操作,完成SDRAM控制器访问转接。If the write DDR3 SDRAM command takes too long to process, it will affect the transfer of the next read command of the SDRAM controller (see Figure 7). At this time, two sets of DDR3 PHY external DDR3 SDRAM and internal cache are used to complete the SDRAM controller access transfer.

图8是一对二转接的情况下的示意图。如图8所示,PHY模块130包括二套DDR3 PHY单元(分别记为1# PHY、2# PHY)。1#和2#PHY单元都外接DDR3SDRAM存储器(分别记为1# DDR3、2# DDR3)。1#、2#二套DDR3的写入数据需要做镜像同步。Fig. 8 is a schematic diagram in the case of one-to-two handover. As shown in FIG. 8, the PHY module 130 includes two sets of DDR3 PHY units (respectively marked as 1# PHY, 2# PHY). Both 1# and 2# PHY units are externally connected to DDR3 SDRAM memory (marked as 1# DDR3 and 2# DDR3 respectively). The writing data of 1# and 2# two sets of DDR3 needs to be mirrored and synchronized.

PHY模块130还包括内部缓存。内部缓存总是写入最近的一次写操作所要求写入的数据。PHY module 130 also includes an internal cache. The internal cache is always written with the data requested by the most recent write operation.

1# PHY、2# PHY二套转接轮流进行转接操作,内部缓存仅在读地址与最近的写地址相同时才启用来完成数据的读出,组合起来完成SDRAM控制器访问转接。The two sets of 1# PHY and 2# PHY are transferred in turn. The internal cache is only enabled when the read address is the same as the latest write address to complete the data readout, and they are combined to complete the SDRAM controller access transfer.

当SDRAM控制器写入数据时,假设1# PHY先进行写入,同时写入内部缓存,2# PHY待命,随时准备受理SDRAM控制器发出的读取命令。如果此时(即写入1# PHY的同时),SDRAM控制器发起读操作命令,如果读和写的地址不同,由2#PHY负责完成数据读出;如果读和写的地址相同,则内部缓存读出之前缓存的数据。当1#PHY写入完成后,将写入1#PHY的数据写入2#PHY,以保持二套PHY单元写入存储器的数据同步镜像。这样避免了读取转接失败。图9示意了利用两套PHY转接进行读写的示意图。When the SDRAM controller writes data, it is assumed that the 1# PHY writes first, and writes to the internal cache at the same time, and the 2# PHY is on standby, ready to accept the read command issued by the SDRAM controller at any time. If at this time (that is, while writing to 1# PHY), the SDRAM controller initiates a read operation command, if the read and write addresses are different, 2#PHY is responsible for completing the data read; if the read and write addresses are the same, the internal The cache reads previously cached data. After the writing of 1#PHY is completed, the data written into 1#PHY is written into 2#PHY to keep the synchronous mirroring of the data written into the memory by the two sets of PHY units. This avoids read transfer failures. FIG. 9 shows a schematic diagram of reading and writing using two sets of PHY switches.

正常工作期间,如果读取地址与最近的写地址不同,1# PHY和2# PHY中哪一套空闲就进行读取,如果二套都空闲则任意选择一套;如果读地址与最近的写地址相同,则读取内部缓存。During normal operation, if the read address is different from the latest write address, whichever set of 1# PHY and 2# PHY is free will be read, and if both sets are free, choose one arbitrarily; If the addresses are the same, the internal cache is read.

在一个例子中,第二模块120采用状态机来控制不同PHY及其相连的DDR3SDRAM的操作。In one example, the second module 120 uses a state machine to control the operations of different PHYs and their connected DDR3 SDRAMs.

图10是状态转移表。如图所示,当第二模块复位或状态机从其他状态进入空闲IDLE状态时,第二模块根据第一模块送来的写入、读取命令不同,对状态机进行不同的状态跳转。Figure 10 is a state transition table. As shown in the figure, when the second module is reset or the state machine enters the IDLE state from other states, the second module performs different state jumps for the state machine according to the write and read commands sent by the first module.

1)当第一模块110送来写入操作<WRITE n>(写n)时(n为地址),选择1#PHY对其相连的1#DDR3进行写入操作(图中标记100),同时写入数据存入内部缓存(图中标记101);1) When the first module 110 sends a write operation <WRITE n> (write n) (n is an address), select 1#PHY to write to its connected 1#DDR3 (mark 100 in the figure), and at the same time The written data is stored in the internal cache (marked 101 in the figure);

2)当1# PHY的写入操作<WRITE n>(写n)还没有完成时,第一模块110就送来读出操作时<READ m>(读m,即读取地址与写入地址不同),启动读取2# PHY相连的2# DDR3(图中标记102),进行读取转接;2) When the write operation <WRITE n> (write n) of 1# PHY has not been completed, the first module 110 sends the read operation <READ m> (read m, that is, the read address and the write address Different), start reading 2# DDR3 connected to 2# PHY (marked 102 in the figure), and read and transfer;

3)2# DDR3读取转接完成后,进行2# DDR3的数据写入(图中标记105),将写入1# DDR3的内容写入2# DDR3,即完成1#、2# DDR3的写入数据镜像同步;写入完成后(图中标记106),进入IDLE状态;3) After the 2# DDR3 reading transfer is completed, write the data of 2# DDR3 (marked 105 in the figure), write the content written in 1# DDR3 into 2# DDR3, that is, complete the data transfer of 1# and 2# DDR3 Write data mirror synchronization; after writing is completed (mark 106 in the figure), enter the IDLE state;

4)当1# DDR3的写入操作<WRITE n>(写n)还没有完成时,第一模块110就送来读出操作<READ n>(读n)(即读取地址与写入地址相同)时,启动读取内部缓存(图中标记103),进行读取转接;完成读取后,进入2#DDR3的数据写入(图中105),完成1#、2#二套DDR3的写入数据镜像同步;4) When the write operation <WRITE n> (write n) of 1# DDR3 has not been completed, the first module 110 just sends the read operation <READ n> (read n) (that is, the read address and the write address When the same), start to read the internal cache (mark 103 in the figure), and perform a read transfer; after completing the reading, enter the data writing of 2#DDR3 (105 in the figure), and complete the two sets of DDR3 of 1# and 2# The write data mirroring synchronization;

5)当1# DDR3的写入操作<WRITE n>(写n)完成时还没有接收到第一模块110送来的读取命令,进行2#DDR3数据写入(图中标记104),即完成1#、2#二套DDR3的写入数据镜像同步;写入完成后(图中标记106),进入空闲<IDLE>状态。5) When the write operation <WRITE n> (write n) of 1# DDR3 is completed, the read command sent by the first module 110 has not been received yet, and 2#DDR3 data is written (mark 104 in the figure), that is Complete 1#, 2# two sets of DDR3 writing data mirror synchronization; after writing is completed (marked 106 in the figure), enter the idle <IDLE> state.

根据SDRAM访问速率,第二模块选择突发传输周期值和位宽,以应对不同的需求。According to the SDRAM access rate, the second module selects the value of the burst transfer period and the bit width to meet different requirements.

在一个实施例中,可以增大DDR3 SDRAM存储器侧的位宽、减小BL(突发传输周期)值,来减少数据传输时间,使读取数据转接获得更多的处理时间,正确完成转接。In one embodiment, the bit width of the DDR3 SDRAM memory side can be increased, and the BL (burst transfer period) value can be reduced to reduce the data transfer time, so that the read data transfer can obtain more processing time, and the transfer can be completed correctly. catch.

图11是增大位宽降低BL减少数据传输时间。如图11所示,例如,SDRAM控制器数据位宽8比特位宽、突发长度BL=8、CL=3、时钟频率100MHz,即从SDRAM控制器的READ命令到送回数据有30ns时间。DDR3 SDRAM侧采取时钟速率800MHz,CL=10。如果BL=8,不能够在SDRAM控制器要求的30ns内完成转接,需要把第二模块和PHY模块的位宽增大为16比特、BL降低为4,减少了数据传输时间,就能够在30ns内完成转接,且总的数据比特数相同,正确实现。这种做法适用于SDRAM访问速率较高的场景。Figure 11 is to increase the bit width and reduce the BL to reduce the data transmission time. As shown in FIG. 11 , for example, the data width of the SDRAM controller is 8 bits, the burst length BL=8, CL=3, and the clock frequency is 100 MHz, that is, there is 30 ns time from the READ command of the SDRAM controller to the return of data. The DDR3 SDRAM side adopts a clock rate of 800MHz, CL=10. If BL=8, the transfer cannot be completed within the 30ns required by the SDRAM controller. It is necessary to increase the bit width of the second module and the PHY module to 16 bits, and reduce the BL to 4, which reduces the data transmission time and can be used in The transfer is completed within 30ns, and the total number of data bits is the same, which is correctly implemented. This approach is suitable for scenarios with a high SDRAM access rate.

在另一个实施例中,在满足转接时间的情况下,减小DDR3 SDRAM存储器的位宽,增加BL值,降低成本。图12是减少位宽增大BL的示意图。例如,SDRAM控制器数据位宽32比特位宽、BL=4、CL=3、时钟频率50MHz,即从SDRAM控制器的READ命令到送回数据有60ns时间,DDR3侧采取时钟速率400MHz,CL=6,把位宽减半为16比特、BL增大为8,加上命令转换与数据传输时间,仍然能够在SDRAM控制器要求的60ns内完成转接,且总的数据比特(bit)数相同,正确实现,降低了成本。这种做法适用于SDRAM访问速率较低的场景。In another embodiment, in the case of satisfying the transition time, the bit width of the DDR3 SDRAM memory is reduced, the BL value is increased, and the cost is reduced. FIG. 12 is a schematic diagram of reducing bit width and increasing BL. For example, the data bit width of the SDRAM controller is 32 bits wide, BL=4, CL=3, and the clock frequency is 50MHz, that is, there is 60ns time from the READ command of the SDRAM controller to sending back the data, and the DDR3 side adopts a clock rate of 400MHz, and CL= 6. The bit width is halved to 16 bits, BL is increased to 8, plus the command conversion and data transmission time, the transfer can still be completed within 60ns required by the SDRAM controller, and the total number of data bits (bits) is the same , implemented correctly, reduces costs. This approach is suitable for scenarios with low SDRAM access rates.

图13为本发明另一实施例的SDRAM桥接电路的示意图。如图13所示,SDRAM桥接电路包括第三模块220和DDR3 PHY模块130。与图1所示的SDRAM桥接电路相比,第一模块110和第二模块120由一个第三模块220代替。在第三模块220,提供了与SDRAM随路时钟同步的工作时钟和使能脉冲,在使能脉冲的控制下用该工作时钟采集SDRAM控制器信号,而不直接使用SDRAM同步时钟。第三模块220解析SDRAM控制器送来的访问命令,并且完成与外部SDRAM控制器之间的信号收发。具体地说,第三模块220在高频时钟的控制下解析访问命令,并且将解析后的访问命令和待写入的数据转换为DDR3 PHY可接受的格式和时序。DDR3 PHY模块130接收第三模块220送来的命令和写入数据,送给外部DDR3 SDRAM存储器;同时接收从外部DDR3 SDRAM存储器读取的数据,发送给第三模块220。FIG. 13 is a schematic diagram of an SDRAM bridge circuit according to another embodiment of the present invention. As shown in FIG. 13 , the SDRAM bridge circuit includes a third module 220 and a DDR3 PHY module 130. Compared with the SDRAM bridge circuit shown in FIG. 1 , the first module 110 and the second module 120 are replaced by a third module 220 . In the third module 220, a working clock and an enabling pulse synchronous with the SDRAM accompanying clock are provided, and the working clock is used to collect SDRAM controller signals under the control of the enabling pulse instead of directly using the SDRAM synchronous clock. The third module 220 parses the access command sent by the SDRAM controller, and completes the sending and receiving of signals with the external SDRAM controller. Specifically, the third module 220 parses the access command under the control of the high-frequency clock, and converts the parsed access command and the data to be written into a format and timing acceptable to the DDR3 PHY. The DDR3 PHY module 130 receives the command and write data sent by the third module 220, and sends it to the external DDR3 SDRAM memory; at the same time, it receives the data read from the external DDR3 SDRAM memory, and sends it to the third module 220.

本发明除上述列举的SDRAM转接DDR3 SDRAM的桥接方法以外,在满足转接时间的情况下,同样适用于SDRAM转接至DDR2 SDRAM、DDR SDRAM转接至DDR2 SDRAM、DDR SDRAM转接至DDR3 SDRAM的桥接。只要SDRAM控制器或DDRPHY送出的访问命令转换给DDR2/DDR3 PHY有足够的时间相应的访问DDR2/DDR3 SDRAM、DDR2/DDR3 PHY读取DDR2/DDR3 SDRAM数据能在SDRAM控制器/DDR PHY约定的CL时间内送回,就能正确的实现桥接。In addition to the bridging method for transferring SDRAM to DDR3 SDRAM listed above, the present invention is also applicable to transferring SDRAM to DDR2 SDRAM, DDR SDRAM to DDR2 SDRAM, and DDR SDRAM to DDR3 SDRAM when the transfer time is satisfied. of bridging. As long as the access command sent by SDRAM controller or DDRPHY is converted to DDR2/DDR3 PHY, there is enough time to access DDR2/DDR3 SDRAM accordingly, and DDR2/DDR3 PHY can read DDR2/DDR3 SDRAM data in the CL agreed by SDRAM controller/DDR PHY Send it back within a certain time, and the bridge can be correctly realized.

本发明通过设计一种SDRAM桥接电路,可以让SDRAM控制器通过该桥接电路,实现对DDR3 SDRAM的访问,进行数据存取;相比更换或重新开发集成SDRAM控制器的芯片,电路改动小,开发周期短,成本低,而且与原有系统很好的兼容。By designing an SDRAM bridge circuit, the present invention can allow the SDRAM controller to realize access to DDR3 SDRAM and perform data access through the bridge circuit; compared with replacing or redeveloping the integrated SDRAM controller chip, the circuit changes little and is easy to develop. The cycle is short, the cost is low, and it is well compatible with the original system.

以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The specific embodiments described above have further described the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above descriptions are only specific embodiments of the present invention and are not intended to limit the scope of the present invention. Protection scope, within the spirit and principles of the present invention, any modification, equivalent replacement, improvement, etc., shall be included in the protection scope of the present invention.

Claims (11)

1. a SDRAM bridgt circuit is characterized in that comprising first module, second module and PHY module; Wherein, The SDRAM visit order that the first module parses controller is sent here; Second module converts the SDRAM visit order the acceptable order of into PHY module, and the PHY module is utilized the acceptable command access storer of said PHY module, and wherein storer has different SDRAM types with controller.
2. SDRAM bridgt circuit as claimed in claim 1, it is characterized in that first module controller with the road clock control under work, second module is worked down in the control of the interface clock of PHY module regulation.
3. SDRAM bridgt circuit as claimed in claim 1; It is characterized in that first module and second module merge into three module; Three module with controller with the control of the work clock of road clock synchronization under resolve visit order, and the visit order after will resolving converts the acceptable order of DDR3PHY into.
4. like the described SDRAM bridgt circuit of one of claim 1-3, it is characterized in that first module carries out command analysis with above-mentioned control signal according to truth table.
5. like the described SDRAM bridgt circuit of one of claim 1-3, it is characterized in that the PHY module comprises a PHY unit.
6. SDRAM bridgt circuit as claimed in claim 5; It is characterized in that the PHY module comprises at least one the 2nd PHY unit and buffer circuit, said second module selects a PHY unit to transfer from a PHY unit and said at least one the 2nd PHY unit.
7. SDRAM bridgt circuit as claimed in claim 6 is characterized in that second module comprises state machine, and second module is coordinated the work of a PHY unit and the 2nd PHY unit according to state machine.
8. SDRAM bridgt circuit as claimed in claim 7 is characterized in that when second module receives the SDRAM visit order of write operation, selects a PHY unit to carry out write operation, writes data simultaneously and deposits inner buffer in; When second module receives the SDRAM visit order that reads the address read operation different with writing the address and said write operation when also not accomplishing, select the 2nd PHY unit to carry out read operation.
9. SDRAM bridgt circuit as claimed in claim 7 is characterized in that when second module receives the SDRAM visit order of write operation, selects a PHY unit to carry out write operation, writes data simultaneously and deposits inner buffer in; When second module receives the SDRAM visit order that reads the address read operation identical with writing the address and said write operation when also not accomplishing, start and read inner buffer; And after completion was read, the data in the inner buffer write the 2nd PHY unit.
10. like the described SDRAM bridgt circuit of one of claim 1-3, it is characterized in that the access rate according to SDRAM, second module is selected burst transfer periodic quantity and bit wide.
11. like the described SDRAM bridgt circuit of one of claim 1-3, it is characterized in that controller is sdram controller or DDR PHY device, storer is DDR2 SDRAM or DDR3 SDRAM.
CN201110302138.3A 2011-09-28 2011-09-28 SDRAM bridge circuit Expired - Fee Related CN102522113B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110302138.3A CN102522113B (en) 2011-09-28 2011-09-28 SDRAM bridge circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110302138.3A CN102522113B (en) 2011-09-28 2011-09-28 SDRAM bridge circuit

Publications (2)

Publication Number Publication Date
CN102522113A true CN102522113A (en) 2012-06-27
CN102522113B CN102522113B (en) 2014-09-17

Family

ID=46293006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110302138.3A Expired - Fee Related CN102522113B (en) 2011-09-28 2011-09-28 SDRAM bridge circuit

Country Status (1)

Country Link
CN (1) CN102522113B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761205A (en) * 2014-01-03 2014-04-30 北京控制工程研究所 Storage bridging method suitable for SPARC spatial processor
CN104333369A (en) * 2014-07-08 2015-02-04 北京芯诣世纪科技有限公司 DDR3 PHY SSTL15 output drive circuit

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983329A (en) * 2005-12-15 2007-06-20 辉达公司 Apparatus, system, and method for graphics memory hub
US20090089517A1 (en) * 2007-09-27 2009-04-02 Renesas Technology Corp. Memory control device and semiconductor processing apparatus
CN101408902A (en) * 2008-10-06 2009-04-15 南京大学 Method for acquiring and transporting high speed data based on FPGA and USB bus
CN102177549A (en) * 2008-10-14 2011-09-07 莫塞德技术公司 A composite memory having a bridging device for connecting discrete memory devices to a system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983329A (en) * 2005-12-15 2007-06-20 辉达公司 Apparatus, system, and method for graphics memory hub
US20090089517A1 (en) * 2007-09-27 2009-04-02 Renesas Technology Corp. Memory control device and semiconductor processing apparatus
CN101408902A (en) * 2008-10-06 2009-04-15 南京大学 Method for acquiring and transporting high speed data based on FPGA and USB bus
CN102177549A (en) * 2008-10-14 2011-09-07 莫塞德技术公司 A composite memory having a bridging device for connecting discrete memory devices to a system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761205A (en) * 2014-01-03 2014-04-30 北京控制工程研究所 Storage bridging method suitable for SPARC spatial processor
CN103761205B (en) * 2014-01-03 2016-03-30 北京控制工程研究所 A kind of storer bridging method being applicable to SPARC spatial processor
CN104333369A (en) * 2014-07-08 2015-02-04 北京芯诣世纪科技有限公司 DDR3 PHY SSTL15 output drive circuit
CN104333369B (en) * 2014-07-08 2017-08-29 北京芯诣世纪科技有限公司 A kind of DDR3 PHY SSTL15 output driving circuits

Also Published As

Publication number Publication date
CN102522113B (en) 2014-09-17

Similar Documents

Publication Publication Date Title
US6795899B2 (en) Memory system with burst length shorter than prefetch length
JP3969547B2 (en) Semiconductor memory device and memory system using the same
CN101149961B (en) Apparatus and method for controlling memory interface
TWI433150B (en) Apparatus and method for data strobe and timing variation detection of an sdram interface
CN113553277A (en) High-throughput and low-delay PHY (physical layer) interface circuit device of DDR5SDRAM (synchronous dynamic random access memory)
CN101692346B (en) Memory data sampling device and sampling controller
KR100909805B1 (en) Multiport memory device
US7835219B2 (en) Multi-port memory device
CN105335326A (en) PCIE-SATA interface array device based on FPGA
CN111143264B (en) APB bridge for realizing synchronous mode, APB bridge for realizing asynchronous mode and control method thereof
CN104599227A (en) DDR3 arbitration controller and method applied to high-speed CCD data storage
US20210041932A1 (en) Optimizing power in a memory device
US7969799B2 (en) Multiple memory standard physical layer macro function
CN104978150B (en) Control method of memory device, and memory system
WO2009049399A1 (en) Single-strobe operation of memory devices
US8593902B2 (en) Controller and access method for DDR PSRAM and operating method thereof
CN111966628B (en) Multi-core combined type large-capacity data synchronous storage method
CN104615386A (en) Off-core cache device
CN102789424B (en) External extended DDR2 (Double Data Rate 2) read-write method on basis of FPGA (Field Programmable Gate Array) and external extended DDR2 particle storage on basis of FPGA
CN102522113B (en) SDRAM bridge circuit
EP2466414B1 (en) Quad-data rate controller and realization method thereof
CN105825880A (en) Access control method used for DDR controller, and apparatus and circuit thereof
CN101510182A (en) Low speed DMA interface chip system and internal memory access method
Sreehari et al. AHB DDR SDRAM enhanced memory controller
Wang et al. Design and implementation of DDR SDRAM controller based on FPGA in satellite navigation system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140917

Termination date: 20190928