[go: up one dir, main page]

CN118796735A - High-speed memory bus timing adaptation method - Google Patents

High-speed memory bus timing adaptation method Download PDF

Info

Publication number
CN118796735A
CN118796735A CN202411269006.9A CN202411269006A CN118796735A CN 118796735 A CN118796735 A CN 118796735A CN 202411269006 A CN202411269006 A CN 202411269006A CN 118796735 A CN118796735 A CN 118796735A
Authority
CN
China
Prior art keywords
signal
sampled
channel
timing
margin
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
CN202411269006.9A
Other languages
Chinese (zh)
Other versions
CN118796735B (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.)
Chengdu Xingtuo Microelectronics Technology Co ltd
Original Assignee
Chengdu Cetc Xingtuo Technology 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 Chengdu Cetc Xingtuo Technology Co ltd filed Critical Chengdu Cetc Xingtuo Technology Co ltd
Priority to CN202411269006.9A priority Critical patent/CN118796735B/en
Publication of CN118796735A publication Critical patent/CN118796735A/en
Application granted granted Critical
Publication of CN118796735B publication Critical patent/CN118796735B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1605Handling requests for interconnection or transfer for access to memory bus based on arbitration
    • G06F13/161Handling requests for interconnection or transfer for access to memory bus based on arbitration with latency improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2023Failover techniques
    • G06F11/2033Failover techniques switching over of hardware resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1605Handling requests for interconnection or transfer for access to memory bus based on arbitration
    • G06F13/161Handling requests for interconnection or transfer for access to memory bus based on arbitration with latency improvement
    • G06F13/1636Handling requests for interconnection or transfer for access to memory bus based on arbitration with latency improvement using refresh
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Dram (AREA)

Abstract

本发明公开了一种高速内存总线时序自适应方法。为实现高速内存总线中的时序自适应,本发明设置第一通道和第二通道,以及相应的空闲模式和正常工作模式。当计时器达到预设时长后,空闲模式的通道开始进入余量测试模式,并在余量测试中待采样信号时序最大余量不小于时序偏差阈值时,进入余量调优模式,最后固定待采样信号的延迟,且当总线状态为自刷新状态时,切换两个通道的模式。本发明可以不中断读写业务,且能实现时序自适应。

The present invention discloses a method for timing self-adaptation of a high-speed memory bus. In order to realize timing self-adaptation in a high-speed memory bus, the present invention sets a first channel and a second channel, as well as a corresponding idle mode and a normal working mode. When the timer reaches a preset duration, the channel in the idle mode begins to enter a margin test mode, and when the maximum margin of the timing of the signal to be sampled is not less than the timing deviation threshold in the margin test, the margin tuning mode is entered, and finally the delay of the signal to be sampled is fixed, and when the bus state is a self-refresh state, the modes of the two channels are switched. The present invention can realize timing self-adaptation without interrupting the read and write business.

Description

高速内存总线时序自适应方法High-speed memory bus timing adaptation method

技术领域Technical Field

本发明涉及内存总线领域,具体涉及一种高速内存总线时序自适应方法。The invention relates to the field of memory bus, and in particular to a high-speed memory bus timing self-adaptation method.

背景技术Background Art

第五/六代双倍数据率同步动态随机存取存储器(Double Data Rate 5/6Synchronous Dynamic Random Access Memory,DDR5/6 SDRAM)、第五/六代低功耗双倍数据率同步动态随机存取存储器(Low Power Double Data Rate 5/6 Synchronous DynamicRandom Access Memory,LPDDR5/6 SDRAM)和第五/六代显卡双倍数据率同步动态随机存取存储器(Graphics Double Data Rate 5/6 Synchronous Dynamic Random AccessMemory,GDDR5/6 SDRAM)是广泛用于计算机处理器(Central Processing Unit,CPU)、图形处理器、现场可编程门阵列、数字信号处理器、存储处理器喻内存颗粒之间通信的内存总线。The fifth/sixth generation Double Data Rate 5/6 Synchronous Dynamic Random Access Memory (DDR5/6 SDRAM), the fifth/sixth generation Low Power Double Data Rate 5/6 Synchronous Dynamic Random Access Memory (LPDDR5/6 SDRAM) and the fifth/sixth generation Graphics Double Data Rate 5/6 Synchronous Dynamic Random Access Memory (GDDR5/6 SDRAM) are memory buses widely used for communication between computer processors (Central Processing Unit, CPU), graphics processors, field programmable gate arrays, digital signal processors, storage processors and memory particles.

寄存器时钟驱动双列直插记忆体模组(Registered Dual Inline MemoryModule,RDIMM)涉及命令和地址(Command and Address,CA)信号、控制(ConTRoL,CTRL)信号、时钟(CLocK,CLK)信号、数据(Data,DQ)信号和数据探头(Data Strobe,DQS)信号等。其中,CA信号和CLK信号经寄存器时钟驱动器(Register Clock Driver,RCD)驱动后,再次发送给内存颗粒。DQ信号经过数据缓冲器(Data Buffer,DB)驱动后,发送给内存颗粒。The Registered Dual Inline Memory Module (RDIMM) driven by the Registered Clock involves Command and Address (CA) signals, Control (ConTRoL, CTRL) signals, Clock (CLocK, CLK) signals, Data (DQ) signals, and Data Strobe (DQS) signals. Among them, the CA signal and CLK signal are driven by the Register Clock Driver (RCD) and then sent to the memory particles again. The DQ signal is driven by the Data Buffer (DB) and then sent to the memory particles.

CPU和RCD之间、RCD和同步动态随机存取存储器(Synchronous Dynamic RandomAccess Memory,SDRAM)之间、CPU和DB之间、DB和SDRAM之间会执行CA信号对CLK信号、DQ信号对DQS信号之间的时序训练。时序训练结束后,时序位置不再发生改变。Timing training between CA signal and CLK signal, DQ signal and DQS signal will be performed between CPU and RCD, between RCD and Synchronous Dynamic Random Access Memory (SDRAM), between CPU and DB, and between DB and SDRAM. After the timing training is completed, the timing position will no longer change.

但随着内存总线的速率越来越高,CA信号对CLK信号、DQ对DQS信号的时序余量越来越小,静态时序训练结束后,随着温度、湿度的变化,时序抖动变大,CA信号相对于CLK信号的偏移发生漂移。However, as the speed of the memory bus increases, the timing margin of the CA signal to the CLK signal and the DQ to the DQS signal becomes smaller and smaller. After the static timing training is completed, as the temperature and humidity change, the timing jitter becomes larger, and the offset of the CA signal relative to the CLK signal drifts.

SoC电源上电时,会对CA信号、CLK信号的时序进行训练,但在读写业务运行过程中,外部环境发生变化,但是时序并未实时地训练,以补偿环境变化带来的影响。When the SoC power is powered on, the timing of the CA signal and the CLK signal will be trained. However, during the operation of the read and write business, the external environment changes, but the timing is not trained in real time to compensate for the impact of the environmental changes.

片上系统(System on Chip,SoC)补偿漂移等因素导致CA信号对CLK信号的时序、DQ信号对DQS信号的时序存在很高的风险。Factors such as system on chip (SoC) compensation drift cause high risks in the timing of CA signals to CLK signals and the timing of DQ signals to DQS signals.

因此,在高速内存发展趋势下,CA信号对CLK信号、DQ信号对DQS信号之间时序自适应,变得越来越重要。Therefore, with the development trend of high-speed memory, timing adaptation between CA signal and CLK signal, and between DQ signal and DQS signal, becomes more and more important.

发明内容Summary of the invention

为了缓解或部分缓解上述技术问题,本发明的解决方案如下所述:In order to alleviate or partially alleviate the above technical problems, the solution of the present invention is as follows:

一种高速内存总线时序自适应方法,用于调整待采样信号和采样时钟信号,当待采样信号为CA信号或CTRL信号时,采样时钟信号为CLK信号,当待采样信号为DQ信号时,采样时钟信号为DQS信号;初始上电时,解复位第一接收采样器和第二接收采样器,切换寄存器设置为0,偏移寄存器设置为0,通道选择寄存器设置为0;设置包括第一接收采样器在内的第一通道为正常工作模式,并设置包括第二接收采样器在内的第二通道为空闲模式;针对第一通道执行时序训练,且训练完成时启动计数器;当计时器到达预设时长,第二通道进入余量测试模式,并在余量测试模式中,左拉偏采样时钟信号相位和右拉偏采样时钟信号相位,测出待采样信号左时序最大余量和待采样信号右时序最大余量,并计算待采样信号时序最大余量;若待采样信号时序最大余量小于K,则第二通道返回空闲状态,直至下一次计数器到达预设时长,第二通道进入余量测试模式;否则,设置偏移寄存器为1,第二通道进入余量调优模式,并在余量调优模式中,以设定步长调整待采样信号的延迟,并测出待采样信号左时序最大余量和待采样信号右时序最大余量,且计算待采样信号时序最大余量,并在当待采样信号时序最大余量小于K时,固定待采样信号的延迟,设置切换寄存器为1,其中K是在寄存器中配置的时序偏差阈值;当偏移寄存器为1,且切换寄存器为1,并且总线状态为自刷新状态时,设置通道选择寄存器为1,将第二通道设置为正常工作模式,将第一通道设置为空闲模式。A high-speed memory bus timing self-adaptive method is used to adjust a signal to be sampled and a sampling clock signal. When the signal to be sampled is a CA signal or a CTRL signal, the sampling clock signal is a CLK signal. When the signal to be sampled is a DQ signal, the sampling clock signal is a DQS signal. When initially powered on, a first receiving sampler and a second receiving sampler are reset, a switching register is set to 0, an offset register is set to 0, and a channel selection register is set to 0. A first channel including the first receiving sampler is set to a normal working mode, and a second channel including the second receiving sampler is set to an idle mode. Timing training is performed on the first channel, and a counter is started when the training is completed. When the timer reaches a preset time length, the second channel enters a margin test mode, and in the margin test mode, the sampling clock signal phase is pulled left and the sampling clock signal phase is pulled right to measure the maximum left timing margin of the signal to be sampled and the maximum right timing margin of the signal to be sampled. The maximum timing margin of the signal to be sampled is calculated; if the maximum timing margin of the signal to be sampled is less than K, the second channel returns to the idle state until the next time the counter reaches the preset duration, and the second channel enters the margin test mode; otherwise, the offset register is set to 1, the second channel enters the margin tuning mode, and in the margin tuning mode, the delay of the signal to be sampled is adjusted with the set step size, and the maximum left timing margin of the signal to be sampled and the maximum right timing margin of the signal to be sampled are measured, and the maximum timing margin of the signal to be sampled is calculated, and when the maximum timing margin of the signal to be sampled is less than K, the delay of the signal to be sampled is fixed, and the switching register is set to 1, where K is the timing deviation threshold configured in the register; when the offset register is 1, the switching register is 1, and the bus state is in the self-refresh state, the channel selection register is set to 1, the second channel is set to the normal working mode, and the first channel is set to the idle mode.

进一步地,所述若待采样信号时序最大余量小于K,则第二通道返回空闲状态,指的是:至少两次测出待采样信号左时序最大余量和待采样信号右时序最大余量,且至少两次计算得到的待采样信号时序最大余量均小于K,则第二通道返回空闲状态。Furthermore, if the maximum timing margin of the signal to be sampled is less than K, the second channel returns to the idle state, which means: the maximum left timing margin of the signal to be sampled and the maximum right timing margin of the signal to be sampled are measured at least twice, and the maximum timing margins of the signal to be sampled calculated at least twice are both less than K, then the second channel returns to the idle state.

进一步地,所述以设定步长调整待采样信号的延迟,其中的设定步长为K/2取整后的结果和-K/2取整后的结果。Furthermore, the delay of the signal to be sampled is adjusted with a set step length, wherein the set step length is a result of rounding K/2 and a result of rounding -K/2.

进一步地,第一通道包括第一延迟模块、第二延迟模块、第一接收采样器和第一校验模块;第二通道包括第三延迟模块、第四延迟模块、第二接收采样器和第二校验模块;其中,待采样信号经过第一延迟模块后作为第一接收采样器的输入信号,采样时钟信号经过第二延迟模块后作为第一接收采样器的输入信号;待采样信号经过第三延迟模块后作为第二接收采样器的输入信号,采样时钟信号经过第四延迟模块后作为第二接收采样器的输入信号;第一校验模块接收第一接收采样器的输出信号,并作为复用器的输入信号;第二校验模块接收第二接收采样器的输出信号,并作为复用器的输入信号。Furthermore, the first channel includes a first delay module, a second delay module, a first receiving sampler and a first verification module; the second channel includes a third delay module, a fourth delay module, a second receiving sampler and a second verification module; wherein, the signal to be sampled is used as the input signal of the first receiving sampler after passing through the first delay module, and the sampling clock signal is used as the input signal of the first receiving sampler after passing through the second delay module; the signal to be sampled is used as the input signal of the second receiving sampler after passing through the third delay module, and the sampling clock signal is used as the input signal of the second receiving sampler after passing through the fourth delay module; the first verification module receives the output signal of the first receiving sampler and uses it as the input signal of the multiplexer; the second verification module receives the output signal of the second receiving sampler and uses it as the input signal of the multiplexer.

进一步地,第一通道进入空闲模式后,当计时器到达预设时长,第一通道进入余量测试模式。Further, after the first channel enters the idle mode, when the timer reaches a preset duration, the first channel enters the margin test mode.

进一步地,第一通道进入余量测试模式后,若待采样信号时序最大余量不小于K,则第一通道进入余量调优模式;并且,在当偏移寄存器为1,且切换寄存器为1,并且总线状态为自刷新状态时,设置通道选择寄存器为1,将第一通道设置为正常工作模式,将第二通道设置为空闲模式。Furthermore, after the first channel enters the margin test mode, if the maximum margin of the signal timing to be sampled is not less than K, the first channel enters the margin tuning mode; and, when the offset register is 1, the switch register is 1, and the bus state is in the self-refresh state, the channel selection register is set to 1, the first channel is set to the normal working mode, and the second channel is set to the idle mode.

进一步地,所述以设定步长调整待采样信号的延迟,指的是:以设定步长调整第三延迟模块的延迟时长。Further, adjusting the delay of the signal to be sampled with a set step length refers to: adjusting the delay time length of the third delay module with a set step length.

本发明技术方案,具有如下有益的技术效果之一或多个:The technical solution of the present invention has one or more of the following beneficial technical effects:

(1)在不中断内存读写业务、不依赖SoC测试模式的前提下,实现快速、实时的CA信号、CTRL信号对CLK信号、DQ信号对DQS信号之间时序自适应。(1) Without interrupting the memory read and write business and without relying on the SoC test mode, fast and real-time timing adaptation between CA signals, CTRL signals to CLK signals, and DQ signals to DQS signals is achieved.

(2)提升CA信号、CTRL信号对CLK信号、DQ信号对DQS信号之间的动态时序余量,余量在线可读。(2) Improve the dynamic timing margin between CA signal, CTRL signal and CLK signal, and DQ signal and DQS signal. The margin can be read online.

(3)动态余量不依赖主机设备,方案独立可控。(3) Dynamic margin does not depend on the host device, and the solution is independently controllable.

(4)功耗低,且可以实时更新。(4) Low power consumption and can be updated in real time.

此外,本发明还具有的其它有益效果将在具体实施例中提及。In addition, other beneficial effects of the present invention will be mentioned in the specific embodiments.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是现有技术RDIMM中时序调整示意图;FIG1 is a schematic diagram of timing adjustment in RDIMM of the prior art;

