CN108228492B - Multi-channel DDR interleaving control method and device - Google Patents
Multi-channel DDR interleaving control method and device Download PDFInfo
- Publication number
- CN108228492B CN108228492B CN201611192741.XA CN201611192741A CN108228492B CN 108228492 B CN108228492 B CN 108228492B CN 201611192741 A CN201611192741 A CN 201611192741A CN 108228492 B CN108228492 B CN 108228492B
- Authority
- CN
- China
- Prior art keywords
- read
- slave
- write
- address
- interleaving
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/1605—Handling requests for interconnection or transfer for access to memory bus based on arbitration
- G06F13/1647—Handling requests for interconnection or transfer for access to memory bus based on arbitration with interleaved bank access
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/1668—Details of memory controller
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Detection And Prevention Of Errors In Transmission (AREA)
- Error Detection And Correction (AREA)
Abstract
本发明公开了一种多通道DDR交织控制方法及装置,其中,所述方法包括:接收主机发送的写数据和第一写地址;根据预先设置的交织控制配置信息,确定所述第一写地址对应的第二写地址和所述第一写地址对应的从机的标识信息;根据所述从机的标识信息,将所述写数据和所述第二写地址发送给所述从机;接收所述从机发送的写反馈消息,其中,所述写反馈消息用于表征所述写数据是否写成功;将所述写反馈消息发送给所述主机。
The invention discloses a multi-channel DDR interleaving control method and device, wherein the method includes: receiving write data and a first write address sent by a host; and determining the first write address according to preset interleaving control configuration information The corresponding second write address and the identification information of the slave corresponding to the first write address; according to the identification information of the slave, send the write data and the second write address to the slave; receive The write feedback message sent by the slave, wherein the write feedback message is used to indicate whether the write data is successfully written; the write feedback message is sent to the host.
Description
技术领域technical field
本发明涉及存储技术领域,尤其涉及一种多通道DDR交织控制方法及装置。The present invention relates to the field of storage technology, and in particular, to a multi-channel DDR interleaving control method and device.
背景技术Background technique
现在的芯片一般都集成了中央处理器(Central Processor Unit,CPU)、直接存储器访问(Direct Memory Access,DMA)、总线互联、存储器、高速外设和低速外设等组件。随着集成电路工艺的不断提高,芯片的运行频率和性能要求也越来越高,芯片需要的带宽也越来越大,因此常规的双倍速率同步动态随机存储器(Double Data Rate SynchronousDynamic Random Access Memory,DDR SDRAM)子系统已经无法满足系统高带宽的需求,越来越多的片上系统(System On Chip,SoC)采用双(多)通道DDR作为动态存储的解决方案,与传统单通道DDR相比具有理论带宽高、传输效率高等特点。Today's chips generally integrate components such as a central processing unit (Central Processor Unit, CPU), direct memory access (Direct Memory Access, DMA), bus interconnection, memory, high-speed peripherals and low-speed peripherals. With the continuous improvement of integrated circuit technology, the operating frequency and performance requirements of the chip are also getting higher and higher, and the bandwidth required by the chip is also increasing. Therefore, the conventional Double Data Rate Synchronous Dynamic Random Access Memory , DDR SDRAM) subsystem has been unable to meet the high bandwidth requirements of the system, more and more systems on chip (System On Chip, SoC) use dual (multi) channel DDR as a dynamic storage solution, compared with traditional single channel DDR It has the characteristics of high theoretical bandwidth and high transmission efficiency.
目前实现多通道DDR存储系统的数据流多使用的片上网络(Network On Chip,NOC)产品进行传输交织控制,该产品具有参数丰富可配置、命令调度能力强等特点,但也存在授权费用高、命令延迟大、面积大、交织方式固定等缺点。At present, the Network On Chip (NOC) product, which is widely used in data streams of multi-channel DDR storage systems, performs transmission interleaving control. This product has the characteristics of rich and configurable parameters, strong command scheduling ability, etc., but it also has high licensing costs, The disadvantage is that the command delay is large, the area is large, and the interleaving mode is fixed.
发明内容SUMMARY OF THE INVENTION
为解决现有存在的技术问题,本发明实施例提供一种多通道DDR交织控制方法及装置,解决了现有技术中多通道DDR存储器交织控制装置延迟大、面积、交织方式固定的问题,达到了延迟小、面积小、交织方式灵活可配置、功耗低的技术效果。In order to solve the existing technical problems, the embodiments of the present invention provide a multi-channel DDR interleaving control method and device, which solve the problems of large delay, area, and fixed interleaving mode of the multi-channel DDR memory interleaving control device in the prior art, so as to achieve The technical effects of small delay, small area, flexible and configurable interleaving mode, and low power consumption are achieved.
为达到上述目的,本发明实施例的技术方案是这样实现的:In order to achieve the above-mentioned purpose, the technical scheme of the embodiment of the present invention is realized as follows:
第一方面,本发明实施例提供一种多通道DDR交织控制方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a multi-channel DDR interleaving control method, the method includes:
接收主机发送的写数据和第一写地址;其中,所述主机为总线互联模块;Receive the write data and the first write address sent by the host; wherein, the host is a bus interconnection module;
根据预先设置的交织控制配置信息,确定所述第一写地址对应的第二写地址和所述第一写地址对应的从机的标识信息;Determine the second write address corresponding to the first write address and the identification information of the slave corresponding to the first write address according to the preset interleaving control configuration information;
根据所述从机的标识信息,将所述写数据和所述第二写地址发送给所述从机;其中,所述从机为DDR控制器;According to the identification information of the slave, the write data and the second write address are sent to the slave; wherein the slave is a DDR controller;
接收所述从机发送的写反馈消息,其中,所述写反馈消息用于表征所述写数据是否写成功;receiving a write feedback message sent by the slave, wherein the write feedback message is used to represent whether the write data is successfully written;
将所述写反馈消息发送给所述主机。The write feedback message is sent to the host.
第二方面,本发明实施例提供一种多通道DDR交织控制方法,所述方法包括:In a second aspect, an embodiment of the present invention provides a multi-channel DDR interleaving control method, the method includes:
接收主机发送的第一读地址;Receive the first read address sent by the host;
根据预先设置的交织控制配置信息,确定所述第一读地址对应的第二读地址和所述第一读地址对应的第一从机的标识信息;Determine the second read address corresponding to the first read address and the identification information of the first slave corresponding to the first read address according to the preset interleaving control configuration information;
根据所述第一从机的标识信息,将所述第二读地址发送给第一从机;sending the second read address to the first slave according to the identification information of the first slave;
接收所述第一从机发送的第一读数据和第一读响应消息;receiving the first read data and the first read response message sent by the first slave;
将所述第一读数据和第一读响应消息发送给所述主机。Send the first read data and the first read response message to the host.
第三方面,本发明实施例提供一种多通道DDR交织控制装置,所述装置包括:In a third aspect, an embodiment of the present invention provides a multi-channel DDR interleaving control device, the device comprising:
第一接收模块,用于接收主机发送的写数据和第一写地址;其中,所述主机为总线互联模块;a first receiving module, configured to receive the write data and the first write address sent by the host; wherein, the host is a bus interconnection module;
第一确定模块,用于根据预先设置的交织控制配置信息,确定所述第一写地址对应的第二写地址和所述第一写地址对应的从机的标识信息;a first determining module, configured to determine, according to preset interleaving control configuration information, the second write address corresponding to the first write address and the identification information of the slave corresponding to the first write address;
第一发送模块,用于根据所述从机的标识信息,将所述写数据和所述第二写地址发送给所述从机;其中,所述从机为DDR控制器;a first sending module, configured to send the write data and the second write address to the slave according to the identification information of the slave; wherein the slave is a DDR controller;
第二接收模块,用于接收所述从机发送的写反馈消息,其中,所述写反馈消息用于表征所述写数据是否写成功;a second receiving module, configured to receive a write feedback message sent by the slave, wherein the write feedback message is used to represent whether the write data is successfully written;
第二发送模块,用于将所述写反馈消息发送给所述主机。A second sending module, configured to send the write feedback message to the host.
第四方面,本发明实施例提供一种多通道DDR交织控制装置,所述装置包括:In a fourth aspect, an embodiment of the present invention provides a multi-channel DDR interleaving control device, the device comprising:
第三接收模块,用于接收主机发送的第一读地址;The third receiving module is used to receive the first read address sent by the host;
第二确定模块,用于根据预先设置的交织控制配置信息,确定所述第一读地址对应的第二读地址和所述第一读地址对应的第一从机的标识信息;a second determining module, configured to determine, according to preset interleaving control configuration information, the second read address corresponding to the first read address and the identification information of the first slave corresponding to the first read address;
第三发送模块,用于根据所述第一从机的标识信息,将所述第二读地址发送给第一从机;a third sending module, configured to send the second read address to the first slave according to the identification information of the first slave;
第四接收模块,用于接收所述第一从机发送的第一读数据和第一读响应消息;a fourth receiving module, configured to receive the first read data and the first read response message sent by the first slave;
第四发送模块,用于将所述第一读数据和第一读响应消息发送给所述主机。The fourth sending module is configured to send the first read data and the first read response message to the host.
本发明实施例所提供的多通道DDR交织控制方法及装置,通过接收主机发送的写数据和第一写地址,再根据预先设置的交织控制配置信息,确定所述第一写地址对应的第二写地址和所述第一写地址对应的从机的标识信息,然后根据所述从机的标识信息,将所述写数据和所述第二写地址发送给所述从机,并接收所述从机发送的写反馈消息,最后将所述写反馈消息发送给所述主机。由于诸如交织大小、交织方式等交织控制配置信息可以提前进行设置,这样,增加了交织控制的灵活性。In the multi-channel DDR interleaving control method and device provided by the embodiments of the present invention, by receiving the write data and the first write address sent by the host, and then according to preset interleaving control configuration information, the second write address corresponding to the first write address is determined. The write address and the identification information of the slave corresponding to the first write address, and then send the write data and the second write address to the slave according to the identification information of the slave, and receive the The write feedback message sent by the slave is finally sent to the host. Since interleaving control configuration information such as interleaving size and interleaving mode can be set in advance, the flexibility of interleaving control is increased.
附图说明Description of drawings
在附图(其不一定是按比例绘制的)中,相似的附图标记可在不同的视图中描述相似的部件。具有不同字母后缀的相似附图标记可表示相似部件的不同示例。附图以示例而非限制的方式大体示出了本文中所讨论的各个实施例。In the drawings, which are not necessarily to scale, like reference numerals may describe like parts in the different views. Similar reference numbers with different letter suffixes may denote different instances of similar components. The accompanying drawings generally illustrate, by way of example and not limitation, the various embodiments discussed herein.
图1为本发明实施例一多通道DDR交织控制方法的实现流程示意图;1 is a schematic flowchart of an implementation of a multi-channel DDR interleaving control method according to an embodiment of the present invention;
图2为本发明实施例二多通道DDR交织控制方法的实现流程示意图;FIG. 2 is a schematic flowchart of the implementation of a multi-channel DDR interleaving control method according to Embodiment 2 of the present invention;
图3-1为本发明实施例三多通道DDR交织控制装置的组成结构示意图;3-1 is a schematic diagram of the composition and structure of a multi-channel DDR interleaving control device according to Embodiment 3 of the present invention;
图3-2为本发明实施例三多通道DDR交织控制方法的实现流程示意图FIG. 3-2 is a schematic flowchart of the implementation of the third multi-channel DDR interleaving control method according to Embodiment 3 of the present invention
图4为本发明实施例四多通道DDR交织控制装置的组成结构示意图;FIG. 4 is a schematic diagram of the composition and structure of a four-channel DDR interleaving control device according to an embodiment of the present invention;
图5为本发明实施例五多通道DDR交织控制装置的组成结构示意图。FIG. 5 is a schematic diagram of the composition and structure of a multi-channel DDR interleaving control apparatus according to Embodiment 5 of the present invention.
具体实施方式Detailed ways
下面结合附图和具体实施例对本发明的技术方案进一步详细阐述。The technical solutions of the present invention will be further elaborated below with reference to the accompanying drawings and specific embodiments.
实施例一Example 1
为解决背景技术中存在的技术问题,本发明实施例提供一种多通道DDR交织控制方法,应用于多通道DDR,所述多通道DDR至少包括:处理器、交织控制器、一个主机和至少一个从机。图1为本发明实施例一多通道DDR交织控制方法的实现流程示意图,如图1所示,所述方法包括以下步骤:In order to solve the technical problems existing in the background art, an embodiment of the present invention provides a multi-channel DDR interleaving control method, which is applied to a multi-channel DDR. The multi-channel DDR at least includes: a processor, an interleaving controller, a host, and at least one slave. FIG. 1 is a schematic flowchart of an implementation of a multi-channel DDR interleaving control method according to an embodiment of the present invention. As shown in FIG. 1 , the method includes the following steps:
步骤S101,接收主机发送的写数据和第一写地址;Step S101, receiving the write data and the first write address sent by the host;
这里,步骤S101可以是由交织控制装置来实现的,在实际的应用中,该交织控制装置可以为交织控制器。所述主机可以为总线互联模块,也即总线Matrix,目前常用的是网络适配器(Network Interface Card,NIC)400。Here, step S101 may be implemented by an interleaving control apparatus, and in practical applications, the interleaving control apparatus may be an interleaving controller. The host may be a bus interconnection module, that is, a bus Matrix, and currently a network adapter (Network Interface Card, NIC) 400 is commonly used.
步骤S102,根据预先设置的交织控制配置信息,确定所述第一写地址对应的第二写地址和所述第一写地址对应的从机的标识信息;Step S102, according to preset interleaving control configuration information, determine the second write address corresponding to the first write address and the identification information of the slave corresponding to the first write address;
这里,处理器会根据系统的实际使用情况,提前配置交织控制器的一些交织控制配置信息,比如交织大小、非交织地址范围、交织方式等。交织控制器根据预先设置的交织控制配置信息,可以确定出所述第一写地址对应的第二写地址和所述第一写地址对应的从机的标识信息。其中,第二写地址为将第一写地址根据所述交织控制配置信息重新映射得到的写地址,也是写数据要写入的DDR的物理地址。Here, the processor configures some interleaving control configuration information of the interleaving controller in advance according to the actual usage of the system, such as interleaving size, non-interleaving address range, interleaving mode, and the like. The interleaving controller may determine, according to preset interleaving control configuration information, the second write address corresponding to the first write address and the identification information of the slave corresponding to the first write address. The second write address is a write address obtained by remapping the first write address according to the interleaving control configuration information, and is also a physical address of the DDR to which the write data is to be written.
步骤S103,根据所述从机的标识信息,将所述写数据和所述第二写地址发送给所述从机;Step S103, sending the write data and the second write address to the slave according to the identification information of the slave;
这里,所述从机可以为DDR控制器;所述从机接收到所述写数据和所述第二写地址后,根据所述第二写地址将所述写数据写入到DDR存储单元中,并向交织控制器发送写反馈信息。Here, the slave may be a DDR controller; after receiving the write data and the second write address, the slave writes the write data into the DDR memory unit according to the second write address , and send write feedback information to the interleaving controller.
步骤S104,接收所述从机发送的写反馈消息;Step S104, receiving the write feedback message sent by the slave;
这里,所述写反馈消息用于表征所述写数据是否写成功。Here, the write feedback message is used to represent whether the write data is successfully written.
步骤S105,将所述写反馈消息发送给所述主机。Step S105, sending the write feedback message to the host.
这里,交织控制器接收到从机发送的写反馈消息后,将所述写反馈消息发送给所述主机。Here, after receiving the write feedback message sent by the slave, the interleaving controller sends the write feedback message to the host.
在本发明的其他实施例中,所述步骤S105包括:判断写反馈接收逻辑模块是否空闲;In other embodiments of the present invention, the step S105 includes: judging whether the write feedback receiving logic module is idle;
如果所述写反馈接收逻辑模块空闲,将所述写反馈消息发送给所述主机。If the write feedback receiving logic module is idle, send the write feedback message to the host.
如果所述写反馈逻辑模块不空闲,则等待预设的时间后,判断所述写反馈接收逻辑模块是否空闲;If the write feedback logic module is not idle, after waiting for a preset time, determine whether the write feedback receiving logic module is idle;
如果所述写反馈接收逻辑模块空闲,将所述写反馈消息发送给所述主机。If the write feedback receiving logic module is idle, send the write feedback message to the host.
在所述步骤S105之后,所述方法还包括:通过确定写数据通道的带宽信息;确定写命令的响应时延信息;这里,所述写命令的响应时延为从接收到主机发送的写数据和第一写地址到向所述主机发送写反馈消息之间的时间差;存储所述写数据通道的带宽信息和所述写命令的响应时延信息,来检测写数据通路的带宽信息,并记录写命令的响应时延并且在预设的低功耗计时阈值时间内如果没有任何数据或消息传输的时候,关断自身的控制时钟,以降低功耗。After the step S105, the method further includes: by determining the bandwidth information of the write data channel; determining the response delay information of the write command; here, the response delay of the write command is the time from receiving the write data sent by the host. The time difference between the first write address and the sending of the write feedback message to the host; the bandwidth information of the write data channel and the response delay information of the write command are stored to detect the bandwidth information of the write data channel, and record The response delay of the write command and if there is no data or message transmission within the preset low-power timing threshold time, turn off its own control clock to reduce power consumption.
在本发明实施提供的多通道DDR交织控制方法中,通过接收主机发送的写数据和第一写地址,再根据预先设置的交织控制配置信息,确定所述第一写地址对应的第二写地址和所述第一写地址对应的从机的标识信息,然后根据所述从机的标识信息,将所述写数据和所述第二写地址发送给所述从机,并接收所述从机发送的写反馈消息,最后将所述写反馈消息发送给所述主机。由于诸如交织大小、交织方式等交织控制配置信息可以提前进行设置,这样,增加了交织控制的灵活性。并且在预设的低功耗计时阈值时间内如果没有任何数据或消息传输的时候,关断自身的控制时钟,如此能够降低功耗。In the multi-channel DDR interleaving control method provided by the implementation of the present invention, the second write address corresponding to the first write address is determined by receiving the write data and the first write address sent by the host, and then according to preset interleaving control configuration information The identification information of the slave corresponding to the first write address, and then according to the identification information of the slave, the write data and the second write address are sent to the slave, and the slave is received. Send the write feedback message, and finally send the write feedback message to the host. Since interleaving control configuration information such as interleaving size and interleaving mode can be set in advance, the flexibility of interleaving control is increased. In addition, if there is no data or message transmission within the preset low-power timing threshold time, the control clock itself is turned off, which can reduce power consumption.
实施例二Embodiment 2
基于前述的实施例,本发明实施例再提供一种多通道DDR交织控制方法,应用于多通道DDR的交织控制器,所述多通道DDR至少包括:交织控制器、一个主机和至少一个从机。图2为本发明实施例二多通道DDR交织控制方法的实现流程示意图,如图2所示,所述方法包括以下步骤:Based on the foregoing embodiments, an embodiment of the present invention further provides a multi-channel DDR interleaving control method, which is applied to an interleaving controller of a multi-channel DDR, where the multi-channel DDR at least includes: an interleaving controller, a host, and at least one slave . FIG. 2 is a schematic flowchart of an implementation of a multi-channel DDR interleaving control method according to Embodiment 2 of the present invention. As shown in FIG. 2 , the method includes the following steps:
步骤S201,交织控制器接收主机发送的第一读地址;Step S201, the interleaving controller receives the first read address sent by the host;
步骤S202,所述交织控制器根据预先设置的交织控制配置信息,确定所述第一读地址对应的第二读地址和所述第一读地址对应的第一从机的标识信息;Step S202, the interleaving controller determines, according to preset interleaving control configuration information, the second read address corresponding to the first read address and the identification information of the first slave corresponding to the first read address;
这里,处理器会根据系统的实际使用情况,提前配置交织控制器的一些交织控制配置信息,比如交织大小、非交织地址范围、交织方式等。交织控制器根据预先设置的交织控制配置信息,可以确定出所述第一读地址对应的第二读地址和所述第一读地址对应的从机的标识信息。第二读地址为第一读地址根据所述交织控制配置信息重新映射的读地址,也就是要读取的数据所在DDR中的物理地址。Here, the processor configures some interleaving control configuration information of the interleaving controller in advance according to the actual usage of the system, such as interleaving size, non-interleaving address range, interleaving mode, and the like. The interleaving controller may determine, according to preset interleaving control configuration information, the second read address corresponding to the first read address and the identification information of the slave corresponding to the first read address. The second read address is the read address remapped by the first read address according to the interleaving control configuration information, that is, the physical address in the DDR where the data to be read is located.
步骤S203,所述交织控制器根据所述第一从机的标识信息,将所述第二读地址发送给第一从机;Step S203, the interleaving controller sends the second read address to the first slave according to the identification information of the first slave;
这里,所述第一从机接收到所述第二读地址后,按照所述第二读地址从DDR的存储单元中读取出第一读数据,并将所述第一读数据和第一读响应消息发送给所述交织控制器。Here, after receiving the second read address, the first slave reads out the first read data from the storage unit of the DDR according to the second read address, and combines the first read data with the first read data. A read response message is sent to the interleaving controller.
步骤S204,所述交织控制器接收所述第一从机发送的第一读数据和第一读响应消息;Step S204, the interleaving controller receives the first read data and the first read response message sent by the first slave;
步骤S205,所述交织控制器判断是否接收到第二从机发送的第二读数据和第二读响应消息;是则进入步骤S206,否则进入步骤S208;Step S205, the interleaving controller judges whether it has received the second read data and the second read response message sent by the second slave; if yes, go to step S206, otherwise go to step S208;
这里,因为多通道DDR有至少一个从机,当存在多个从机的时候,当有其他从机在同一时刻也要向所述交织控制器发送读数据和读响应消息时(比如是第二从机要向所述交织控制器发送第二读数据和第二读响应消息),需要判断是先将第一读数据和第一读响应消息发送给所述交织控制器,还是先将第二读数据和第二读响应消息发送给所述交织控制器。Here, because the multi-channel DDR has at least one slave, when there are multiple slaves, when other slaves also send read data and read response messages to the interleaving controller at the same time (for example, the second If the slave wants to send the second read data and the second read response message to the interleaving controller), it needs to determine whether to send the first read data and the first read response message to the interleaving controller first, or whether to send the second read data and the first read response message to the interleaving controller first. Read data and a second read response message are sent to the interleaving controller.
步骤S206,所述交织控制器判断所述第一从机等待的时间是否小于等于预设的响应超时阈值;是则进入步骤S207,否则进入步骤S211;Step S206, the interleaving controller judges whether the waiting time of the first slave is less than or equal to a preset response timeout threshold; if yes, then go to step S207, otherwise go to step S211;
步骤S207,所述交织控制器判断所述第一从机的读优先级是否高于第二从机的读优先级;是则,进入步骤S208,否则进入步骤S209;Step S207, the interleaving controller determines whether the read priority of the first slave is higher than the read priority of the second slave; if yes, go to step S208, otherwise go to step S209;
步骤S208,所述交织控制器将所述第一读数据和第一读响应消息发送给所述主机。Step S208, the interleaving controller sends the first read data and the first read response message to the host.
步骤S209,所述交织控制器判断所述第一从机的读优先级与第二从机的读优先级是否相同;是则进入步骤S210,否则进入步骤S211;Step S209, the interleaving controller determines whether the read priority of the first slave is the same as the read priority of the second slave; if so, go to step S210, otherwise go to step S211;
步骤S210,所述交织控制器判断所述第一从机的端口号是否小于所述第二从机的端口号;是则进入步骤S208,否则进入步骤S211;Step S210, the interleaving controller judges whether the port number of the first slave is smaller than the port number of the second slave; if yes, then go to step S208, otherwise go to step S211;
步骤S211,所述交织控制器将所述第二读数据和第二读响应消息发送给所述主机;然后进入步骤S205。Step S211, the interleaving controller sends the second read data and the second read response message to the host; and then goes to step S205.
在本发明实施例中,所述方法还包括:通过确定读数据通道的带宽信息;确定读命令的响应时延信息;这里,所述读命令的响应时延为从接收到主机发送的第一读地址到向所述主机发送完第一读数据和第一读响应消息之间的时间差,也就是从接收到主机发送的第一读地址到向所述主机发送完最后一笔读数据之间的时间差。存储所述读数据通道的带宽信息和所述读命令的响应时延信息,来检测读数据通路的带宽信息,并记录读命令的响应时延。In the embodiment of the present invention, the method further includes: determining the bandwidth information of the read data channel; determining the response delay information of the read command; here, the response delay of the read command is the first time from receiving the first data sent by the host. The time difference between reading the address and sending the first read data to the host and the first read response message, that is, from receiving the first read address sent by the host to sending the last read data to the host. time difference. The bandwidth information of the read data channel and the response delay information of the read command are stored to detect the bandwidth information of the read data channel, and the response delay of the read command is recorded.
在本发明及其他实施例中,所述方法还包括:In the present invention and other embodiments, the method further includes:
如果没有接收到任一从机发送的读数据和读响应消息或写反馈信息,并且也没有接收到主机发送的读地址或写地址或写数据,则启动低功耗计时器开始计时;If the read data and read response message or write feedback information sent by any slave are not received, and the read address or write address or write data sent by the master is not received, the low-power timer is started to start timing;
如果当低功耗计时器的计时时间达到低功耗计时阈值时,仍没有接收到任一从机发送的读数据和读响应消息和/或写反馈消息并且也没有接收到主机发送的读地址或写地址或写数据,则关断自身的控制时钟。If the low-power timer reaches the low-power timer threshold, the read data and read response message and/or write feedback message sent by any slave have not been received and the read address sent by the master has not been received. Or write address or write data, then turn off its own control clock.
这样,在预设的低功耗计时阈值时间内如果没有读请求或者写请求并且没有正在进行的读写操作,关断自身的控制时钟,以降低功耗。In this way, if there is no read request or write request and there is no ongoing read and write operation within the preset low power consumption timing threshold time, the control clock of itself is turned off to reduce power consumption.
在本发明实施例提供的多通道DDR交织控制方法中,通过接收主机发送的第一读地址,再根据预先设置的交织控制配置信息,确定所述第一读地址对应的第二读地址和所述第一读地址对应的第一从机的标识信息,然后再根据所述第一从机的标识信息,将所述第二读地址发送给第一从机,接收所述第一从机发送的第一读数据和第一读响应消息,并将所述第一读数据和第一读响应消息发送给所述主机。由于诸如交织大小、交织方式等交织控制配置信息可以提前进行设置,这样,增加了交织控制的灵活性。并且在预设的低功耗计时阈值时间内如果没有任何数据或消息传输的时候,关断自身的控制时钟,如此能够降低功耗。In the multi-channel DDR interleaving control method provided by the embodiment of the present invention, by receiving the first read address sent by the host, and then according to preset interleaving control configuration information, the second read address corresponding to the first read address and all The identification information of the first slave corresponding to the first read address, and then according to the identification information of the first slave, the second read address is sent to the first slave, and received from the first slave. the first read data and the first read response message, and send the first read data and the first read response message to the host. Since interleaving control configuration information such as interleaving size and interleaving mode can be set in advance, the flexibility of interleaving control is increased. In addition, if there is no data or message transmission within the preset low-power timing threshold time, the control clock itself is turned off, which can reduce power consumption.
实施例三Embodiment 3
本发明实施例先提供一种多通道DDR的交织控制装置,基于所述交织控制装置本发明实施例又提供了一种多通道DDR的交织控制方法。Embodiments of the present invention first provide an interleaving control device for multi-channel DDR, and based on the interleaving control device, embodiments of the present invention further provide an interleaving control method for multi-channel DDR.
图3-1为本发明实施例三多通道DDR交织控制装置的组成结构示意图,如图3-1所示,所述装置包括:读数据、读响应控制301、读地址映射控制302、写地址映射、写数据、写反馈控制303、总线监控304和寄存器配置305,其中:Figure 3-1 is a schematic structural diagram of a multi-channel DDR interleaving control device according to Embodiment 3 of the present invention. As shown in Figure 3-1, the device includes: read data, read
所述读数据、读响应控制301,用于将各从机返回的读数据、读响应做判决后返回给主机。The read data and read
所述读地址映射控制302,用于按照交织配置将主机发送过来的读地址映射到相应的从机。The read
所述写地址映射、写数据、写反馈控制303,用于按照交织配置将主机发送过来的写地址映射到相应的从机,并将写数据发送到对应地址的从机,且从机接收写反馈给主机。The write address mapping, write data, and write
所述总线监控304,检测读数据通路、写数据通路的带宽信息、多个读写命令同时执行的信息(outstanding信息),并记录读写命令的各自平均响应延时,这些信息可以存在寄存器配置105供处理器获取。The
所述寄存器配置305:完成交织控制的各项配置,包括交织大小、交织方式、非交织区域、读数据通道超时阈值、忽略交织控制、低功耗计时阈值等,寄存总线监测信息。The register configuration 305: Complete various configurations of interleaving control, including interleaving size, interleaving mode, non-interleaving area, read data channel timeout threshold, ignore interleaving control, low power consumption timing threshold, etc., and register bus monitoring information.
根据以上多通道DDR控制装置的组成结构的说明可以看出,本发明实施例提供的多通道DDR控制装置,主要有以下功能:According to the above description of the composition of the multi-channel DDR control device, it can be seen that the multi-channel DDR control device provided by the embodiment of the present invention mainly has the following functions:
(1)交织控制器配置:完成交织控制的各项配置,包括交织大小、交织方式、非交织区域、读数据通道超时阈值、忽略交织控制、低功耗计时阈值等。(1) Interleaving controller configuration: Complete various configurations of interleaving control, including interleaving size, interleaving mode, non-interleaving area, read data channel timeout threshold, ignoring interleaving control, and low-power timing threshold.
(2)写通道控制:完成写通道地址映射,写优先级寄存,改进的微控制器总线架构(Advanced Microcontroller Bus Architecture,AMBA),改进的高级的可扩展接口(Advanced eXtensible Interface,AXI)写标识(Identification,ID)寄存,写数据发送,写反馈接收。(2) Write channel control: complete write channel address mapping, write priority register, improved microcontroller bus architecture (Advanced Microcontroller Bus Architecture, AMBA), improved Advanced eXtensible Interface (Advanced eXtensible Interface, AXI) write identification (Identification, ID) register, send write data, receive write feedback.
(3)读通道控制:完成读通道地址映射,读优先级寄存,AMBA、AXI协议读ID寄存,读数据、读响应返回控制。(3) Read channel control: complete read channel address mapping, read priority register, AMBA, AXI protocol read ID register, read data, read response return control.
(4)读数据、读响应返回控制:根据读优先级有高到低向主机返回读数据,优先级相同则根据从机端口序号顺序有低到高返回读数据,如果某个从机占用读数据通道时间超过读数据通道超时阈值,则响应该从机以外的其他从机的读数据。(4) Read data and read response return control: Return read data to the host according to the read priority from high to low. If the priority is the same, the read data is returned from low to high according to the sequence of the slave port serial number. If a slave occupies the read data If the data channel time exceeds the read data channel timeout threshold, it will respond to the read data of other slaves except the slave.
(5)低功耗控制:在一段时间没有读请求或者写请求并且没有正在进行的读写操作,则自动关断交织控制器时钟。(5) Low power consumption control: If there is no read request or write request for a period of time and there is no ongoing read and write operation, the clock of the interleaving controller is automatically turned off.
(6)总线监控:监控总线的带宽信息和传输延时信息。(6) Bus monitoring: monitor the bandwidth information and transmission delay information of the bus.
基于所述多通道DDR交织控制装置,本发明实施例再提供一种多通道DDR交织控制方法,图3-2为本发明实施例三多通道DDR交织控制方法的实现流程示意图,如图3-2所示,所述方法包括以下步骤:Based on the multi-channel DDR interleaving control device, an embodiment of the present invention further provides a multi-channel DDR interleaving control method. FIG. 3-2 is a schematic diagram of the implementation flow of the multi-channel DDR interleaving control method according to the third embodiment of the present invention, as shown in FIG. 3- 2, the method includes the following steps:
步骤S301,处理器配置交织控制器的寄存器,如交织大小的寄存器、交织方式的寄存器、非交织地址范围的寄存器等;Step S301, the processor configures the registers of the interleaving controller, such as the registers of the interleaving size, the registers of the interleaving mode, the registers of the non-interleaving address range, etc.;
步骤S302,主机发送写地址、写数据到所述交织控制器;Step S302, the host sends a write address and write data to the interleaving controller;
步骤S303,所述交织控制器根据设置好的交织大小、交织方式、非交织地址范围等将写地址映射到相应从机,并发送写数据到该从机;Step S303, the interleaving controller maps the write address to the corresponding slave according to the set interleaving size, interleaving mode, non-interleaving address range, etc., and sends write data to the slave;
步骤S304,交织控制器接收该从机返回的写反馈;Step S304, the interleaving controller receives the write feedback returned by the slave;
步骤S305,所述交织控制器判断写反馈接收逻辑是否正忙;Step S305, the interleaving controller judges whether the write feedback receiving logic is busy;
步骤S306,如果写反馈接收逻辑空闲,则所述交织控制器将写反馈返回给主机;Step S306, if the write feedback receiving logic is idle, the interleaving controller returns the write feedback to the host;
步骤S307,如果写反馈接收逻辑正忙,则等待空闲后再回到步骤S305;Step S307, if the write feedback receiving logic is busy, wait for idle time before returning to step S305;
步骤S308,主机发送读地址到所述交织控制器;Step S308, the host sends a read address to the interleaving controller;
步骤S309,所述交织控制器根据设置好的交织大小、交织方式、非交织地址范围等将读地址映射到相应从机;Step S309, the interleaving controller maps the read address to the corresponding slave according to the set interleaving size, interleaving mode, non-interleaving address range, etc.;
步骤S310,所述交织控制器接收该从机返回的读数据和读响应;Step S310, the interleaving controller receives the read data and the read response returned by the slave;
步骤S311,所述交织控制器判断同一时刻是否有其他从机返回读数据和读响应;Step S311, the interleaving controller judges whether there are other slaves returning read data and read responses at the same time;
步骤S312,如果同一时刻有其他从机返回读数据和读响应,则所述交织控制器判断该从机等待的时间是否小于等于响应超时阈值;是则进入步骤S313,否则进入步骤S316;Step S312, if there are other slaves returning read data and read responses at the same time, the interleaving controller determines whether the waiting time of the slave is less than or equal to the response timeout threshold; if so, go to step S313, otherwise go to step S316;
步骤S313,所述交织控制器判断该从机的读优先级是否比其他从机的读优先级高;是则进入步骤S314,否则进入步骤S315;Step S313, the interleaving controller judges whether the read priority of the slave is higher than that of other slaves; if yes, then go to step S314, otherwise go to step S315;
步骤S314,所述交织控制器返回读数据和读响应到主机;Step S314, the interleaving controller returns read data and read response to the host;
步骤S315,所述交织控制器判断该从机与其他从机是否优先级相同并且从机端口号小于其他从机;是则进入步骤S314,否则进入步骤S316;Step S315, the interleaving controller judges whether the slave has the same priority as other slaves and the slave port number is smaller than that of the other slaves; if so, go to step S314, otherwise go to step S316;
步骤S316,所述交织控制器等待其他从机将读数据和读响应返回给主机后,再回到步骤S311。Step S316, the interleaving controller waits for other slaves to return read data and read responses to the host, and then returns to step S311.
这里,交织控制器可重复步骤S302-S307进行写操作,重复步骤S308-S316进行读操作。Here, the interleaving controller may repeat steps S302-S307 to perform a write operation, and repeat steps S308-S316 to perform a read operation.
在本发明实施例提供的多通道DDR交织控制方法中,处理器提前配置交织控制器的交织大小、非交织地址范围、交织方式等;交织大小可以为64字节(Byte,B)、128B、256B、512B、1千字节(Kilo Byte,KB)、2KB、4KB;非交织地址范围为一段连续地址(KB对齐),可以约定该地址只会映射到固定的从机,不做交织访存;交织方式约定为交织地址范围内不同的交织地址映射形式,交织方式在不同应用场景下的带宽利用率不同。In the multi-channel DDR interleaving control method provided by the embodiment of the present invention, the processor configures the interleaving size, non-interleaving address range, interleaving mode, etc. of the interleaving controller in advance; the interleaving size may be 64 bytes (Byte, B), 128 B, 256B, 512B, 1 kilobyte (Kilo Byte, KB), 2KB, 4KB; the non-interleaving address range is a continuous address (KB alignment), it can be agreed that the address will only be mapped to a fixed slave, without interleaving memory access ; The interleaving mode is agreed to be different interleaving address mapping forms within the interleaving address range, and the bandwidth utilization rate of the interleaving mode in different application scenarios is different.
写地址数据流根据交织设置发送至相应从机DDR写通道,根据写地址的映射发送写数据到从机,从机侧将写反馈发送给主机;The write address data stream is sent to the corresponding slave DDR write channel according to the interleaving setting, and the write data is sent to the slave according to the mapping of the write address, and the slave side sends the write feedback to the host;
读地址数据流根据交织设置发送至相应从机DDR读通道,从机侧接收读数据并按照一定的次序反馈给主机,从机侧将读响应和读数据发送给主机。The read address data stream is sent to the corresponding slave DDR read channel according to the interleaving setting. The slave side receives the read data and feeds it back to the host in a certain order. The slave side sends the read response and read data to the host.
其中,写通道包含:1,写地址通道:主机发送写地址到交织控制器,交织控制器根据交织配置,完成地址映射并发送映射后的写地址到相应从机;2,写数据通道:根据映射后的写地址,发送写数据到相应从机;3,写反馈通道:从机根据写地址将写反馈返回给主机。Among them, the write channel includes: 1, write address channel: the host sends the write address to the interleaving controller, the interleaving controller completes the address mapping and sends the mapped write address to the corresponding slave according to the interleaving configuration; 2, the write data channel: according to the After mapping the write address, send the write data to the corresponding slave; 3. Write feedback channel: the slave returns the write feedback to the host according to the write address.
读通道包括:1,读地址通道:主机发送读地址到交织控制器,交织控制器根据交织配置,完成地址映射并发送映射后的读地址到相应从机;2,读数据、读响应通道:从机接收读数据,并根据各个从机读数据的优先级、从机的读数据超时计时器、各个从机的轮询响应控制等情况依次返回读数据、读响应。The read channel includes: 1. Read address channel: the host sends the read address to the interleaving controller, and the interleaving controller completes the address mapping according to the interleaving configuration and sends the mapped read address to the corresponding slave; 2. Read data and read response channels: The slave receives the read data, and returns the read data and read response in turn according to the priority of the read data of each slave, the read data timeout timer of the slave, and the polling response control of each slave.
在本发明实施例中,交织控制器的交织大小、交织方式、非交织地址范围等参数可以提前进行配置,增加了灵活性。完成交织配置后,主机就可以通过交织控制器完成对从机多通道DDR进行读写交织访问,读写的信息按照规则到达从机并返回相关信息到主机。本发明实施例提供的交织控制方法及控制装置具有延迟小、面积小、交织方式灵活可配置、功耗低等特点。In this embodiment of the present invention, parameters such as the interleaving size, interleaving mode, and non-interleaving address range of the interleaving controller can be configured in advance, which increases flexibility. After completing the interleaving configuration, the host can complete the read and write interleaving access to the slave multi-channel DDR through the interleaving controller. The read and write information reaches the slave according to the rules and returns relevant information to the host. The interleaving control method and control device provided by the embodiments of the present invention have the characteristics of small delay, small area, flexible and configurable interleaving mode, and low power consumption.
实施例四Embodiment 4
本发明实施例提供一种多通道DDR交织控制装置,图4为本发明实施例四多通道DDR交织控制装置的组成结构示意图,如图4所示,所述控制装置包括:第一接收模块401、第一确定模块402、第一发送模块403、第二接收模块404和第二发送模块405,其中:An embodiment of the present invention provides a multi-channel DDR interleaving control device. FIG. 4 is a schematic diagram of the composition and structure of a multi-channel DDR interleaving control device according to an embodiment of the present invention. As shown in FIG. 4 , the control device includes: a first receiving module 401 , a first determining module 402, a first sending module 403, a second receiving module 404 and a second sending module 405, wherein:
所述第一接收模块401,用于接收主机发送的写数据和第一写地址;其中,所述主机为总线互联模块;The first receiving module 401 is used to receive the write data and the first write address sent by the host; wherein, the host is a bus interconnection module;
所述第一确定模块402,用于根据预先设置的交织控制配置信息,确定所述第一写地址对应的第二写地址和所述第一写地址对应的从机的标识信息;The first determining module 402 is configured to determine, according to preset interleaving control configuration information, the second write address corresponding to the first write address and the identification information of the slave corresponding to the first write address;
这里,所述第一确定模块402进一步包括:第一确定单元,用于根据预先设置的交织控制器的交织大小、非交织地址范围、交织方式确定所述第一写地址对应的第二写地址和所述第一写地址对应的从机的标识信息。Here, the first determining module 402 further includes: a first determining unit, configured to determine the second write address corresponding to the first write address according to the preset interleaving size, non-interleaving address range, and interleaving mode of the interleaving controller The identification information of the slave corresponding to the first write address.
所述第一发送模块403,用于根据所述从机的标识信息,将所述写数据和所述第二写地址发送给所述从机;其中,所述从机为DDR控制器;The first sending module 403 is configured to send the write data and the second write address to the slave according to the identification information of the slave; wherein the slave is a DDR controller;
所述第二接收模块404,用于接收所述从机发送的写反馈消息,其中,所述写反馈消息用于表征所述写数据是否写成功;The second receiving module 404 is configured to receive a write feedback message sent by the slave, wherein the write feedback message is used to represent whether the write data is successfully written;
所述第二发送模块405,用于将所述写反馈消息发送给所述主机。The second sending module 405 is configured to send the write feedback message to the host.
这里,所述第二发送模块405进一步包括:第一判断单元,用于判断写反馈接收逻辑模块是否空闲;第一发送单元,用于如果所述写反馈接收逻辑模块空闲,将所述写反馈消息发送给所述主机。第二判断单元,用于如果所述写反馈逻辑模块不空闲,则等待预设的时间后,判断所述写反馈接收逻辑模块是否空闲;第二发送单元,用于如果所述写反馈接收逻辑模块空闲,将所述写反馈消息发送给所述主机。Here, the second sending module 405 further includes: a first judging unit for judging whether the write feedback receiving logic module is idle; a first sending unit for sending the write feedback if the write feedback receiving logic module is idle message to the host. a second judging unit, configured to wait a preset time to determine whether the write feedback receiving logic module is idle if the write feedback logic module is not idle; a second sending unit, configured to wait for a preset time if the write feedback receiving logic module is idle; When the module is idle, the write feedback message is sent to the host.
本发明实施例提供的多通道DDR交织控制装置还包括:The multi-channel DDR interleaving control device provided by the embodiment of the present invention further includes:
第三确定模块,用于确定写数据通路的带宽信息;The third determining module is used to determine the bandwidth information of the write data path;
第四确定模块,用于确定写命令的响应时延信息;其中,所述写命令的响应时延为从接收到主机发送的写数据和第一写地址到向所述主机发送写反馈消息之间的时间差;The fourth determination module is used to determine the response delay information of the write command; wherein, the response delay of the write command is the time from receiving the write data and the first write address sent by the host to sending the write feedback message to the host. time difference between
第一存储模块,用于存储所述写数据通路的带宽信息和所述写命令的响应时延信息。A first storage module, configured to store bandwidth information of the write data path and response delay information of the write command.
第一启动模块,用于如果没有接收到任一从机发送的读数据和读响应消息或写反馈信息,并且也没有接收到主机发送的读地址或写地址或写数据,则启动低功耗计时器开始计时;The first startup module is used to start low power consumption if no read data and read response message or write feedback information sent by any slave is received, and no read address or write address or write data sent by the host is received. The timer starts counting;
第一关断模块,用于如果当低功耗计时器的计时时间达到低功耗计时阈值时,仍没有接收到任一从机发送的读数据和读响应消息和/或写反馈消息并且也没有接收到主机发送的读地址或写地址或写数据,则关断自身的控制时钟。The first shutdown module is used for, if when the timing time of the low power consumption timer reaches the low power consumption timing threshold, the read data and the read response message and/or the write feedback message sent by any slave have not been received and also If it does not receive the read address or write address or write data sent by the host, it will turn off its own control clock.
这里需要指出的是:以上多通道DDR交织控制装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果,因此不做赘述。对于本发明多通道DDR交织控制装置实施例中未披露的技术细节,请参照本发明方法实施例的描述而理解,为节约篇幅,因此不再赘述。It should be pointed out here that the descriptions of the above embodiments of the multi-channel DDR interleaving control apparatus are similar to the descriptions of the above method embodiments, and have similar beneficial effects as the method embodiments, so they are not repeated. For the technical details that are not disclosed in the embodiments of the multi-channel DDR interleaving control apparatus of the present invention, please refer to the description of the method embodiments of the present invention for understanding. In order to save space, detailed descriptions are omitted.
实施例五Embodiment 5
本发明实施例再提供一种多通道DDR交织控制装置,图5为本发明实施例五多通道DDR交织控制装置的组成结构示意图,如图5所示,所述控制装置500包括:第三接收模块501、第二确定模块502、第三发送模块503、第四接收模块504和第四发送模块505,其中:An embodiment of the present invention further provides a multi-channel DDR interleaving control device. FIG. 5 is a schematic structural diagram of a multi-channel DDR interleaving control device according to Embodiment 5 of the present invention. As shown in FIG. 5 , the control device 500 includes: a third receiver Module 501, second determining module 502, third sending module 503, fourth receiving module 504 and fourth sending module 505, wherein:
所述第三接收模块501,用于接收主机发送的第一读地址;The third receiving module 501 is configured to receive the first read address sent by the host;
所述第二确定模块502,用于根据预先设置的交织控制配置信息,确定所述第一读地址对应的第二读地址和所述第一读地址对应的第一从机的标识信息;The second determining module 502 is configured to determine, according to preset interleaving control configuration information, the second read address corresponding to the first read address and the identification information of the first slave corresponding to the first read address;
所述第三发送模块503,用于根据所述第一从机的标识信息,将所述第二读地址发送给第一从机;The third sending module 503 is configured to send the second read address to the first slave according to the identification information of the first slave;
所述第四接收模块504,用于接收所述第一从机发送的第一读数据和第一读响应消息;The fourth receiving module 504 is configured to receive the first read data and the first read response message sent by the first slave;
所述第四发送模块505,用于将所述第一读数据和第一读响应消息发送给所述主机。The fourth sending module 505 is configured to send the first read data and the first read response message to the host.
这里,所述第四发送模块505进一步包括:Here, the fourth sending module 505 further includes:
第三判断单元,用于判断是否接收到第二从机发送的第二读数据和第二读响应消息;a third judging unit for judging whether to receive the second read data and the second read response message sent by the second slave;
第三发送单元,用于如果没有接收到第二从机发送的第二读数据和第二读响应消息,则将所述第一读数据和第一读响应消息发送给所述主机。The third sending unit is configured to send the first read data and the first read response message to the host if the second read data and the second read response message sent by the second slave are not received.
第四判断单元,用于如果接收到第二从机发送的第二读数据和第二读响应消息,判断所述第一从机等待的时间是否小于等于预设的响应超时阈值;The fourth judgment unit is used to judge whether the waiting time of the first slave is less than or equal to a preset response timeout threshold if the second read data and the second read response message sent by the second slave are received;
第五判断单元,用于如果所述第一从机等待的时间小于等于预设的响应超时阈值,判断所述第一从机的读优先级是否高于第二从机的读优先级;a fifth judgment unit, configured to judge whether the read priority of the first slave is higher than the read priority of the second slave if the waiting time of the first slave is less than or equal to a preset response timeout threshold;
第四发送单元,用于如果所述第一从机的读优先级高于第二从机的读优先级,则将所述第一读数据和第一读响应消息发送给所述主机。The fourth sending unit is configured to send the first read data and the first read response message to the host if the read priority of the first slave is higher than the read priority of the second slave.
第六判断单元,用于如果所述第一从机的读优先级与第二从机的读优先级相同,则判断所述第一从机的端口号是否小于所述第二从机的端口号;The sixth judgment unit is used to judge whether the port number of the first slave is smaller than the port of the second slave if the read priority of the first slave is the same as the read priority of the second slave No;
第五发送单元,用于如果所述第一从机的端口号小于所述第二从机的端口号,则将所述第一读数据和第一读响应消息发送给所述主机。A fifth sending unit, configured to send the first read data and the first read response message to the host if the port number of the first slave is smaller than the port number of the second slave.
第六发送单元,用于如果所述第一从机的读优先级低于所述第二从机的读优先级,将所述第二读数据和第二读响应消息发送给所述主机;a sixth sending unit, configured to send the second read data and the second read response message to the host if the read priority of the first slave is lower than the read priority of the second slave;
第七判断单元,用于判断是否接收到第三从机发送的第三读数据和第三读响应消息;a seventh judgment unit, used for judging whether to receive the third read data and the third read response message sent by the third slave;
第七发送单元,用于如果没有接收到第三从机发送的第三读数据和第二读响应消息,则将所述第一读数据和第一读响应消息发送给所述主机。A seventh sending unit, configured to send the first read data and the first read response message to the host if the third read data and the second read response message sent by the third slave are not received.
第八发送单元,用于如果所述第一从机等待的时间大于预设的响应超时阈值,将所述第二读数据和第二读响应消息发送给所述主机;an eighth sending unit, configured to send the second read data and the second read response message to the host if the waiting time of the first slave is greater than a preset response timeout threshold;
第八判断单元,用于判断是否接收到第三从机发送的第三读数据和第三读响应消息;an eighth judgment unit, used for judging whether to receive the third read data and the third read response message sent by the third slave;
第九发送单元,用于如果没有接收到第三从机发送的第三读数据和第三读响应消息,则将所述第一读数据和第一读响应消息发送给所述主机。A ninth sending unit, configured to send the first read data and the first read response message to the host if the third read data and the third read response message sent by the third slave are not received.
本发明实施例提供的多通道DDR交织控制装置还包括:The multi-channel DDR interleaving control device provided by the embodiment of the present invention further includes:
第五确定模块,用于确定读数据通路的带宽信息;the fifth determination module, used for determining the bandwidth information of the read data path;
第六确定模块,用于确定读命令的响应时延信息;其中,所述读命令的响应时延为从接收到主机发送的第一读地址到向所述主机发送第一读数据和第一读响应消息之间的时间差;The sixth determination module is used to determine the response delay information of the read command; wherein, the response delay of the read command is from receiving the first read address sent by the host to sending the first read data and the first read data to the host. Time difference between read response messages;
第一存储模块,用于存储所述读数据通路的带宽信息和所述读命令的响应时延信息。The first storage module is configured to store bandwidth information of the read data path and response delay information of the read command.
第二启动模块,用于如果没有接收到任一从机发送的读数据和读响应消息或写反馈信息,并且也没有接收到主机发送的读地址或写地址或写数据,则启动低功耗计时器开始计时;The second startup module is used to start low power consumption if no read data, read response message or write feedback information sent by any slave is received, and no read address or write address or write data sent by the host is received. The timer starts counting;
第二关断模块,用于如果当低功耗计时器的计时时间达到低功耗计时阈值时,仍没有接收到任一从机发送的读数据和读响应消息和/或写反馈消息并且也没有接收到主机发送的读地址或写地址或写数据,则关断自身的控制时钟。The second shutdown module is configured to, if when the timing time of the low power consumption timer reaches the low power consumption timing threshold, the read data and the read response message and/or the write feedback message sent by any of the slaves are still not received, and the If it does not receive the read address or write address or write data sent by the host, it will turn off its own control clock.
这里需要指出的是:以上多通道DDR交织控制装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果,因此不做赘述。对于本发明多通道DDR交织控制装置实施例中未披露的技术细节,请参照本发明方法实施例的描述而理解,为节约篇幅,因此不再赘述。It should be pointed out here that the descriptions of the above embodiments of the multi-channel DDR interleaving control apparatus are similar to the descriptions of the above method embodiments, and have similar beneficial effects as the method embodiments, so they are not repeated. For the technical details that are not disclosed in the embodiments of the multi-channel DDR interleaving control apparatus of the present invention, please refer to the description of the method embodiments of the present invention for understanding. In order to save space, detailed descriptions are omitted.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including but not limited to disk storage, optical storage, and the like.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flows of the flowcharts and/or the block or blocks of the block diagrams.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention.
Claims (14)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201611192741.XA CN108228492B (en) | 2016-12-21 | 2016-12-21 | Multi-channel DDR interleaving control method and device |
| PCT/CN2017/097329 WO2018113318A1 (en) | 2016-12-21 | 2017-08-14 | Multi-channel ddr interleaving control method and device, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201611192741.XA CN108228492B (en) | 2016-12-21 | 2016-12-21 | Multi-channel DDR interleaving control method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108228492A CN108228492A (en) | 2018-06-29 |
| CN108228492B true CN108228492B (en) | 2020-11-17 |
Family
ID=62624491
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201611192741.XA Active CN108228492B (en) | 2016-12-21 | 2016-12-21 | Multi-channel DDR interleaving control method and device |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN108228492B (en) |
| WO (1) | WO2018113318A1 (en) |
Families Citing this family (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20200066893A (en) * | 2018-12-03 | 2020-06-11 | 에스케이하이닉스 주식회사 | Memory controller and operating method thereof |
| CN109803452A (en) * | 2019-03-14 | 2019-05-24 | 李清庭 | Controlled device, method and system |
| CN112395243B (en) * | 2019-08-16 | 2023-04-28 | 上海寒武纪信息科技有限公司 | Access method and device of processor |
| CN113010463B (en) * | 2019-12-20 | 2024-05-14 | 林德(中国)叉车有限公司 | IIC communication method and system for lithium battery management |
| CN114981782A (en) * | 2020-01-19 | 2022-08-30 | 华为技术有限公司 | System on chip and data verification method |
| WO2021168697A1 (en) * | 2020-02-26 | 2021-09-02 | 深圳市欢太科技有限公司 | Data synchronization method and apparatus, data storage system, and computer readable medium |
| CN111857999B (en) * | 2020-07-10 | 2023-01-10 | 苏州浪潮智能科技有限公司 | A data scheduling method, device, equipment, and computer-readable storage medium |
| CN112559387B (en) * | 2020-12-23 | 2023-05-02 | 湖南国科微电子股份有限公司 | Read request processing method, device, equipment and medium |
| CN115102896B (en) * | 2022-07-22 | 2022-11-15 | 北京象帝先计算技术有限公司 | Data broadcasting method, broadcasting accelerator, NOC, SOC and electronic equipment |
| CN116185887A (en) * | 2022-12-14 | 2023-05-30 | 上海赛治信息技术有限公司 | Multi-partition communication method based on FC equipment, FC equipment, storage medium |
| CN115658588B (en) * | 2022-12-15 | 2023-03-28 | 芯动微电子科技(珠海)有限公司 | ID compression device and method of AXI bus |
| CN115658591B (en) * | 2022-12-19 | 2023-03-28 | 摩尔线程智能科技(北京)有限责任公司 | Chip access method and device, storage medium and electronic equipment |
| CN116597887B (en) * | 2023-04-17 | 2024-04-02 | 深圳市晶存科技有限公司 | Capacity reduction test method, system and equipment for LPDDR chip and storage medium |
| CN116561056B (en) * | 2023-07-07 | 2024-02-20 | 芯动微电子科技(珠海)有限公司 | System on chip |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6453381B1 (en) * | 1999-12-02 | 2002-09-17 | Etron Technology, Inc. | DDR DRAM data coherence scheme |
| CN101621469A (en) * | 2009-08-13 | 2010-01-06 | 杭州华三通信技术有限公司 | Control device and control method for accessing data messages |
| CN102324999A (en) * | 2011-05-16 | 2012-01-18 | 中兴通讯股份有限公司 | Method and system for parallel computing of interweaved address |
| CN104184536A (en) * | 2013-05-21 | 2014-12-03 | 华为技术有限公司 | Sub block interleaving control method based on LTE (Long Term Evolution) Turbo decoding, device and equipment |
Family Cites Families (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| AU2003280051A1 (en) * | 2002-11-20 | 2004-06-15 | Koninklijke Philips Electronics N.V. | Sdram address mapping optimized for two-dimensional access |
| CN101150331B (en) * | 2007-02-21 | 2011-03-30 | 清华大学 | Time de-interleaver implementation using SDRAM in a TDS-OFDM receiver |
| CN101477505B (en) * | 2008-12-23 | 2012-11-21 | 无锡中星微电子有限公司 | Data transmission method between master and slave equipments through bus |
| CN102263604B (en) * | 2010-05-25 | 2014-07-16 | 中兴通讯股份有限公司 | LTE (long term evolution) PDCCH (physical downlink control channel) demapping method and device |
| US20110320751A1 (en) * | 2010-06-25 | 2011-12-29 | Qualcomm Incorporated | Dynamic Interleaving Of Multi-Channel Memory |
| US9256531B2 (en) * | 2012-06-19 | 2016-02-09 | Samsung Electronics Co., Ltd. | Memory system and SoC including linear addresss remapping logic |
| CN104993837B (en) * | 2015-07-24 | 2018-08-03 | 丽水博远科技有限公司 | A kind of convolutional interleave method and convolutional deinterleaver |
| CN105049834B (en) * | 2015-08-07 | 2017-05-17 | 四川虹微技术有限公司 | Real-time auto-stereoscopic playing system based on FPGA (Field Programmable Gate Array) |
| CN105760310B (en) * | 2016-02-05 | 2018-12-14 | 华为技术有限公司 | address distribution method and DDR controller |
-
2016
- 2016-12-21 CN CN201611192741.XA patent/CN108228492B/en active Active
-
2017
- 2017-08-14 WO PCT/CN2017/097329 patent/WO2018113318A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6453381B1 (en) * | 1999-12-02 | 2002-09-17 | Etron Technology, Inc. | DDR DRAM data coherence scheme |
| CN101621469A (en) * | 2009-08-13 | 2010-01-06 | 杭州华三通信技术有限公司 | Control device and control method for accessing data messages |
| CN102324999A (en) * | 2011-05-16 | 2012-01-18 | 中兴通讯股份有限公司 | Method and system for parallel computing of interweaved address |
| CN104184536A (en) * | 2013-05-21 | 2014-12-03 | 华为技术有限公司 | Sub block interleaving control method based on LTE (Long Term Evolution) Turbo decoding, device and equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2018113318A1 (en) | 2018-06-28 |
| CN108228492A (en) | 2018-06-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108228492B (en) | Multi-channel DDR interleaving control method and device | |
| US8166221B2 (en) | Low-power USB superspeed device with 8-bit payload and 9-bit frame NRZI encoding for replacing 8/10-bit encoding | |
| US8200862B2 (en) | Low-power USB flash card reader using bulk-pipe streaming with UAS command re-ordering and channel separation | |
| US7171526B2 (en) | Memory controller useable in a data processing system | |
| CN104781801B (en) | Solid state drive is set to be configured to the technology operated using memory module or memory mode | |
| CN104520932B (en) | flash memory controller | |
| US9396109B2 (en) | Method and apparatus for DRAM spatial coalescing within a single channel | |
| EP3844628B1 (en) | Slave-to-slave direct communication | |
| CN106933760A (en) | A kind of dma controller and data uploading method based on AXI protocol | |
| CN101303677B (en) | Method, system and controller for direct memory access control | |
| CN102253910A (en) | A kind of I2C transmission method and its device | |
| CN109947682A (en) | A server motherboard and server | |
| CN107710179B (en) | Multiple access single SDIO interface with multiple SDIO units | |
| CN201583943U (en) | IP structure of high-performance low-power consumption DMA of audio SOC chip | |
| US10216421B2 (en) | Method of operating storage device using serial interface and method of operating data processing system including the same | |
| US8943238B2 (en) | Operations using direct memory access | |
| CN116225995B (en) | A bus system and chip | |
| CN102591817A (en) | Multi-bus bridge controller and implementing method thereof | |
| JP2008009817A (en) | Semiconductor device and data transfer method | |
| CN112825024A (en) | Command fusion and split method and NVMe controller | |
| CN108008908A (en) | The method and apparatus of data in a kind of management and control SD card | |
| CN107771328B (en) | Single trunk SDIO interface with multiple SDIO units | |
| US20230325262A1 (en) | Message notification method and apparatus | |
| WO1994008307A1 (en) | Multiplexed communication protocol between central and distributed peripherals in multiprocessor computer systems | |
| US5664213A (en) | Input/output (I/O) holdoff mechanism for use in a system where I/O device inputs are fed through a latency introducing bus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |