[go: up one dir, main page]

CN117347818A - A delay measurement method, device, system and interface circuit - Google Patents

A delay measurement method, device, system and interface circuit Download PDF

Info

Publication number
CN117347818A
CN117347818A CN202311215108.8A CN202311215108A CN117347818A CN 117347818 A CN117347818 A CN 117347818A CN 202311215108 A CN202311215108 A CN 202311215108A CN 117347818 A CN117347818 A CN 117347818A
Authority
CN
China
Prior art keywords
delay
control signal
time
measurement
measurement time
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.)
Pending
Application number
CN202311215108.8A
Other languages
Chinese (zh)
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.)
Nanjing Semidrive Technology Co Ltd
Original Assignee
Nanjing Semidrive 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 Nanjing Semidrive Technology Co Ltd filed Critical Nanjing Semidrive Technology Co Ltd
Priority to CN202311215108.8A priority Critical patent/CN117347818A/en
Publication of CN117347818A publication Critical patent/CN117347818A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/2851Testing of integrated circuits [IC]
    • G01R31/2882Testing timing characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Pulse Circuits (AREA)

Abstract

The application discloses a delay line delay measurement method, a delay line delay measurement device, a delay line delay measurement system and an interface circuit, wherein the delay line delay measurement method comprises the following steps: and acquiring a measurement mode of the delay line and a bit width of a delay control signal of the delay line, wherein the measurement mode is used for showing a target measurement time of the delay line, determining a pre-delay stage number of the delay control signal for controlling the delay line to realize delay according to the bit width, judging the coincidence of a delay output result under the action of the delay control signal corresponding to the pre-delay stage number and the target measurement time, and adjusting the pre-delay stage number of the delay control signal according to the coincidence until the delay output result under the action of the delay control signal corresponding to the pre-delay stage number coincides with the target measurement time, so as to obtain the delay stage number corresponding to the target measurement time. Thus, the measurement can be flexibly performed for different measurement modes, and the number of measurement turns is remarkably reduced.

Description

一种延时测量方法、装置、系统及接口电路A delay measurement method, device, system and interface circuit

技术领域Technical field

本申请涉及集成电路技术领域,尤其涉及一种延时测量方法、装置、系统及接口电路。The present application relates to the field of integrated circuit technology, and in particular to a delay measurement method, device, system and interface circuit.

背景技术Background technique

延迟线广泛应用于各种接口电路中,例如:SOC(system On Chip,片上系统)芯片读取DDR(Double Data Rate,双倍速率)存储器中的数据时需要用延迟线(delayline)把DQS(data strobe signal,数据选通信号)信号延迟1/4个时钟周期。延迟线的延迟时间和dly_code(一组多bit信号)呈线性正相关性,dly_code每增加1,延迟线的延迟时间增加一个延迟单元(Dly_element)的延迟。延迟线的步进延迟时间就是一个延迟单元(Dly_element)的延迟。Delay lines are widely used in various interface circuits. For example, when SOC (system on chip) chips read data in DDR (Double Data Rate) memories, they need to use delay lines to separate DQS ( data strobe signal, data strobe signal) signal is delayed by 1/4 clock cycle. The delay time of the delay line has a linear positive correlation with dly_code (a set of multi-bit signals). Every time dly_code increases by 1, the delay time of the delay line increases by the delay of a delay unit (Dly_element). The step delay time of the delay line is the delay of a delay unit (Dly_element).

延迟单元的延迟时间和环境温度、电压等相关。在芯片初始化阶段,需要测量目标时钟周期等效的延迟线的延迟时间,记录等效延迟时间对应的dly_code值,从而对延迟线设置不同的dly_code值得到预期的延迟时间。例如,测量一个时钟周期等效延迟时间对应的dly_code值是100,那么1/4时钟周期对应dly_code值是25。The delay time of the delay unit is related to the ambient temperature, voltage, etc. During the chip initialization phase, it is necessary to measure the delay time of the delay line equivalent to the target clock cycle, record the dly_code value corresponding to the equivalent delay time, and then set different dly_code values for the delay line to obtain the expected delay time. For example, the dly_code value corresponding to measuring the equivalent delay time of one clock cycle is 100, then the dly_code value corresponding to 1/4 clock cycle is 25.

因此,在延迟线延迟时间测量完成之前并不能准确产生目标延迟时间,所以在使用延迟线进行延迟之前,应首先完成延迟测量,并且延迟测量时间越短越好。同时,延迟时间测量的精度越高越好。Therefore, the target delay time cannot be accurately generated before the delay line delay time measurement is completed, so before using the delay line for delay, the delay measurement should be completed first, and the shorter the delay measurement time, the better. At the same time, the higher the accuracy of delay time measurement, the better.

目前主要采用的方案是参考时钟采样延迟之后的时钟,固定使用半周期进行测量,但是若待测时钟占空比不是精确的50%,将导致测量结果误差增大。并且测量期间dly_code需要逐级增加,测量时间很长。Currently, the main solution used is to sample the clock after the reference clock delay, and use a fixed half cycle for measurement. However, if the duty cycle of the clock to be measured is not exactly 50%, the error in the measurement results will increase. Moreover, dly_code needs to be increased step by step during the measurement period, and the measurement time is very long.

发明内容Contents of the invention

本申请实施例提供一种延时测量方法、装置、系统及接口电路。Embodiments of the present application provide a delay measurement method, device, system and interface circuit.

根据本申请第一方面,提供了一种延迟线的延时测量方法,该方法包括:获取所述延迟线的测量模式和所述延迟线的延迟控制信号的位宽,所述测量模式用于示出所述延迟线的目标测量时间;根据所述位宽,确定控制所述延迟线实现延时的延迟控制信号的预延迟级数;判断在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间的符合性;根据所述符合性调整所述延迟控制信号的预延迟级数,直至在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间相符合,得到与所述目标测量时间相对应的延迟级数。According to a first aspect of the present application, a delay measurement method of a delay line is provided. The method includes: obtaining a measurement mode of the delay line and a bit width of a delay control signal of the delay line, and the measurement mode is used to Shows the target measurement time of the delay line; determines the pre-delay level of the delay control signal that controls the delay line to achieve delay according to the bit width; determines the role of the delay control signal corresponding to the pre-delay level The delay output result under is consistent with the target measurement time; adjust the pre-delay series of the delay control signal according to the compliance, until the delay output under the action of the delay control signal corresponding to the pre-delay series The result is consistent with the target measurement time, and a delay series corresponding to the target measurement time is obtained.

根据本申请一实施方式,根据所述位宽,确定控制所述延迟线实现延时的延迟控制信号的预延迟级数,包括:根据所述位宽,取所述延迟控制信号的中位数作为所述预延迟级数。According to an embodiment of the present application, determining the number of pre-delay stages of the delay control signal that controls the delay line to achieve delay according to the bit width includes: taking the median of the delay control signal according to the bit width. as the pre-delay level.

根据本申请一实施方式,所述取所述延迟控制信号的中位数作为所述预延迟级数,包括:将所述延迟控制信号的最高位置为1,其他位置为零。According to an embodiment of the present application, taking the median of the delay control signal as the pre-delay level includes: setting the highest position of the delay control signal as 1 and other positions as zero.

根据本申请一实施方式,所述延迟输出结果用于示出在所述延迟级数对应的延迟控制信号作用下的实际延迟时间;相应的,所述判断在所述延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间的符合性,包括:判断所述实际延迟时间与所述目标测量时间的大小关系;在相邻两个延迟级数所得到的大小关系相反的情况下,判定所述延迟输出结果与所述目标测量时间相符合,确定所述相邻两次测试中延时差别较小的一次测试所对应的延迟控制信号延迟级数为与所述目标测量时间相对应的延迟级数;其中延时差别为所述实际延迟时间与所述目标测量时间差。According to an embodiment of the present application, the delay output result is used to show the actual delay time under the action of the delay control signal corresponding to the delay level; accordingly, the judgment is made based on the delay control signal corresponding to the delay level. The conformity of the delay output result under the action of the signal with the target measurement time includes: judging the size relationship between the actual delay time and the target measurement time; the size relationship obtained in two adjacent delay series is opposite. In this case, it is determined that the delay output result is consistent with the target measurement time, and it is determined that the delay level of the delay control signal corresponding to the test with a smaller delay difference among the two adjacent tests is equal to the target measurement time. The delay series corresponding to time; where the delay difference is the difference between the actual delay time and the target measurement time.

根据本申请一实施方式,所述延迟输出结果用于示出在所述延迟级数对应的延迟控制信号作用下的实际延迟时间;相应的,所述根据所述符合性调整所述延迟控制信号的预延迟级数,包括:在所述实际延迟时间大于所述目标测量时间时,采用二分法调整所述预延迟级数,直至相邻两个延迟级数所得到所述实际延迟时间与所述目标测量时间的大小关系相反。According to an embodiment of the present application, the delay output result is used to show the actual delay time under the action of the delay control signal corresponding to the delay level; accordingly, the delay control signal is adjusted according to the compliance The pre-delay series includes: when the actual delay time is greater than the target measurement time, the dichotomy method is used to adjust the pre-delay series until the actual delay time obtained by two adjacent delay series is the same as the target measurement time. The relationship between the size of the above-mentioned target measurement time is opposite.

根据本申请一实施方式,所述采用二分法调整所述预延迟级数,包括:在所述实际延迟时间大于所述目标测量时间时,将前一次预延迟级数中置为1的位置为零,其他位保持不变;在所述实际延迟时间小于所述目标测量时间时,将前一次预延迟级数中置为1的位保持不变。According to an embodiment of the present application, the adjustment of the pre-delay series using a dichotomy method includes: when the actual delay time is greater than the target measurement time, setting the position of the previous pre-delay series to 1 is zero, and other bits remain unchanged; when the actual delay time is less than the target measurement time, the bits set to 1 in the previous pre-delay series remain unchanged.

根据本申请第二方面,还提供了一种延迟线的延时测量装置,所述装置包括:获取模块,用于获取所述延迟线的测量模式和所述延迟线的延迟控制信号的位宽,所述测量模式用于示出所述延迟线的目标测量时间;确定模块,用于根据所述位宽,确定控制所述延迟线实现延时的延迟控制信号的预延迟级数;判断模块,用于判断在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间的符合性;调整模块,用于根据所述符合性调整所述延迟控制信号的预延迟级数,直至在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间相符合,得到与所述目标测量时间相对应的延迟级数。According to a second aspect of the present application, a delay measurement device for a delay line is also provided. The device includes: an acquisition module for acquiring the measurement mode of the delay line and the bit width of the delay control signal of the delay line. , the measurement mode is used to show the target measurement time of the delay line; the determination module is used to determine the pre-delay level of the delay control signal that controls the delay line to achieve delay according to the bit width; the judgment module , used to determine the compliance of the delay output result under the action of the delay control signal corresponding to the pre-delay series with the target measurement time; an adjustment module, used to adjust the pre-delay control signal according to the compliance Delay the series until the delay output result under the action of the delay control signal corresponding to the pre-delay series matches the target measurement time, and obtain the delay series corresponding to the target measurement time.

根据本申请第三方面,还提供了一种延迟线的延时测量系统,所述系统包括:文件寄存单元,用于接收和存储对延迟线进行延时测量的控制文件和状态文件;延时检测电路单元,用于在测量控制单元触发下,基于所述状态文件对延迟线进行延时检测,并发送延迟输出结果;测量控制单元,用于从所述文件寄存单元获取所述控制文件,触发所述延时检测电路单元进行延时检测,从所述延时检测电路单元获取所述延迟输出结果,并根据所述延迟输出结果更新所述状态文件。According to the third aspect of the present application, a delay measurement system for a delay line is also provided. The system includes: a file storage unit for receiving and storing control files and status files for delay measurement of the delay line; The detection circuit unit is used to perform delay detection on the delay line based on the status file when triggered by the measurement control unit, and send the delay output result; the measurement control unit is used to obtain the control file from the file storage unit, The delay detection circuit unit is triggered to perform delay detection, the delay output result is obtained from the delay detection circuit unit, and the status file is updated according to the delay output result.

根据本申请一实施方式,所述状态文件包括测量模式子文件和位宽子文件,所述测量模式子文件用于示出所述延迟线的目标测量时间,所述位宽子文件用于示出延迟控制信号的位宽;相应的,所述测量控制单元根据所述延迟输出结果更新所述状态文件,包括:根据所述位宽,确定控制所述延迟线实现延时的延迟控制信号的预延迟级数;判断在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间的符合性;根据所述符合性调整所述延迟控制信号的预延迟级数,直至在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间相符合,得到与所述目标测量时间相对应的延迟级数。According to an embodiment of the present application, the status file includes a measurement mode sub-file and a bit-width sub-file. The measurement mode sub-file is used to show the target measurement time of the delay line, and the bit-width sub-file is used to show The bit width of the delay control signal is output; accordingly, the measurement control unit updates the status file according to the delay output result, including: determining the delay control signal that controls the delay line to achieve delay according to the bit width. Pre-delay series; determine the compliance of the delay output result under the action of the delay control signal corresponding to the pre-delay series with the target measurement time; adjust the pre-delay series of the delay control signal according to the compliance , until the delay output result under the action of the delay control signal corresponding to the pre-delay series matches the target measurement time, and a delay series corresponding to the target measurement time is obtained.

根据本申请第四方面,还提供了一种需要进行延迟测量的接口电路,所述接口电路包括上述延迟测量系统。According to a fourth aspect of the present application, an interface circuit that requires delay measurement is also provided, and the interface circuit includes the above delay measurement system.

本申请实施例延迟线的延时测量方法,获取延迟线的测量模式和所述延迟线的延迟控制信号的位宽,所述测量模式用于示出所述延迟线的目标测量时间,根据所述位宽,确定控制所述延迟线实现延时的延迟控制信号的预延迟级数,判断在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间的符合性,并根据所述符合性调整所述延迟控制信号的预延迟级数,直至在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间相符合,得到与所述目标测量时间相对应的延迟级数。如此,可以针对不同测量模式灵活进行测量,例如:可以分别在0.25T、0.5T或1T模式下进行测量,其中,测量模式为1T模式时不受时钟占空比影响,测量结果更加准确。进一步的根据位宽确定控制所述延迟线实现延时的延迟控制信号的预延迟级数,以及根据在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间的符合性调整所述延迟控制信号的预延迟级数,能够显著减少测量的轮次。The delay measurement method of the delay line in the embodiment of the present application obtains the measurement mode of the delay line and the bit width of the delay control signal of the delay line. The measurement mode is used to show the target measurement time of the delay line. According to the The above-mentioned bit width is used to determine the number of pre-delay stages of the delay control signal that controls the delay line to achieve delay, and to determine whether the delay output result under the action of the delay control signal corresponding to the pre-delay stage is consistent with the target measurement time. property, and adjust the pre-delay series of the delay control signal according to the compliance, until the delay output result under the action of the delay control signal corresponding to the pre-delay series is consistent with the target measurement time, and the result is obtained as described The delay series corresponding to the target measurement time. In this way, measurements can be flexibly performed for different measurement modes. For example, measurements can be performed in 0.25T, 0.5T or 1T modes respectively. When the measurement mode is 1T mode, it is not affected by the clock duty cycle and the measurement results are more accurate. Further, the number of pre-delay stages of the delay control signal that controls the delay line to achieve delay is determined based on the bit width, and based on the delay output result under the action of the delay control signal corresponding to the pre-delay stage and the target measurement time. The compliance adjustment of the pre-delay series of the delay control signal can significantly reduce the number of measurement rounds.

需要理解的是,本申请的教导并不需要实现上面所述的全部有益效果,而是特定的技术方案可以实现特定的技术效果,并且本申请的其他实施方式还能够实现上面未提到的有益效果。It should be understood that the teachings of the present application do not need to achieve all the beneficial effects mentioned above, but specific technical solutions can achieve specific technical effects, and other embodiments of the present application can also achieve beneficial effects not mentioned above. Effect.

附图说明Description of drawings

通过参考附图阅读下文的详细描述,本申请示例性实施方式的上述以及其他目的、特征和优点将变得易于理解。在附图中,以示例性而非限制性的方式示出了本申请的若干实施方式,其中:The above and other objects, features and advantages of the exemplary embodiments of the present application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of the application are shown by way of example and not by way of limitation, in which:

在附图中,相同或对应的标号表示相同或对应的部分。In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

图1示出了本申请实施例本申请延迟线的延时测量方法的应用场景示意图;Figure 1 shows a schematic diagram of the application scenario of the delay measurement method of the delay line of the present application according to the embodiment of the present application;

图2示出了DDR存储器的寄存器采样建立和保持时间的时序图;Figure 2 shows the timing diagram of the register sampling setup and hold times of DDR memory;

图3示出了延迟线的电路结构示意图;Figure 3 shows a schematic diagram of the circuit structure of the delay line;

图4示出了延迟线的一个延迟单元的电路结构示意图;Figure 4 shows a schematic circuit structure diagram of a delay unit of the delay line;

图5示出了本申请实施例提供的延迟线的延时测量方法的实现流程示意图;Figure 5 shows a schematic flow chart of the implementation of the delay measurement method of a delay line provided by an embodiment of the present application;

图6示出本申请实施例提供的延迟线的延时测量方法的具体应用示例的实现流程示意图;Figure 6 shows a schematic implementation flow diagram of a specific application example of the delay line delay measurement method provided by the embodiment of the present application;

图7示出了本申请实施例提供的延迟线的延时测量装置的组成结构示意图;Figure 7 shows a schematic structural diagram of a delay measurement device for a delay line provided by an embodiment of the present application;

图8示出本申请实施例提供的本申请实施例提供的延迟线的延时测量系统的组成结构示意图;Figure 8 shows a schematic structural diagram of a delay measurement system for a delay line provided by an embodiment of the present application;

图9示出了基于图8所示的延时测量系统的dly_ms_ctrl的状态机的状态转换图;Figure 9 shows a state transition diagram of the state machine of dly_ms_ctrl based on the delay measurement system shown in Figure 8;

图10本申请实施例提供的本申请实施例提供的延迟线的延时测量电路;Figure 10 is a delay measurement circuit of a delay line provided by an embodiment of this application;

图11示出了一个dly_code位宽为8、1T模式的延迟线延迟测量示例的波形示意图。Figure 11 shows a schematic waveform diagram of a delay line delay measurement example with a dly_code bit width of 8 and 1T mode.

具体实施方式Detailed ways

下面将参考若干示例性实施方式来描述本申请的原理和精神。应当理解,给出这些实施方式仅仅是为使本领域技术人员能够更好地理解进而实现本申请,而并非以任何方式限制本申请的范围。相反,提供这些实施方式是为使本申请更加透彻和完整,并能够将本申请的范围完整地传达给本领域的技术人员。The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present application, and are not intended to limit the scope of the present application in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

下面结合附图和具体实施例对本申请的技术方案进一步详细阐述。The technical solution of the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

首先,为了更好的对本申请实施例的方案进行阐述,这里首先对本申请实施例的应用场景进行简单说明。延迟线是一种用于将电信号延迟一段时间的元件或器件,其广泛应用于各种接口电路中。举例说明,如图1所示,SoC(System on Chip,片上系统)芯片读取DDR存储器中的数据时需要用延迟线delayline把DQS信号延迟1/4个时钟周期。图2示出了DDR存储器的寄存器采样建立和保持时间的时序图,如图2所示,首先DDR存储器在接收到SoC芯片发送的读命令之后返回边沿对齐的DQS和DQ[7:0]。在SoC内部为了满足寄存器采样的建立和保持时间,需要把DQS延迟1/4个时钟周期变成DQS_dly,然后分别用DQS_dly的上升沿和下降沿采样DQ[7:0]都得到DQ_pos和DQ_neg,此时,就需要延迟线来实现对DQS信号的延迟。First, in order to better explain the solutions of the embodiments of the present application, the application scenarios of the embodiments of the present application are briefly described here. A delay line is a component or device used to delay electrical signals for a period of time. It is widely used in various interface circuits. For example, as shown in Figure 1, when the SoC (System on Chip) chip reads the data in the DDR memory, it needs to use a delay line to delay the DQS signal by 1/4 clock cycle. Figure 2 shows the timing diagram of the register sampling setup and hold time of the DDR memory. As shown in Figure 2, first, the DDR memory returns edge-aligned DQS and DQ[7:0] after receiving the read command sent by the SoC chip. In order to meet the setup and hold time of register sampling within the SoC, DQS needs to be delayed by 1/4 clock cycle to become DQS_dly, and then the rising edge and falling edge of DQS_dly are used to sample DQ[7:0] respectively to obtain DQ_pos and DQ_neg. At this time, a delay line is needed to delay the DQS signal.

其次,这里对延迟线的电路结构进行简单说明,以说明对延迟线进行延迟时间测量的原因。延迟线的电路结构如图3所示,din是需要延迟的信号;dout是经过延迟之后的信号;dly_code是一组多bit(位)信号,用来控制延迟线的延迟大小。延迟线内部包含若干个延迟单元(Dly_element)和一个译码器(delayline_decoder)。当dly_code=0时,译码器产生的en[n:0]='b0;当dly_code=1时,en[n:0]='b1;当dly_code=2时,en[n:0]='b11;当dly_code=3时,en[n:0]='b111;依次类推。其中,一个延迟单元的电路结构如图4所示。Secondly, here is a brief explanation of the circuit structure of the delay line to explain the reasons for measuring the delay time of the delay line. The circuit structure of the delay line is shown in Figure 3. din is the signal that needs to be delayed; dout is the signal after delay; dly_code is a set of multi-bit signals used to control the delay size of the delay line. The delay line contains several delay units (Dly_element) and a decoder (delayline_decoder). When dly_code=0, en[n:0]='b0 generated by the decoder; when dly_code=1, en[n:0]='b1; when dly_code=2, en[n:0]= 'b11; When dly_code=3, en[n:0]='b111; and so on. Among them, the circuit structure of a delay unit is shown in Figure 4.

由上述分析可知,延迟线的延迟时间和dly_code呈线性正相关性,dly_code每增加1,延迟线的延迟时间增加一个延迟单元(Dly_element)的延迟时间。延迟线的步进延迟时间就是一个延迟单元(Dly_element)的延迟时间。而一个延迟单元的延迟时间与延迟线的环境温度、电压等相关,是一个动态变化的参数。因此在芯片初始化阶段,需要测量与目标时钟周期等效的延迟线的延迟时间,记录下等效延迟时间对应的dly_code值,从而对延迟线设置不同的dly_code值得到预期的延迟时间。例如,测量一个时钟周期T等效延迟时间对应的dly_code值是100,那么如果需要获得1/4时钟周期的延迟时间,则对应的dly_code值是25。From the above analysis, it can be seen that the delay time of the delay line has a linear positive correlation with dly_code. Every time dly_code increases by 1, the delay time of the delay line increases by the delay time of a delay unit (Dly_element). The step delay time of the delay line is the delay time of a delay unit (Dly_element). The delay time of a delay unit is related to the ambient temperature, voltage, etc. of the delay line, and is a dynamically changing parameter. Therefore, during the chip initialization phase, it is necessary to measure the delay time of the delay line that is equivalent to the target clock cycle, record the dly_code value corresponding to the equivalent delay time, and then set different dly_code values for the delay line to obtain the expected delay time. For example, the dly_code value corresponding to measuring the equivalent delay time of one clock cycle T is 100. If you need to obtain the delay time of 1/4 clock cycle, the corresponding dly_code value is 25.

鉴于此,本申请实施例提供了一种延迟线的延时测量方法,图5示出了本申请实施例提供的延迟线的延时测量方法的实现流程示意图。In view of this, an embodiment of the present application provides a delay measurement method for a delay line. FIG. 5 shows a schematic flow chart of the implementation of the delay measurement method of a delay line provided by an embodiment of the present application.

参考图5,本申请实施例延迟线的延时测量方法,至少包括如下操作流程:操作501,获取延迟线的测量模式和延迟线的延迟控制信号的位宽,测量模式用于示出延迟线的目标测量时间;操作502,根据位宽,确定控制延迟线实现延时的延迟控制信号的预延迟级数;操作503,判断在预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间的符合性;操作504,根据符合性调整延迟控制信号的预延迟级数,直至在预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间相符合,得到与目标测量时间相对应的延迟级数。Referring to Figure 5, the delay measurement method of the delay line in the embodiment of the present application at least includes the following operation process: Operation 501, obtain the measurement mode of the delay line and the bit width of the delay control signal of the delay line. The measurement mode is used to show the delay line The target measurement time; operation 502, determine the number of pre-delay stages of the delay control signal that controls the delay line to achieve delay according to the bit width; operation 503, determine the delay output result under the action of the delay control signal corresponding to the pre-delay stage and Compliance of the target measurement time; operation 504, adjust the pre-delay series of the delay control signal according to the compliance, until the delay output result under the action of the delay control signal corresponding to the pre-delay series is consistent with the target measurement time, and obtain the target measurement time Measure the delay level corresponding to the time.

在操作501中,获取延迟线的测量模式和延迟线的延迟控制信号的位宽,测量模式用于示出延迟线的目标测量时间。In operation 501, a measurement pattern of a delay line and a bit width of a delay control signal of the delay line are acquired, the measurement pattern being used to show a target measurement time of the delay line.

在本申请这一实施方式中,测量模式可以包括0.25T、0.5T和1T等,这里T表示延迟线的一个时钟周期。延迟控制信号可以一组二进制数字表示,其位宽即为这个二进制数字的位数。In this embodiment of the present application, the measurement modes may include 0.25T, 0.5T, 1T, etc., where T represents one clock cycle of the delay line. The delay control signal can be represented by a set of binary digits, and its bit width is the number of bits in this binary digit.

这里获取延迟线的测量模式,目的是可以根据实际需要灵活选择0.25T、0.5T或1T等的延迟时间进行测量。具体的,在需要利用延迟线的接口电路的信号传输频率为低频条件下,例如:100M或200M,延迟线的最大延迟时间小于1T,则使用0.5T测量模式;在需要利用延迟线的接口电路的信号传输频率为高频条件下,例如:1G,延迟线的最大延迟大于1T,使用1T测量模式。称选定的0.5T或者1T为目标测量时间。The measurement mode of the delay line is obtained here. The purpose is to flexibly select the delay time of 0.25T, 0.5T or 1T for measurement according to actual needs. Specifically, when the signal transmission frequency of the interface circuit that needs to use a delay line is low frequency, such as 100M or 200M, and the maximum delay time of the delay line is less than 1T, the 0.5T measurement mode is used; when the interface circuit that needs to use a delay line When the signal transmission frequency is high frequency, for example: 1G, the maximum delay of the delay line is greater than 1T, use the 1T measurement mode. The selected 0.5T or 1T is called the target measurement time.

在操作502中,根据位宽,确定控制延迟线实现延时的延迟控制信号的预延迟级数。In operation 502, the number of pre-delay stages of the delay control signal that controls the delay line to achieve delay is determined according to the bit width.

在本申请这一实施方式中,根据位宽,取延迟控制信号的中位数作为预延迟级数,以实现根据位宽确定控制延迟线实现延时的延迟控制信号的预延迟级数。In this embodiment of the present application, according to the bit width, the median number of the delay control signal is taken as the pre-delay level, so as to determine the pre-delay level of the delay control signal that controls the delay line to achieve delay according to the bit width.

在本申请这一实施方式中,可以采用以下方法实现取延迟控制信号的中位数作为预延迟级数:将延迟控制信号的最高位置为1,其他位置为零。In this implementation of the present application, the following method can be used to achieve taking the median of the delay control signal as the pre-delay level: setting the highest position of the delay control signal as 1 and other positions as zero.

例如:延迟控制信号的位宽为3,这里可以直接取延迟级数为二进制100,即预延迟级数为4。For example: the bit width of the delay control signal is 3, here you can directly take the delay stage as binary 100, that is, the pre-delay stage is 4.

这里预延迟级数是指,将与预延迟级数对应的延迟单元接入对线路信号进行延迟,检测实际的延迟时间是否与目标延迟时间相符合。Here, the pre-delay level means that the delay unit corresponding to the pre-delay level is connected to delay the line signal, and it is detected whether the actual delay time matches the target delay time.

在操作503中,判断在预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间的符合性。In operation 503, it is determined whether the delay output result under the action of the delay control signal corresponding to the pre-delay stage is consistent with the target measurement time.

在本申请这一实施方式中,延迟输出结果用于示出在延迟级数对应的延迟控制信号作用下的实际延迟时间。相应的,可以采用如下操作判断在延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间的符合性:判断实际延迟时间与目标测量时间的大小关系,在相邻两个延迟级数所得到的大小关系相反的情况下,判定延迟输出结果与目标测量时间相符合,确定相邻两次测试中延时差别较小的一次测试所对应的延迟控制信号延迟级数为与目标测量时间相对应的延迟级数。其中,延时差别为实际延迟时间与目标测量时间差。In this embodiment of the present application, the delay output result is used to show the actual delay time under the action of the delay control signal corresponding to the delay level. Correspondingly, the following operations can be used to determine the consistency of the delay output result under the action of the delay control signal corresponding to the delay stage and the target measurement time: determine the relationship between the actual delay time and the target measurement time, and determine the relationship between the actual delay time and the target measurement time. If the magnitude relationship obtained by the number is opposite, determine that the delay output result is consistent with the target measurement time, and determine that the delay level of the delay control signal corresponding to the test with a smaller delay difference between the two adjacent tests is the same as the target measurement time. The delay series corresponding to the time. Among them, the delay difference is the difference between the actual delay time and the target measurement time.

这里,通过判断预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间的符合性,确定最符合目标测量时间的延迟级数。Here, by judging the consistency of the delay output result under the action of the delay control signal corresponding to the pre-delay stage and the target measurement time, the delay stage that best meets the target measurement time is determined.

在操作504中,根据符合性调整延迟控制信号的预延迟级数,直至在预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间相符合,得到与目标测量时间相对应的延迟级数。In operation 504, the pre-delay series of the delay control signal is adjusted according to the compliance, until the delay output result under the action of the delay control signal corresponding to the pre-delay series is consistent with the target measurement time, and a value corresponding to the target measurement time is obtained. Delay level.

在本申请这一实施方式中,延迟输出结果用于示出在延迟级数对应的延迟控制信号作用下的实际延迟时间。相应的,可以采用以下操作实现根据符合性调整延迟控制信号的预延迟级数:在实际延迟时间大于目标测量时间时,采用二分法调整预延迟级数,直至相邻两个延迟级数所得到实际延迟时间与目标测量时间的大小关系相反。In this embodiment of the present application, the delay output result is used to show the actual delay time under the action of the delay control signal corresponding to the delay level. Correspondingly, the following operations can be used to adjust the pre-delay series of the delay control signal according to compliance: when the actual delay time is greater than the target measurement time, the dichotomy method is used to adjust the pre-delay series until the two adjacent delay series are obtained The actual delay time is inversely related to the target measurement time.

在本申请这一实施方式中,采用二分法调整预延迟级数具体可以通过如下操作实现:在实际延迟时间大于目标测量时间时,将前一次预延迟级数中置为1的位置为零,其他位保持不变,在实际延迟时间小于目标测量时间时,将前一次预延迟级数中置为1的位保持不变。In this implementation of the present application, the use of the dichotomy method to adjust the pre-delay series can be achieved through the following operations: when the actual delay time is greater than the target measurement time, the position set to 1 in the previous pre-delay series is set to zero, The other bits remain unchanged. When the actual delay time is less than the target measurement time, the bit set to 1 in the previous pre-delay series remains unchanged.

如此,采用半分法逐步逼近目标测量时间,有效加快测量速度,缩短测量时间。In this way, the half-point method is used to gradually approach the target measurement time, effectively speeding up the measurement speed and shortening the measurement time.

图6示出本申请实施例提供的延迟线的延时测量方法的具体应用示例的实现流程示意图。FIG. 6 shows a schematic flowchart of an implementation example of a specific application example of the delay line delay measurement method provided by the embodiment of the present application.

参考图6,本申请实施例提供的延迟线的延时测量方法的具体应用示例,至少包括如下操作流程:Referring to Figure 6, a specific application example of the delay line delay measurement method provided by the embodiment of the present application includes at least the following operation process:

在本申请这一实施方式中,根据测量模式确定0.25T、0.5T或1T模式的测量模式之后,首先根据延迟控制信号dly_code的位宽,取其最高为为1,其他位置为0,在延迟线的延迟时间大于目标延迟时间其最高位不变,第二位置1,其他位置零。直至延迟线的延迟时间不大于目标延迟时间。取最后两次测量过程中实际延迟时间与目标延迟时间差值较小的一次所对应的延迟级数作为最终的与目标延迟时间对应的目标延迟级数。这里需要说明的是,这里的目标延迟时间与上文的目标测量时间概念一致。In this implementation of the present application, after determining the measurement mode of 0.25T, 0.5T or 1T mode according to the measurement mode, first according to the bit width of the delay control signal dly_code, the highest value is 1, and the other positions are 0. If the delay time of the line is greater than the target delay time, its highest bit remains unchanged, the second bit is 1, and the other bits are zero. The delay time until the delay line is no greater than the target delay time. The delay series corresponding to the smaller difference between the actual delay time and the target delay time in the last two measurement processes is taken as the final target delay series corresponding to the target delay time. It should be noted here that the target delay time here is consistent with the target measurement time concept above.

由此,若dly_code位宽为n bit,控制的延迟线步进级数为2的n次方。使用半分法,在测量延迟线延迟时间过程中只需要遍历n次dly_code即可得到测量结果。例如,256级的延迟单元对应dly_code位宽是8bit,只需要遍历8次dly_code就可以得到测量结果。相比于现有技术中最多需要遍历256次dly_code才能得到测量结果的方案,有效缩短测量时间。Therefore, if the dly_code bit width is n bit, the number of controlled delay line step levels is 2 to the nth power. Using the half-division method, in the process of measuring the delay line delay time, only n times of dly_code need to be traversed to obtain the measurement result. For example, the dly_code bit width corresponding to a 256-level delay unit is 8 bits, and the measurement result only needs to be traversed 8 times through dly_code. Compared with the existing technology that requires up to 256 traversals of dly_code to obtain the measurement results, the measurement time is effectively shortened.

其中,图6的其他具体实现过程与图5所示实施例中操作501-504的具体实现过程相类似,这里不再赘述。The other specific implementation processes in Figure 6 are similar to the specific implementation processes of operations 501-504 in the embodiment shown in Figure 5, and will not be described again here.

本申请实施例延迟线的延时测量方法,获取延迟线的测量模式和延迟线的延迟控制信号的位宽,测量模式用于示出延迟线的目标测量时间,根据位宽,确定控制延迟线实现延时的延迟控制信号的预延迟级数,判断在预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间的符合性,并根据符合性调整延迟控制信号的预延迟级数,直至在预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间相符合,得到与目标测量时间相对应的延迟级数。如此,可以针对不同测量模式灵活进行测量,例如:可以分别在0.25T、0.5T或1T模式下进行测量,其中,测量模式为1T模式时不受时钟占空比影响,测量结果更加准确。进一步的根据位宽确定控制延迟线实现延时的延迟控制信号的预延迟级数,以及根据在预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间的符合性调整延迟控制信号的预延迟级数,能够显著减少测量的轮次。The delay measurement method of the delay line in the embodiment of the present application obtains the measurement mode of the delay line and the bit width of the delay control signal of the delay line. The measurement mode is used to show the target measurement time of the delay line. According to the bit width, the control delay line is determined. Realize the pre-delay stages of the delayed delay control signal, determine the compliance of the delay output result under the action of the delay control signal corresponding to the pre-delay stage and the target measurement time, and adjust the pre-delay stage of the delay control signal according to the compliance number until the delay output result under the action of the delay control signal corresponding to the pre-delay series matches the target measurement time, and the delay series corresponding to the target measurement time is obtained. In this way, measurements can be flexibly performed for different measurement modes. For example, measurements can be performed in 0.25T, 0.5T or 1T modes respectively. When the measurement mode is 1T mode, it is not affected by the clock duty cycle and the measurement results are more accurate. Further, the number of pre-delay stages of the delay control signal that controls the delay line to achieve delay is determined based on the bit width, and the delay control is adjusted based on the compliance of the delay output result under the action of the delay control signal corresponding to the pre-delay stage and the target measurement time. The pre-delay series of signals can significantly reduce the number of measurement rounds.

同理,基于上文延迟线的延时测量方法,本申请实施例还提供一种计算机可读存储介质,计算机可读存储介质存储有程序,当程序被处理器执行时,使得处理器至少执行如下的操作步骤:操作501,获取延迟线的测量模式和延迟线的延迟控制信号的位宽,测量模式用于示出延迟线的目标测量时间;操作502,根据位宽,确定控制延迟线实现延时的延迟控制信号的预延迟级数;操作503,判断在预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间的符合性;操作504,根据符合性调整延迟控制信号的预延迟级数,直至在预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间相符合,得到与目标测量时间相对应的延迟级数。Similarly, based on the above delay line delay measurement method, embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a program. When the program is executed by the processor, the processor at least executes The following operation steps: Operation 501, obtain the measurement mode of the delay line and the bit width of the delay control signal of the delay line. The measurement mode is used to show the target measurement time of the delay line; Operation 502, determine the control delay line implementation based on the bit width. The pre-delay series of the delayed delay control signal; Operation 503, determine the compliance of the delay output result under the action of the delay control signal corresponding to the pre-delay series with the target measurement time; Operation 504, adjust the delay control signal according to the compliance pre-delay series until the delay output result under the action of the delay control signal corresponding to the pre-delay series matches the target measurement time, and the delay series corresponding to the target measurement time is obtained.

进一步,基于如上文延迟线的延时测量方法,本申请实施例还提供一种延迟线的延时测量装置,如图7,该装置70包括:获取模块701,用于获取延迟线的测量模式和延迟线的延迟控制信号的位宽,测量模式用于示出延迟线的目标测量时间;确定模块702,用于根据位宽,确定控制延迟线实现延时的延迟控制信号的预延迟级数;判断模块703,用于判断在预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间的符合性;调整模块704,用于根据符合性调整延迟控制信号的预延迟级数,直至在预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间相符合,得到与目标测量时间相对应的延迟级数。Furthermore, based on the above delay line delay measurement method, embodiments of the present application also provide a delay line delay measurement device, as shown in Figure 7. The device 70 includes: an acquisition module 701, used to obtain the measurement mode of the delay line. and the bit width of the delay control signal of the delay line, the measurement mode is used to show the target measurement time of the delay line; the determination module 702 is used to determine the number of pre-delay stages of the delay control signal that controls the delay line to achieve delay according to the bit width. ; Judgment module 703, used to determine the compliance of the delay output result under the action of the delay control signal corresponding to the pre-delay series with the target measurement time; Adjustment module 704, used to adjust the pre-delay series of the delay control signal according to compliance , until the delay output result under the action of the delay control signal corresponding to the pre-delay series matches the target measurement time, and the delay series corresponding to the target measurement time is obtained.

更进一步,基于如上文延迟线的延时测量方法,本申请实施例还提供了一种延迟线的延时测量系统,如图8所示,该系统包括:文件寄存单元reg_file,用于接收和存储对延迟线进行延时测量的控制文件和状态文件;延时检测电路单元dly_ms,用于在测量控制单元触发下,基于状态文件对延迟线进行延时检测,并发送延迟输出结果;测量控制单元dly_ms_ctrl,用于从文件寄存单元获取控制文件,触发延时检测电路单元进行延时检测,从延时检测电路单元获取延迟输出结果,并根据延迟输出结果更新状态文件。Furthermore, based on the above delay line delay measurement method, embodiments of the present application also provide a delay line delay measurement system, as shown in Figure 8. The system includes: a file storage unit reg_file, used to receive and Stores the control file and status file for delay measurement of the delay line; the delay detection circuit unit dly_ms is used to perform delay detection on the delay line based on the status file and send the delay output result when triggered by the measurement control unit; measurement control The unit dly_ms_ctrl is used to obtain the control file from the file storage unit, trigger the delay detection circuit unit to perform delay detection, obtain the delay output result from the delay detection circuit unit, and update the status file according to the delay output result.

在本申请这一实施方式中,状态文件包括测量模式子文件和位宽子文件,测量模式子文件用于示出延迟线的目标测量时间,位宽子文件用于示出延迟控制信号的位宽;相应的,测量控制单元根据延迟输出结果更新状态文件,包括:根据位宽,确定控制延迟线实现延时的延迟控制信号的预延迟级数;判断在预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间的符合性;根据符合性调整延迟控制信号的预延迟级数,直至在预延迟级数对应的延迟控制信号作用下的延迟输出结果与目标测量时间相符合,得到与目标测量时间相对应的延迟级数。In this embodiment of the present application, the status file includes a measurement mode sub-file and a bit-width sub-file. The measurement mode sub-file is used to show the target measurement time of the delay line, and the bit-width sub-file is used to show the bits of the delay control signal. width; correspondingly, the measurement control unit updates the status file according to the delay output result, including: according to the bit width, determining the pre-delay level of the delay control signal that controls the delay line to achieve delay; judging the delay control signal corresponding to the pre-delay level The delay output result under the action is consistent with the target measurement time; adjust the pre-delay series of the delay control signal according to the compliance, until the delay output result under the action of the delay control signal corresponding to the pre-delay series is consistent with the target measurement time , obtain the delay series corresponding to the target measurement time.

这里对各个单元之间传输的信号做出如下解释:Here is the following explanation of the signals transmitted between each unit:

reg_access_bus:读写reg_file内部的寄存器的接口信号。reg_access_bus: Interface signal for reading and writing registers inside reg_file.

dly_ms_start:当用户配置寄存器触发延迟时间测量时,dly_ms_start会生效(通常定义1为生效值,0为不生效值)。dly_ms_start: When the user configuration register triggers delay time measurement, dly_ms_start will take effect (usually defined as 1 as a valid value and 0 as a non-valid value).

dly_code_upd:更新dly_code的指示信号。dly_code_upd: Instruction signal to update dly_code.

dly_code_upd_value:当dly_code_upd有效时,reg_file内部的dly_code寄存器会被更新成dly_code_upd_value值。dly_code_upd_value: When dly_code_upd is valid, the dly_code register inside reg_file will be updated to the dly_code_upd_value value.

dly_ms_finish:延迟时间测量结束的指示信号。dly_ms_finish: Indicates the end of delay time measurement.

dly_ms_mode:用来区分0.5T和1T两种延迟时间测量模式。例如,可以定义dly_ms_mode等于0为1T测量模式,dly_ms_mode等于1为0.5T测量模式。dly_ms_mode: Used to distinguish between 0.5T and 1T delay time measurement modes. For example, you can define dly_ms_mode equal to 0 as 1T measurement mode, and dly_ms_mode equal to 1 as 0.5T measurement mode.

dly_code:控制延迟线的延迟级数。dly_code: Controls the delay level of the delay line.

dly_ms_trig:脉冲信号,dly_ms收到dly_ms_trig脉冲后会对当前dly_code值对应的延迟线的延迟进行测量。dly_ms_trig: Pulse signal. After receiving the dly_ms_trig pulse, dly_ms will measure the delay of the delay line corresponding to the current dly_code value.

dly_ms_result:当前延迟测量的结果,例如dly_ms_result为0表示当前dly_code值对应的延迟线延迟时间大于目标测量时间,dly_ms_result为1表示当前dly_code值对应的延迟线延迟时间小于目标测量时间。dly_ms_result: The result of the current delay measurement. For example, a dly_ms_result of 0 means that the delay line delay time corresponding to the current dly_code value is greater than the target measurement time, and a dly_ms_result of 1 means that the delay line delay time corresponding to the current dly_code value is less than the target measurement time.

进一步的,在本申请这一实施方式中,文件寄存单元reg_file实质上是一寄存器文件,可以包含延迟测量需要的控制寄存器和状态寄存器。用户通过读写reg_file可以实现以下目标:(1)触发延迟线的延迟时间测量;(2)查询延迟测量是否完成;(3)查询延迟时间测量结果,即dly_code值。Furthermore, in this embodiment of the present application, the file registration unit reg_file is essentially a register file, which may include control registers and status registers required for delay measurement. Users can achieve the following goals by reading and writing reg_file: (1) Trigger the delay time measurement of the delay line; (2) Query whether the delay measurement is completed; (3) Query the delay time measurement result, that is, the dly_code value.

测量控制单元dly_ms_ctrl是对延迟线延迟时间测量进行控制的控制模块,图9示出了基于图8所示的延时测量系统的dly_ms_ctrl的状态机的状态转换图。The measurement control unit dly_ms_ctrl is a control module that controls the delay line delay time measurement. Figure 9 shows the state transition diagram of the state machine of dly_ms_ctrl based on the delay measurement system shown in Figure 8.

具体的:specific:

DLY_MS_IDLE:空闲状态。当用户通过配置寄存器文件触发延迟测量时,dly_code被恢复为初始值0,状态机从空闲状态跳转到DLY_MS_CODE_UPD状态。DLY_MS_IDLE: idle state. When the user triggers the delay measurement through the configuration register file, dly_code is restored to the initial value 0, and the state machine jumps from the idle state to the DLY_MS_CODE_UPD state.

HALF_CODE_SET:此状态会按照二分法更新dly_code值。例如dly_code的位宽是n,即dly_code[n-1:0]。触发延迟测量后,第一次进入HALF_CODE_SET会把dly_code[n-1]置为1,dly_code其他位保持初始值0不变。第二次进入HALF_CODE_SET会把dly_code[n-2]置为1,dly_code其他位保持不变。依次类推,第n次进入HALF_CODE_SET把dly_code[0]置为1,dly_code其他位保持不变。HALF_CODE_SET: This status will update the dly_code value according to the dichotomy. For example, the bit width of dly_code is n, that is, dly_code[n-1:0]. After triggering delay measurement, entering HALF_CODE_SET for the first time will set dly_code[n-1] to 1, and other bits of dly_code will remain unchanged from the initial value 0. Entering HALF_CODE_SET for the second time will set dly_code[n-2] to 1, and the other bits of dly_code will remain unchanged. By analogy, the nth time you enter HALF_CODE_SET sets dly_code[0] to 1, and the other bits of dly_code remain unchanged.

DLY_MS_WAIT_TRIG:通常dly_code变化之后,延迟线的延迟时间需要等待一段时间才能稳定。具体等待时间可以根据实际情况选择,或者由用户配置需要等待的时间。DLY_MS_WAIT_TRIG: Usually after the dly_code changes, the delay time of the delay line needs to wait for a period of time to stabilize. The specific waiting time can be selected according to the actual situation, or the user can configure the waiting time.

DLY_MS_TRIG:在此状态,控制模块会在dly_ms_trig信号上产生一个脉冲信号,通知dly_ms模块进行延迟测量。DLY_MS_TRIG: In this state, the control module will generate a pulse signal on the dly_ms_trig signal to notify the dly_ms module to perform delay measurement.

DLY_MS_WAIT_RESULT:等待dly_ms模块返回有效的dly_ms_result。DLY_MS_WAIT_RESULT: Wait for the dly_ms module to return a valid dly_ms_result.

DLY_MS_CHECK_RESULT:如果dly_ms_result为0,说明当前dly_code值对应的延迟线的延迟时间大于目标测量时间,需要前一次HALF_CODE_SET期间设置的dly_code置为1的bit位清0。如果dly_ms_result为1,说明当前dly_code值对应的延迟线的延迟时间小于目标测量时间,前一次HALF_CODE_SET期间设置的dly_code置为1的bit位保持1不变。DLY_MS_CHECK_RESULT: If dly_ms_result is 0, it means that the delay time of the delay line corresponding to the current dly_code value is greater than the target measurement time. It is necessary to clear the dly_code set to 1 during the previous HALF_CODE_SET bit to 0. If dly_ms_result is 1, it means that the delay time of the delay line corresponding to the current dly_code value is less than the target measurement time, and the bit where dly_code is set to 1 during the previous HALF_CODE_SET remains 1 unchanged.

DLY_MS_FINISH:如果dly_code所有bit位都被遍历完之后进入此结束状态位,控制模块会产生有效的dly_ms_finish信号给到寄存器模块。DLY_MS_FINISH: If all bits of dly_code are traversed and then enter this end status bit, the control module will generate a valid dly_ms_finish signal to the register module.

图10本申请实施例提供的本申请实施例提供的延迟线的延时测量电路,该接口电路包括上述延迟测量系统。Figure 10 is a delay measurement circuit of a delay line provided by an embodiment of the present application. The interface circuit includes the above delay measurement system.

在本申请这一实施方式中,寄存器1、2、3、5和6使用同一个时钟clk_dly_ms,并且时钟路径等长。dly_ms_mode为0选定1T测量模式,目标测量时间就是1个clk_dly_ms时钟周期。dly_ms_mode为1选定0.5T测量模式,目标测量时间就是0.5个clk_dly_ms时钟周期。寄存器2采用下降沿采样,寄存器1,3,4,5,6采用上升沿采样。寄存器1负责对dly_ms_trig采样一拍,采样结果为dly_ms_trig_r。dly_ms_trig_r经过寄存器2,寄存器3,MUX_1变成trig_dly_0。dly_ms_trig_r经过delay_line、MUX_0变为trig_dly1。寄存器4用trig_dly0的上升沿采样trig_dly1,寄存器5和寄存器6负责把寄存器4的采样结果同步到clk_dly_ms时钟域。MUX_0的作用是为了抵消MUX_1的延时。In this implementation of the present application, registers 1, 2, 3, 5 and 6 use the same clock clk_dly_ms, and the clock paths are of equal length. dly_ms_mode is 0 to select the 1T measurement mode, and the target measurement time is 1 clk_dly_ms clock cycle. dly_ms_mode is 1 to select the 0.5T measurement mode, and the target measurement time is 0.5 clk_dly_ms clock cycles. Register 2 uses falling edge sampling, and registers 1, 3, 4, 5, and 6 use rising edge sampling. Register 1 is responsible for sampling dly_ms_trig for one beat, and the sampling result is dly_ms_trig_r. dly_ms_trig_r passes through register 2, register 3, MUX_1 becomes trig_dly_0. dly_ms_trig_r changes to trig_dly1 through delay_line and MUX_0. Register 4 uses the rising edge of trig_dly0 to sample trig_dly1. Register 5 and register 6 are responsible for synchronizing the sampling results of register 4 to the clk_dly_ms clock domain. The function of MUX_0 is to offset the delay of MUX_1.

图11示出了一个dly_code位宽为8、1T模式的延迟线延迟测量示例的波形示意图。从图11中的dly_code位宽为8、1T模式的延迟线延迟测量示例的波形可知,最终的测量结果为:dly_code[7:0]=8’b0111_1110对应的延迟线的延迟最接近1个clk_dly_ms时钟周期。Figure 11 shows a schematic waveform diagram of a delay line delay measurement example with a dly_code bit width of 8 and 1T mode. From the waveform of the delay line delay measurement example of dly_code bit width 8 and 1T mode in Figure 11, we can see that the final measurement result is: dly_code[7:0]=8'b0111_1110 The delay of the corresponding delay line is closest to 1 clk_dly_ms clock cycle.

这里需要指出的是:以上对针对延迟线的延时测量装置、系统及接口电路实施例的描述,与前述图1至6所示的方法实施例的描述是类似的,具有同前述图1至6所示的方法实施例相似的有益效果,因此不做赘述。对于本申请延迟线的延时测量装置、系统及接口电路实施例中未披露的技术细节,请参照本申请前述图1至6所示的方法实施例的描述而理解,为节约篇幅,因此不再赘述。It should be pointed out here that the above description of the delay measurement device, system and interface circuit embodiments for the delay line is similar to the description of the method embodiments shown in Figures 1 to 6, and has the same features as the aforementioned Figures 1 to 6. The method embodiment shown in 6 has similar beneficial effects, so no further description is given. For technical details that are not disclosed in the embodiments of the delay measurement device, system and interface circuit of the delay line of this application, please refer to the description of the method embodiments shown in Figures 1 to 6 of this application. To save space, we will not Again.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element.

在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be electrical, mechanical, or other forms. of.

上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated; the components shown as units may or may not be physical units; they may be located in one place or distributed to multiple network units; Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, all functional units in the embodiments of the present application can be integrated into one processing unit, or each unit can be separately used as a unit, or two or more units can be integrated into one unit; the above-mentioned integration The unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps to implement the above method embodiments can be completed through hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the execution includes: The steps of the above method embodiment; and the aforementioned storage media include: mobile storage devices, read-only memory (Read Only Memory, ROM), magnetic disks or optical disks and other various media that can store program codes.

或者,本申请上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本申请各个实施例方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, if the integrated units mentioned above in this application are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence or those that contribute to the existing technology. The computer software products are stored in a storage medium and include a number of instructions to A computer device (which may be a personal computer, a server, a network device, etc.) is caused to execute all or part of the methods of various embodiments of the present application. The aforementioned storage media include: mobile storage devices, ROMs, magnetic disks or optical disks and other media that can store program codes.

以上,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, and all of them should be covered. within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (10)

1.一种延迟线的延时测量方法,所述方法包括:1. A delay measurement method for a delay line, the method includes: 获取所述延迟线的测量模式和所述延迟线的延迟控制信号的位宽,所述测量模式用于示出所述延迟线的目标测量时间;Obtain a measurement mode of the delay line and a bit width of the delay control signal of the delay line, where the measurement mode is used to show the target measurement time of the delay line; 根据所述位宽,确定控制所述延迟线实现延时的延迟控制信号的预延迟级数;According to the bit width, determine the number of pre-delay stages of the delay control signal that controls the delay line to achieve delay; 判断在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间的符合性;Determine the consistency of the delay output result under the action of the delay control signal corresponding to the pre-delay series and the target measurement time; 根据所述符合性调整所述延迟控制信号的预延迟级数,直至在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间相符合,得到与所述目标测量时间相对应的延迟级数。The pre-delay stages of the delay control signal are adjusted according to the compliance, until the delay output result under the action of the delay control signal corresponding to the pre-delay stage is consistent with the target measurement time, and the target measurement time is obtained. The delay level corresponding to the measurement time. 2.根据权利要求1所述的方法,根据所述位宽,确定控制所述延迟线实现延时的延迟控制信号的预延迟级数,包括:2. The method according to claim 1, determining the number of pre-delay stages of the delay control signal that controls the delay line to achieve delay according to the bit width, including: 根据所述位宽,取所述延迟控制信号的中位数作为所述预延迟级数。According to the bit width, the median number of the delay control signal is taken as the pre-delay level. 3.根据权利要求2所述的方法,所述取所述延迟控制信号的中位数作为所述预延迟级数,包括:3. The method according to claim 2, said taking the median of the delay control signal as the pre-delay level, including: 将所述延迟控制信号的最高位置为1,其他位置为零。Set the highest position of the delay control signal to 1 and other positions to zero. 4.根据权利要求1所述的方法,所述延迟输出结果用于示出在所述延迟级数对应的延迟控制信号作用下的实际延迟时间;相应的,4. The method according to claim 1, the delay output result is used to show the actual delay time under the action of the delay control signal corresponding to the delay series; accordingly, 所述判断在所述延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间的符合性,包括:Determining the consistency of the delay output result under the action of the delay control signal corresponding to the delay series and the target measurement time includes: 判断所述实际延迟时间与所述目标测量时间的大小关系;Determine the relationship between the actual delay time and the target measurement time; 在相邻两个延迟级数所得到的大小关系相反的情况下,判定所述延迟输出结果与所述目标测量时间相符合,确定所述相邻两次测试中延时差别较小的一次测试所对应的延迟控制信号延迟级数为与所述目标测量时间相对应的延迟级数;When the relationship between the magnitudes obtained by two adjacent delay stages is opposite, it is determined that the delay output result is consistent with the target measurement time, and the test with the smaller delay difference among the two adjacent tests is determined. The corresponding delay control signal delay level is the delay level corresponding to the target measurement time; 其中延时差别为所述实际延迟时间与所述目标测量时间差。The delay difference is the difference between the actual delay time and the target measurement time. 5.根据权利要求1所述的方法,所述延迟输出结果用于示出在所述延迟级数对应的延迟控制信号作用下的实际延迟时间;相应的,5. The method according to claim 1, the delay output result is used to show the actual delay time under the action of the delay control signal corresponding to the delay series; accordingly, 所述根据所述符合性调整所述延迟控制信号的预延迟级数,包括:The adjusting the pre-delay level of the delay control signal according to the compliance includes: 在所述实际延迟时间大于所述目标测量时间时,采用二分法调整所述预延迟级数,直至相邻两个延迟级数所得到所述实际延迟时间与所述目标测量时间的大小关系相反。When the actual delay time is greater than the target measurement time, the dichotomy method is used to adjust the pre-delay series until the actual delay time obtained by two adjacent delay series has an opposite relationship with the target measurement time. . 6.根据权利要求5所述的方法,所述采用二分法调整所述预延迟级数,包括:6. The method according to claim 5, said adjusting the pre-delay series using a dichotomy method, including: 在所述实际延迟时间大于所述目标测量时间时,将前一次预延迟级数中置为1的位置为零,其他位保持不变;When the actual delay time is greater than the target measurement time, the position set to 1 in the previous pre-delay series is set to zero, and other bits remain unchanged; 在所述实际延迟时间小于所述目标测量时间时,将前一次预延迟级数中置为1的位保持不变。When the actual delay time is less than the target measurement time, the bit set to 1 in the previous pre-delay series remains unchanged. 7.一种延迟线的延时测量装置,所述装置包括:7. A delay measurement device for a delay line, the device comprising: 获取模块,用于获取所述延迟线的测量模式和所述延迟线的延迟控制信号的位宽,所述测量模式用于示出所述延迟线的目标测量时间;An acquisition module, configured to acquire the measurement mode of the delay line and the bit width of the delay control signal of the delay line, where the measurement mode is used to show the target measurement time of the delay line; 确定模块,用于根据所述位宽,确定控制所述延迟线实现延时的延迟控制信号的预延迟级数;A determination module configured to determine, according to the bit width, the number of pre-delay stages of the delay control signal that controls the delay line to achieve delay; 判断模块,用于判断在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间的符合性;A judgment module, used to judge whether the delay output result under the action of the delay control signal corresponding to the pre-delay series is consistent with the target measurement time; 调整模块,用于根据所述符合性调整所述延迟控制信号的预延迟级数,直至在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间相符合,得到与所述目标测量时间相对应的延迟级数。an adjustment module, configured to adjust the pre-delay series of the delay control signal according to the compliance, until the delay output result under the action of the delay control signal corresponding to the pre-delay series is consistent with the target measurement time, Obtain the delay series corresponding to the target measurement time. 8.一种延迟线的延时测量系统,所述系统包括:8. A delay measurement system for a delay line, the system comprising: 文件寄存单元,用于接收和存储对延迟线进行延时测量的控制文件和状态文件;The file storage unit is used to receive and store the control file and status file for delay measurement of the delay line; 延时检测电路单元,用于在测量控制单元触发下,基于所述状态文件对延迟线进行延时检测,并发送延迟输出结果;A delay detection circuit unit, configured to perform delay detection on the delay line based on the status file when triggered by the measurement control unit, and send the delay output result; 测量控制单元,用于从所述文件寄存单元获取所述控制文件,触发所述延时检测电路单元进行延时检测,从所述延时检测电路单元获取所述延迟输出结果,并根据所述延迟输出结果更新所述状态文件。A measurement control unit, configured to obtain the control file from the file storage unit, trigger the delay detection circuit unit to perform delay detection, obtain the delay output result from the delay detection circuit unit, and obtain the delay output result according to the Delayed output results update the state file. 9.根据权利要求8所述的延迟测量系统,所述状态文件包括测量模式子文件和位宽子文件,所述测量模式子文件用于示出所述延迟线的目标测量时间,所述位宽子文件用于示出延迟控制信号的位宽;相应的,9. The delay measurement system according to claim 8, the status file includes a measurement mode sub-file and a bit width sub-file, the measurement mode sub-file is used to show the target measurement time of the delay line, the bit width sub-file The wide subfile is used to show the bit width of the delay control signal; accordingly, 所述测量控制单元根据所述延迟输出结果更新所述状态文件,包括:The measurement control unit updates the status file according to the delayed output result, including: 根据所述位宽,确定控制所述延迟线实现延时的延迟控制信号的预延迟级数;According to the bit width, determine the number of pre-delay stages of the delay control signal that controls the delay line to achieve delay; 判断在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间的符合性;Determine the consistency of the delay output result under the action of the delay control signal corresponding to the pre-delay series and the target measurement time; 根据所述符合性调整所述延迟控制信号的预延迟级数,直至在所述预延迟级数对应的延迟控制信号作用下的延迟输出结果与所述目标测量时间相符合,得到与所述目标测量时间相对应的延迟级数。The pre-delay stages of the delay control signal are adjusted according to the compliance, until the delay output result under the action of the delay control signal corresponding to the pre-delay stage is consistent with the target measurement time, and the target measurement time is obtained. Measure the delay level corresponding to the time. 10.一种需要进行延迟测量的接口电路,所述接口电路包括权利要求8或9所述的延迟测量系统。10. An interface circuit that requires delay measurement, the interface circuit comprising the delay measurement system according to claim 8 or 9.
CN202311215108.8A 2023-09-19 2023-09-19 A delay measurement method, device, system and interface circuit Pending CN117347818A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311215108.8A CN117347818A (en) 2023-09-19 2023-09-19 A delay measurement method, device, system and interface circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311215108.8A CN117347818A (en) 2023-09-19 2023-09-19 A delay measurement method, device, system and interface circuit

Publications (1)

Publication Number Publication Date
CN117347818A true CN117347818A (en) 2024-01-05

Family

ID=89356619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311215108.8A Pending CN117347818A (en) 2023-09-19 2023-09-19 A delay measurement method, device, system and interface circuit

Country Status (1)

Country Link
CN (1) CN117347818A (en)

Similar Documents

Publication Publication Date Title
EP1356468B1 (en) Method for programming memory controller in a high performance microprocessor
US6316980B1 (en) Calibrating data strobe signal using adjustable delays with feedback
KR100432965B1 (en) Method and apparatus for testing semiconductor devices
JPH0411960B2 (en)
CN103839590B (en) The measurement apparatus of memorizer time sequence parameter, method and memory chip
US8058893B1 (en) Frequency trimming for internal oscillator for test-time reduction
CN111863048A (en) Determination circuit, method, memory and electronic device for memory reference voltage
US7796465B2 (en) Write leveling of memory units designed to receive access requests in a sequential chained topology
CN116384306A (en) Time sequence simulation verification method, verification device, electronic equipment and readable storage medium
JP2001518625A (en) Format-Aware Timing Calibration for Integrated Circuit Testers
JPH05342085A (en) Memory access control circuit
CN117347818A (en) A delay measurement method, device, system and interface circuit
CN115827568A (en) Method for acquiring data of logic system design, electronic device and storage medium
KR20030020379A (en) Propagation delay independent sdram data capture device and method
US7493461B1 (en) Dynamic phase alignment for resynchronization of captured data
CN110047552B (en) Memory reading speed measuring circuit
US5598556A (en) Conditional wait state generator circuit
JPH04274100A (en) Memory-lsi with built-in test circuit
CN107967926B (en) System and method for determining memory access time
KR101957412B1 (en) Built Off Self-Test Circuit Apparatus and Time to Digital Converter with New Vernier Delay Line Design
US10591538B2 (en) Data reading device and data reading method for design-for-testing
US8008935B1 (en) Tester and a method for testing an integrated circuit
KR20080005294A (en) Delay-Locked Loop Measured-Initiated with Live Measurements
JP2573401Y2 (en) IC tester
JP2936807B2 (en) Integrated circuit

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
CB02 Change of applicant information

Country or region after: China

Address after: 100176 Beijing City, Daxing District, Beijing Economic and Technological Development Zone, No. 2, Ronghuannan Road, Building 1, 26th Floor, Rooms 01A, 01B, 01C, 02A, 02B

Applicant after: Beijing Xinchi Semiconductor Technology Co.,Ltd.

Address before: Room 2268, Yingying Building, No. 99 Tuanjie Road, Yanchuangyuan, Jiangbei New District, Nanjing, Jiangsu Province, 210000 (Nanjing Area, Jiangsu Free Trade Pilot Zone, China)

Applicant before: Nanjing Xinchi Semiconductor Technology Co.,Ltd.

Country or region before: China

CB02 Change of applicant information