图2是本发明RDIMM中时序调整示意图。FIG. 2 is a schematic diagram of timing adjustment in the RDIMM of the present invention.

具体实施方式DETAILED DESCRIPTION

为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明中的附图,对本发明中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

为了便于清楚描述本发明实施例的技术方案,在本发明的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定。In order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order.

图1是现有技术RDIMM中时序调整示意图。方案针对两种不同的情况。在情况1中,延迟模块1接收CA信号或CTRL信号,延迟模块2接收CLK信号,经过接收采样器的采样以及校验模块的校验后,输出CA信号或CTRL信号。在情况2中,延迟模块1接收DQ信,延迟模块2接收DQS信号,经过接收采样器的采样以及校验模块的校验后,输出DQ信号。FIG1 is a schematic diagram of timing adjustment in the prior art RDIMM. The scheme is for two different situations. In situation 1, delay module 1 receives a CA signal or a CTRL signal, and delay module 2 receives a CLK signal, and after sampling by a receiving sampler and verification by a verification module, a CA signal or a CTRL signal is output. In situation 2, delay module 1 receives a DQ signal, and delay module 2 receives a DQS signal, and after sampling by a receiving sampler and verification by a verification module, a DQ signal is output.

图2是本发明RDIMM中时序调整示意图。本发明中,可以针对不同的信号类型,比如情况1时,CA信号或CTRL信号被CLK信号采样;在情况2时,DQ信号被DQS信号采样。Fig. 2 is a schematic diagram of timing adjustment in RDIMM of the present invention. In the present invention, different signal types can be targeted, for example, in case 1, the CA signal or the CTRL signal is sampled by the CLK signal; in case 2, the DQ signal is sampled by the DQS signal.

CA信号或CTRL信号,以及DQ信号是待采样信号。CLK信号和DQS信号为采样时钟信号。The CA signal or the CTRL signal and the DQ signal are signals to be sampled, and the CLK signal and the DQS signal are sampling clock signals.

本发明包括第一通道和第二通道。第一通道包括第一延迟模块、第二延迟模块、第一接收采样器和第一校验模块。第二通道包括第三延迟模块、第四延迟模块、第二接收采样器和第二校验模块。The invention comprises a first channel and a second channel. The first channel comprises a first delay module, a second delay module, a first receiving sampler and a first verification module. The second channel comprises a third delay module, a fourth delay module, a second receiving sampler and a second verification module.

复用器在通路选择信号配置为不同的值,比如0或1时,选择第一通道的输出信号或第二通道的输出信号为最终输出信号。When the path selection signal is configured to different values, such as 0 or 1, the multiplexer selects the output signal of the first channel or the output signal of the second channel as the final output signal.

CA信号、CTRL信号或DQ信号,经过第一延迟模块后作为第一接收采样器的输入信号,CLK信号或DQS信号经过第二延迟模块后作为第一接收采样器的输入信号。The CA signal, CTRL signal or DQ signal is used as the input signal of the first receiving sampler after passing through the first delay module, and the CLK signal or DQS signal is used as the input signal of the first receiving sampler after passing through the second delay module.

CA信号、CTRL信号或DQ信号,经过第三延迟模块后作为第二接收采样器的输入信号,CLK信号或DQS信号经过第四延迟模块后作为第二接收采样器的输入信号。The CA signal, CTRL signal or DQ signal is used as the input signal of the second receiving sampler after passing through the third delay module, and the CLK signal or DQS signal is used as the input signal of the second receiving sampler after passing through the fourth delay module.

第一校验模块接收第一接收采样器的输出信号,并作为复用器的输入信号之一。第二校验模块接收第二接收采样器的输出信号,并作为复用器的输入信号之一。The first verification module receives the output signal of the first receiving sampler and uses it as one of the input signals of the multiplexer. The second verification module receives the output signal of the second receiving sampler and uses it as one of the input signals of the multiplexer.

具体的采样过程,由第一接收采样器或第二接收采样器执行。第一校验模块和第二校验模块根据采样结果判断是否出错。The specific sampling process is performed by the first receiving sampler or the second receiving sampler. The first checking module and the second checking module determine whether there is an error according to the sampling result.

后文以CA信号和CLK信号为例,本发明的高速内存总线时序自适应方法,包括如下步骤:Taking the CA signal and the CLK signal as an example, the high-speed memory bus timing self-adaptation method of the present invention includes the following steps:

初始上电时,解复位第一接收采样器和第二接收采样器,切换寄存器设置为0,偏移寄存器设置为0,通道选择寄存器设置为0。At initial power-up, the first receive sampler and the second receive sampler are reset, the switch register is set to 0, the offset register is set to 0, and the channel selection register is set to 0.

本发明中,解复位的含义是将复位信号置为无效状态,解除复位状态。In the present invention, releasing the reset means setting the reset signal to an invalid state, thereby releasing the reset state.

设置包括第一接收采样器在内的第一通道为正常工作模式,并设置包括第二接收采样器在内的第二通道为空闲模式。The first channel including the first receiving sampler is set to a normal operating mode, and the second channel including the second receiving sampler is set to an idle mode.

保持第二通道为空闲模式;针对第一通道执行时序训练,且训练完成时启动计数器。Keep the second channel in idle mode; perform timing training for the first channel and start the counter when the training is completed.

此时,第一通道为数据主通道,起数据传送功能;第二通道解复位,处于空闲模式,这往往只需消耗较低的能量。At this time, the first channel is the main data channel and performs data transmission function; the second channel is reset and is in idle mode, which often consumes less energy.

当计数器到达预设时长,第二通道进入余量测试模式。在余量测试模式中,先逐步左拉偏CLK信号相位,直至观测到第二校验模块在0至某时刻指示错误,测得CA信号左时序最大余量为A0。然后,逐步右拉偏CLK信号相位,直至观测到第二校验模块在0至某时刻指示错误,测得CA信号右时序最大余量为B0。计算A0-B0,并保存。重复上述步骤,得到A1-B1结果,其中A1是再次测得的CA信号左时序最大余量,B1是CA信号右时序最大余量。When the counter reaches the preset duration, the second channel enters the margin test mode. In the margin test mode, first gradually pull the CLK signal phase to the left until the second verification module indicates an error from 0 to a certain moment, and the maximum margin of the left timing of the CA signal is measured to be A0. Then, gradually pull the CLK signal phase to the right until the second verification module indicates an error from 0 to a certain moment, and the maximum margin of the right timing of the CA signal is measured to be B0. Calculate A0-B0 and save. Repeat the above steps to obtain the A1-B1 result, where A1 is the maximum margin of the left timing of the CA signal measured again, and B1 is the maximum margin of the right timing of the CA signal.

本发明中,左拉偏采样时钟信号(比如CLK信号)相位指的是将采样时钟信号的相位相对于当前提前,右拉偏采样时钟信号(比如CLK信号)相位指的是将采样时钟信号的相位相对于当前滞后。In the present invention, the phase of the sampling clock signal (such as CLK signal) pulled to the left refers to advancing the phase of the sampling clock signal relative to the current phase, and the phase of the sampling clock signal (such as CLK signal) pulled to the right refers to lagging the phase of the sampling clock signal relative to the current phase.

若|A0-B0|<K且|A1-B1|<K,第二通道返回空闲状态,直至下一次计数器到达预设时长,第二通道再次进入余量测试模式,其中K是在寄存器中可以配置的时序偏差阈值。If |A0-B0|<K and |A1-B1|<K, the second channel returns to the idle state until the next time the counter reaches the preset duration, the second channel enters the margin test mode again, where K is the timing deviation threshold that can be configured in the register.

而若|A0-B0|≥K且|A1-B1|≥K,则设置偏移寄存器为1,第二通道进入余量调优模式,以调整CA信号的延迟。If |A0-B0|≥K and |A1-B1|≥K, the offset register is set to 1, and the second channel enters the margin tuning mode to adjust the delay of the CA signal.

本发明中,|A0-B0|或|A1-B1|,是待采样信号时序最大余量,也是待采样信号左时序最大余量和待采样信号右时序最大余量差值的绝对值。本示例中,待采样信号是CA信号,也可以是CTRL信号或DQ信号。In the present invention, |A0-B0| or |A1-B1| is the maximum timing margin of the signal to be sampled, and is also the absolute value of the difference between the maximum left timing margin of the signal to be sampled and the maximum right timing margin of the signal to be sampled. In this example, the signal to be sampled is a CA signal, and may also be a CTRL signal or a DQ signal.

可选地,可以将保存左时序最大余量的A0、A1,以及保存右时序最大余量B0、B1的寄存器归零。Optionally, the registers A0 and A1 storing the maximum left timing margins and the registers B0 and B1 storing the maximum right timing margins may be reset to zero.

在第二通道进入余量调优模式后,以设定步长(比如K/2取整后的结果和-K/2取整后的结果)调整第三延迟模块的延迟时长,进而调整CA信号的延迟,并测试第二通道的CA信号左时序最大余量和CA信号右时序最大余量,若连续两次出现CA信号时序最大余量<K,则将固定此时第三延迟模块的延迟时长的配置,并将切换寄存器设置为1。固定此时第三延迟模块的延迟时长的配置,也即固定CA信号的延迟。After the second channel enters the margin tuning mode, the delay time of the third delay module is adjusted with a set step size (such as the result after rounding K/2 and the result after rounding -K/2), thereby adjusting the delay of the CA signal, and testing the maximum margin of the left timing of the CA signal and the maximum margin of the right timing of the CA signal of the second channel. If the maximum margin of the CA signal timing < K appears twice in succession, the configuration of the delay time of the third delay module at this time will be fixed, and the switching register will be set to 1. Fixing the configuration of the delay time of the third delay module at this time means fixing the delay of the CA signal.

示例地,沿用前文中保存左时序最大余量A0、A1的寄存器,以及保存右时序最大余量B0、B1的寄存器,若|A0-B0|<K且|A1-B1|<K,则固定第三延迟模块的延迟时长的配置。For example, the registers for storing the left maximum timing margins A0 and A1 and the registers for storing the right maximum timing margins B0 and B1 are used as described above. If |A0-B0|<K and |A1-B1|<K, the configuration of the delay time length of the third delay module is fixed.

当偏移寄存器为1,且切换寄存器为1,并且总线状态为自刷新状态时,通道选择寄存器设置为1,将第二通道为主为数据主通道,也即正常工作模式,起数据传送功能。When the offset register is 1, the switch register is 1, and the bus state is in the self-refresh state, the channel selection register is set to 1, and the second channel is used as the main data channel, that is, the normal working mode, and the data transmission function is performed.

示例地,可以通过通路选择信号控制通道选择寄存器为1,实现将第二通道设置为主为数据主通道目的。For example, the channel selection register may be controlled to be 1 through a path selection signal, so as to achieve the purpose of setting the second channel as the main data channel.

当第二通道设置为数据主通道,第二接收采样器正常采样,第三延迟模块处于静态,第一通道设置为空闲状态,计数器开始计时。当计数器达到预设时长,第一通道进入余量测试模式,并且|A0-B0|≥K且|A1-B1|≥K时,进入余量调优模式。When the second channel is set as the data master channel, the second receiving sampler samples normally, the third delay module is in static state, the first channel is set to idle state, and the counter starts timing. When the counter reaches the preset time, the first channel enters the margin test mode, and when |A0-B0|≥K and |A1-B1|≥K, it enters the margin tuning mode.

然后,将偏移寄存器设置为0,切换寄存器设置为0。Then, set the offset register to 0 and the switch register to 0.

至此,已经成功地实现了将数据主通道从第一通道切换为第二通道的变化。So far, the change of switching the data main channel from the first channel to the second channel has been successfully achieved.

此后,按照前述相同的模式,在时序偏差较大时,同样可以将数据主通道从第二通道切换为第一通道。Thereafter, according to the same mode as above, when the timing deviation is large, the data main channel can also be switched from the second channel to the first channel.

示例地,第一通道进入空闲模式后,当计时器到达预设时长,第一通道进入余量测试模式。For example, after the first channel enters the idle mode, when the timer reaches a preset duration, the first channel enters the margin test mode.

第一通道进入余量测试模式后,若待采样信号时序最大余量不小于K,则第一通道进入余量调优模式。并且,在当偏移寄存器为1,且切换寄存器为1,并且总线状态为自刷新状态时,设置通道选择寄存器为1,将第一通道设置为正常工作模式,将第二通道设置为空闲模式。After the first channel enters the margin test mode, if the maximum margin of the timing of the signal to be sampled is not less than K, the first channel enters the margin tuning mode. In addition, when the offset register is 1, the switch register is 1, and the bus state is in the self-refresh state, the channel selection register is set to 1, the first channel is set to the normal working mode, and the second channel is set to the idle mode.

本发明虽然以上针对CA信号和CLK信号为例,但是对于其它信号组合,也是适用的,比如CTRL信号和CLK信号、DQ信号和DQS信号。Although the present invention takes the CA signal and the CLK signal as an example, it is also applicable to other signal combinations, such as the CTRL signal and the CLK signal, and the DQ signal and the DQS signal.

本发明中的“0”或“1”指的是任何可以指示逻辑“0”或“1”的信号。“0” or “1” in the present invention refers to any signal that can indicate logic “0” or “1”.

为了更好的说明本发明,在上文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本发明同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本发明的主旨。In order to better illustrate the present invention, numerous specific details are provided in the above specific embodiments. It should be understood by those skilled in the art that the present invention can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present invention.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (7)

1.一种高速内存总线时序自适应方法,用于调整待采样信号和采样时钟信号,其特征在于:1. A high-speed memory bus timing adaptive method for adjusting a signal to be sampled and a sampling clock signal, characterized in that: 当待采样信号为CA信号或CTRL信号时,采样时钟信号为CLK信号,当待采样信号为DQ信号时,采样时钟信号为DQS信号;When the signal to be sampled is a CA signal or a CTRL signal, the sampling clock signal is a CLK signal; when the signal to be sampled is a DQ signal, the sampling clock signal is a DQS signal; 初始上电时,解复位第一接收采样器和第二接收采样器,切换寄存器设置为0,偏移寄存器设置为0,通道选择寄存器设置为0;At the initial power-on, the first receiving sampler and the second receiving sampler are reset, the switch register is set to 0, the offset register is set to 0, and the channel selection register is set to 0; 设置包括第一接收采样器在内的第一通道为正常工作模式,并设置包括第二接收采样器在内的第二通道为空闲模式;Setting the first channel including the first receiving sampler to a normal working mode, and setting the second channel including the second receiving sampler to an idle mode; 针对第一通道执行时序训练,且训练完成时启动计数器;Perform timing training for the first channel and start the counter when the training is completed; 当计时器到达预设时长,第二通道进入余量测试模式,并在余量测试模式中,左拉偏采样时钟信号相位和右拉偏采样时钟信号相位,测出待采样信号左时序最大余量和待采样信号右时序最大余量,并计算待采样信号时序最大余量;When the timer reaches the preset duration, the second channel enters the margin test mode, and in the margin test mode, the sampling clock signal phase is pulled left and the sampling clock signal phase is pulled right to measure the maximum left timing margin of the signal to be sampled and the maximum right timing margin of the signal to be sampled, and the maximum timing margin of the signal to be sampled is calculated; 若待采样信号时序最大余量小于K,则第二通道返回空闲状态,直至下一次计数器到达预设时长,第二通道进入余量测试模式;否则,设置偏移寄存器为1,第二通道进入余量调优模式,并在余量调优模式中,以设定步长调整待采样信号的延迟,并测出待采样信号左时序最大余量和待采样信号右时序最大余量,且计算待采样信号时序最大余量,并在当待采样信号时序最大余量小于K时,固定待采样信号的延迟,设置切换寄存器为1,其中K是在寄存器中配置的时序偏差阈值;If the maximum timing margin of the signal to be sampled is less than K, the second channel returns to the idle state until the next time the counter reaches the preset duration, and the second channel enters the margin test mode; otherwise, the offset register is set to 1, and the second channel enters the margin tuning mode, and in the margin tuning mode, the delay of the signal to be sampled is adjusted with the set step size, and the maximum left timing margin of the signal to be sampled and the maximum right timing margin of the signal to be sampled are measured, and the maximum timing margin of the signal to be sampled is calculated, and when the maximum timing margin of the signal to be sampled is less than K, the delay of the signal to be sampled is fixed, and the switching register is set to 1, where K is the timing deviation threshold configured in the register; 当偏移寄存器为1,且切换寄存器为1,并且总线状态为自刷新状态时,设置通道选择寄存器为1,将第二通道设置为正常工作模式,将第一通道设置为空闲模式。When the offset register is 1, the switch register is 1, and the bus state is in the self-refresh state, the channel selection register is set to 1, the second channel is set to the normal working mode, and the first channel is set to the idle mode. 2.根据权利要求1所述的高速内存总线时序自适应方法,其特征在于:2. The high-speed memory bus timing adaptive method according to claim 1, characterized in that: 所述若待采样信号时序最大余量小于K,则第二通道返回空闲状态,指的是:至少两次测出待采样信号左时序最大余量和待采样信号右时序最大余量,且至少两次计算得到的待采样信号时序最大余量均小于K,则第二通道返回空闲状态。If the maximum timing margin of the signal to be sampled is less than K, the second channel returns to the idle state, which means: the maximum left timing margin of the signal to be sampled and the maximum right timing margin of the signal to be sampled are measured at least twice, and the maximum timing margins of the signal to be sampled calculated at least twice are both less than K, then the second channel returns to the idle state. 3.根据权利要求2所述的高速内存总线时序自适应方法,其特征在于:3. The high-speed memory bus timing adaptive method according to claim 2, characterized in that: 所述以设定步长调整待采样信号的延迟,其中的设定步长为K/2取整后的结果和-K/2取整后的结果。The delay of the signal to be sampled is adjusted by setting a step length, wherein the set step length is a result of rounding K/2 and a result of rounding -K/2. 4.根据权利要求3所述的高速内存总线时序自适应方法,其特征在于:4. The high-speed memory bus timing adaptive method according to claim 3, characterized in that: 第一通道包括第一延迟模块、第二延迟模块、第一接收采样器和第一校验模块;The first channel includes a first delay module, a second delay module, a first receiving sampler and a first verification module; 第二通道包括第三延迟模块、第四延迟模块、第二接收采样器和第二校验模块;其中,The second channel includes a third delay module, a fourth delay module, a second receiving sampler and a second verification module; wherein, 待采样信号经过第一延迟模块后作为第一接收采样器的输入信号,采样时钟信号经过第二延迟模块后作为第一接收采样器的输入信号;The signal to be sampled is used as the input signal of the first receiving sampler after passing through the first delay module, and the sampling clock signal is used as the input signal of the first receiving sampler after passing through the second delay module; 待采样信号经过第三延迟模块后作为第二接收采样器的输入信号,采样时钟信号经过第四延迟模块后作为第二接收采样器的输入信号;The signal to be sampled is used as the input signal of the second receiving sampler after passing through the third delay module, and the sampling clock signal is used as the input signal of the second receiving sampler after passing through the fourth delay module; 第一校验模块接收第一接收采样器的输出信号,并作为复用器的输入信号;第二校验模块接收第二接收采样器的输出信号,并作为复用器的输入信号。The first verification module receives the output signal of the first receiving sampler and uses it as the input signal of the multiplexer; the second verification module receives the output signal of the second receiving sampler and uses it as the input signal of the multiplexer. 5.根据权利要求4所述的高速内存总线时序自适应方法,其特征在于:5. The high-speed memory bus timing self-adaptation method according to claim 4, characterized in that: 第一通道进入空闲模式后,当计时器到达预设时长,第一通道进入余量测试模式。After the first channel enters the idle mode, when the timer reaches a preset time length, the first channel enters the margin test mode. 6.根据权利要求5所述的高速内存总线时序自适应方法,其特征在于:6. The high-speed memory bus timing adaptive method according to claim 5, characterized in that: 第一通道进入余量测试模式后,若待采样信号时序最大余量不小于K,则第一通道进入余量调优模式;并且,After the first channel enters the margin test mode, if the maximum margin of the timing of the signal to be sampled is not less than K, the first channel enters the margin tuning mode; and, 在当偏移寄存器为1,且切换寄存器为1,并且总线状态为自刷新状态时,设置通道选择寄存器为1,将第一通道设置为正常工作模式,将第二通道设置为空闲模式。When the offset register is 1, the switch register is 1, and the bus state is in the self-refresh state, the channel selection register is set to 1, the first channel is set to the normal working mode, and the second channel is set to the idle mode. 7.根据权利要求6所述的高速内存总线时序自适应方法,其特征在于:7. The high-speed memory bus timing self-adaptation method according to claim 6, characterized in that: 所述以设定步长调整待采样信号的延迟,指的是:以设定步长调整第三延迟模块的延迟时长。The adjusting the delay of the signal to be sampled with a set step length refers to: adjusting the delay time length of the third delay module with a set step length.
CN202411269006.9A 2024-09-11 2024-09-11 High-speed memory bus time sequence self-adapting method Active CN118796735B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411269006.9A CN118796735B (en) 2024-09-11 2024-09-11 High-speed memory bus time sequence self-adapting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411269006.9A CN118796735B (en) 2024-09-11 2024-09-11 High-speed memory bus time sequence self-adapting method

Publications (2)

Publication Number Publication Date
CN118796735A true CN118796735A (en) 2024-10-18
CN118796735B CN118796735B (en) 2024-11-15

Family

ID=93034007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411269006.9A Active CN118796735B (en) 2024-09-11 2024-09-11 High-speed memory bus time sequence self-adapting method

Country Status (1)

Country Link
CN (1) CN118796735B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210065757A1 (en) * 2018-05-16 2021-03-04 Huawei Technologies Co., Ltd. DQS Position Adjustment Method , Controller and Network Device
CN113625940A (en) * 2020-05-06 2021-11-09 三星电子株式会社 Storage device and retraining method of storage device
CN114356206A (en) * 2020-09-30 2022-04-15 华为技术有限公司 Memory training method, memory controller, processor and electronic equipment
CN114968070A (en) * 2021-02-26 2022-08-30 华为技术有限公司 Method and related apparatus for optimizing flash memory granules
CN116303201A (en) * 2023-02-28 2023-06-23 西安思丹德信息技术有限公司 Self-adaptive synchronous parallel bus interface device and time sequence calibration method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210065757A1 (en) * 2018-05-16 2021-03-04 Huawei Technologies Co., Ltd. DQS Position Adjustment Method , Controller and Network Device
CN113625940A (en) * 2020-05-06 2021-11-09 三星电子株式会社 Storage device and retraining method of storage device
CN114356206A (en) * 2020-09-30 2022-04-15 华为技术有限公司 Memory training method, memory controller, processor and electronic equipment
CN114968070A (en) * 2021-02-26 2022-08-30 华为技术有限公司 Method and related apparatus for optimizing flash memory granules
CN116303201A (en) * 2023-02-28 2023-06-23 西安思丹德信息技术有限公司 Self-adaptive synchronous parallel bus interface device and time sequence calibration method

Also Published As

Publication number Publication date
CN118796735B (en) 2024-11-15

Similar Documents

Publication Publication Date Title
US6178133B1 (en) Method and system for accessing rows in multiple memory banks within an integrated circuit
US12367159B2 (en) Low latency memory access
US20110205832A1 (en) On-die termination circuit, memory device, memory module, and method of operating and training an on-die termination
CN100568386C (en) Semiconductor memory device capable of adjusting impedance of data output driver
JP5733126B2 (en) Memory interface circuit and timing adjustment method
JPH09204769A (en) Semiconductor memory device and memory system using the same
JP2000137983A (en) Semiconductor storage
JP2013058209A (en) Dynamic data strobe detection
JP6476325B1 (en) Pseudo SRAM and control method thereof
US20220129201A1 (en) Asynchronous arbitration across clock domains for register writes in an integrated circuit chip
US8406080B2 (en) Data output control circuit of a double data rate (DDR) synchronous semiconductor memory device responsive to a delay locked loop (DLL) clock and method thereof
JP2007134029A (en) Clock circuit for semiconductor memory
JP2000030456A (en) Memory device
JP3266127B2 (en) Synchronous semiconductor memory device
US20020054515A1 (en) Semiconductor memory device having row buffers
TWI749849B (en) Delay-locked loop, memory device, and method for operating delay-locked loop
US7626884B2 (en) Optimizing mode register set commands
CN118796735A (en) High-speed memory bus timing adaptation method
EP4127867B1 (en) Improved clocking scheme to receive data
US8074096B2 (en) Semiconductor integrated circuit, memory system, memory controller and memory control method
JP3588521B2 (en) Semiconductor integrated circuit
JP4731730B2 (en) Semiconductor memory device
JP2009032170A (en) Memory controller
US10496368B1 (en) Systems and methods for memory FIFO control
KR20010004202A (en) Device and method to control output data in semiconductor memory device

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
CP03 Change of name, title or address

Address after: 610096 Sichuan Province, Chengdu City, No. 399, West Section of Fucheng Avenue, Chengdu High-tech Development Zone, China (Sichuan) Free Trade Pilot Zone, Building 7, Unit 3, 14th Floor, Room 1409

Patentee after: Chengdu Xingtuo Microelectronics Technology Co.,Ltd.

Country or region after: China

Address before: No. 1409, 14th Floor, Unit 3, Building 7, No. 399 Fucheng Avenue West Section, High tech Zone, Chengdu City, Sichuan Province

Patentee before: Chengdu CETC Xingtuo Technology Co.,Ltd.

Country or region before: China