WO2023202242A1 - Instruction word processing circuit and method, and chip - Google Patents

Instruction word processing circuit and method, and chip Download PDF

Info

Publication number
WO2023202242A1
WO2023202242A1 PCT/CN2023/079757 CN2023079757W WO2023202242A1 WO 2023202242 A1 WO2023202242 A1 WO 2023202242A1 CN 2023079757 W CN2023079757 W CN 2023079757W WO 2023202242 A1 WO2023202242 A1 WO 2023202242A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction word
delay control
circuit
transmission
control units
Prior art date
Application number
PCT/CN2023/079757
Other languages
French (fr)
Chinese (zh)
Inventor
强鹏
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2023202242A1 publication Critical patent/WO2023202242A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30076Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements
    • G06F9/30101Special purpose registers

Abstract

An instruction word processing circuit and method, and a chip, which belong to the technical field of artificial intelligence. The instruction word processing circuit comprises: an instruction word generation register, an instruction word sending circuit, an instruction word receiving circuit and an instruction word training state machine, wherein the instruction word generation register is electrically connected to the instruction word sending circuit; the instruction word training state machine is respectively electrically connected to the instruction word generation register, the instruction word sending circuit and the instruction word receiving circuit; and the instruction word sending circuit comprises a plurality of delay control units, which are used for adjusting a transmission delay of an instruction word in the instruction word sending circuit. A plurality of delay control units are added to an instruction word sending circuit, such that a transmission delay of an instruction word in the instruction word sending circuit can be adjusted, and thus the central position of a data window of the instruction word can be aligned with a clock sampling edge, thereby facilitating correct sampling performed by a memory on the instruction word.

Description

指令字处理电路、芯片及方法Instruction word processing circuit, chip and method
本申请要求于2022年04月22日提交的申请号为202210430604.4、发明名称为“指令字处理电路、芯片及方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application with application number 202210430604.4 and the invention name "Instruction Word Processing Circuit, Chip and Method" submitted on April 22, 2022, the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请涉及人工智能技术领域,特别涉及一种指令字处理电路、芯片及方法。This application relates to the field of artificial intelligence technology, and in particular to an instruction word processing circuit, chip and method.
背景技术Background technique
在高带宽内存(High Bandwidth Memory,HBM)芯片的工作过程中,高带宽内存的主机(host)向高带宽内存的动态随机接入存储器(Dynamic Random Access Memory,DRAM)发送指令字(Address Word,AWORD)信号,以通过指令字信号对应的指令字指示DRAM进行相应的操作。During the working process of the high-bandwidth memory (High Bandwidth Memory, HBM) chip, the host of the high-bandwidth memory sends the instruction word (Address Word) to the dynamic random access memory (Dynamic Random Access Memory, DRAM) of the high-bandwidth memory. AWORD) signal to instruct the DRAM to perform corresponding operations through the instruction word corresponding to the instruction word signal.
相关技术中,在指令字信号的高电平(即数据窗口)的中心处,与采样时钟信号的上升沿对齐的情况下,DRAM对指令字信号进行采样,即可得到正确的指令字。然而,在高带宽内存的实际工作过程中,传输到DRAM的指令字信号与采样时钟信号之间容易发生偏移,导致指令字信号采样错误,从而导致host对DRAM的操作出现错误,进而影响DRAM中存储的数据的准确度。In the related art, when the center of the high level of the instruction word signal (ie, the data window) is aligned with the rising edge of the sampling clock signal, the DRAM samples the instruction word signal to obtain the correct instruction word. However, in the actual working process of high-bandwidth memory, the instruction word signal transmitted to the DRAM and the sampling clock signal are prone to offset, resulting in instruction word signal sampling errors, which leads to errors in the host's operation of the DRAM, thereby affecting the DRAM. the accuracy of the data stored in it.
发明内容Contents of the invention
本申请提供了一种指令字处理电路、芯片及方法。所述技术方案如下:This application provides an instruction word processing circuit, chip and method. The technical solutions are as follows:
根据本申请实施例的一个方面,提供了一种指令字处理电路,所述指令字处理电路包括:According to one aspect of the embodiment of the present application, an instruction word processing circuit is provided. The instruction word processing circuit includes:
所述指令字处理电路包括:指令字生成寄存器、指令字发送电路、指令字接收电路和指令字训练状态机;The instruction word processing circuit includes: an instruction word generation register, an instruction word sending circuit, an instruction word receiving circuit and an instruction word training state machine;
所述指令字生成寄存器与所述指令字发送电路之间电性连接;The instruction word generation register is electrically connected to the instruction word sending circuit;
所述指令字训练状态机分别与所述指令字生成寄存器、所述指令字发送电路和所述指令字接收电路之间电性连接;The instruction word training state machine is electrically connected to the instruction word generation register, the instruction word sending circuit and the instruction word receiving circuit respectively;
所述指令字发送电路中包括多个延时控制单元,所述延时控制单元用于调整指令字在所述指令字发送电路中的传输延时。The instruction word sending circuit includes a plurality of delay control units, and the delay control units are used to adjust the transmission delay of the instruction word in the instruction word sending circuit.
根据本申请实施例的一个方面,提供了一种芯片,所述芯片包括:存储器以及如上所述的指令字处理电路。According to one aspect of an embodiment of the present application, a chip is provided, and the chip includes: a memory and an instruction word processing circuit as described above.
根据本申请实施例的一个方面,提供了一种指令字处理方法,所述方法应用于指令字处理电路中,所述指令字处理电路包括指令字生成寄存器、指令字发送电路、指令字接收电路和指令字训练状态机;所述方法包括:According to one aspect of the embodiment of the present application, an instruction word processing method is provided. The method is applied in an instruction word processing circuit. The instruction word processing circuit includes an instruction word generation register, an instruction word sending circuit, and an instruction word receiving circuit. and instruction word training state machine; the method includes:
所述指令字生成寄存器生成测试指令字序列;其中,所述测试指令字序列包括至少一个测试指令字;The instruction word generation register generates a test instruction word sequence; wherein the test instruction word sequence includes at least one test instruction word;
所述指令字发送电路向存储器发送所述测试指令字;The instruction word sending circuit sends the test instruction word to the memory;
所述指令字接收电路接收所述存储器发送的所述测试指令字对应的反馈指令字,并将所述反馈指令字发送给所述指令字训练状态机,所述反馈指令字由所述存储器根据时钟信号对所述测试指令字进行采样得到;The instruction word receiving circuit receives the feedback instruction word corresponding to the test instruction word sent by the memory, and sends the feedback instruction word to the instruction word training state machine. The feedback instruction word is generated by the memory according to The clock signal is obtained by sampling the test instruction word;
所述指令字训练状态机根据所述反馈指令字,对所述测试指令字对应的传输子电路的传输延时进行调整,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量。The instruction word training state machine adjusts the transmission delay of the transmission sub-circuit corresponding to the test instruction word according to the feedback instruction word, and determines the delay control unit that should be used by the transmission sub-circuit corresponding to the test instruction word. quantity.
根据本申请实施例的一个方面,提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现上述指令字处理方法。According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, and the computer program is loaded and executed by a processor to implement the above instruction word processing method.
根据本申请实施例的一个方面,提供了一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序存储在计算机可读存储介质中,处理器从所述计算机可读存储介质读取并执行所述计算机程序以实现上述指令字处理方法。 According to an aspect of an embodiment of the present application, a computer program product is provided. The computer program product includes a computer program. The computer program is stored in a computer-readable storage medium. A processor reads the computer program from the computer-readable storage medium. The computer program is fetched and executed to implement the above instruction word processing method.
本申请提供的技术方案,通过对指令字发送电路进行改进,在指令字发送电路中增加一个以上的延时控制单元,使得指令字发送电路具有改变指令字的传输延时的能力,指令字发送电路基于该能力,能够对时钟采样沿与指令字的数据窗口之间的相对位置进行调整,从而有助于使得时钟采样沿与指令字的数据窗口(如高电平)的中心位置对齐,进而提升了指令字的采样准确性。The technical solution provided by this application improves the instruction word sending circuit and adds more than one delay control unit in the instruction word sending circuit, so that the instruction word sending circuit has the ability to change the transmission delay of the instruction word. Based on this ability, the circuit can adjust the relative position between the clock sampling edge and the data window of the instruction word, which helps to align the clock sampling edge with the center position of the data window (such as high level) of the instruction word, and then Improved the sampling accuracy of instruction words.
附图说明Description of the drawings
图1是本申请的一个示例性实施例提供的高带宽内存的动态随机存储器的结构示意图;Figure 1 is a schematic structural diagram of a high-bandwidth memory dynamic random access memory provided by an exemplary embodiment of the present application;
图2是本申请一个示例性实施例提供的高带宽内存的行指令字传输过程的示意图;Figure 2 is a schematic diagram of the row instruction word transmission process of the high-bandwidth memory provided by an exemplary embodiment of the present application;
图3是本申请一个示例性实施例提供的在正常情况下,时钟采样上升沿和指令字的数据窗口的对齐关系的示意图;Figure 3 is a schematic diagram of the alignment relationship between the rising edge of clock sampling and the data window of the instruction word under normal circumstances provided by an exemplary embodiment of the present application;
图4是本申请一个示例性实施例提供的指令字与采样时钟信号出现偏移的示意图;Figure 4 is a schematic diagram of the offset between the instruction word and the sampling clock signal provided by an exemplary embodiment of the present application;
图5是本申请另一个示例性实施例提供的指令字与采样时钟信号出现偏移的示意图;Figure 5 is a schematic diagram showing the deviation between the instruction word and the sampling clock signal provided by another exemplary embodiment of the present application;
图6是本申请一个示例性实施例提供的指令字处理电路的结构的示意图;Figure 6 is a schematic diagram of the structure of an instruction word processing circuit provided by an exemplary embodiment of the present application;
图7是本申请一个示例性实施例提供的HBM DRAM中,指令字寄存器中的指令字排布方式的示意图;Figure 7 is a schematic diagram of the arrangement of instruction words in the instruction word register in HBM DRAM provided by an exemplary embodiment of the present application;
图8是本申请一个示例性实施例提供的指令字发送电路中,列指令字分别对应的传输子电路中延时控制单元的排列方式的示意图;Figure 8 is a schematic diagram of the arrangement of delay control units in the transmission subcircuit corresponding to the column of instruction words in the instruction word sending circuit provided by an exemplary embodiment of the present application;
图9是本申请一个示例性实施例提供的偏移步长计数单元调整传输子电路中使用的延时控制单元数量的示意图;Figure 9 is a schematic diagram of the offset step counting unit adjusting the number of delay control units used in the transmission subcircuit provided by an exemplary embodiment of the present application;
图10是本申请一个示例性实施例提供的左移差值和右移差值确定过程的示意图;Figure 10 is a schematic diagram of the left shift difference and right shift difference determination process provided by an exemplary embodiment of the present application;
图11是本申请一个示例性实施例提供的进行单步字节训练阶段的示意图;Figure 11 is a schematic diagram of a single-step byte training stage provided by an exemplary embodiment of the present application;
图12是本申请一个示例性实施例提供的进行单步片段训练阶段的示意图;Figure 12 is a schematic diagram of the single-step segment training stage provided by an exemplary embodiment of the present application;
图13是本申请一个示例性实施例提供的指令字处理方法的流程图。Figure 13 is a flow chart of an instruction word processing method provided by an exemplary embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
在介绍本申请技术方案之前,先对本申请中涉及到的名词进行介绍说明。Before introducing the technical solution of this application, the terms involved in this application will be introduced and explained.
高带宽内存芯片是一种包括中央处理器(Central Processing Unit,CPU)/图像处理器(Graphic Processing Unit,GPU)的芯片。在一些实施例中,高带宽内存芯片中包括多个存在堆叠关系的双倍数据流(Double Data Rate,DDR)芯片(或DRAM、SDRAM(Synchronous Dynamic Random Access Memory,同步动态随机存储器)等),通过将存在堆叠关系的DDR芯片与处理器进行封装,即可得到内存总线的宽度较高的高带宽存储器。在本申请实施例中,高带宽内存也可以被称之为高带宽存储器。A high-bandwidth memory chip is a chip that includes a central processing unit (Central Processing Unit, CPU)/image processor (Graphic Processing Unit, GPU). In some embodiments, the high-bandwidth memory chip includes multiple stacked Double Data Rate (DDR) chips (or DRAM, SDRAM (Synchronous Dynamic Random Access Memory, synchronous dynamic random access memory), etc.), By packaging DDR chips and processors in a stacked relationship, a high-bandwidth memory with a higher memory bus width can be obtained. In the embodiment of this application, high-bandwidth memory may also be called high-bandwidth memory.
高带宽存储器与高性能图形加速器、高性能数据中心、人工智能(Artificial Intelligence,AI)、特定用途集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)和网络设备等联用,可以满足一些需要高带宽的应用场景。High-bandwidth memory and high-performance graphics accelerators, high-performance data centers, Artificial Intelligence (AI), Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) and Used in conjunction with network equipment, it can meet some application scenarios that require high bandwidth.
人工智能是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个综合技术,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。Artificial intelligence is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is the study of the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.
人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技 术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。Artificial intelligence technology is a comprehensive subject that covers a wide range of fields, including both hardware-level technology and software-level technology. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
鉴于带宽优势,高带宽内存具有更强大的传输能力,其能够为人工智能技术、高性能计算、游戏等应用场景提供更好的支持,尤其是需要对大量数据进行处理的场景。In view of the bandwidth advantage, high-bandwidth memory has more powerful transmission capabilities, which can provide better support for artificial intelligence technology, high-performance computing, games and other application scenarios, especially scenarios that require the processing of large amounts of data.
在对本申请实施例提供的技术方案进行介绍之前,首先对本申请实施例中所涉及的背景技术进行说明。Before introducing the technical solutions provided by the embodiments of the present application, the background technology involved in the embodiments of the present application will first be described.
高带宽内存的存储器用于接收高带宽内存的主机发送的指令字,并根据指令字的指示,执行相应的操作。可选地,该存储器可以是动态随机接入存储器,也可以是其他能够接收指令的存储器。The memory of the high-bandwidth memory is used to receive the instruction word sent by the host of the high-bandwidth memory and perform corresponding operations according to the instructions of the instruction word. Optionally, the memory may be a dynamic random access memory or other memory capable of receiving instructions.
示例性地,图1是本申请的一个示例性实施例提供的高带宽内存的动态随机存储器的结构示意图。其中,高带宽内存的动态随机存储器100能够接收高带宽内存的主机提供的指令字序列(即指令字信号),通过对接收到的指令字序列进行解析,得到指令字。动态随机存储器100中可以包括多输入特征寄存器(Multiple Input Signature Register,MISR)单元,以用于存储上述解析得到的指令字。Exemplarily, FIG. 1 is a schematic structural diagram of a high-bandwidth memory dynamic random access memory provided by an exemplary embodiment of the present application. Among them, the dynamic random access memory 100 of the high-bandwidth memory can receive the instruction word sequence (ie, instruction word signal) provided by the host of the high-bandwidth memory, and obtain the instruction word by analyzing the received instruction word sequence. The dynamic random access memory 100 may include a multiple input signature register (Multiple Input Signature Register, MISR) unit for storing the above parsed instruction words.
此外,动态随机存储器100支持IEEE(the Institute of Electrical and Electronics Engineers,电气电子工程师学会)Std(标准)1500接口,以用于支持测试、调试等功能。表1是关于图1中各个接口的类型和描述信息。In addition, the dynamic random access memory 100 supports the IEEE (the Institute of Electrical and Electronics Engineers, Institute of Electrical and Electronics Engineers) Std (standard) 1500 interface to support testing, debugging and other functions. Table 1 is about the type and description information of each interface in Figure 1.
表1
Table 1
高带宽内存的指令字是高带宽内存的动态随机接入存储器接口上的控制信号的总称,其可用于指示动态随机接入存储器针对数据进行相关操作,诸如读、写、刷新、覆盖等操作。在一些示例中,指令字包括:行(Row,R)指令字信号、列(Column,C)指令字信号和时钟使能(Clock Enable,CKE)信号。The instruction word of high-bandwidth memory is the general name for the control signals on the dynamic random access memory interface of high-bandwidth memory. It can be used to instruct the dynamic random access memory to perform related operations on data, such as read, write, refresh, overwrite and other operations. In some examples, the instruction words include: a row (Row, R) instruction word signal, a column (Column, C) instruction word signal, and a clock enable (Clock Enable, CKE) signal.
下面以单通道的HBM2e DRAM为例(HBM2e为第三代HBM),对高带宽内存的指令字进行介绍。高带宽内存的指令字可以分为两大类:行指令字和列指令字。其中,每个行指令字可以包括9字节(bit),即行指令字的位宽为9,每个列指令字可以包括7个字节,即列指令字的位宽为7。每一个字节对应一个上升沿指令字和一个下降沿指令字。参考表2,表2示出了不同类型的指令字信号的位宽分布。The following takes the single-channel HBM2e DRAM as an example (HBM2e is the third generation HBM) to introduce the instruction words of high-bandwidth memory. The instruction words of high-bandwidth memory can be divided into two categories: row instruction words and column instruction words. Each row instruction word may include 9 bytes (bits), that is, the bit width of the row instruction word is 9, and each column instruction word may include 7 bytes, that is, the bit width of the column instruction word is 7. Each byte corresponds to a rising edge instruction word and a falling edge instruction word. Referring to Table 2, Table 2 shows the bit width distribution of different types of instruction word signals.
表2
Table 2
通过高带宽内存的指令字,能够实现对高带宽内存的动态随机接入存储器发送指令的功能,在高带宽内存的指令字准确发送的情况下,才能确保高带宽内存的动态随机接入存储器中的操作的正确性。Through the instruction words of the high-bandwidth memory, the function of sending instructions to the dynamic random access memory of the high-bandwidth memory can be realized. Only when the instruction words of the high-bandwidth memory are accurately sent can the dynamic random access memory of the high-bandwidth memory be ensured. correctness of operation.
示例性地,图2是本申请一个示例性实施例提供的高带宽内存的行指令字传输过程的示意图。图2中的CK_t(正向时钟信号)和CK_c(反向时钟信号)组成了差分时钟,其中, CK_t和CK_c之间相差180°相位。可选地,在CK_t的上行沿(也可以是CK_c的下降沿),对齐于行指令字的指令数据对应的数据窗口201的中心位置的情况下,可以保证高带宽内存的动态随机接入存储器采样得到正确的指令字。可选地,CK_t的上行沿、CK_c的下降沿可以称为时钟采样沿。图2中的R0-R6为某个行指令字对应的7个字节(即位宽)。Exemplarily, FIG. 2 is a schematic diagram of a row instruction word transmission process of a high-bandwidth memory provided by an exemplary embodiment of the present application. CK_t (forward clock signal) and CK_c (reverse clock signal) in Figure 2 form a differential clock, where, There is a 180° phase difference between CK_t and CK_c. Optionally, when the rising edge of CK_t (or the falling edge of CK_c) is aligned with the center position of the data window 201 corresponding to the instruction data of the row instruction word, the dynamic random access memory of the high-bandwidth memory can be guaranteed Sample the correct instruction word. Alternatively, the rising edge of CK_t and the falling edge of CK_c may be called clock sampling edges. R0-R6 in Figure 2 are 7 bytes (i.e. bit width) corresponding to a certain row instruction word.
例如,图3是本申请一个示例性实施例提供的正常情况下,时钟采样上升沿和指令字的数据窗口的对齐关系的示意图。图3中,指令字的数据窗口310中的数据为1(高电平),时钟采样沿(时钟上升沿)301与指令字的高电平中心302(即数据窗口310的中心)对齐。可选地,图3中时钟上升沿对应于指令字的数据窗口的中心位置称为采样对齐。For example, FIG. 3 is a schematic diagram of the alignment relationship between the rising edge of clock sampling and the data window of the instruction word under normal circumstances, provided by an exemplary embodiment of the present application. In Figure 3, the data in the data window 310 of the instruction word is 1 (high level), and the clock sampling edge (clock rising edge) 301 is aligned with the high level center 302 of the instruction word (that is, the center of the data window 310). Optionally, the rising edge of the clock in Figure 3 corresponds to the center position of the data window of the instruction word, which is called sampling alignment.
而在CK_t的上行沿(也可以是CK_c下降沿),与行指令字的指令数据对应的数据窗口的中心位置存在偏移的情况下,无法确保高带宽内存的动态随机接入存储器采样得到的指令字的正确性。此时高带宽内存处于亚稳态状态,高带宽内存的动态随机接入存储器对指令字信号进行采样得到的数据有一定概率出现错误。例如,在CK_t的上行沿(也可以是CK_c下降沿),与行指令字的指令数据对应的数据窗口的中心位置存在偏移的情况下,虽然指令字的数据窗口中的数据为1,但由于动态随机接入存储器采样错误,采样得到的指令字对应的数据为0。On the rising edge of CK_t (or the falling edge of CK_c), when the center position of the data window corresponding to the instruction data of the row instruction word is offset, the dynamic random access memory sampling of the high-bandwidth memory cannot be guaranteed. The correctness of the command word. At this time, the high-bandwidth memory is in a metastable state, and the data obtained by sampling the instruction word signal in the dynamic random access memory of the high-bandwidth memory has a certain probability of errors. For example, on the rising edge of CK_t (or the falling edge of CK_c), if the center position of the data window corresponding to the instruction data of the row instruction word is offset, although the data in the data window of the instruction word is 1, Due to a dynamic random access memory sampling error, the data corresponding to the sampled instruction word is 0.
例如,图4是本申请一个示例性实施例提供的指令字与采样时钟信号出现偏移的示意图。时钟采样沿(时钟的上升沿)401偏移出指令字的数据窗口410,导致高带宽内存的动态随机接入存储器对指令字的采样发生错误。For example, FIG. 4 is a schematic diagram illustrating the deviation between the instruction word and the sampling clock signal provided by an exemplary embodiment of the present application. The clock sampling edge (rising edge of the clock) 401 is offset from the data window 410 of the instruction word, causing the dynamic random access memory of the high-bandwidth memory to erroneously sample the instruction word.
在数字电路中,理想状态下,时钟信号的采样沿和数据同时出现,即可采集到正确的数据。而在现实情况中,数据的信号存在上升时间、逻辑门的状态变换也需要时间,因此在时钟采样沿出现前,数据应保持稳定(也即在时钟采样沿出现之前,信号的高电平或低电平已经维持稳定)。在时钟采样沿出现之前数据保持稳定的最短时间称为建立时间(set up timing)。由于对数据进行采集也需要一定的时间,因此在时钟采样沿出现之后,数据在一段时间内也应该保持稳定,以便有充足的时间对数据进行采样。在时钟采样沿出现之后,数据维持稳定的最短时间称为保持时间(hold timing)。在时钟采样沿与数据的建立边沿(或撤销边沿过近)的情况下,导致采样出现建立时间(或维持时间)的时序违例,也即时钟采样沿出现之前数据稳定的时间小于建立时间,导致数据不稳定,以及时钟采样沿出现之后数据维持稳定的时间小于保持时间,导致动态随机接入存储器没有充足的时间对数据进行采样,进而导致动态随机接入存储器对数据的采样出现错误。In digital circuits, under ideal conditions, the sampling edge of the clock signal and the data appear at the same time, and the correct data can be collected. In reality, the data signal has a rise time, and the state transition of the logic gate also takes time. Therefore, the data should remain stable before the clock sampling edge appears (that is, before the clock sampling edge appears, the signal's high level or The low level has remained stable). The minimum time the data remains stable before the clock sampling edge occurs is called setup time (set up timing). Since it takes a certain amount of time to collect data, the data should remain stable for a period of time after the clock sampling edge occurs, so that there is sufficient time to sample the data. After the clock sampling edge occurs, the shortest time for the data to remain stable is called the hold time (hold timing). When the clock sampling edge is too close to the data setup edge (or the cancellation edge), a timing violation occurs in the setup time (or sustain time) of the sampling, that is, the time for the data to stabilize before the clock sampling edge appears is less than the setup time, resulting in The data is unstable, and the time the data remains stable after the clock sampling edge appears is less than the hold time, resulting in the dynamic random access memory not having enough time to sample the data, which in turn causes the dynamic random access memory to sample data incorrectly.
例如,图5是本申请另一个示例性实施例提供的指令字与采样时钟信号出现偏移的示意图。图5中,时钟采样沿501虽然没有偏移出指令字的数据窗口,但是时钟采样沿与指令字的数据撤销边沿502的距离过近,导致发生维持时间的时序违例,从而影响指令字采样的正确性,导致高带宽内存的存储器进行的操作出现错误,引起高带宽内存的存储器执行操作的异常。For example, FIG. 5 is a schematic diagram of an offset between an instruction word and a sampling clock signal provided by another exemplary embodiment of the present application. In Figure 5, although the clock sampling edge 501 does not shift out of the data window of the instruction word, the distance between the clock sampling edge and the data cancel edge 502 of the instruction word is too close, resulting in a timing violation of the maintenance time, thereby affecting the sampling of the instruction word. Correctness, causing errors in the operations performed by the memory of high-bandwidth memory, causing exceptions in the operations performed by the memory of high-bandwidth memory.
在一些实施例中,导致指令字的数据窗口的中心位置与时钟采样沿出现偏移的原因可以包括:In some embodiments, the reasons that cause the center position of the data window of the instruction word to deviate from the clock sampling edge may include:
1.由于高带宽内存的后端时序不收敛,导致指令字在传输线路中的传输出现延迟,从而产生偏移;1. Because the back-end timing of high-bandwidth memory does not converge, the transmission of instruction words in the transmission line is delayed, resulting in offset;
2.由于高带宽内存的生产故障,导致指令字在传输线路中的传输出现延迟,从而产生偏移;2. Due to production failures of high-bandwidth memory, the transmission of instruction words in the transmission line is delayed, resulting in offset;
3.在高带宽内存的工作过程中,由于工艺、电压、温度等的环境变化,导致指令字在传输线路中的传输出现延迟,从而产生偏移;3. During the working process of high-bandwidth memory, due to environmental changes in process, voltage, temperature, etc., the transmission of instruction words in the transmission line is delayed, resulting in offset;
4.在高带宽内存的工作过程中,由于信号间串扰的影响导致指令字和时钟信号出现偏移。4. During the operation of high-bandwidth memory, the influence of crosstalk between signals causes the instruction word and clock signal to deviate.
可选地,在指令字的数据窗口和时钟信号发生偏移的情况下,会引起如下问题:Optionally, when the data window of the instruction word and the clock signal are offset, the following problems will occur:
1.若本次操作为激活(Active)指令的丢失或采样错误,则后续激活指令之后的“读(read)” 或者“写(write)”指令将工作在行未被激活的状态下,HBM DRAM无法正确执行“读”或者“写”指令,也即“读”或者“写”指令将无法正常执行。1. If this operation is the loss or sampling error of the Active command, the "read" after the subsequent Active command will Or the "write" command will work when the row is not activated, and HBM DRAM cannot correctly execute the "read" or "write" command, that is, the "read" or "write" command will not be executed normally.
2.若本次操作为“预充电(Precharge)”或“全部预充电(Precharge All)”指令的丢失或采样错误,则当前激活的行无法被正确的预充电退出,将导致后续的HBM DRAM中,“读”或者“写”指令将无法正常执行。2. If this operation is a loss or sampling error of the "Precharge" or "Precharge All" command, the currently activated row cannot be correctly precharged and exited, which will result in subsequent HBM DRAM , the "read" or "write" instructions will not be executed normally.
3.若本次操作为“单区分块(Single Bank)”或“刷新(Refresh)”指令的丢失或采样错误,则HBM DRAM将丢失掉当前的刷新指令,若刷新指令无法满足HBM DRAM的刷新需求,则将导致HBM DRAM中存储的数据出现故障或丢失。3. If this operation is the loss or sampling error of the "Single Bank" or "Refresh" instruction, HBM DRAM will lose the current refresh instruction. If the refresh instruction cannot satisfy the refresh of HBM DRAM demand, it will cause the data stored in HBM DRAM to malfunction or be lost.
4.若本次操作为“断电入口(Power-Down Entry)”或“自刷新入口(Self Refresh Entry)”或“断电&自刷新出口(Power-Down&Self Refresh Exit)”指令的丢失或采样错误,则将导致HBM DRAM的模式切换错误,进而导致HBM DRAM出现异常。4. If this operation is the loss or sampling of the "Power-Down Entry" or "Self Refresh Entry" or "Power-Down&Self Refresh Exit" command If it is wrong, it will cause the mode switching error of HBM DRAM, which will lead to the abnormality of HBM DRAM.
5.若本次操作为“读”、“写”类指令的丢失或采样错误,则HBM DRAM将出现读、写数据的错误,甚至会对HBM DRAM中的数据造成污染。5. If this operation is a loss or sampling error of "read" and "write" instructions, HBM DRAM will have errors in reading and writing data, and may even cause pollution to the data in HBM DRAM.
本申请实施例提供一种指令字处理电路及方法,其可用于调整指令字的数据窗口和时钟信号之间的偏移,以便实现采样对齐,从而提高带宽内存的存储器对指令字的采样正确率。Embodiments of the present application provide an instruction word processing circuit and method, which can be used to adjust the offset between the data window of the instruction word and the clock signal to achieve sampling alignment, thereby improving the sampling accuracy of the instruction word by the memory of the bandwidth memory. .
请参考图6,其是本申请一个示例性实施例提供的指令字处理电路的结构的示意图。该指令字处理电路包括:指令字生成寄存器610、指令字发送电路620、指令字接收电路630和指令字训练状态机640;Please refer to FIG. 6 , which is a schematic diagram of the structure of an instruction word processing circuit provided by an exemplary embodiment of the present application. The instruction word processing circuit includes: an instruction word generation register 610, an instruction word sending circuit 620, an instruction word receiving circuit 630 and an instruction word training state machine 640;
指令字生成寄存器610与指令字发送电路620之间电性连接;指令字训练状态机640分别与指令字生成寄存器610、指令字发送电路620和指令字接收电路630之间电性连接;指令字发送电路620中包括多个延时控制单元622,延时控制单622元用于调整指令字在指令字发送电路620中的传输延时。The instruction word generation register 610 is electrically connected to the instruction word sending circuit 620; the instruction word training state machine 640 is electrically connected to the instruction word generation register 610, the instruction word sending circuit 620 and the instruction word receiving circuit 630 respectively; the instruction word The sending circuit 620 includes a plurality of delay control units 622, and the delay control units 622 are used to adjust the transmission delay of the instruction word in the instruction word sending circuit 620.
指令字生成寄存器610是指用于存储、生成二进制位码的同步时序逻辑电路。可选地,指令字生成寄存器610对应的存储电路包括若干个具有记忆功能的触发器(Flip Flop,FF)或锁存器(latch)。以触发器为例,一个触发器用于存储k位二进制位码,k为正整数,通过将x个触发器的时钟端口进行连接能够组成存储x*k位二进制位码的指令生成寄存器,x为正整数。在一些情况下,k=1,即一个触发器能够存储1位二进制位码。其中,二进制位码即可组成指令字信号,指令字信号可以仅包括行指令字,也可以仅包括列指令字,还可以同时包括行指令字和列指令字,本申请实施例对指令字信号所包括的指令字的数量不作限定。The instruction word generation register 610 refers to a synchronous sequential logic circuit used to store and generate binary bit codes. Optionally, the storage circuit corresponding to the instruction word generation register 610 includes several flip-flops (FF) or latches (latches) with memory functions. Take a flip-flop as an example. A flip-flop is used to store k-bit binary codes, and k is a positive integer. By connecting the clock ports of x flip-flops, an instruction generation register that stores x*k-bit binary codes can be formed. x is Positive integer. In some cases, k=1, that is, a flip-flop can store 1 binary bit. Among them, the binary bit code can constitute the instruction word signal. The instruction word signal can only include row instruction words, or only column instruction words, or can also include both row instruction words and column instruction words. In the embodiment of the present application, the instruction word signal The number of instruction words included is not limited.
指令字发送电路620是指用于对指令字信号进行传输的电路。在一些实施例中,指令字发送电路620中包括至少一个传输子电路。可选地,传输子电路也被称之为指令字传输路径。上述指令字处理电路可以部署在上述高带宽内存中,则指令字发送电路620用于高带宽内存的主机向高带宽内存的存储器发送指令字。可选地,上述指令字处理电路可以就是上述高带宽内存,本申请实施例在此不进行限制。The command word transmitting circuit 620 refers to a circuit for transmitting command word signals. In some embodiments, the instruction word sending circuit 620 includes at least one transmission sub-circuit. Optionally, the transmission subcircuit is also called an instruction word transmission path. The above-mentioned instruction word processing circuit can be deployed in the above-mentioned high-bandwidth memory, and the instruction word sending circuit 620 is used for the host of the high-bandwidth memory to send instruction words to the memory of the high-bandwidth memory. Optionally, the above-mentioned instruction word processing circuit may be the above-mentioned high-bandwidth memory, and the embodiments of the present application are not limited here.
在一些实施例中,指令字发送电路620中的传输子电路的数量与高带宽内存中支持的指令字的总位宽有关。示例性地,指令字发送电路620中的传输子电路的数量,可以与高带宽内存中支持的指令字的总位宽的位数相同。例如,在高带宽内存的指令字的总位宽为17位(即17bit,行指令字、列指令字和时钟使能信号的位宽和值)的情况下,指令字发送电路620中的传输子电路的总数量为17个,也即传输子电路与指令字的字节是一一对应的关系,一个指令字的字节对应于一个传输子电路。可选地,指令字发送电路620可以通过至少一个传输子电路,对指令字对应的字节进行并行传输,从而提高指令字的传输效率。另外,根据指令字的总位宽来设置传输子电路的数量,使得指令发送电路620可以针对指令字的每个字节进行调整,以实现指令字的数据窗口的中心位置与时钟采样沿的对齐。In some embodiments, the number of transmission sub-circuits in the instruction word sending circuit 620 is related to the total bit width of the instruction words supported in the high-bandwidth memory. For example, the number of transmission sub-circuits in the instruction word sending circuit 620 may be the same as the number of bits of the total bit width of the instruction words supported in the high-bandwidth memory. For example, when the total bit width of the instruction word of the high-bandwidth memory is 17 bits (i.e., 17 bits, the sum of the bit widths of the row instruction word, column instruction word and clock enable signal), the transmission in the instruction word sending circuit 620 The total number of sub-circuits is 17, that is, the transmission sub-circuit has a one-to-one correspondence with the bytes of the instruction word, and one byte of the instruction word corresponds to one transmission sub-circuit. Optionally, the instruction word sending circuit 620 can transmit the bytes corresponding to the instruction words in parallel through at least one transmission subcircuit, thereby improving the transmission efficiency of the instruction words. In addition, the number of transmission sub-circuits is set according to the total bit width of the instruction word, so that the instruction sending circuit 620 can be adjusted for each byte of the instruction word to achieve alignment between the center position of the data window of the instruction word and the clock sampling edge. .
在一些实施例中,指令字发送电路620中的传输子电路的排布方式,与设置在高带宽内 存的存储器中的指令字寄存器中的指令字的排布方式有关,该存储器可以是动态随机接入存储器,也可以是其他类型的存储器。示例性地,指令字发送电路620中的至少一个传输子电路,可以按照指令字寄存器中的指令字的字节排布方式依次排布。In some embodiments, the transmission sub-circuit in the instruction word sending circuit 620 is arranged in a manner consistent with being arranged within a high bandwidth. It is related to the arrangement of the instruction words in the instruction word register in the stored memory. The memory can be a dynamic random access memory or other types of memory. For example, at least one transmission sub-circuit in the instruction word sending circuit 620 can be arranged sequentially according to the byte arrangement of the instruction words in the instruction word register.
例如,图7是本申请一个示例性实施例提供的HBM DRAM中,指令字寄存器中的指令字排布方式的示意图。图7中,该指令字寄存器710为多输入特征寄存器,或者为线性反馈移位寄存器(Linear Feedback Shift Register,LFSR),其用于对指令字进行存储。如图7所示,指令字寄存器710包括17字节(即34位指令位),从左侧到右侧依次为:R5~R0对应的字节、R6对应的字节、C7~C4对应的字节、CKE对应的字节,C3~C0对应的字节,C8对应的字节,则指令字发送电路620中的17个传输子电路,可以按照图7中R5-C8的顺序依次排序。For example, FIG. 7 is a schematic diagram of the arrangement of instruction words in the instruction word register in HBM DRAM provided by an exemplary embodiment of the present application. In Figure 7, the instruction word register 710 is a multi-input feature register, or a linear feedback shift register (Linear Feedback Shift Register, LFSR), which is used to store instruction words. As shown in Figure 7, the instruction word register 710 includes 17 bytes (ie, 34-bit instruction bits). From left to right, they are: bytes corresponding to R5~R0, bytes corresponding to R6, and C7~C4. byte, the byte corresponding to CKE, the byte corresponding to C3 to C0, and the byte corresponding to C8, then the 17 transmission sub-circuits in the instruction word sending circuit 620 can be sorted in the order of R5-C8 in Figure 7.
其中,每一个字节中的下降沿指令字(图7中的F)和上升沿指令字(图7中的R)按从左到右的顺序交错排列。上升沿指令字是指信号由0向1转变,下降沿指令字是指信号由1向0转变。例如,R5对应的字节中包括R5下降沿指令字和R5上升沿指令字,R5下降沿指令字排布在R5上升沿指令字左侧。C0-C8为列指令字对应的9个字节。Among them, the falling edge instruction words (F in Figure 7) and rising edge instruction words (R in Figure 7) in each byte are staggered from left to right. The rising edge instruction word means the signal changes from 0 to 1, and the falling edge instruction word means the signal changes from 1 to 0. For example, the byte corresponding to R5 includes the R5 falling edge instruction word and the R5 rising edge instruction word. The R5 falling edge instruction word is arranged to the left of the R5 rising edge instruction word. C0-C8 are 9 bytes corresponding to the column instruction word.
需要说明的是,本申请实施例中的指令字寄存器中的指令字排布方式,可以根据相关标准等实际情况确定,本申请实施例在此不进行限制。It should be noted that the arrangement of instruction words in the instruction word register in the embodiment of the present application can be determined according to actual conditions such as relevant standards, and is not limited in the embodiment of the present application.
在一些实施例中,通过将指令字发送电路620中的传输子电路的排布方式,与指令字寄存器中的指令字排布方式设置相同,可以方便高带宽内存的存储器对指令字的采样和存储。In some embodiments, by setting the arrangement of the transmission subcircuit in the instruction word sending circuit 620 to be the same as the arrangement of the instruction words in the instruction word register, the memory of the high-bandwidth memory can facilitate the sampling and summarization of instruction words. storage.
指令字发送电路620中具有一个以上延时控制单元。在一些实施例中,延时控制单元称为延时元件(Delay Element,DE)。延时控制单元可用于增加指令字发送电路中传输的指令字的传输时延,以调整指令字在指令字发送电路中的传输延时。示例性地,每个延迟控制单元可以对应相同或不同的延时时长(如36ps、32ps、28ps等),根据传输延时需求,可以在指令发明电路620中设置不同数量的延时控制单元,来增加指令字发送电路中传输的指令字的传输时延。延迟控制单元的功能实现下文将做详细说明,这里不再赘述。The instruction word sending circuit 620 has more than one delay control unit. In some embodiments, the delay control unit is called a delay element (Delay Element, DE). The delay control unit can be used to increase the transmission delay of the instruction word transmitted in the instruction word sending circuit to adjust the transmission delay of the instruction word in the instruction word sending circuit. For example, each delay control unit can correspond to the same or different delay lengths (such as 36ps, 32ps, 28ps, etc.). According to the transmission delay requirements, different numbers of delay control units can be set in the instruction invention circuit 620. To increase the transmission delay of the instruction word transmitted in the instruction word sending circuit. The function implementation of the delay control unit will be described in detail below and will not be repeated here.
在一些实施例中,指令字发送电路620中的一个以上传输子电路共用指令字发送电路620中的延时控制单元,也即指令字发送电路620中的多个延时控制单元,每个传输子电路均可以根据需求进行调用。在另一些实施例中,传输子电路分别具有独立的延时控制单元,也即每个传输子电路中均独立设置有至少一个延时控制单元,本申请实施例在此不进行限定。In some embodiments, more than one transmission sub-circuit in the instruction word sending circuit 620 shares the delay control unit in the instruction word sending circuit 620, that is, multiple delay control units in the instruction word sending circuit 620, each transmission Sub-circuits can be called as needed. In other embodiments, the transmission sub-circuits each have an independent delay control unit, that is, each transmission sub-circuit is independently provided with at least one delay control unit. The embodiments of the present application are not limited here.
指令字接收电路630是指能够接收数字脉冲的电路。在一些实施例中,数字脉冲包括0-1脉冲(表示1)、1-0脉冲(表示0)。可选地,指令字接收电路630是指高带宽内存的主机支持的接口,其可用于接收高带宽内存的存储器所返回的指令字。指令字接收电路630的接口类型属于高带宽内存与高带宽内存的存储器共同支持的接口,例如IEEE 1500接口。The command word receiving circuit 630 is a circuit capable of receiving digital pulses. In some embodiments, the digital pulses include 0-1 pulses (representing 1) and 1-0 pulses (representing 0). Optionally, the instruction word receiving circuit 630 refers to an interface supported by the host of the high-bandwidth memory, which can be used to receive the instruction word returned by the memory of the high-bandwidth memory. The interface type of the instruction word receiving circuit 630 belongs to the interface supported by the high-bandwidth memory and the memory of the high-bandwidth memory, such as the IEEE 1500 interface.
指令字训练状态机640是指负责对指令字的传输延时进行训练(training)的电路。在一些实施例中,指令字训练状态机640是指通过集成电路(如专用集成电路(Application Specific Integrated Circuit,ASIC))进行设计,在进行芯片流片工艺后产生的电路。可选地,指令字训练状态机640可部署在高带宽内存中,以用于对高带宽内存中的指令字的传输延时进行训练,来使得指令字的数据窗口的中心位置与时钟采样沿的对齐。The instruction word training state machine 640 refers to a circuit responsible for training the transmission delay of the instruction word. In some embodiments, the instruction word training state machine 640 refers to a circuit designed through an integrated circuit (such as an application specific integrated circuit (Application Specific Integrated Circuit, ASIC)) and generated after a chip tape-out process. Optionally, the instruction word training state machine 640 can be deployed in a high-bandwidth memory to train the transmission delay of the instruction word in the high-bandwidth memory so that the center position of the data window of the instruction word is consistent with the clock sampling edge. alignment.
在一些实施例中,指令字训练状态机640分别与指令字生成寄存器610、指令字发送电路620和指令字接收电路630之间电性连接,包括:指令字训练状态机640通过接口分别与指令字生成寄存器610的接口、指令字发送电路620的接口和指令字接收电路630的接口进行连接。可选地,指令字训练状态机640与指令字生成寄存器610、指令字发送电路620和指令字接收电路630进行连接分别使用的接口可以是同一个接口,也可以是不完全相同的接口。In some embodiments, the instruction word training state machine 640 is electrically connected to the instruction word generation register 610, the instruction word sending circuit 620, and the instruction word receiving circuit 630, including: the instruction word training state machine 640 is connected to the instruction word through an interface. The interface of the word generation register 610, the interface of the instruction word transmitting circuit 620, and the interface of the instruction word receiving circuit 630 are connected. Optionally, the interfaces used by the instruction word training state machine 640 to connect to the instruction word generation register 610, the instruction word sending circuit 620, and the instruction word receiving circuit 630 may be the same interface, or they may be different interfaces.
例如,指令字训练状态机640和指令字生成寄存器610之间通过接口1连接,指令字训练状态机640和指令字发送电路620之间通过接口2连接,指令字训练状态机640和指令字 接收电路630之间通过接口3连接,其中接口1,接口2和接口3是3个不相同的接口。For example, the instruction word training state machine 640 and the instruction word generation register 610 are connected through interface 1, the instruction word training state machine 640 and the instruction word sending circuit 620 are connected through interface 2, and the instruction word training state machine 640 and the instruction word are connected through interface 2. The receiving circuits 630 are connected through interface 3, where interface 1, interface 2 and interface 3 are three different interfaces.
在一些实施例中,参考图6,指令字生成寄存器610,指令字发送电路620,指令字接收电路630和指令字训练状态机640均设置在高带宽内存芯片的主机600中。其中,指令字生成寄存器610和指令字训练状态机640应用于高带宽内存的指令字训练阶段。指令字训练(training)阶段可以称为控制字(Control Word,CA)训练阶段。指令字训练阶段不同于高带宽内存的工作阶段。工作阶段中,高带宽内存通过主机向存储器发送指令字以便指示存储器完成相对应操作,以完成外部的任务,而指令字训练阶段用于调整时钟采样沿与指令字的数据窗口的对齐位置。可选地,指令字生成寄存器610既能应用于指令字训练阶段,也能够应用于工作阶段。指令字发送电路620既能在指令字训练阶段使用,也能在工作阶段使用。下文将对指令字训练阶段进行详细说明,这里不再赘述。In some embodiments, referring to FIG. 6 , the instruction word generation register 610 , the instruction word sending circuit 620 , the instruction word receiving circuit 630 and the instruction word training state machine 640 are all disposed in the host 600 of the high-bandwidth memory chip. Among them, the instruction word generation register 610 and the instruction word training state machine 640 are applied to the instruction word training phase of the high-bandwidth memory. The instruction word training (training) phase can be called the control word (Control Word, CA) training phase. The instruction word training phase is different from the high-bandwidth memory working phase. In the working phase, the high-bandwidth memory sends instruction words to the memory through the host to instruct the memory to complete corresponding operations to complete external tasks, while the instruction word training phase is used to adjust the alignment position of the clock sampling edge and the data window of the instruction word. Optionally, the instruction word generation register 610 can be applied to both the instruction word training phase and the working phase. The instruction word sending circuit 620 can be used both in the instruction word training phase and in the working phase. The instruction word training phase will be described in detail below and will not be described again here.
综上所述,通过对指令字发送电路进行改进,在指令字发送电路中增加一个以上的延时控制单元,使得指令字发送电路具有改变指令字的传输延时的能力,指令字发送电路基于该能力,能够对时钟采样沿与指令字的数据窗口之间的相对位置进行调整,从而有助于使得时钟采样沿与指令字的数据窗口(如高电平)的中心位置对齐,进而提升了指令字的采样准确性。To sum up, by improving the instruction word sending circuit and adding more than one delay control unit in the instruction word sending circuit, the instruction word sending circuit has the ability to change the transmission delay of the instruction word. The instruction word sending circuit is based on This ability can adjust the relative position between the clock sampling edge and the data window of the instruction word, thereby helping to align the clock sampling edge with the center position of the data window (such as high level) of the instruction word, thereby improving Sampling accuracy of instruction words.
另外,通过至少一个传输子电路,对指令字对应的字节进行并行传输,从而提高指令字的传输效率。同时,根据指令字的总位宽来设置传输子电路的数量,使得指令发送电路可以针对指令字的每个字节进行调整,以及通过调节指令字发送电路中使用的延时控制单元的数量,改变指令字在传输控制电路中的传输延时,以便调整时钟采样沿与指令字的数据窗口的中间位置之间的对齐位置,有助于使得时钟采样沿与指令字的数据窗口的中心位置对齐,从而提升了存储器采样得到的指令字的准确性。In addition, bytes corresponding to the instruction words are transmitted in parallel through at least one transmission subcircuit, thereby improving the transmission efficiency of the instruction words. At the same time, the number of transmission sub-circuits is set according to the total bit width of the instruction word, so that the instruction sending circuit can be adjusted for each byte of the instruction word, and by adjusting the number of delay control units used in the instruction word sending circuit, Changing the transmission delay of the instruction word in the transmission control circuit to adjust the alignment position between the clock sampling edge and the center position of the data window of the instruction word helps to align the clock sampling edge with the center position of the data window of the instruction word , thereby improving the accuracy of the instruction words obtained by memory sampling.
在高带宽内存的指令字训练阶段,提前对时钟采样沿与指令字的数据窗口的中心位置进行对齐,在不对高带宽内存的工作阶段产生影响的同时,使得存储器能够对指令字进行正确的采样,也即高带宽内存的存储器能够按照高带宽内存的主机的指示,执行正确的操作。In the instruction word training phase of the high-bandwidth memory, the clock sampling edge is aligned with the center position of the instruction word data window in advance, so that the memory can correctly sample the instruction word without affecting the working phase of the high-bandwidth memory. , that is, the high-bandwidth memory memory can perform correct operations according to the instructions of the high-bandwidth memory host.
下面,通过几个实施例对指令字处理电路进行进一步的介绍说明。Below, the instruction word processing circuit will be further introduced and explained through several embodiments.
在一些实施例中,指令字发送电路中包括至少一个指令字分别对应的传输子电路,每个传输子电路中包括一个以上的延时控制单元。In some embodiments, the instruction word sending circuit includes at least one transmission sub-circuit corresponding to the instruction word, and each transmission sub-circuit includes more than one delay control unit.
在一些实施例中,各个传输子电路中包括的延时控制单元的总数量相等,也即指令字发送电路中,所有的传输子电路中分别具有p个延迟单控制单元,p为大于1的正整数。例如,p=256。In some embodiments, the total number of delay control units included in each transmission sub-circuit is equal, that is, in the instruction word sending circuit, there are p delay single control units in all transmission sub-circuits, and p is greater than 1. Positive integer. For example, p=256.
在一些实施例中,传输子电路中的一个以上的延时控制单元串行排列。示例性地,图8是本申请一个示例性实施例提供的指令字发送电路中,列指令字分别对应的传输子电路中延时控制单元的排列方式的示意图。如图8所示,对于列指令字对应的发送电路800,其包括7个传输子电路,也即列指令字的C0-C6字节分别对应的传输子电路,每个传输子电路中均包括p个延时控制单元801(即图8中的“DE”)。In some embodiments, more than one delay control unit in the transmission subcircuit is arranged in series. Exemplarily, FIG. 8 is a schematic diagram of the arrangement of delay control units in the transmission sub-circuit corresponding to the column of instruction words in the instruction word sending circuit provided by an exemplary embodiment of the present application. As shown in Figure 8, the transmitting circuit 800 corresponding to the column instruction word includes 7 transmission sub-circuits, that is, the transmission sub-circuits corresponding to the C0-C6 bytes of the column instruction word. Each transmission sub-circuit includes p delay control units 801 (ie "DE" in Figure 8).
在指令字在传输子电路中传输的情况下,指令字依次结经过传输子电路中的延时控制单元,直至指令字被从传输子电路中接出为止。例如,列指令字的C0在依次经过其对应的传输子电路中的部分或所有延时控制单元之后,被接出并发送至高带宽内存的存储器。其中,指令字所需经过的延时控制单元的数量可以根据指令字训练阶段的结果进行设置与调整。When the instruction word is transmitted in the transmission sub-circuit, the instruction word passes through the delay control unit in the transmission sub-circuit in sequence until the instruction word is taken out from the transmission sub-circuit. For example, C0 of the instruction word is taken out and sent to the memory of the high-bandwidth memory after passing through some or all delay control units in its corresponding transmission sub-circuit in sequence. Among them, the number of delay control units that the instruction words need to pass through can be set and adjusted according to the results of the instruction word training phase.
对于指令字发送电路中的任意一个传输子电路,传输子电路中的延时控制单元的总数量决定该传输子电路对指令字的传输延时的调整能力。可选地,传输子电路对指令字的传输延时的调整能力,与传输子电路中的延时控制单元的总数量呈正相关关系,也即传输子电路中包括的延时控制单元的数量越多,意味着传输子电路对指令字的传输延时的可调节范围越广。由于对指令字的传输延时的调整过程(即所需使用的延时控制单元的数量调整过程)是在高 带宽内存的指令字训练阶段进行,而在高带宽内存的实际工作过程中,传输子电路可能并不会使用全部的延时控制单元,因此延时控制单元的数量不能无限增加,避免造成不必要浪费。For any transmission sub-circuit in the instruction word sending circuit, the total number of delay control units in the transmission sub-circuit determines the ability of the transmission sub-circuit to adjust the transmission delay of the instruction word. Optionally, the ability of the transmission subcircuit to adjust the transmission delay of the instruction word is positively correlated with the total number of delay control units in the transmission subcircuit, that is, the greater the number of delay control units included in the transmission subcircuit. More means that the transmission subcircuit has a wider adjustable range for the transmission delay of the instruction word. Since the adjustment process of the transmission delay of the instruction word (that is, the adjustment process of the number of delay control units required) is at a high The instruction word training phase of the bandwidth memory is carried out. In the actual working process of the high-bandwidth memory, the transmission sub-circuit may not use all the delay control units. Therefore, the number of delay control units cannot be increased infinitely to avoid unnecessary waste.
传输子电路中的延时控制单元的具体数量,可以根据单个延时控制单元增加传输时延的能力,以及高带宽内存中指令字的数据窗口与时钟采样沿之间偏移程度等情况确定,本申请实施例在此不进行限定。The specific number of delay control units in the transmission subcircuit can be determined based on the ability of a single delay control unit to increase the transmission delay and the degree of offset between the data window of the instruction word and the clock sampling edge in the high-bandwidth memory. The embodiments of the present application are not limited here.
通过分别在指令传输电路中的任意一个传输子电路中设置延时控制单元,使得传输子电路具有改变指令字的传输延时的能力,使得在高带宽内存的指令字训练阶段,能够分别对不同的指令字(如行指令字、列指令字)对应的传输子电路进行独立的调整。由于不同的指令字的数据窗口与时钟采样沿的偏移情况不同,分别调整不同指令字在对应的传输子电路上的传输延时,有助于保证各个指令字的数据窗口的中心位置与时钟采样沿对齐,有助于减少任意一个指令字出现采样错误的情况,提高存储器接收主机发送的指令,并按照指令进行对应操作的正确性。By setting a delay control unit in any transmission sub-circuit in the instruction transmission circuit, the transmission sub-circuit has the ability to change the transmission delay of the instruction word, so that in the instruction word training phase of the high-bandwidth memory, different The transmission sub-circuit corresponding to the instruction word (such as row instruction word, column instruction word) is independently adjusted. Since the data windows of different instruction words have different offsets from the clock sampling edges, adjusting the transmission delays of different instruction words on the corresponding transmission subcircuit will help ensure that the center position of the data window of each instruction word is consistent with the clock Sampling edge alignment helps reduce sampling errors in any instruction word and improves the accuracy of the memory receiving instructions sent by the host and performing corresponding operations in accordance with the instructions.
在一些实施例中,延时控制单元通过改变指令字的相位改变指令字的传输时延。其中,可以通过反相器来改变指令字的相位。示例性地,延时控制单元中可以包括n个反相器,反相器用于改变传输子电路中传输的指令字的相位,n为正整数。其中,在1个反相器用于增加指令字相位的情况下,1个延时控制单元中包括的反相器的总数量n满足: 其中k为正整数。在1个反相器用于增加指令字(2a+1)π相位的情况下(a为自然数),n为正偶数。例如,在a=0的情况下,1个反相器能够使指令字的相位增加π。此时n=2,4,6……。In some embodiments, the delay control unit changes the transmission delay of the instruction word by changing the phase of the instruction word. Among them, the phase of the instruction word can be changed through an inverter. For example, the delay control unit may include n inverters. The inverters are used to change the phase of the instruction word transmitted in the transmission subcircuit, and n is a positive integer. Among them, one inverter is used to increase the instruction word In the case of phase, the total number n of inverters included in one delay control unit satisfies: where k is a positive integer. In the case where one inverter is used to increase the phase of the instruction word (2a+1)π (a is a natural number), n is a positive even number. For example, when a=0, one inverter can increase the phase of the command word by π. At this time n=2, 4, 6....
以经典(typical)模式为例,对于能够使指令字的相位增加π的反相器,大约能将指令字的传输延时增加8ps(1ps=10-12s)。在1个延时控制单元中包括4个反向器的情况下,传输子电路中每增加使用1个延时控制单元,指令字在传输子电路中的传输延时增加32ps。Taking the classic mode as an example, an inverter that can increase the phase of the instruction word by π can increase the transmission delay of the instruction word by approximately 8ps (1ps=10 -12 s). When one delay control unit includes four inverters, for each additional delay control unit used in the transmission subcircuit, the transmission delay of the instruction word in the transmission subcircuit increases by 32ps.
每个延时控制单元中的反向器的总数量,决定该延时控制单元能够改变的指令字的传输延时的调整粒度。例如,延时控制单元中的反相器的总数量越多,传输子电路中增加使用一个延时控制单元,指令字的传输延时的改变量越大,指令字的数据窗口的中心位置与时钟采样沿的对齐速度越快,然而指令字的数据窗口的中心位置与时钟采样沿的对齐精度可能较低。The total number of inverters in each delay control unit determines the adjustment granularity of the transmission delay of the instruction word that the delay control unit can change. For example, the greater the total number of inverters in the delay control unit and the use of a delay control unit in the transmission subcircuit, the greater the change in the transmission delay of the instruction word, and the center position of the data window of the instruction word will be The alignment speed of the clock sampling edge is faster, but the alignment accuracy between the center position of the data window of the instruction word and the clock sampling edge may be lower.
相反,延时控制单元中反相器的总数量越少,传输子电路中每增加使用一个延时控制单元,指令字的传输延时的改变量越小,指令字的数据窗口的高电平与时钟采样沿的对齐速度越慢。在这种情况下,传输子电路中每增加(或减少)使用一个延时控制单元对指令字的传输时延的增加量(或减少量)较小,使得时钟采样沿与指令字的数据窗口的中心位置的对齐精度较高。On the contrary, the smaller the total number of inverters in the delay control unit, and each additional delay control unit used in the transmission subcircuit, the smaller the change in the transmission delay of the instruction word, the higher the high level of the data window of the instruction word. The alignment to the clock sampling edge is slower. In this case, every time a delay control unit is added (or reduced) in the transmission subcircuit, the increase (or decrease) in the transmission delay of the instruction word is small, so that the clock sampling edge is consistent with the data window of the instruction word. The alignment accuracy of the center position is higher.
通过改变延时控制单元中反向器的数量进行实验,在延时控制单元中包括4个能增加π相位的反向器的情况下,指令字的数据窗口的中心位置与时钟采样沿的对齐效果较好,且调整指令字的数据窗口的中心位置与时钟采样沿对齐的过程较快。本申请实施例通过反相器来构建延时控制单元,使得延时控制单元具有传输延时的能力的同时,具有针对传输延时的颗粒度进行灵活调整的能力,从而使得高带宽内存具有调整指令字的数据窗口的中心位置与时钟采样沿之间的对齐位置的能力,进而可对指令字的数据窗口的中心位置与时钟采样沿进行对齐训练,以提升指令字的采样准确性。Experiments were conducted by changing the number of inverters in the delay control unit. When the delay control unit included 4 inverters that could increase the π phase, the center position of the data window of the instruction word was aligned with the clock sampling edge. The effect is better, and the process of adjusting the center position of the instruction word data window to align with the clock sampling edge is faster. The embodiment of the present application constructs a delay control unit through an inverter, so that the delay control unit not only has the ability to transmit delay, but also has the ability to flexibly adjust the granularity of the transmission delay, so that the high-bandwidth memory has the ability to adjust The ability to align the position between the center position of the data window of the instruction word and the clock sampling edge, and then perform alignment training on the center position of the data window of the instruction word and the clock sampling edge to improve the sampling accuracy of the instruction word.
在一些实施例中,传输子电路中包括至少一个抽头接口,抽头接口和延时控制单元按比例交错排列;其中,抽头接口用于接出传输子电路中传输的指令字,以便将指令字传输给存储器。如此通过改变传输电路中使用的抽头接口,可以调整传输子电路中投入使用的延时控制单元的数量,进而可以调整指令字在指令字发送电路中的传输延时,使得高带宽内存具有调整指令字的数据窗口的中心位置与时钟采样沿之间的对齐位置的能力。可选地,抽头接口具有两个使用状态,例如“1”表示抽头接口投入使用,“0”抽头接口禁止使用。In some embodiments, the transmission subcircuit includes at least one tap interface, and the tap interface and the delay control unit are staggered in proportion; wherein, the tap interface is used to connect the instruction word transmitted in the transmission subcircuit, so as to transmit the instruction word to memory. In this way, by changing the tap interface used in the transmission circuit, the number of delay control units put into use in the transmission sub-circuit can be adjusted, and then the transmission delay of the instruction word in the instruction word sending circuit can be adjusted, so that the high-bandwidth memory has the ability to adjust instructions The ability to align the position between the center position of the word's data window and the clock sample edge. Optionally, the tap interface has two usage states. For example, "1" indicates that the tap interface is put into use, and "0" indicates that the tap interface is prohibited from use.
在一些实施例中,延时控制单元与抽头接口在传输子路径中按照一定比例交错排列,也 即一个抽头接口与相邻的最近一个抽头接口之间间隔m个延时控制单元,m为正整数。例如,抽头接口a和抽头接口b是两个最近的抽头接口,抽头接口a和抽头接口b之间间隔2个延时控制单元。In some embodiments, the delay control units and tap interfaces are staggered according to a certain proportion in the transmission subpath, and also That is, there are m delay control units between one tap interface and the nearest adjacent tap interface, and m is a positive integer. For example, tap interface a and tap interface b are the two closest tap interfaces, and there are two delay control units between tap interface a and tap interface b.
在一些实施例中,延时控制单元与抽头接口在传输子路径中交错排列,也即,传输子电路中相邻的两个延时控制单元之间间隔一个抽头接口,且两个相邻的抽头接口之间间隔一个延时控制单元。在这种情况下,假设各个延时控制单元能够增加的指令字传输延时相同,通过调整传输子电路中用于接出指令字的抽头接口,改变指令字在从传输子电路中接出前使用的延时控制单元的数量,以改变指令字在传输子电路中的传输延时。In some embodiments, the delay control units and tap interfaces are staggered in the transmission subpath, that is, two adjacent delay control units in the transmission subcircuit are separated by a tap interface, and two adjacent delay control units are separated by a tap interface. There is a delay control unit spaced between tap interfaces. In this case, assuming that the instruction word transmission delay that each delay control unit can increase is the same, by adjusting the tap interface used to receive the instruction word in the transmission subcircuit, change the instruction word used before being taken out from the transmission subcircuit. The number of delay control units is used to change the transmission delay of the instruction word in the transmission sub-circuit.
综上所述,在传输子电路传输指令字的过程中,所传输的指令字在到达使用状态的抽头接口时,能够直接被抽头接口从传输子电路中接出,并传输给存储器,不需要再经过该抽头接口之后的延时控制单元。通过在传输子电路中设置至少一个抽头接口,使得高带宽内存可以通过改变传输子电路中用于接出指令字的抽头接口,调节指令字在传输子电路中的传输延时,从而能够在不改变传输子电路的结构的情况下,灵活的改变指令字在传输子电路中的传输延时。To sum up, during the process of transmitting instruction words by the transmission subcircuit, when the transmitted instruction words arrive at the tap interface in use, they can be directly taken out of the transmission subcircuit by the tap interface and transmitted to the memory without the need for Then go through the delay control unit after the tap interface. By arranging at least one tap interface in the transmission sub-circuit, the high-bandwidth memory can adjust the transmission delay of the instruction word in the transmission sub-circuit by changing the tap interface used to receive the instruction word in the transmission sub-circuit, so that the high-bandwidth memory can be used at different times. When the structure of the transmission subcircuit is changed, the transmission delay of the instruction word in the transmission subcircuit can be flexibly changed.
下面,通过几个实施例介绍在高带宽内存的指令字训练阶段,指令字处理电路的工作过程。Below, several embodiments are used to introduce the working process of the instruction word processing circuit in the instruction word training phase of high-bandwidth memory.
在一些实施例中,指令字生成寄存器用于生成测试指令字序列;其中,测试指令字序列包括至少一个测试指令字;指令字发送电路用于向存储器发送测试指令字;指令字接收电路用于接收存储器发送的测试指令字对应的反馈指令字,并将反馈指令字发送给指令字训练状态机,反馈指令字由存储器根据时钟信号对测试指令字进行采样得到;指令字训练状态机用于根据反馈指令字,对测试指令字对应的传输子电路的传输延时进行调整,确定测试指令字对应的传输子电路应使用的延时控制单元的数量。In some embodiments, the instruction word generation register is used to generate a test instruction word sequence; wherein the test instruction word sequence includes at least one test instruction word; the instruction word sending circuit is used to send the test instruction word to the memory; and the instruction word receiving circuit is used to Receive the feedback instruction word corresponding to the test instruction word sent by the memory, and send the feedback instruction word to the instruction word training state machine. The feedback instruction word is obtained by the memory sampling the test instruction word according to the clock signal; the instruction word training state machine is used to Feed back the instruction word, adjust the transmission delay of the transmission sub-circuit corresponding to the test instruction word, and determine the number of delay control units that should be used in the transmission sub-circuit corresponding to the test instruction word.
其中,测试指令字是指用于对其所在的传输子电路中的传输延时进行测试的指令字。测试指令字序列用于对至少一个指令字对应的传输子电路中的传输延时进行测试。在一些实施例中,测试指令字序列称为测试向量(pattern)序列。可选地,本申请实施例中的测试指令字序列对应于上述的指令字信号(如行指令字、列指令字),测试指令字序列中的测试指令字对应于某个指令字的一个字节。可选地,在高带宽内存的工作阶段,指令字生成寄存器用于生成指令字信号,以指示高带宽内存的存储器执行相应的操作。Among them, the test instruction word refers to the instruction word used to test the transmission delay in the transmission sub-circuit in which it is located. The test instruction word sequence is used to test the transmission delay in the transmission subcircuit corresponding to at least one instruction word. In some embodiments, the test instruction word sequence is called a test pattern sequence. Optionally, the test instruction word sequence in the embodiment of the present application corresponds to the above-mentioned instruction word signal (such as row instruction word, column instruction word), and the test instruction word in the test instruction word sequence corresponds to one word of a certain instruction word. Festival. Optionally, during the working phase of the high-bandwidth memory, the instruction word generation register is used to generate an instruction word signal to instruct the memory of the high-bandwidth memory to perform corresponding operations.
在一些实施例中,测试指令字是一个指令字比特上持续时间为1拍的高电平信号;其中,1拍是指时钟信号的一个周期。在一些实施例中,一个周期的时钟信号包括一个时钟上升沿,以及一个时钟下降沿。可选地,时钟上升沿、时钟下降沿可以称为时钟采样沿。在本申请实施例中,以时钟上升沿作为时钟采样沿为例,对指令字的数据窗口与时钟采样沿之间存在的偏移进行调整。In some embodiments, the test instruction word is a high-level signal on an instruction word bit that lasts for 1 beat; where 1 beat refers to one cycle of the clock signal. In some embodiments, one cycle of the clock signal includes one clock rising edge and one clock falling edge. Optionally, the clock rising edge and the clock falling edge can be called clock sampling edges. In the embodiment of the present application, taking the rising edge of the clock as the clock sampling edge as an example, the offset existing between the data window of the instruction word and the clock sampling edge is adjusted.
在一些实施例中,测试指令字序列中除了包括至少一个测试指令字之外还包括时钟信号。测试指令字序列中的至少一个测试指令字对应于相同的时钟信号。高带宽内存的存储器按照时钟信号的时钟采样沿,对测试指令字序列中的至少一个测试指令字进行采样。例如,在HBM中,测试指令字序列可以共包括17个测试指令字(即17字节),共34位指令位,其中每一个测试指令字包括上升沿指令字和下降沿指令字2位指令字。例如,测试指令字R1包括R1上升指令字和R1下降沿指令字。在一些实施例中,测试指令字是指令字比特中的上升沿指令字或下降沿指令字中的一个。In some embodiments, the test instruction word sequence includes a clock signal in addition to at least one test instruction word. At least one test instruction word in the sequence of test instruction words corresponds to the same clock signal. The memory of the high-bandwidth memory samples at least one test instruction word in the test instruction word sequence according to the clock sampling edge of the clock signal. For example, in HBM, the test instruction word sequence can include a total of 17 test instruction words (i.e. 17 bytes), with a total of 34 instruction bits. Each test instruction word includes a rising edge instruction word and a falling edge instruction word of 2-bit instructions. Character. For example, the test instruction word R1 includes the R1 rising instruction word and the R1 falling edge instruction word. In some embodiments, the test instruction word is one of a rising edge instruction word or a falling edge instruction word in the instruction word bits.
指令字生成寄存器生成指令字测试序列后,向指令字发送电路传输测试指令字序列,以便通过指令字发送电路将测试指令字传输给高带宽内存的存储器。在一些实施例中,高带宽内存中的存储器是指高带宽内存的动态随机接入存储器,缩写为HBM DRAM。After the instruction word generation register generates the instruction word test sequence, it transmits the test instruction word sequence to the instruction word sending circuit, so that the test instruction word is transmitted to the memory of the high-bandwidth memory through the instruction word sending circuit. In some embodiments, the memory in high-bandwidth memory refers to high-bandwidth memory dynamic random access memory, abbreviated as HBM DRAM.
需要说明的是,高带宽内存中的存储器也可以是能够通过堆叠等方式,实现提高数据传 输带宽的其他类型存储器,本申请实施例在此不进行限定。It should be noted that the memory in the high-bandwidth memory can also be stacked to improve data transmission. Other types of memory with transmission bandwidth are not limited in the embodiments of this application.
指令字发送电路将测试指令字传输给存储器,包括:将测试指令字序列传输给存储器,或者将测试指令序列中的测试指令单独字发送给存储器。例如,该存储器是指高带宽内存的存储器,如HBM DRAM。在指令字发送电路向存储器单独发送测试指令字的情况下,需要将指令字序列对应的时钟信号发送给存储器。The instruction word sending circuit transmits the test instruction word to the memory, including: transmitting the test instruction word sequence to the memory, or sending individual test instruction words in the test instruction sequence to the memory. For example, this memory refers to high-bandwidth memory memory, such as HBM DRAM. When the instruction word sending circuit sends a test instruction word individually to the memory, the clock signal corresponding to the instruction word sequence needs to be sent to the memory.
以HBM DRAM为例,介绍存储器接收和处理测试指令字的过程。Taking HBM DRAM as an example, the process of receiving and processing test instruction words by the memory is introduced.
在一些实施例中,HBM DRAM通过双沿指令字接收电路,接收指令字发送电路中的测试指令字序列,并通过HBM DRAM的向量分析电路进行采样,得到反馈指令字序列;其中,反馈指令字序列中的包括至少一个反馈指令字,反馈指令字与测试指令字是一一对应关系,反馈指令字可以和其对应的测试指令字相同,也可以和其对应的测试指令字相反。在解析得到反馈指令字序列之后,向量解析电路将反馈指令字序列传输给HBM DRAM的指令字寄存器。在一些实施例中,指令字寄存单元可是MISR单元。In some embodiments, HBM DRAM receives the test instruction word sequence in the instruction word sending circuit through a double-edge instruction word receiving circuit, and samples it through the vector analysis circuit of HBM DRAM to obtain a feedback instruction word sequence; where, the feedback instruction word The sequence includes at least one feedback instruction word, and the feedback instruction word has a one-to-one correspondence with the test instruction word. The feedback instruction word can be the same as its corresponding test instruction word, or it can be opposite to its corresponding test instruction word. After parsing the feedback instruction word sequence, the vector analysis circuit transmits the feedback instruction word sequence to the instruction word register of HBM DRAM. In some embodiments, the instruction word register unit may be a MISR unit.
在一些实施例中,HBM DRAM中具有能够发送反馈指令字的指令字发送电路。在一些实施例中,用于发送反馈指令字的指令字发送电路是指发送数字脉冲的接口。可选地,上述指令字发送电路可以通过HBM DRAM中的IEEE1500接口实现。In some embodiments, the HBM DRAM has an instruction word sending circuit capable of sending feedback instruction words. In some embodiments, the instruction word sending circuit for sending the feedback instruction word refers to an interface that sends digital pulses. Optionally, the above instruction word sending circuit can be implemented through the IEEE1500 interface in HBM DRAM.
在一些实施例中,HBM Host通过指令字接收电路获取指令字寄存器中的反馈指令字序列。例如,通过HBM Host中的IEEE1500接口获取HBM DRAM的指令字寄存器中的存储的至少一个反馈指令字。又例如通过HBM Host中的IEEE1500接口获取HBM DRAM的指令字寄存器中的存储反馈指令字序列。示例性地,HBM Host通过中的指令字接收电路与HBM DRAM中的指令字发送电路相对应,以通过IEEE1500接口实现数据传输。例如,可以通过HBM DRAM中的IEEE1500接口向HBM Host中的IEEE1500接口发送测试指令字对应的反馈指令字,或者发送测试指令字序列对应的反馈指令字序列。In some embodiments, HBM Host obtains the feedback instruction word sequence in the instruction word register through the instruction word receiving circuit. For example, at least one feedback instruction word stored in the instruction word register of the HBM DRAM is obtained through the IEEE1500 interface in the HBM Host. Another example is to obtain the storage feedback instruction word sequence in the instruction word register of HBM DRAM through the IEEE1500 interface in HBM Host. Exemplarily, the instruction word receiving circuit in the HBM Host corresponds to the instruction word sending circuit in the HBM DRAM to realize data transmission through the IEEE1500 interface. For example, the feedback instruction word corresponding to the test instruction word can be sent to the IEEE1500 interface in the HBM Host through the IEEE1500 interface in the HBM DRAM, or the feedback instruction word sequence corresponding to the test instruction word sequence can be sent.
在一些实施例中,HBM DRAM中的IEEE 1500接口以数字脉冲的形式,向HBM Host中的IEEE 1500接口发送反馈指令字或者反馈指令字序列。对于任意一个反馈指令字对应的脉冲:0-1脉冲表示该反馈指令字对应的数据为1,1-0脉冲表示该反馈指令字对应的数据为0。In some embodiments, the IEEE 1500 interface in the HBM DRAM sends a feedback instruction word or a sequence of feedback instruction words to the IEEE 1500 interface in the HBM Host in the form of digital pulses. For the pulse corresponding to any feedback instruction word: 0-1 pulse means that the data corresponding to the feedback instruction word is 1, and 1-0 pulse means that the data corresponding to the feedback instruction word is 0.
在高带宽内存的指令字训练阶段,存储器对指令字发送电路发送的测试指令字进行采样,得到反馈指令字,并将反馈指令字发送给高带宽内存的主机,根据反馈指令字与测试指令字之间的变化,确定测试指令字的数据窗口的中心与时钟采样沿的对齐情况,方便调节测试指令字的数据窗口与时钟采样沿之间的对齐关系,以提高指令字的采样正确性。In the instruction word training phase of the high-bandwidth memory, the memory samples the test instruction word sent by the instruction word sending circuit to obtain the feedback instruction word, and sends the feedback instruction word to the host of the high-bandwidth memory. According to the feedback instruction word and the test instruction word The change between the two determines the alignment between the center of the data window of the test instruction word and the clock sampling edge, and facilitates adjustment of the alignment relationship between the data window of the test instruction word and the clock sampling edge to improve the sampling accuracy of the instruction word.
可选地,HBM Host的指令字接收电路在接收到反馈指令字之后,将反馈指令字传输给指令字训练状态机。由指令字训练状态机根据反馈指令字,对测试指令字对应的传输子电路的传输延时进行调整,确定测试指令字对应的传输子电路应使用的延时控制单元的数量。Optionally, after receiving the feedback instruction word, the instruction word receiving circuit of HBM Host transmits the feedback instruction word to the instruction word training state machine. The instruction word training state machine adjusts the transmission delay of the transmission sub-circuit corresponding to the test instruction word according to the feedback instruction word, and determines the number of delay control units that should be used in the transmission sub-circuit corresponding to the test instruction word.
在一些实施例中,指令字训练状态机通过反馈指令字的数值,确定测试指令字对应的传输子电路中应使用的延时控制单元的数量变化,以便最终确定测试指令字对应的传输子电路应使用的延时控制单元的数量。该过程的具体内容,请参考下文实施例。In some embodiments, the instruction word training state machine determines the change in the number of delay control units that should be used in the transmission sub-circuit corresponding to the test instruction word by feeding back the value of the instruction word, so as to finally determine the transmission sub-circuit corresponding to the test instruction word. The number of delay control units that should be used. For the specific content of this process, please refer to the embodiment below.
综上所述,通过将测试指令字发送给高带宽内存的存储器,并通过高带宽内存的存储器对测试指令字进行采样得到的反馈指令字,根据采样结果(反馈指令字)的变化能够更加直接的反馈出测试指令字的数据窗口与时钟采样沿之间对齐位置的变化,以便确定测试指令字对应的传输子电路应使用的延时控制单元的数量,完成对测试指令字在传输子电路的传输延时进行调整。通过指令字处理电路进行指令字训练阶段,有助于提高高带宽内存的工作过程中,高带宽内存的存储器读取到的指令字的准确度。To sum up, by sending the test instruction word to the memory of the high-bandwidth memory, and sampling the test instruction word through the memory of the high-bandwidth memory, the feedback instruction word can be obtained more directly according to the change of the sampling result (feedback instruction word) Feedback the change in alignment position between the data window of the test instruction word and the clock sampling edge, in order to determine the number of delay control units that should be used in the transmission sub-circuit corresponding to the test instruction word, and complete the processing of the test instruction word in the transmission sub-circuit. Transmission delay is adjusted. The instruction word training phase performed by the instruction word processing circuit helps to improve the accuracy of the instruction words read by the memory of the high-bandwidth memory during the operation of the high-bandwidth memory.
下面,对指令字训练状态机确定传输子电路应使用的延时控制单元的数量的过程进行介绍说明。Next, the process of determining the number of delay control units that the transmission subcircuit should use by the instruction word training state machine is introduced and explained.
在一些实施例中,指令字训练状态机包括:偏移步长计数单元和偏移步长确定单元;偏 移步长计数单元用于改变测试指令字对应的传输子电路中投入使用的延迟控制单元的数量;偏移步长确定单元用于在反馈指令字满足对齐条件的情况下,确定测试指令字对应的传输子电路中当前使用的延时控制单元的数量与原始使用的延时控制单元的数量之间的差值,并根据差值确定测试指令字对应的传输子电路应使用的延时控制单元的数量。In some embodiments, the instruction word training state machine includes: an offset step counting unit and an offset step determining unit; The shift step size counting unit is used to change the number of delay control units put into use in the transmission subcircuit corresponding to the test instruction word; the offset step size determination unit is used to determine the corresponding test instruction word when the feedback instruction word meets the alignment condition. The difference between the number of delay control units currently used in the transmission sub-circuit and the number of delay control units originally used, and based on the difference, determine the delay control unit that should be used by the transmission sub-circuit corresponding to the test instruction word quantity.
其中,偏移步长计数单元可以是指用于对传输子电路中使用的延时控制单元进行调整的电路。偏移步长计数单元可以称为步长计数器(Step Counter)。示例性地,偏移步长计数单元看通过控制测试指令字对应的传输子电路中使用的抽头接口,改变测试指令字对应的传输子电路中投入使用的延迟控制单元的数量。The offset step counting unit may refer to a circuit used to adjust the delay control unit used in the transmission sub-circuit. The offset step counting unit can be called a step counter (Step Counter). For example, the offset step counting unit changes the number of delay control units put into use in the transmission sub-circuit corresponding to the test instruction word by controlling the tap interface used in the transmission sub-circuit corresponding to the test instruction word.
例如,偏移步长计数单元通过改变传输子电路中的一个抽头接口的使用状态,对将测试指令字从传输子电路中接出所使用的抽头接口进行更换,以改变测试指令字在传输子电路中经过的延时控制单元的数量。设传输子电路中的抽头接口存在两个状态:允许使用状态(如使用“1”表示)和禁止使用状态(如使用“0”表示)。传输子电路中只允许同时存在一个抽头接口的状态为允许使用状态,偏移步长计数单元将传输子电路中状态为“1”的抽头接口更改为状态“0”,并将传输子电路中除了该抽头接口之外的任意一个抽头接口的使用状态变换为“1”,即可完成传输子电路中的抽头接口的更换。For example, the offset step counting unit changes the usage status of a tap interface in the transmission sub-circuit and replaces the tap interface used to take out the test instruction word from the transmission sub-circuit, so as to change the position of the test instruction word in the transmission sub-circuit. The number of delay control units passed through. Assume that the tap interface in the transmission subcircuit has two states: the allowed use state (such as represented by "1") and the prohibited use state (such as represented by "0"). The state of only one tap interface allowed to exist in the transmission subcircuit at the same time is the allowed use state. The offset step counting unit changes the tap interface in the state of "1" in the transmission subcircuit to the state of "0", and changes the state of the tap interface in the transmission subcircuit to "0". The use status of any tap interface other than this tap interface changes to "1", and the replacement of the tap interface in the transmission subcircuit can be completed.
示例性地,图9是本申请一个示例性实施例提供的偏移步长计数单元调整传输子电路中使用的延时控制单元数量的示意图。偏移步长计数单元910通过更换传输子电路920中接出测试指令字的抽头接口,对传输子电路920中投入使用延时控制单元的数量进行调整。例如,传输子电路920在第i次传输测试指令字时,使用抽头接口3接出测试指令字。也就是说,在将测试指令字从传输子电路920中接出之前,测试指令字在传输子电路920中需要经过3个延时控制单元。若通过偏移步长计数单元910指示传输子电路920变更为使用抽头接口2接出测试指令字,则测试指令字在传输子电路920中需要经过2个延时控制单元,从而调整了测试指令字在传输子电路920中的传输延时。Exemplarily, FIG. 9 is a schematic diagram of an offset step counting unit adjusting the number of delay control units used in a transmission subcircuit provided by an exemplary embodiment of the present application. The offset step counting unit 910 adjusts the number of delay control units put into use in the transmission sub-circuit 920 by changing the tap interface in the transmission sub-circuit 920 for receiving the test instruction word. For example, when transmitting the test instruction word for the i-th time, the transmission subcircuit 920 uses the tap interface 3 to receive the test instruction word. That is to say, before the test instruction word is received from the transmission sub-circuit 920, the test instruction word needs to pass through three delay control units in the transmission sub-circuit 920. If the offset step counting unit 910 instructs the transmission subcircuit 920 to change to use the tap interface 2 to receive the test instruction word, the test instruction word needs to pass through two delay control units in the transmission subcircuit 920, thereby adjusting the test instruction The transmission delay of the word in the transmission sub-circuit 920.
由于测试指令字每经过一个延时控制单元,其在传输子电路中的传输延时都会增加,通过偏移步长计数单元,调整接出测试指令字使用抽头接口,改变测试指令字在传输子电路中经过延时控制单元的数量以改变测试指令字的相位,达到调整测试指令字在传输子电路中的传输延时。在测试指令字的高电平中心位置与时钟采样沿存在偏移的情况下,改变调整测试指令字在传输子电路中的传输延时,相当于改变时钟采样沿在测试指令字的数据窗口中的对齐的位置。Since every time the test instruction word passes through a delay control unit, its transmission delay in the transmission subcircuit will increase. Through the offset step counting unit, the tap interface used to receive the test instruction word is adjusted to change the transmission subcircuit of the test instruction word. The number of delay control units in the circuit changes the phase of the test instruction word to adjust the transmission delay of the test instruction word in the transmission subcircuit. When there is an offset between the high-level center position of the test instruction word and the clock sampling edge, changing and adjusting the transmission delay of the test instruction word in the transmission subcircuit is equivalent to changing the clock sampling edge in the data window of the test instruction word. the aligned position.
在一些实施例中,偏移步长计数单元每次调整传输子电路中使用的延时控制单元的数量变化量是固定的。也即,偏移步长计数单元每次指示传输子电路中增加/减少使用的延时控制单元的变化量相同。例如,在需要减少传输子电路中投入使用的延时控制单元的情况下,偏移步长计数单元每次指示传输子电路中减少使用1个延时控制单元。又例如,在需要增加传输子电路中投入使用的延时控制单元的情况下,偏移步长计数单元每次指示传输子电路中增加使用2个延时控制单元。In some embodiments, the offset step counting unit adjusts a fixed amount of change in the number of delay control units used in the transmission subcircuit each time. That is, the offset step counting unit instructs the transmission subcircuit to increase/decrease the used delay control unit by the same amount each time. For example, when it is necessary to reduce the number of delay control units used in the transmission subcircuit, the offset step counting unit instructs each time to reduce the use of one delay control unit in the transmission subcircuit. For another example, when it is necessary to increase the delay control units put into use in the transmission subcircuit, the offset step counting unit instructs two additional delay control units to be used in the transmission subcircuit each time.
在传输子电路中的延时控制单元和抽头接口交错排列的情况下,若偏移步长计数单元每次指示传输子电路增加使用1个延时控制单元,则偏移步长计数单元指示将测试指令字从第q+1个抽头接口中接出,q为当前使用的抽头接口的位置,q为正整数,实现增加传输子电路中使用的延时控制单元的数量的目的。When the delay control units and tap interfaces in the transmission subcircuit are arranged in a staggered manner, if the offset step counting unit instructs the transmission subcircuit to increase the use of one delay control unit each time, the offset step counting unit will indicate The test instruction word is taken out from the q+1th tap interface, q is the position of the currently used tap interface, and q is a positive integer to achieve the purpose of increasing the number of delay control units used in the transmission subcircuit.
通过这种方法,偏移步长计数单元每次指示传输子电路改变的延时控制单元的数量相同,控制传输子电路只需根据需求调整接出测试指令字的抽头接口,而无需对偏移步长计数单元所控制的延时控制单元的数量进行调整,降低了延时控制单元的调整复杂度。Through this method, the offset step counting unit instructs the transmission sub-circuit to change the number of delay control units each time. The control transmission sub-circuit only needs to adjust the tap interface for receiving the test instruction word according to the needs, without the need to adjust the offset The number of delay control units controlled by the step counting unit is adjusted, which reduces the adjustment complexity of the delay control unit.
在一些实施例中,偏移步长计数单元每次调整传输子电路中使用的延时控制单元的数量变化量是动态变化的,也即偏移步长计数单元每次调整传输子电路中使用延时控制单元变化量不是固定的。示例性地,偏移步长计数单元调整传输子电路中使用的延时控制单元数量的 变化量不断减小。例如,偏移步长计数单元第一次、第二次分别指示某传输子电路增加使用m、n个延时控制单元,其中m大于n。In some embodiments, each time the offset step counting unit adjusts the number of delay control units used in the transmission subcircuit, the change amount is dynamically changed, that is, each time the offset step counting unit adjusts the number of delay control units used in the transmission subcircuit, The amount of variation of the delay control unit is not fixed. Exemplarily, the offset step counting unit adjusts the number of delay control units used in the transmission subcircuit. The amount of change keeps decreasing. For example, the offset step counting unit instructs a certain transmission subcircuit to increase the use of m and n delay control units for the first and second times respectively, where m is greater than n.
在一个示例中,偏移步长计数单元采用二分法原则调整传输子电路中使用的延时控制单元的变化量,也即偏移步长计数单元每次调整传输子电路中使用的延时控制单元数目的变化量,是该偏移步长计数单元上一次调整该传输子电路中使用的延时控制单元的数目的变化量的一半。In one example, the offset step counting unit uses the dichotomy principle to adjust the variation of the delay control unit used in the transmission subcircuit, that is, the offset step counting unit adjusts the delay control used in the transmission subcircuit each time. The amount of change in the number of units is half of the amount of change in the last time the offset step counting unit adjusted the number of delay control units used in the transmission subcircuit.
设在某个传输子电路中包括的延时控制单元的总数为256个,其中待使用的延时控制单元的数量为129个,也即,该传输子电路通过与第127个延时控制单元相邻的、之后的抽头接口(即第127个抽头接口),接出测试指令字,测试指令字在传输子电路中经过127个延时控制单元。在需要增加该传输子电路中使用的延时控制单元的情况下,该偏移步长计数单元第一次指示该传输子电路中增加使用的延时控制单元的数量为64个,第二次指示该传输子电路使用的延时控制单元的数量的变化量为32个,第三次指示该传输子电路使用的延时控制单元的数量的变化量为16个,以此类推。Assume that the total number of delay control units included in a certain transmission sub-circuit is 256, of which the number of delay control units to be used is 129, that is, the transmission sub-circuit passes through the 127th delay control unit The adjacent and subsequent tap interface (i.e., the 127th tap interface) receives the test instruction word, which passes through 127 delay control units in the transmission subcircuit. When it is necessary to increase the delay control unit used in the transmission sub-circuit, the offset step counting unit indicates for the first time that the number of delay control units used in the transmission sub-circuit is increased to 64, and for the second time The change amount indicating the number of delay control units used by the transmission sub-circuit is 32, the third time indicating the change amount of the number of delay control units used by the transmission sub-circuit is 16, and so on.
需要注意的是,该偏移步长计数单元是否需要第二次、第三次、……第w次调整该传输子电路中使用的延时控制单元的数量,以及第二次、第三次、……第w次调整该传输子电路中使用的延时控制单元的数量的变化量为增加延时控制单元的数量或者减少延时控制单元的数量,取决于第一次增加该传输子电路中使用的延时控制单元的数量之后,测试指令字再次使用该传输子电路进行传输得到的反馈指令字是否满足对齐条件,有关该过程的具体内容,请参考下文实施例。It should be noted that whether the offset step counting unit needs to adjust the number of delay control units used in the transmission subcircuit for the second, third, ...wth time, and the second and third times ,...the wth adjustment of the number of delay control units used in the transmission subcircuit is to increase the number of delay control units or reduce the number of delay control units, depending on the first increase of the transmission subcircuit. After the number of delay control units used in the test instruction word is transmitted again using the transmission subcircuit, the feedback instruction word obtained satisfies the alignment condition. For details on this process, please refer to the embodiment below.
在一些实施例中,上述对齐条件包括:反馈指令字与测试指字相反。示例性地,在测试指令字为1拍高电平的情况下,即测试指令字的数据信号为1,反馈指令字的数据信号为0,即满足对齐条件。如此可以直观地反映出指令字的数据窗口的中心位置与时钟采样沿之间存在偏差,降低了指令字的训练复杂度。In some embodiments, the alignment condition includes: the feedback instruction word is opposite to the test instruction word. For example, when the test instruction word has a high level, that is, the data signal of the test instruction word is 1, and the data signal of the feedback instruction word is 0, that is, the alignment condition is met. This can intuitively reflect the deviation between the center position of the data window of the instruction word and the clock sampling edge, which reduces the training complexity of the instruction word.
在一些实施例中,在未对反馈指令字对应的传输子电路中的延时控制单元进行调整的过程中,指令字生成寄存器生成的测试指令字对应的数据为1(1拍的高电平),反馈指令字对应的数据也为1,也即初始状态下,高带宽内存的存储器可以正确采样到测试指令字,但指令字的数据窗口的中心位置与时钟采样沿之间可能存在偏差,为了确保指令字的采样准确率,还需对每个测试指令字对应的传输子电路中的延时控制单元进行优化。In some embodiments, in the process of not adjusting the delay control unit in the transmission subcircuit corresponding to the feedback instruction word, the data corresponding to the test instruction word generated by the instruction word generation register is 1 (1-beat high level ), the data corresponding to the feedback instruction word is also 1, that is, in the initial state, the memory of the high-bandwidth memory can correctly sample the test instruction word, but there may be a deviation between the center position of the data window of the instruction word and the clock sampling edge. In order to ensure the sampling accuracy of the instruction words, the delay control unit in the transmission subcircuit corresponding to each test instruction word needs to be optimized.
示例性地,在指令字训练阶段开始,需要调整时钟的工作频率,以保证第一次向高带宽内存的存储器发送测试指令字时,高带宽内存根据时钟信号对测试指令字进行采样能够得到正确的反馈指令字。尽管在测试开始阶段,测试指令字的高电平窗口的中心位置与时钟采样沿(上升沿)存在偏移,但是偏移不足以导致时序违例的产生,因此高带宽内存的存储器能够对测试指令字采样正确,得到的反馈指令字与测试指令字相同(两者对应的数值都是1)。For example, at the beginning of the instruction word training phase, the operating frequency of the clock needs to be adjusted to ensure that when the test instruction word is sent to the memory of the high-bandwidth memory for the first time, the high-bandwidth memory samples the test instruction word according to the clock signal to obtain the correct result. feedback command word. Although at the beginning of the test, there is an offset between the center position of the high-level window of the test instruction word and the clock sampling edge (rising edge), the offset is not enough to cause a timing violation, so the memory of the high-bandwidth memory can The word sampling is correct, and the obtained feedback command word is the same as the test command word (both corresponding values are 1).
在这种情况下,需要偏移步长计数单元调整反馈指令字对应的传输子电路中使用的延时控制单元的数量,调整测试指令字在传输子电路中的传输延时,使得时钟采样沿与测试指令字的数据窗口的边沿对齐,以便确定测试指令字的数据窗口中高电平的持续时间。In this case, the offset step counting unit needs to adjust the number of delay control units used in the transmission subcircuit corresponding to the feedback instruction word, and adjust the transmission delay of the test instruction word in the transmission subcircuit so that the clock sampling edge Aligned with the edges of the test instruction word's data window to determine the duration of the high level in the test instruction word's data window.
在一些实施例中,测试指令字的数据窗口的边沿包括:高电平建立边沿和高电平撤销边沿。偏移步长计数单元需要多次调整反馈字对应的传输子电路中使用的延时控制单元的数据量,分别实现时钟采样沿与高电平建立边沿对齐,以及,时钟采样沿与高电平撤销边沿对齐。In some embodiments, the edges of the data window of the test instruction word include: a high-level establishment edge and a high-level withdrawal edge. The offset step counting unit needs to adjust the data amount of the delay control unit used in the transmission subcircuit corresponding to the feedback word multiple times to achieve edge alignment between the clock sampling edge and the high level, and to achieve edge alignment between the clock sampling edge and the high level. Undo edge alignment.
时钟采样沿与高电平边沿是否对齐可以通过反馈指令字来体现。例如,在时钟采样沿与高电平建立边沿对齐的情况下,存储器无法对测试指令字训练阶段令字进行正确的采样,此时若测试指令字为1,反馈指令字为0。又因为,在指令字训练阶段,需要保证存储器第一次能够对测试指令字正确采样,即采样得到的反馈指令字为1。因此,在调整传输子电路中使用的延时控制单元的数量之后,若反馈指令字为0,则表示时钟采样沿已经与高电平建立边沿对齐。 Whether the clock sampling edge is aligned with the high-level edge can be reflected by the feedback instruction word. For example, when the clock sampling edge is edge aligned with the high level, the memory cannot correctly sample the test instruction word during the training phase. At this time, if the test instruction word is 1, the feedback instruction word is 0. And because, in the instruction word training phase, it is necessary to ensure that the memory can correctly sample the test instruction word for the first time, that is, the sampled feedback instruction word is 1. Therefore, after adjusting the number of delay control units used in the transmission subcircuit, if the feedback command word is 0, it means that the clock sampling edge has been aligned with the high-level establishment edge.
参考上文介绍内容,在时钟采样沿与指令字的数据窗口的对齐位置不满足建立时间或持续时间的情况下,会导致时序违例的发生。也就是说,在时钟采样沿与测试指令字的数据窗口的内部对齐的情况下,也会存在测试指令字采样错误,导致反馈指令字为0。但是由于需要将测试指令字与高电平建立边沿,测试指令字与高电平撤销边沿分别进行对齐,该两次对齐过程中,由于时许违例导致的偏差可以忽略不计,或者相互抵消。Referring to the above introduction, when the alignment position of the clock sampling edge and the data window of the instruction word does not meet the setup time or duration, timing violations will occur. That is to say, when the clock sampling edge is internally aligned with the data window of the test instruction word, there will also be a test instruction word sampling error, causing the feedback instruction word to be 0. However, since the test instruction word needs to be aligned with the high-level edge establishment and the test instruction word with the high-level cancellation edge, the deviations caused by timing violations during the two alignment processes can be ignored or offset each other.
在一些实施例中,差值包括左移差值和右移差值,偏移步长确定单元用于:分别确定左移差值和右移差值;其中,左移差值是指在反馈指令字满足对齐条件的情况下,测试指令字对应的传输子电路中减少使用的延时控制单元的数量;右移差值是指在反馈指令字满足对齐条件的情况下,测试指令字对应的传输子电路中增加使用的延时控制单元的数量;根据左移差值和右移差值,确定测试指令字对应的传输子电路应使用的延时控制单元的数量。In some embodiments, the difference includes a left shift difference and a right shift difference, and the offset step determination unit is used to: determine the left shift difference and the right shift difference respectively; where the left shift difference refers to the feedback When the instruction word meets the alignment condition, the number of delay control units used in the transmission subcircuit corresponding to the test instruction word is reduced; the right shift difference means that when the feedback instruction word meets the alignment condition, the test instruction word corresponds to Increase the number of delay control units used in the transmission subcircuit; determine the number of delay control units that should be used in the transmission subcircuit corresponding to the test instruction word based on the left shift difference and right shift difference.
其中,右移差值是指在时钟采样沿与测试指令字的高电平建立边沿对齐的情况下,传输子电路中使用的延时控制单元的变化量。由于在指令字训练阶段的初始,保证存储器能够对测试指令字正确采样,也即时钟采样沿与测试指令字的数据窗口内的位置对齐。将时钟采样沿与测试指令字的高电平建立边沿对齐,相当于将测试指令字的数据窗口向右移动。这说明测试指令字的数据窗口的发生时间延后,也即测试指令字在传输子电路中的传输延时增加,传输子电路中投入使用的延时控制单元的数目增加。Among them, the right shift difference refers to the change amount of the delay control unit used in the transmission subcircuit when the clock sampling edge is aligned with the high-level establishment edge of the test instruction word. Since at the beginning of the instruction word training phase, it is ensured that the memory can correctly sample the test instruction word, that is, the clock sampling edge is aligned with the position within the data window of the test instruction word. Aligning the clock sampling edge with the high level of the test instruction word is equivalent to moving the data window of the test instruction word to the right. This shows that the occurrence time of the data window of the test instruction word is delayed, that is, the transmission delay of the test instruction word in the transmission subcircuit increases, and the number of delay control units put into use in the transmission subcircuit increases.
左移差值是指在时钟采样沿与测试指令字的高电平撤销边沿对齐的情况下,传输子电路中使用的延时控制单元的变化量。由于在指令字训练阶段的初始,保证存储器能够对测试指令字正确采样,也即时钟采样沿与测试指令字的数据窗口内的位置对齐。将时钟采样沿与测试指令字的高电平撤销边沿对齐,相当于将测试指令字的数据窗口向左移动。这说明测试指令字的数据窗口的发生时间提前,也即测试指令字在传输子电路中的传输延时减少,传输子电路中投入使用的延时控制单元的数目变少。The left shift difference refers to the change in the delay control unit used in the transmission subcircuit when the clock sampling edge is aligned with the high-level withdrawal edge of the test command word. Since at the beginning of the instruction word training phase, it is ensured that the memory can correctly sample the test instruction word, that is, the clock sampling edge is aligned with the position within the data window of the test instruction word. Aligning the clock sampling edge with the high-level cancel edge of the test instruction word is equivalent to moving the data window of the test instruction word to the left. This shows that the occurrence time of the data window of the test instruction word is advanced, that is, the transmission delay of the test instruction word in the transmission sub-circuit is reduced, and the number of delay control units put into use in the transmission sub-circuit is reduced.
以确定右移差值为例,介绍指令字调整电路的工作过程。在控制测试指令字的数据窗口右移的过程中,可能需要一次或多次,才能使得时钟采样沿与测试指令字的高电平撤销边沿对齐。在只需右移一次的情况下,将该次对应的延时控制单元的增加数量,确定为该测试指令字对应的右移差值;在需右移多次的情况下,将该多次对应的延时控制单元的增加数量的和值,确定为该测试指令字对应的右移差值。Taking the determination of the right shift difference as an example, the working process of the instruction word adjustment circuit is introduced. In the process of controlling the right shift of the data window of the test instruction word, it may be necessary one or more times to align the clock sampling edge with the high-level cancellation edge of the test instruction word. In the case of only one right shift, the corresponding increase in the delay control unit is determined as the right shift difference corresponding to the test instruction word; in the case of multiple right shifts, the multiple right shifts are The sum of the increasing numbers of the corresponding delay control units is determined as the right shift difference corresponding to the test instruction word.
示例性地,在指令字训练状态机接收到反馈指令字1之后,若反馈指令字1不满足对齐条件,则偏移步长计数单元指示反馈指令字1对应的传输子电路,增加使用a1个延时控制单元,a1为正整数。当前右移差值对应的数值为a1。例如,传输子电路通过调整用于接出测试指令字使用的抽头接口,增加传输子电路中使用的延时控制单元的数量。可选地,步长计数单元可以按照固定的步长改变传输子电路中使用的延时控制单元的数量,也可以按照动态变化的步长调整传输子电路中使用的延时控制单元的数量。具体过程请参考上文实施例,在此不进行赘述。For example, after the instruction word training state machine receives the feedback instruction word 1, if the feedback instruction word 1 does not meet the alignment condition, the offset step counting unit indicates the transmission subcircuit corresponding to the feedback instruction word 1, and additionally uses a1 Delay control unit, a1 is a positive integer. The value corresponding to the current right shift difference is a1. For example, the transmission subcircuit increases the number of delay control units used in the transmission subcircuit by adjusting the tap interface used to receive the test instruction word. Optionally, the step counting unit can change the number of delay control units used in the transmission subcircuit according to a fixed step size, or can adjust the number of delay control units used in the transmission subcircuit according to a dynamically changing step size. Please refer to the above embodiment for the specific process, which will not be described in detail here.
在偏移步长计数单元增加传输子电路中使用延时控制单元的数量之后,指令字训练状态机向指令字生成寄存器指示,再次向传输子电路发送测试指令字,传输子电路将测试指令字第二次发送给存储器。由于此时传输子电路中投入使用的延时控制单元的数量发生改变,测试指令字在传输子电路中经过的延时控制单元的数量发生变化,测试指令字的相位发生了变化,使得时钟采样沿与测试指令字的数据窗口的对齐位置发生改变。After the offset step counting unit increases the number of delay control units used in the transmission subcircuit, the instruction word training state machine indicates to the instruction word generation register and sends the test instruction word to the transmission subcircuit again, and the transmission subcircuit will test the instruction word Send to storage the second time. Since the number of delay control units put into use in the transmission subcircuit changes at this time, the number of delay control units that the test instruction word passes through in the transmission subcircuit changes, and the phase of the test instruction word changes, causing the clock sampling The alignment of the edge with the data window of the test instruction word changes.
存储器对相位发生改变的测试指令字进行采样,得到反馈指令字2,并将反馈指令字2发送给指令字接收电路。通过指令字接收电路将反馈指令字2发送给指令字训练状态机。The memory samples the test instruction word whose phase has changed, obtains the feedback instruction word 2, and sends the feedback instruction word 2 to the instruction word receiving circuit. The feedback instruction word 2 is sent to the instruction word training state machine through the instruction word receiving circuit.
指令字训练状态机判断反馈指令字2是否满足对齐条件。假设反馈指令字2不满足对齐条件(即反馈指令字2对应的数值为1),则偏移步长计数单元指示反馈指令字2对应的传输子电路,增加使用a2个延时控制单元,a2为正整数。当前右移差值对应的数值为a1+a2。The instruction word training state machine determines whether the feedback instruction word 2 meets the alignment condition. Assuming that feedback instruction word 2 does not meet the alignment condition (that is, the value corresponding to feedback instruction word 2 is 1), the offset step counting unit indicates the transmission subcircuit corresponding to feedback instruction word 2, and a2 delay control units are added, a2 is a positive integer. The value corresponding to the current right shift difference is a1+a2.
随后,指令字训练状态机指示指令字生成寄存器再次发送测试指令字,并执行将测试指 令字发送给存储器,并获取获得存储器发送的反馈指令字的过程,指令字状态训练机接收到本次存储器对测试指令字进行采样得到的反馈指令字3。在得到反馈指令字3之后,判断指令字3是否满足对齐条件,假设反馈指令字3不满足对齐条件(即反馈指令字3对应的数值为1),则通过偏移步长计数单元指示反馈指令字对应传输子电路中,增加使用a3个延时控制单元。当前右移差值对应的数值为a1+a2+a3。重复执行指令字训练状态机指示指令字生成寄存器将测试指令字发送给指令字发送电路的步骤,直到反馈指令字满足对齐条件(即反馈指令字对应的数值为0)。Subsequently, the instruction word training state machine instructs the instruction word generation register to send the test instruction word again, and executes the test instruction word The process of sending the command word to the memory and obtaining the feedback command word sent by the memory. The command word state training machine receives the feedback command word 3 obtained by sampling the test command word from the memory this time. After obtaining the feedback instruction word 3, it is judged whether the instruction word 3 meets the alignment condition. Assuming that the feedback instruction word 3 does not meet the alignment condition (that is, the value corresponding to the feedback instruction word 3 is 1), the feedback instruction is indicated through the offset step counting unit. In the word corresponding transmission sub-circuit, a3 delay control units are added. The value corresponding to the current right shift difference is a1+a2+a3. Repeat the steps in which the instruction word training state machine instructs the instruction word generation register to send the test instruction word to the instruction word sending circuit until the feedback instruction word meets the alignment condition (that is, the value corresponding to the feedback instruction word is 0).
在一些实施例中,偏移步长计数单元每次按照相同的步长对传输子电路中使用的延时控制单元的数量进行调整。也即,在上述实施例中:a1=a2=a3=ai,其中,i为反馈指令字满足对齐条件时,偏移步长计数单元对反馈指令字对应的传输子电路中使用的延时控制单元的数量进行调整的次数,其中i正整数。In some embodiments, the offset step counting unit adjusts the number of delay control units used in the transmission subcircuit according to the same step size each time. That is, in the above embodiment: a1=a2=a3=ai, where i is the delay control used by the offset step counting unit in the transmission subcircuit corresponding to the feedback instruction word when the feedback instruction word meets the alignment condition The number of times the number of units is adjusted, where i is a positive integer.
在另一些实施例中,偏移步长计数单元每次按照不完全相同的步长对传输子电路中使用的延时控制单元的数量进行调整。也即,在上述实施例中a1、a2、a3……不完全相等。在这种情况下,所得到的右移差值可能超过时钟采样沿与测试指令字的高电平撤销边沿对齐情况下的右移差值(也即指针采样沿超出数据窗口,反馈指令字也满足对齐条件),因此在反馈指令字满足对齐条件的情况下,偏移步长计数单元再次对反馈指令字对应的传输子电路中使用的延时控制单元进行调整,以确定使得时钟采样沿与测试指令字的高电平撤销边沿对齐情况下的右移差值,如此可以获取最优的右移差值,从而提高指令字的训练准确性。In other embodiments, the offset step counting unit adjusts the number of delay control units used in the transmission subcircuit according to steps that are not exactly the same each time. That is, in the above embodiment, a1, a2, a3... are not completely equal. In this case, the resulting right shift difference may exceed the right shift difference if the clock sampling edge is aligned with the high-level cancel edge of the test instruction word (that is, the pointer sampling edge exceeds the data window, and the feedback instruction word is also satisfy the alignment condition), therefore when the feedback instruction word satisfies the alignment condition, the offset step counting unit again adjusts the delay control unit used in the transmission subcircuit corresponding to the feedback instruction word to ensure that the clock sampling edge is aligned with the The high level of the test instruction word cancels the right shift difference under edge alignment, so that the optimal right shift difference can be obtained, thereby improving the training accuracy of the instruction word.
示例性地,同样以确定右移差值的过程为例,在反馈指令字满足对齐条件的情况下,偏移步长计数单元指示传输子电路:减少使用的延时控制单元的数量。Illustratively, taking the process of determining the right shift difference as an example, when the feedback instruction word satisfies the alignment condition, the offset step counting unit instructs the transmission subcircuit to: reduce the number of delay control units used.
例如,在偏移步长计数单元指示传输子电路中增加使用b1个延时控制单元之后,存储器发送的反馈指令字满足对齐条件。偏移步长计数单元指示传输子电路减少使用b2个延时控制单元。进行上述过程的目的在于确定传输子电路中使用的延时控制单元的最小变化数量,该最小变化量就能够使存储器对测试指令字进行的采样发生采样错误,也即反馈指令字为0。右移差值则可以为b1-b2。For example, after the offset step counting unit indicates that b1 delay control units are added to the transmission subcircuit, the feedback instruction word sent by the memory meets the alignment condition. The offset step counting unit instructs the transmission subcircuit to reduce the use of b2 delay control units. The purpose of the above process is to determine the minimum number of changes in the delay control unit used in the transmission subcircuit, which can cause sampling errors in the memory's sampling of the test instruction word, that is, the feedback instruction word is 0. If the difference is shifted right, it can be b1-b2.
在一些实施例中,偏移步长确定单元确定右移差值,包括:获取反馈指令字满足对齐条件的情况下,反馈指令字对应的传输子电路中使用的延时控制单元的第一数量;获取进行指令字训练的初始阶段,反馈指令字对应的传输子电路中使用的延时控制单元的第二数量;计算第一数量与第二数量的差值,确定右移差值。In some embodiments, the offset step determination unit determines the right shift difference, including: obtaining the first number of delay control units used in the transmission subcircuit corresponding to the feedback instruction word when the feedback instruction word meets the alignment condition ; Obtain the second number of delay control units used in the transmission subcircuit corresponding to the feedback instruction word in the initial stage of instruction word training; calculate the difference between the first number and the second number, and determine the right shift difference.
可选地,在指令字训练的初始阶段,各个测试指令字对应的传输子电路中使用至少一个延时控制单元。例如,传输子电路中延时控制单元的总数量为A,则传输子电路中原始使用的延时控制单元的数量不少1个,不多于A个。Optionally, in the initial stage of instruction word training, at least one delay control unit is used in the transmission subcircuit corresponding to each test instruction word. For example, if the total number of delay control units in the transmission subcircuit is A, then the number of delay control units originally used in the transmission subcircuit is not less than 1 and not more than A.
由于在确定传输子电路中应使用的延时控制单元的过程中,需要确定左移差值和右移差值,因此可以设置传输子电路中原始使用的延时控制单元的数量为传输子电路中延时控制单元的总数量的一半,以方便增加、减少测试指令字在传输子电路中经过的延时控制单元的数量,达到增大、减小测试指令字的相位的作用。Since the left shift difference and the right shift difference need to be determined in the process of determining the delay control unit that should be used in the transmission subcircuit, the number of delay control units originally used in the transmission subcircuit can be set to Half of the total number of delay control units in order to facilitate the increase or decrease of the number of delay control units that the test instruction words pass through in the transmission sub-circuit, so as to increase or decrease the phase of the test instruction words.
例如,某个传输子电路中包括256个延时控制单元,则传输子电路中原始使用的延时控制单元的数量为128个。For example, if a certain transmission subcircuit includes 256 delay control units, the original number of delay control units used in the transmission subcircuit is 128.
在另一些实施例中,偏移步长确定单元确定右移差值,包括:获取反馈指令字满足对齐条件之前,偏移步长计算单元每次调整的传输子电路中使用的延时控制单元数量;在反馈指令字满足对齐条件的情况下,将统计结果作为右移差值。In other embodiments, the offset step size determination unit determines the right shift difference, including: before obtaining the feedback instruction word to meet the alignment condition, the offset step size calculation unit adjusts the delay control unit used in the transmission subcircuit each time. Quantity; when the feedback instruction word meets the alignment condition, the statistical result is used as the right shift difference.
例如,在反馈指令字满足对齐条件之前,偏移步长计数单元一共对传输子电路中使用的延时控制单元的数量进行了3次调整,分别为:传输子电路第一次增加使用的延时控制单元的数量为5个,第二次增加使用的延时控制单元的数量为5个,第三次减少使用的延时控制单元的数量为2个,则右移差值为8(5+5-2)。 For example, before the feedback instruction word meets the alignment condition, the offset step counting unit adjusts the number of delay control units used in the transmission subcircuit a total of three times, as follows: the first time the transmission subcircuit increases the delay used The number of time control units is 5, the number of delay control units used for the second increase is 5, and the number of delay control units used for the third time is reduced to 2, then the right shift difference is 8 (5 +5-2).
上述示例中,在第三次减少传输子电路中使用的延时控制单元的原因是:第二次偏移步长计数单元调整传输子电路使用的延时控制单元的变化量大于1(增加5),假设传输子电路中增加使用8个延时控制单元即可使得时钟采样沿与测试指令子的数据窗口建立边沿对齐,则增加使用10个延时控制单元是,反馈指令字对应的数值一定为0,但是只需使用更少的延时控制单元即可得到反馈指令字的数值为0。为了避免减小误差,需要减少延时控制单元的使用数量,确定测试指令字发生采样错误的最小延时控制单元变化量作为右移差值。In the above example, the reason why the delay control unit used in the transmission sub-circuit is reduced for the third time is that the second offset step counting unit adjusts the change of the delay control unit used in the transmission sub-circuit by greater than 1 (increased by 5 ), assuming that the additional use of 8 delay control units in the transmission subcircuit can establish edge alignment between the clock sampling edge and the data window of the test instruction subcircuit, then the additional use of 10 delay control units means that the value corresponding to the feedback instruction word will be certain is 0, but only fewer delay control units are needed to obtain the value of the feedback command word as 0. In order to avoid reducing the error, it is necessary to reduce the number of delay control units used, and determine the minimum delay control unit change amount when a sampling error occurs in the test instruction word as the right shift difference.
在确定右移差值之后,传输子电路进行复位,也即测试指令字在传输子电路中经过的延时控制单元的数量为原始使用的延时控制单元的数量。在一些实施例中,通过指令字训练状态机指示反馈指令字对应的传输子电路恢复原始使用的延时控制单元数量。如通过偏移步长计数单元指示传输子电路使用初始的抽头接口对测试指令字进行接出。After the right shift difference is determined, the transmission subcircuit is reset, that is, the number of delay control units that the test instruction word passes through in the transmission subcircuit is the number of delay control units originally used. In some embodiments, the instruction word training state machine is used to instruct the transmission subcircuit corresponding to the feedback instruction word to restore the original number of delay control units used. For example, the transmission subcircuit is instructed to use the initial tap interface to receive the test instruction word through the offset step counting unit.
在对传输子电路进行复位之后,开始确定左移差值的过程。左移差值的确定过程与右移差值的确定过程类似,通过反馈指令字是否满足对齐条件,确定是否需要继续减少反馈指令字对应的传输子电路中使用的延时控制单元的数量,以减小测试指令字的相位,使得测试指令字的数据窗口的撤销边缘与时钟采样沿对齐,该过程的具体内容请参考上文实施例,在此不进行赘述。After resetting the transmission subcircuit, the process of determining the left shift difference begins. The determination process of the left shift difference is similar to the determination process of the right shift difference. By whether the feedback instruction word meets the alignment condition, it is determined whether it is necessary to continue to reduce the number of delay control units used in the transmission subcircuit corresponding to the feedback instruction word, so as to Reduce the phase of the test instruction word so that the cancel edge of the data window of the test instruction word is aligned with the clock sampling edge. Please refer to the above embodiment for the specific content of this process, which will not be described again here.
需要说明的是,确定左移差值和确定右移差值两者之间不存在先后顺序,可以向确定左移差值,再确定右移差值,也可以先确定右移差值,再确定左移差值。It should be noted that there is no sequence between determining the left shift difference and determining the right shift difference. You can determine the left shift difference and then determine the right shift difference, or you can first determine the right shift difference and then Determine the left shift difference.
示例性地,图10是本申请一个示例性实施例提供的左移差值和右移差值确定过程的示意图。图10中,对于传输子电路中中传输的测试指令字1001,通过将初始相位下的测试指令字1001调整为相位1下的测试指令字1001(增加传输子电路中使用的延时控制单元的数量),使得测试指令字1001的数据窗口的建立边沿与时钟采样沿对齐。此时右移差值可使用R_CNT表示。对相位1下的测试指令字1001进行复位,得到初始相位下的测试指令字1001,再将将初始相位下的测试指令字1001调整为相位2下的测试指令字1001(减少传输子电路中使用的延时控制单元的数量),使得数据窗口的撤销边沿与时钟采样沿对齐。此时左移差值可使用L_CNT表示。由图10可知,R_CNT与L_CNT之和等于测试指令字的数据窗口中高电平的持续时间。Exemplarily, FIG. 10 is a schematic diagram of the left shift difference and right shift difference determination process provided by an exemplary embodiment of the present application. In Figure 10, for the test instruction word 1001 transmitted in the transmission subcircuit, the test instruction word 1001 in the initial phase is adjusted to the test instruction word 1001 in phase 1 (increasing the delay control unit used in the transmission subcircuit quantity), so that the establishment edge of the data window of the test instruction word 1001 is aligned with the clock sampling edge. At this time, the right shift difference can be represented by R_CNT. Reset the test instruction word 1001 under phase 1 to obtain the test instruction word 1001 under the initial phase, and then adjust the test instruction word 1001 under the initial phase to the test instruction word 1001 under phase 2 (to reduce the use in the transmission subcircuit (the number of delay control units) so that the withdrawal edge of the data window is aligned with the clock sampling edge. At this time, the left shift difference can be represented by L_CNT. It can be seen from Figure 10 that the sum of R_CNT and L_CNT is equal to the duration of the high level in the data window of the test instruction word.
在确定左移差值和右移差值后,偏移步长确定单元可以根据左移差值和右移差值,确定反馈指令字对应的传输子电路中应使用的延时控制单元的数量。该应使用的延时控制单元的数量是指能够使得测试指令字能够被存储器正确采样时,反馈指令字对应的传输子电路中使用的延时控制单元的数量,如此提高了指令字的采样准确性。After determining the left shift difference and right shift difference, the offset step determination unit can determine the number of delay control units that should be used in the transmission subcircuit corresponding to the feedback instruction word based on the left shift difference and right shift difference. . The number of delay control units that should be used refers to the number of delay control units used in the transmission subcircuit corresponding to the feedback instruction word when the test instruction word can be correctly sampled by the memory. This improves the sampling accuracy of the instruction word. sex.
在一些实施例中,偏移步长确定单元用于:根据左移差值和右移差值,计算第一对齐量;其中,第一对齐量用于表征测试指令字的传输信号的高电平持续时间的一半;根据原始使用的延时控制单元的数量和第一对齐量,确定测试指令字对应的传输子电路应使用的延时控制单元的数量。In some embodiments, the offset step determination unit is configured to: calculate a first alignment amount based on the left shift difference value and the right shift difference value; wherein the first alignment amount is used to characterize the high voltage of the transmission signal of the test instruction word. Half of the flat duration; determine the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word based on the number of delay control units originally used and the first alignment amount.
示例性地,第一对齐量=(右移差值+左移差值)*0.5。第一对齐量可以理解称为测试指令字的数据窗口中高电平持续时长的一半所对应的延时控制单元的数量。For example, the first alignment amount=(right shift difference value+left shift difference value)*0.5. The first alignment amount can be understood as the number of delay control units corresponding to half of the high-level duration in the data window called the test instruction word.
测试指令字对应的传输子电路应使用的延时控制单元的数量,通过原始使用的延时控制单元数量与第一对齐量计算得到。The number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word is calculated by the originally used number of delay control units and the first alignment amount.
示例性地,对于传输子电路中原始使用的延时控制单元的数量-左移差值得到边缘对齐量,传输子电路中使用该边缘对齐量的延时控制单元时,测试指令字的数据窗口的建立边沿能够与时钟采样沿对齐。随后传输子电路中只需要增加第一对齐量的延时控制单元,即可使得测试指令字的数据窗口的中心位置与时钟采样沿对齐,也即测试指令字对应的传输子电路应使用的延时控制单元的数量T=原始使用的延时控制单元数量+0.5*(右移差值-左移差值)。For example, for the number of delay control units originally used in the transmission subcircuit - shift the difference left to obtain the edge alignment amount. When the delay control unit with this edge alignment amount is used in the transmission subcircuit, the data window of the instruction word is tested. The setup edge of can be aligned with the clock sampling edge. Subsequently, only the delay control unit of the first alignment amount needs to be added to the transmission sub-circuit to align the center position of the data window of the test instruction word with the clock sampling edge, that is, the delay that should be used by the transmission sub-circuit corresponding to the test instruction word. The number of time control units T = the original number of delay control units used + 0.5* (right shift difference - left shift difference).
如此通过调整用于接出测试指令字的抽头接口,使得抽头接口从传输子电路中接出测试指令字之前,测试指令字经过的延时控制单元的数量为T,即可保证测试指令字的数据窗口 的中心位置与时钟采样沿对齐,从而确保指令字的采样准确性。In this way, by adjusting the tap interface used to receive the test command word, so that before the tap interface receives the test command word from the transmission sub-circuit, the number of delay control units that the test command word passes through is T, which can ensure the accuracy of the test command word. data window The center position is aligned with the clock sampling edge to ensure the sampling accuracy of the instruction word.
在一些实施例中,指令字处理电路对所有的传输子电路分别进行上述对齐过程。在一些实施例中,上述过程可以称为单步字节训练(Per bit training)阶段。In some embodiments, the word processing circuit is instructed to perform the above alignment process on all transmission sub-circuits respectively. In some embodiments, the above process may be called a single-step byte training (Per bit training) phase.
例如,图11本申请一个示例性实施例提供的进行单步字节训练阶段的示意图。其中,指令字的字节1101、指令字的字节1102、……、指令字的字节j分别对应的数据窗口的中心位置与时钟采样沿1对齐;指令字的字节i等分别对应的数据窗口的中心位置与时钟采样沿2对齐,以便使得各个测试指令字被正确采样。For example, Figure 11 is a schematic diagram of a single-step byte training stage provided by an exemplary embodiment of the present application. Among them, the center position of the data window corresponding to byte 1101 of the instruction word, byte 1102 of the instruction word, ..., and byte j of the instruction word respectively is aligned with the clock sampling edge 1; byte i of the instruction word corresponds to The center position of the data window is aligned with clock sampling edge 2 so that each test instruction word is sampled correctly.
在指令字训练阶段中的独立字节训练阶段,通过分别确定各个传输子电路中应使用的延时控制单元的数量,使得各个测试指令字的数据窗口的中心位置能够与时钟采样沿对齐,使得与时钟信号发生偏移得到纠正,保证各个传输子电路中传输的指令字能够被正确采样。In the independent byte training phase of the instruction word training phase, by determining the number of delay control units that should be used in each transmission subcircuit, the center position of the data window of each test instruction word can be aligned with the clock sampling edge, so that The offset from the clock signal is corrected to ensure that the instruction words transmitted in each transmission sub-circuit can be sampled correctly.
在一些实施例中,单步字节训练阶段除了可以通过指令字处理电路控制执行之外,还可以通过程序产品控制进行执行,例如使用程序产品配置偏移步长计算单元每次改变传输子电路中使用的延时控制单元的数量的变化量,使用程序产品指示主机发向存储器送反馈指令字传输指令,以便使存储器向主机发送反馈指令字或反馈指令字序列。In some embodiments, in addition to being controlled by the instruction word processing circuit, the single-step byte training phase can also be executed by program product control, for example, using the program product to configure the offset step calculation unit each time the transmission subcircuit is changed. The variation in the number of delay control units used in the program product is used to instruct the host to send a feedback instruction word transmission instruction to the memory, so that the memory sends a feedback instruction word or a sequence of feedback instruction words to the host.
可选地,在完成单步字节训练阶段后,还可以对部分传输子电路进行调整,使得多个测试指令字的数据窗口的高电平中心位置对齐于相同的时钟采样沿,以减少指令字传输时占用的传输资源的时长,降低数据传输压力。该阶段也可以称为单步片段训练阶段(Per Slice training)。Optionally, after completing the single-step byte training phase, some transmission sub-circuits can also be adjusted so that the high-level center positions of the data windows of multiple test instruction words are aligned with the same clock sampling edge to reduce instruction The duration of transmission resources occupied during word transmission reduces data transmission pressure. This stage can also be called the single-step segment training stage (Per Slice training).
在一些实施例中,偏移步长确定单元还用于:在根据原始使用的延时控制单元的数量和第一对齐量,确定测试指令字对应的传输子电路应使用的延时控制的单元的数量之后,根据左移差值和右移差值计算第二对齐量;其中,第二对齐量用于表征测试指令字的传输信号的高电平持续时间;使用第二对齐量对测试指令字对应的传输子电路应使用的延时控制单元的数量进行调整。In some embodiments, the offset step size determination unit is also used to: determine the delay control unit that should be used by the transmission sub-circuit corresponding to the test instruction word based on the number of originally used delay control units and the first alignment amount. After the number, calculate the second alignment amount according to the left shift difference value and the right shift difference value; wherein, the second alignment amount is used to characterize the high-level duration of the transmission signal of the test instruction word; use the second alignment amount to The transmission subcircuit corresponding to the word should be adjusted using the number of delay control units.
可选地,第二对齐量=左移差值+右移差值。在单步片段训练阶段中,指令字生成序列生成测试指令字序列,并将测试指令字序列传输给传输子电路。传输子电路接收到测试指令字序列将测试测试字序列中的各个测试指令字,使用对应的传输子电路发送给存储器(如HBM DRAM)。存储器在一个时钟周期内对测试指令字序列中的所有测试指令字进行采样,生成反馈指令字序列,并将反馈指令字序列传输给指令字接收电路,由指令字接收电路将反馈指令字序列发送给指令字训练状态机。Optionally, the second alignment amount=left shift difference value+right shift difference value. In the single-step segment training phase, the instruction word generation sequence generates a test instruction word sequence, and the test instruction word sequence is transmitted to the transmission subcircuit. The transmission subcircuit receives the test instruction word sequence and tests each test instruction word in the test word sequence, and sends it to the memory (such as HBM DRAM) using the corresponding transmission subcircuit. The memory samples all test instruction words in the test instruction word sequence within one clock cycle, generates a feedback instruction word sequence, and transmits the feedback instruction word sequence to the instruction word receiving circuit, which sends the feedback instruction word sequence Train the state machine for the instruction words.
指令字训练状态机对反馈指令字序列是否满足第二对齐条件进行判断。在一些实施例中,第二对齐条件是指反馈指令字序列中的所有的反馈指令字的数值都为1。The instruction word training state machine determines whether the feedback instruction word sequence satisfies the second alignment condition. In some embodiments, the second alignment condition means that the value of all feedback instruction words in the feedback instruction word sequence is 1.
在反馈指令字序列满足第二对齐条件的情况下,说明各个测试指令字的数据窗口的中心位置对齐与相同的时钟采样沿。在反馈指令字序列不满足第二对齐条件的情况下,调节反馈指令字的数值为0的目标传输子电路中使用的延时控制单元的数量,以便使得测试指令字对应的传输子电路的传输延迟与至少一个其他测试指令字对应的传输子电路的传输延迟相同。When the feedback instruction word sequence satisfies the second alignment condition, it means that the center position of the data window of each test instruction word is aligned with the same clock sampling edge. When the feedback instruction word sequence does not meet the second alignment condition, adjust the number of delay control units used in the target transmission sub-circuit whose value of the feedback instruction word is 0, so as to ensure the transmission of the transmission sub-circuit corresponding to the test instruction word. The delay is the same as the transmission delay of the transmission subcircuit corresponding to at least one other test instruction word.
在一些实施例中,调节目标传输子电路中使用的延时控制单元数量,包括:In some embodiments, adjusting the number of delay control units used in the target transmission subcircuit includes:
在目标传输子电路中减少或增加使用第二对齐量的延迟控制单元,并重复向存储器发送测试指令字序列的步骤,直到反馈指令字序列满足第二对齐条件为止。Reduce or increase the delay control unit using the second alignment amount in the target transmission subcircuit, and repeat the step of sending the test instruction word sequence to the memory until the feedback instruction word sequence satisfies the second alignment condition.
示例性地,图12是本申请一个示例性实施例提供的进行单步片段训练阶段的示意图。在图12中,通过将测试指令字1202从相位1调整到相位2(即将测试指令字1202对应的传输子电路中使用的延时控制单元的数量减少(左移差值+右移差值)个),使得测试指令字1201、相位2下的测试指令字1202与相同的时钟采样沿对齐。Exemplarily, FIG. 12 is a schematic diagram of a single-step segment training stage provided by an exemplary embodiment of the present application. In Figure 12, by adjusting the test instruction word 1202 from phase 1 to phase 2 (that is, reducing the number of delay control units used in the transmission sub-circuit corresponding to the test instruction word 1202 (left shift difference + right shift difference) ), so that the test instruction word 1201 and the test instruction word 1202 in phase 2 are aligned with the same clock sampling edge.
在一些实施例中,指令字处理电路还包括:时钟锁相环寄存器,其用于调整存储器的时钟信号的频率。In some embodiments, the instruction word processing circuit further includes: a clock phase-locked loop register, which is used to adjust the frequency of the clock signal of the memory.
通过调整时钟锁相环寄存器改变高带宽内存的工作频率,也即调整存储器对测试指令字 进行采样的时钟信号的频率。在一些实施例中,高带宽内存的工作频率1.8Ghz,高带宽内存的工作频率越高,测试指令字对应的数据窗口越短。又因为信号从低电平向高电平转换过程需要时间,从高电平向低电平转换同样需要时间,这使得高电平维持稳定的时长低于数据窗口的时长。在这种情况下,时钟采样沿与测试指令字中的数据窗口中的高电中点发生轻微的偏移,就会导致对测试指令字的采样发生错误。通过时钟锁相环寄存器降低高带宽内存的工作频率,有助于使得测试指令字能够被正确采样。Change the operating frequency of the high-bandwidth memory by adjusting the clock phase-locked loop register, that is, adjusting the memory to test the instruction word The frequency of the clock signal that is sampled. In some embodiments, the operating frequency of the high-bandwidth memory is 1.8Ghz. The higher the operating frequency of the high-bandwidth memory, the shorter the data window corresponding to the test instruction word. And because the signal conversion process from low level to high level takes time, the conversion from high level to low level also takes time, which makes the high level maintain stable duration lower than the length of the data window. In this case, a slight offset between the clock sampling edge and the high-voltage midpoint of the data window in the test command word will cause an error in the sampling of the test command word. Reducing the operating frequency of high-bandwidth memory through the clock phase-locked loop register helps enable the test instruction words to be sampled correctly.
在一些实施例中,在进行高带宽内存的指令字测试阶段时,需要时钟锁相环寄存器将高带宽内存的工作频率(也称为时钟的工作频率)控制在测试频率以下,测试频率是指能够保证任意一个测试指令字能够被采样正确的工作频率,也即在测试频率下,存储器对任意一个测试指令字进行第一次采样时,都能采样正确,也即测试指令字对应的数据为1,反馈指令字对应的数据也为1。其中,测试频率是指能够使各个测试指令字都能被存储器正确采样的时钟工作频率。一些实施例中,测试频率是经过实验测试得到的工艺数据。In some embodiments, when performing the instruction word test phase of the high-bandwidth memory, the clock phase-locked loop register is required to control the operating frequency of the high-bandwidth memory (also called the operating frequency of the clock) below the test frequency. The test frequency refers to It can ensure that any test instruction word can be sampled at the correct working frequency, that is, under the test frequency, the memory can sample correctly when it samples any test instruction word for the first time, that is, the data corresponding to the test instruction word is 1. The data corresponding to the feedback command word is also 1. Among them, the test frequency refers to the clock operating frequency that enables each test instruction word to be correctly sampled by the memory. In some embodiments, the test frequency is process data obtained through experimental testing.
示例性地,在12nm的芯片制备工艺下,对指令字处理电路进行芯片流片得到一个高带宽内存的,在对该高带宽内存进行测试的过程中,发现在高带宽内存的工作频率为300MHz左右的情况下,任意一个测试指令字都能被存储器采样正确。在这种情况下,在对高带宽内存进行测试的过程中,可以通过时钟锁相环寄存器将高带宽内存芯片的工作频率调整为300MHz。For example, under the 12nm chip manufacturing process, the instruction word processing circuit was tape-out to obtain a high-bandwidth memory. During the test of the high-bandwidth memory, it was found that the operating frequency of the high-bandwidth memory was 300MHz. In either case, any test instruction word can be sampled correctly by the memory. In this case, during the test of high-bandwidth memory, the operating frequency of the high-bandwidth memory chip can be adjusted to 300MHz through the clock phase-locked loop register.
在一些情况中,对于某个测试频率,存在至少一个测试指令字不能被正确采样,也即,出现至少一个测试指令字被第一次采样得到的反馈指令字对应的数据为0,那么需要通过时钟锁相环寄存器继续降低时钟的工作频率,直至所有测试指令字被第一次采样得到的反馈指令字对应的数据均为1。In some cases, for a certain test frequency, there is at least one test instruction word that cannot be sampled correctly. That is, if at least one test instruction word is sampled for the first time and the data corresponding to the feedback instruction word is 0, then you need to pass The clock phase-locked loop register continues to reduce the operating frequency of the clock until all test instruction words are sampled for the first time and the data corresponding to the feedback instruction words are all 1.
通过在指令字测试阶段中调整是时钟的工作频率,延长了测试指令字的数据窗口中高电平的持续时长,降低时钟信号的采样沿与测试指令字的数据窗口中高电平中心位置对齐的难度,使得指令字训练阶段能够快速完成,同时,有助于提高在高带宽内存的工作过程中,指令字采样的正确率。By adjusting the operating frequency of the clock during the instruction word test phase, the duration of the high level in the data window of the test instruction word is extended, and the difficulty of aligning the sampling edge of the clock signal with the center position of the high level in the data window of the test instruction word is reduced. , so that the instruction word training phase can be completed quickly, and at the same time, it helps to improve the accuracy of instruction word sampling during the working process of high-bandwidth memory.
在一些实施例中,在确定好各个传输子电路中应当使用的延时控制单元之后,在高带宽内存的工作过程中,时钟工作频率可能发生改变。例如,时钟工作频率提高至1.5GHz,在该时钟工作频率下,时钟采样沿可能再次偏移出指令字的数据窗口的高/低电平中心,导致对指令字的采样可能发生错误。在这种情况下,可以使用工作过程中的使用工作频率,再次进行高带宽内存的指令字训练过程,对指令字在传输子电路中的传输时延的调整过程请参考上文实施例,在此不进行赘述。In some embodiments, after determining the delay control unit that should be used in each transmission subcircuit, the clock operating frequency may change during the operation of the high-bandwidth memory. For example, if the clock operating frequency is increased to 1.5GHz, at this clock operating frequency, the clock sampling edge may again deviate from the high/low level center of the data window of the instruction word, resulting in possible errors in the sampling of the instruction word. In this case, the operating frequency used during the operation can be used to perform the instruction word training process of the high-bandwidth memory again. For the adjustment process of the transmission delay of the instruction word in the transmission subcircuit, please refer to the above embodiment. This will not be described in detail.
由于在测试频率下,已经通过测试指令字对传输子路径中使用的延时控制单元的数量进行调整,使得各个指令字在对应的传输子路径中的传输延时能够满足指令字的数据窗口的中心位置与时钟采样沿保持对齐。因此,在工作频率下,时钟采样沿和指令字的数据窗口的中心位置之间的偏移不会太大,因此在工作频率下,易于调整传输子电路中应使用的延时控制单元的数量。Because at the test frequency, the number of delay control units used in the transmission subpath has been adjusted through the test instruction word, so that the transmission delay of each instruction word in the corresponding transmission subpath can meet the data window of the instruction word. The center position remains aligned with the clock sampling edge. Therefore, at the operating frequency, the offset between the clock sampling edge and the center position of the data window of the instruction word will not be too large, so at the operating frequency, it is easy to adjust the number of delay control units that should be used in the transmission subcircuit. .
在一些实施例中,指令字处理电路还包括训练指令接收单元,其用于接收训练指令,训练指令用于指示指令字处理电路开始进行指令字训练过程。In some embodiments, the instruction word processing circuit further includes a training instruction receiving unit, which is configured to receive a training instruction. The training instruction is used to instruct the instruction word processing circuit to start an instruction word training process.
在一些实施例中,在高带宽内存的工作环境超出阈值的情况下,高带宽内存的基板上的检测单元向指令字处理电路发送训练指令。可选地,高带宽内存的工作环境包括:工艺、电压、温度等。In some embodiments, when the operating environment of the high-bandwidth memory exceeds a threshold, the detection unit on the substrate of the high-bandwidth memory sends a training instruction to the instruction word processing circuit. Optionally, the working environment of high-bandwidth memory includes: process, voltage, temperature, etc.
通过上述方法,在高带宽内存的工作环境发生改变的情况下,重新对高带宽内存进行指令字训练,可避免因为工作环境的变化导致指令字在工作阶段出现偏移,导致存储器对指令字的采样错误。Through the above method, when the working environment of the high-bandwidth memory changes, re-training the instruction words of the high-bandwidth memory can avoid the deviation of the instruction words in the working phase due to changes in the working environment, resulting in the memory's distortion of the instruction words. Sampling error.
在一些实施例中,指令字处理电路中包括周期控制单元;其中,周期控制单元用于按照 训练周期,对高带宽内存进行指令字训练阶段,避免在高带宽内存的工作阶段,因为指令字出现偏移造成采样错误。In some embodiments, the instruction word processing circuit includes a cycle control unit; wherein the cycle control unit is used to In the training cycle, the instruction word training phase is performed on the high-bandwidth memory to avoid sampling errors caused by offsets in the instruction words during the working phase of the high-bandwidth memory.
在完成指令字训练后,在高带宽内存的工作过程中,指令字发送电路中的各个传输子电路使用的延时控制单元的数量,为指令字训练阶段中所确定的传输子电路中应使用的延时控制单元的数量,从而使得在工作阶段中,各个指令字的数据窗口的中心位置能够与时钟采样沿对齐,进一步地,这些数据窗口的中心位置与相同的时钟采样沿对齐,有助于各个指令字能够被正确采样。After completing the instruction word training, during the operation of the high-bandwidth memory, the number of delay control units used by each transmission sub-circuit in the instruction word sending circuit is the number of delay control units that should be used in the transmission sub-circuit determined in the instruction word training stage. The number of delay control units allows the center position of the data window of each instruction word to be aligned with the clock sampling edge during the working phase. Furthermore, the center position of these data windows is aligned with the same clock sampling edge, which helps Each instruction word can be sampled correctly.
本申请一示例性实施例提供了一种芯片,该芯片中包括存储器,以及上述实施例中介绍的指令字处理电路。An exemplary embodiment of the present application provides a chip, which includes a memory and the instruction word processing circuit introduced in the above embodiment.
在一些实施例中,指令字处理电路设置在芯片的主机模块中,主机模块用于指示存储器执行相应的操作,例如通过指令字对存储器进行指示。在一些实施例中,芯片还包括基板,基板中设置用感应传感器,例如温度传感器、电压传感器,以用于在芯片的工作温度、工作电压发生变化时,向主机模块指示进行指令字训练。In some embodiments, the instruction word processing circuit is provided in the host module of the chip, and the host module is used to instruct the memory to perform corresponding operations, such as instructing the memory through instruction words. In some embodiments, the chip further includes a substrate, and inductive sensors, such as temperature sensors and voltage sensors, are provided in the substrate to instruct the host module to perform instruction word training when the operating temperature and operating voltage of the chip change.
在一些实施例中,芯片中还设置有调节寄存器,调节寄存器用于与计算机程序产品进行连接,接收计算机程序产品的指示,以对指令字训练阶段进行调节。例如,调节指令字训练阶段的进行时间、调整偏移步长调整单元改变传输子电路使用的延时控制单元的数量等。In some embodiments, the chip is also provided with an adjustment register. The adjustment register is used to connect with the computer program product and receive instructions from the computer program product to adjust the instruction word training phase. For example, adjust the execution time of the instruction word training phase, adjust the offset step adjustment unit, change the number of delay control units used by the transmission subcircuit, etc.
在一些实施例中,该芯片可以是高带宽内存芯片,也可以是时钟采样沿容易与指令字的数据窗口的中心位置发生偏移的其他芯片,本申请实施例在此不进行限定。上文实施例中,仅以高带宽内存芯片为例,对指令字处理电路进行介绍,并不是限定指令字处理电路只能应用于高带宽内存芯片中。In some embodiments, the chip may be a high-bandwidth memory chip or other chips in which the clock sampling edge is easily offset from the center position of the data window of the instruction word, which is not limited in the embodiments of the present application. In the above embodiments, only high-bandwidth memory chips are used as examples to introduce the instruction word processing circuit. This does not limit the instruction word processing circuit to only be applied to high-bandwidth memory chips.
下述为本申请方法实施例,对于本申请方法实施例中未披露的细节,请参照本申请指令字处理电路的实施例。The following are method embodiments of the present application. For details not disclosed in the method embodiments of the present application, please refer to the embodiments of the instruction word processing circuit of the present application.
请参考图13,其是本申请一个示例性实施例提供的指令字处理方法的流程图。示例性地,该方法的执行主体可以是图6所示的高带宽内存芯片的主机600。Please refer to Figure 13, which is a flow chart of an instruction word processing method provided by an exemplary embodiment of the present application. For example, the execution subject of this method may be the host 600 of the high-bandwidth memory chip shown in FIG. 6 .
本申请一示例性实施例提供了一种指令字处理方法,所述方法应用于指令字处理电路中,所述指令字处理电路包括指令字生成寄存器、指令字发送电路、指令字接收电路和指令字训练状态机;如图13所示,该方法可以包括如下几个步骤(1310~1340):An exemplary embodiment of the present application provides an instruction word processing method. The method is applied in an instruction word processing circuit. The instruction word processing circuit includes an instruction word generation register, an instruction word sending circuit, an instruction word receiving circuit and an instruction word processing circuit. Word training state machine; as shown in Figure 13, this method may include the following steps (1310~1340):
步骤1310,所述指令字生成寄存器生成测试指令字序列;其中,所述测试指令字序列包括至少一个测试指令字。Step 1310: The instruction word generation register generates a test instruction word sequence; wherein the test instruction word sequence includes at least one test instruction word.
步骤1320,所述指令字发送电路向存储器发送所述测试指令字。Step 1320: The instruction word sending circuit sends the test instruction word to the memory.
步骤1330,所述指令字接收电路接收所述存储器发送的所述测试指令字对应的反馈指令字,并将所述反馈指令字发送给所述指令字训练状态机,所述反馈指令字由所述存储器根据时钟信号对所述测试指令字进行采样得到。Step 1330: The instruction word receiving circuit receives the feedback instruction word corresponding to the test instruction word sent by the memory, and sends the feedback instruction word to the instruction word training state machine. The feedback instruction word is generated by the The memory samples the test instruction word according to the clock signal.
步骤1340,所述指令字训练状态机根据所述反馈指令字,对所述测试指令字对应的传输子电路的传输延时进行调整,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量。Step 1340: The instruction word training state machine adjusts the transmission delay of the transmission sub-circuit corresponding to the test instruction word according to the feedback instruction word, and determines the delay that should be used by the transmission sub-circuit corresponding to the test instruction word. number of control units.
在一些实施例中,所述指令字训练状态机包括:偏移步长计数单元和偏移步长确定单元;所述所指令字训练状态机根据所述反馈指令字,对所述测试指令字对应的传输子电路的传输延时进行调整,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量,包括:所述偏移步长计数单元改变所述测试指令字对应的传输子电路中投入使用的延迟控制单元的数量;所述偏移步长确定单元在所述反馈指令字满足对齐条件的情况下,确定所述测试指令字对应的传输子电路中当前使用的延时控制单元的数量与原始使用的延时控制单元的数量之间的差值,并根据所述差值确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量。 In some embodiments, the instruction word training state machine includes: an offset step counting unit and an offset step determination unit; the instruction word training state machine performs the test instruction word according to the feedback instruction word. The transmission delay of the corresponding transmission sub-circuit is adjusted to determine the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word, including: the offset step counting unit changes the corresponding value of the test instruction word The number of delay control units put into use in the transmission sub-circuit; the offset step determination unit determines the current used in the transmission sub-circuit corresponding to the test instruction word when the feedback instruction word meets the alignment condition The difference between the number of delay control units and the number of originally used delay control units, and based on the difference, determine the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word.
在一些实施例中,所述差值包括左移差值和右移差值;所述偏移步长确定单元在所述反馈指令字满足对齐条件的情况下,确定所述测试指令字对应的传输子电路中当前使用的延时控制单元的数量与原始使用的延时控制单元的数量之间的差值,并根据所述差值确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量,包括:所述偏移步长确定单元在所述反馈指令字满足对齐条件的情况下,分别确定所述左移差值和所述右移差值;其中,所述左移差值是指在所述反馈指令字满足所述对齐条件的情况下,所述测试指令字对应的传输子电路中减少使用的延时控制单元的数量,所述右移差值是指在所述反馈指令字满足所述对齐条件的情况下,所述测试指令字对应的传输子电路中增加使用的延时控制单元的数量;所述偏移步长确定单元根据所述左移差值和所述右移差值,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量。In some embodiments, the difference includes a left shift difference and a right shift difference; the offset step determination unit determines the offset step size corresponding to the test instruction word when the feedback instruction word satisfies the alignment condition. The difference between the number of delay control units currently used in the transmission sub-circuit and the number of delay control units originally used, and based on the difference, determine the delay that should be used by the transmission sub-circuit corresponding to the test instruction word. The number of time control units includes: the offset step determination unit determines the left shift difference and the right shift difference respectively when the feedback instruction word meets the alignment condition; wherein, the left shift difference The shift difference value refers to the reduction in the number of delay control units used in the transmission sub-circuit corresponding to the test instruction word when the feedback instruction word satisfies the alignment condition. The right shift difference value refers to the When the feedback instruction word satisfies the alignment condition, the number of delay control units used in the transmission subcircuit corresponding to the test instruction word is increased; the offset step determination unit is based on the left shift difference and the right shift difference to determine the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word.
在一些实施例中,所述偏移步长确定单元根据所述左移差值和所述右移差值,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量,包括:所述偏移步长确定单元根据所述左移差值和所述右移差值,计算第一对齐量;其中,所述第一对齐量用于表征所述测试指令字的传输信号的高电平的持续时间的一半;所述偏移步长确定单元根据所述原始使用的延时控制单元的数量和所述第一对齐量,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量。In some embodiments, the offset step size determination unit determines the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word based on the left shift difference value and the right shift difference value, The method includes: the offset step determination unit calculating a first alignment amount according to the left shift difference value and the right shift difference value; wherein the first alignment amount is used to characterize the transmission signal of the test instruction word half of the duration of the high level; the offset step determination unit determines that the transmission sub-circuit corresponding to the test instruction word should be based on the number of originally used delay control units and the first alignment amount. The number of delay control units used.
在一些实施例中,所述偏移步长确定单元在根据所述原始使用的延时控制单元的数量和所述第一对齐量,确定所述测试指令字对应的传输子电路应使用的延时控制的单元的数量之后,根据所述左移差值和所述右移差值计算所述第二对齐量;其中,所述第二对齐量用于表征所述测试指令字的传输信号的高电平的持续时间;所述偏移步长确定单元使用所述第二对齐量对所述测试指令字对应的传输子电路应使用的延时控制单元的数量进行调整。In some embodiments, the offset step size determination unit determines the delay that should be used by the transmission sub-circuit corresponding to the test instruction word based on the number of originally used delay control units and the first alignment amount. After controlling the number of units, the second alignment amount is calculated according to the left shift difference value and the right shift difference value; wherein the second alignment amount is used to characterize the transmission signal of the test instruction word. The duration of the high level; the offset step determination unit uses the second alignment amount to adjust the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word.
在一些实施例中,所述方法还包括:所述指令字训练状态机中的序列生成指示单元,在所述反馈指令字不满足所述对齐条件的情况下,指示所述指令字生成寄存器向所述指令字发送电路重新发送所述测试指令字。In some embodiments, the method further includes: a sequence generation instruction unit in the instruction word training state machine, instructing the instruction word generation register to send the instruction word to the sequence generation register when the feedback instruction word does not satisfy the alignment condition. The instruction word sending circuit resends the test instruction word.
需要说明的是,上述实施例提供的方法与指令字处理电路的实施例属于同一构思,其具体实现过程详见指令字处理电路的实施例,这里不再赘述。上述方法实施例的有益效果请参考指令字处理电路实施例的描述,这里也不再赘述。It should be noted that the method provided by the above embodiments belongs to the same concept as the embodiment of the instruction word processing circuit. For details of its implementation process, please refer to the embodiment of the instruction word processing circuit, which will not be described again here. For the beneficial effects of the above method embodiments, please refer to the description of the instruction word processing circuit embodiment, which will not be described again here.
本申请实施例还提供一种计算机可读存储介质,该存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现上述各方法实施例提供的指令字处理方法。Embodiments of the present application also provide a computer-readable storage medium, which stores a computer program. The computer program is loaded and executed by a processor to implement the instruction word processing method provided by the above method embodiments.
该计算机可读介质可以包括计算机存储介质和通信介质。计算机存储介质包括以用于存储诸如计算机可读指令、数据结构、程序模块或其他数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介质。计算机存储介质包括RAM(Random Access Memory,随机存取存储器)、ROM(Read-Only Memory,只读存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦写可编程只读存储器)、闪存或其他固态存储技术,CD-ROM、DVD(Digital Video Disc,高密度数字视频光盘)或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域技术人员可知该计算机存储介质不局限于上述几种。The computer-readable media may include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM (Random Access Memory), ROM (Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, flash memory or other solid-state storage technology, CD-ROM, DVD (Digital Video Disc, high-density digital video disc) or other optical storage, tape cassette, magnetic tape , disk storage or other magnetic storage devices. Of course, those skilled in the art will know that the computer storage medium is not limited to the above types.
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序存储在计算机可读存储介质中,处理器从所述计算机可读存储介质读取并执行所述计算机程序,以实现上述各方法实施例提供的指令字处理方法。Embodiments of the present application also provide a computer program product. The computer program product includes a computer program. The computer program is stored in a computer-readable storage medium. The processor reads and executes the computer program from the computer-readable storage medium. Computer program to implement the instruction word processing method provided by each of the above method embodiments.
需要说明的是,本申请所涉及的信息(包括但不限于对象设备信息、对象个人信息等)、数据(包括但不限于用于分析的数据、存储的数据、展示的数据等)以及信号,均为经对象授权或者经过各方充分授权的,且相关数据的收集、使用和处理需要遵守相关国家和地区的 相关法律法规和标准。例如,本申请中涉及到的指令字、指令字处理电路等都是在充分授权的情况下获取的。It should be noted that the information (including but not limited to subject device information, subject personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application, All are authorized by the subject or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the laws and regulations of relevant countries and regions. Relevant laws, regulations and standards. For example, the instruction words, instruction word processing circuits, etc. involved in this application were obtained with full authorization.
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。It should be understood that "plurality" mentioned in this article means two or more. "And/or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and/or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the related objects are in an "or" relationship.
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同切换、改进等,均应包含在本申请的保护范围之内。 The above are only optional embodiments of this application and are not intended to limit this application. Any modifications, equivalent switches, improvements, etc. made within the spirit and principles of this application shall be included in the protection of this application. within the range.

Claims (20)

  1. 一种指令字处理电路,所述指令字处理电路包括:指令字生成寄存器、指令字发送电路、指令字接收电路和指令字训练状态机;An instruction word processing circuit, the instruction word processing circuit includes: an instruction word generation register, an instruction word sending circuit, an instruction word receiving circuit and an instruction word training state machine;
    所述指令字生成寄存器与所述指令字发送电路之间电性连接;The instruction word generation register is electrically connected to the instruction word sending circuit;
    所述指令字训练状态机分别与所述指令字生成寄存器、所述指令字发送电路和所述指令字接收电路之间电性连接;The instruction word training state machine is electrically connected to the instruction word generation register, the instruction word sending circuit and the instruction word receiving circuit respectively;
    所述指令字发送电路中包括多个延时控制单元,所述延时控制单元用于调整指令字在所述指令字发送电路中的传输延时。The instruction word sending circuit includes a plurality of delay control units, and the delay control units are used to adjust the transmission delay of the instruction word in the instruction word sending circuit.
  2. 根据权利要求1所述的指令字处理电路,其中,所述指令字发送电路中包括至少一个指令字分别对应的传输子电路,每个传输子电路中包括一个以上的所述延时控制单元。The instruction word processing circuit according to claim 1, wherein the instruction word sending circuit includes at least one transmission sub-circuit corresponding to the instruction word, and each transmission sub-circuit includes more than one of the delay control units.
  3. 根据权利要求2所述的指令字处理电路,其中,所述延时控制单元中包括n个反相器,所述反相器用于改变所述传输子电路中传输的指令字的相位,所述n为正整数。The instruction word processing circuit according to claim 2, wherein the delay control unit includes n inverters, the inverters are used to change the phase of the instruction word transmitted in the transmission sub-circuit, the n is a positive integer.
  4. 根据权利要求2所述的指令字处理电路,其中,所述传输子电路中包括至少一个抽头接口,所述抽头接口和所述延时控制单元按比例交错排列;其中,所述抽头接口用于接出所述传输子电路中传输的测试指令字,以便将所述测试指令字传输给存储器。The instruction word processing circuit according to claim 2, wherein the transmission subcircuit includes at least one tap interface, and the tap interface and the delay control unit are staggered in proportion; wherein the tap interface is used for The test instruction word transmitted in the transmission sub-circuit is received so as to transmit the test instruction word to the memory.
  5. 根据权利要求2所述的指令字处理电路,其中,The instruction word processing circuit according to claim 2, wherein,
    所述指令字生成寄存器用于生成测试指令字序列;其中,所述测试指令字序列包括至少一个测试指令字;The instruction word generation register is used to generate a test instruction word sequence; wherein the test instruction word sequence includes at least one test instruction word;
    所述指令字发送电路用于向存储器发送所述测试指令字;The instruction word sending circuit is used to send the test instruction word to the memory;
    所述指令字接收电路用于接收所述存储器发送的所述测试指令字对应的反馈指令字,并将所述反馈指令字发送给所述指令字训练状态机,所述反馈指令字由所述存储器根据时钟信号对所述测试指令字进行采样得到;The instruction word receiving circuit is used to receive the feedback instruction word corresponding to the test instruction word sent by the memory, and send the feedback instruction word to the instruction word training state machine. The feedback instruction word is generated by the The memory samples the test instruction word according to the clock signal;
    所述指令字训练状态机用于根据所述反馈指令字,对所述测试指令字对应的传输子电路的传输延时进行调整,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量。The instruction word training state machine is used to adjust the transmission delay of the transmission sub-circuit corresponding to the test instruction word according to the feedback instruction word, and determine the delay that should be used by the transmission sub-circuit corresponding to the test instruction word. Number of control units.
  6. 根据权利要求5所述的指令字处理电路,其中,所述指令字训练状态机包括:偏移步长计数单元和偏移步长确定单元;The instruction word processing circuit according to claim 5, wherein the instruction word training state machine includes: an offset step counting unit and an offset step determining unit;
    所述偏移步长计数单元用于改变所述测试指令字对应的传输子电路中投入使用的延迟控制单元的数量;The offset step counting unit is used to change the number of delay control units put into use in the transmission sub-circuit corresponding to the test instruction word;
    所述偏移步长确定单元用于在所述反馈指令字满足对齐条件的情况下,确定所述测试指令字对应的传输子电路中当前使用的延时控制单元的数量,与原始使用的延时控制单元的数量之间的差值,并根据所述差值确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量。The offset step determination unit is used to determine the number of delay control units currently used in the transmission sub-circuit corresponding to the test instruction word when the feedback instruction word meets the alignment condition, and the number of delay control units originally used. The difference between the number of time control units, and the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word is determined based on the difference.
  7. 根据权利要求6所述的指令字处理电路,其中,所述差值包括左移差值和右移差值,所述偏移步长确定单元用于:The instruction word processing circuit according to claim 6, wherein the difference value includes a left shift difference value and a right shift difference value, and the offset step size determination unit is used for:
    分别确定所述左移差值和所述右移差值;其中,所述左移差值是指在所述反馈指令字满足所述对齐条件的情况下,所述测试指令字对应的传输子电路中减少使用的延时控制单元的数量;所述右移差值是指在所述反馈指令字满足所述对齐条件的情况下,所述测试指令字对应的传输子电路中增加使用的延时控制单元的数量; Determine the left shift difference and the right shift difference respectively; wherein, the left shift difference refers to the transmission subunit corresponding to the test instruction word when the feedback instruction word satisfies the alignment condition. The number of delay control units used in the circuit is reduced; the right shift difference refers to the increase in the delay used in the transmission subcircuit corresponding to the test instruction word when the feedback instruction word satisfies the alignment condition. the number of time control units;
    根据所述左移差值和所述右移差值,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量。According to the left shift difference value and the right shift difference value, the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word is determined.
  8. 根据权利要求7所述的指令字处理电路,其中,所述偏移步长确定单元用于:The instruction word processing circuit according to claim 7, wherein the offset step size determination unit is used for:
    根据所述左移差值和所述右移差值,计算第一对齐量;其中,所述第一对齐量用于表征所述测试指令字的传输信号的高电平持续时间的一半;Calculate a first alignment amount according to the left shift difference value and the right shift difference value; wherein the first alignment amount is used to characterize half of the high level duration of the transmission signal of the test instruction word;
    根据所述原始使用的延时控制单元的数量和所述第一对齐量,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量。The number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word is determined based on the originally used number of delay control units and the first alignment amount.
  9. 根据权利要求8所述的指令字处理电路,其中,所述偏移步长确定单元还用于:The instruction word processing circuit according to claim 8, wherein the offset step size determination unit is also used for:
    在根据所述原始使用的延时控制单元的数量和所述第一对齐量,确定所述测试指令字对应的传输子电路应使用的延时控制的单元的数量之后,根据所述左移差值和所述右移差值计算第二对齐量;其中,所述第二对齐量用于表征所述测试指令字的传输信号的高电平持续时间;After determining the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word based on the number of originally used delay control units and the first alignment amount, according to the left shift difference value and the right shift difference value to calculate a second alignment amount; wherein the second alignment amount is used to characterize the high level duration of the transmission signal of the test instruction word;
    使用所述第二对齐量对所述测试指令字对应的传输子电路应使用的延时控制单元的数量进行调整。The second alignment amount is used to adjust the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word.
  10. 根据权利要求6所述的指令字处理电路,其中,所述对齐条件包括所述反馈指令字与所述测试指令字相反。The instruction word processing circuit of claim 6, wherein the alignment condition includes the feedback instruction word being opposite to the test instruction word.
  11. 根据权利要求6所述的指令字处理电路,其中,所述偏移步长计数单元用于控制所述测试指令字对应的传输子电路中使用的抽头接口,改变所述测试指令字对应的传输子电路中投入使用的延迟控制单元的数量。The instruction word processing circuit according to claim 6, wherein the offset step counting unit is used to control the tap interface used in the transmission subcircuit corresponding to the test instruction word, and change the transmission corresponding to the test instruction word. The number of delay control units in use in the subcircuit.
  12. 根据权利要求6所述的指令字处理电路,其中,所述指令字训练状态机还包括:The instruction word processing circuit according to claim 6, wherein the instruction word training state machine further includes:
    序列生成指示单元,用于在所述反馈指令字不满足所述对齐条件的情况下,指示所述指令字生成寄存器向所述指令字发送电路重新发送所述测试指令字。A sequence generation instruction unit, configured to instruct the instruction word generation register to resend the test instruction word to the instruction word sending circuit when the feedback instruction word does not satisfy the alignment condition.
  13. 根据权利要求1所述的指令字处理电路,其中,所述指令字处理电路还包括:The instruction word processing circuit according to claim 1, wherein the instruction word processing circuit further includes:
    时钟锁相环寄存器,用于调整存储器的时钟信号的频率。The clock phase-locked loop register is used to adjust the frequency of the memory clock signal.
  14. 一种芯片,所述芯片包括存储器以及如权利要求1至13任一项所述的指令字处理电路。A chip, which includes a memory and an instruction word processing circuit according to any one of claims 1 to 13.
  15. 一种指令字处理方法,所述方法应用于指令字处理电路中,所述指令字处理电路包括指令字生成寄存器、指令字发送电路、指令字接收电路和指令字训练状态机;所述方法包括:An instruction word processing method, the method is applied in an instruction word processing circuit, the instruction word processing circuit includes an instruction word generation register, an instruction word sending circuit, an instruction word receiving circuit and an instruction word training state machine; the method includes :
    所述指令字生成寄存器生成测试指令字序列;其中,所述测试指令字序列包括至少一个测试指令字;The instruction word generation register generates a test instruction word sequence; wherein the test instruction word sequence includes at least one test instruction word;
    所述指令字发送电路向存储器发送所述测试指令字;The instruction word sending circuit sends the test instruction word to the memory;
    所述指令字接收电路接收所述存储器发送的所述测试指令字对应的反馈指令字,并将所述反馈指令字发送给所述指令字训练状态机,所述反馈指令字由所述存储器根据时钟信号对所述测试指令字进行采样得到;The instruction word receiving circuit receives the feedback instruction word corresponding to the test instruction word sent by the memory, and sends the feedback instruction word to the instruction word training state machine. The feedback instruction word is generated by the memory according to The clock signal is obtained by sampling the test instruction word;
    所述指令字训练状态机根据所述反馈指令字,对所述测试指令字对应的传输子电路的传输延时进行调整,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量。The instruction word training state machine adjusts the transmission delay of the transmission sub-circuit corresponding to the test instruction word according to the feedback instruction word, and determines the delay control unit that should be used by the transmission sub-circuit corresponding to the test instruction word. quantity.
  16. 根据权利要求15所述的方法,其中,所述指令字训练状态机包括:偏移步长计数单元 和偏移步长确定单元;The method according to claim 15, wherein the instruction word training state machine includes: an offset step counting unit and offset step size determination unit;
    所述指令字训练状态机根据所述反馈指令字,对所述测试指令字对应的传输子电路的传输延时进行调整,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量,包括:The instruction word training state machine adjusts the transmission delay of the transmission sub-circuit corresponding to the test instruction word according to the feedback instruction word, and determines the delay control unit that should be used by the transmission sub-circuit corresponding to the test instruction word. Quantity, including:
    所述偏移步长计数单元改变所述测试指令字对应的传输子电路中投入使用的延迟控制单元的数量;The offset step counting unit changes the number of delay control units put into use in the transmission sub-circuit corresponding to the test instruction word;
    所述偏移步长确定单元在所述反馈指令字满足对齐条件的情况下,确定所述测试指令字对应的传输子电路中当前使用的延时控制单元的数量与原始使用的延时控制单元的数量之间的差值,并根据所述差值确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量。When the feedback instruction word satisfies the alignment condition, the offset step determination unit determines the number of delay control units currently used in the transmission sub-circuit corresponding to the test instruction word and the originally used delay control unit. The difference between the numbers, and the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word is determined based on the difference.
  17. 根据权利要求16所述的方法,其中,所述差值包括左移差值和右移差值;The method of claim 16, wherein the difference includes a left shift difference and a right shift difference;
    所述偏移步长确定单元在所述反馈指令字满足对齐条件的情况下,确定所述测试指令字对应的传输子电路中当前使用的延时控制单元的数量与原始使用的延时控制单元的数量之间的差值,并根据所述差值确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量,包括:When the feedback instruction word satisfies the alignment condition, the offset step determination unit determines the number of delay control units currently used in the transmission sub-circuit corresponding to the test instruction word and the originally used delay control unit. The difference between the numbers, and determine the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word based on the difference, including:
    所述偏移步长确定单元在所述反馈指令字满足对齐条件的情况下,分别确定所述左移差值和所述右移差值;其中,所述左移差值是指在所述反馈指令字满足所述对齐条件的情况下,所述测试指令字对应的传输子电路中减少使用的延时控制单元的数量;所述右移差值是指在所述反馈指令字满足所述对齐条件的情况下,所述测试指令字对应的传输子电路中增加使用的延时控制单元的数量;The offset step size determination unit determines the left shift difference value and the right shift difference value respectively when the feedback instruction word meets the alignment condition; wherein the left shift difference value refers to the left shift difference value when the feedback instruction word satisfies the alignment condition. When the feedback instruction word satisfies the alignment condition, the number of delay control units used in the transmission subcircuit corresponding to the test instruction word is reduced; the right shift difference means that when the feedback instruction word satisfies the In the case of alignment conditions, increase the number of delay control units used in the transmission subcircuit corresponding to the test instruction word;
    所述偏移步长确定单元根据所述左移差值和所述右移差值,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量。The offset step size determination unit determines the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word based on the left shift difference value and the right shift difference value.
  18. 根据权利要求17所述的方法,其中,所述偏移步长确定单元根据所述左移差值和所述右移差值,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量,包括:The method according to claim 17, wherein the offset step size determination unit determines the delay that should be used by the transmission sub-circuit corresponding to the test instruction word based on the left shift difference value and the right shift difference value. Number of control units, including:
    所述偏移步长确定单元根据所述左移差值和所述右移差值,计算第一对齐量;其中,所述第一对齐量用于表征所述测试指令字的传输信号的高电平持续时间的一半;The offset step determination unit calculates a first alignment amount based on the left shift difference value and the right shift difference value; wherein the first alignment amount is used to characterize the high level of the transmission signal of the test instruction word. Half the level duration;
    所述偏移步长确定单元根据所述原始使用的延时控制单元的数量和所述第一对齐量,确定所述测试指令字对应的传输子电路应使用的延时控制单元的数量。The offset step size determination unit determines the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word based on the number of originally used delay control units and the first alignment amount.
  19. 根据权利要求18所述的方法,其中,所述方法还包括:The method of claim 18, wherein the method further includes:
    所述偏移步长确定单元在根据所述原始使用的延时控制单元的数量和所述第一对齐量,确定所述测试指令字对应的传输子电路应使用的延时控制的单元的数量之后,根据所述左移差值和所述右移差值计算所述第二对齐量;其中,所述第二对齐量用于表征所述测试指令字的传输信号的高电平的持续时间;The offset step size determination unit determines the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word based on the number of originally used delay control units and the first alignment amount. After that, the second alignment amount is calculated according to the left shift difference value and the right shift difference value; wherein the second alignment amount is used to characterize the duration of the high level of the transmission signal of the test instruction word. ;
    所述偏移步长确定单元使用所述第二对齐量对所述测试指令字对应的传输子电路应使用的延时控制单元的数量进行调整。The offset step size determination unit uses the second alignment amount to adjust the number of delay control units that should be used by the transmission sub-circuit corresponding to the test instruction word.
  20. 根据权利要求16所述的方法,其中,所述指令字训练状态机还包括序列生成指示单元,所述方法还包括:The method according to claim 16, wherein the instruction word training state machine further includes a sequence generation instruction unit, the method further includes:
    所述序列生成指示单元在所述反馈指令字不满足所述对齐条件的情况下,指示所述指令字生成寄存器向所述指令字发送电路重新发送所述测试指令字。 The sequence generation instruction unit instructs the instruction word generation register to resend the test instruction word to the instruction word sending circuit when the feedback instruction word does not satisfy the alignment condition.
PCT/CN2023/079757 2022-04-22 2023-03-06 Instruction word processing circuit and method, and chip WO2023202242A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210430604.4A CN115113926A (en) 2022-04-22 2022-04-22 Instruction word processing circuit, chip and method
CN202210430604.4 2022-04-22

Publications (1)

Publication Number Publication Date
WO2023202242A1 true WO2023202242A1 (en) 2023-10-26

Family

ID=83325088

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/079757 WO2023202242A1 (en) 2022-04-22 2023-03-06 Instruction word processing circuit and method, and chip

Country Status (2)

Country Link
CN (1) CN115113926A (en)
WO (1) WO2023202242A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115113926A (en) * 2022-04-22 2022-09-27 腾讯科技(深圳)有限公司 Instruction word processing circuit, chip and method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050102545A1 (en) * 2003-11-06 2005-05-12 Jean-Paul Clavequin Synchronized communication between integrated circuit chips
JP2007200555A (en) * 2007-05-14 2007-08-09 Fujitsu Ltd Clock synchronizing type memory device and its scheduler circuit
WO2022022537A1 (en) * 2020-07-29 2022-02-03 华为技术有限公司 Processor, signal adjustment method, and computer system
CN115113926A (en) * 2022-04-22 2022-09-27 腾讯科技(深圳)有限公司 Instruction word processing circuit, chip and method
CN115113686A (en) * 2022-04-25 2022-09-27 腾讯科技(深圳)有限公司 Timing adjustment method and device, storage medium and electronic equipment
CN115114198A (en) * 2022-04-20 2022-09-27 腾讯科技(深圳)有限公司 Signal delay control method, device, equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050102545A1 (en) * 2003-11-06 2005-05-12 Jean-Paul Clavequin Synchronized communication between integrated circuit chips
JP2007200555A (en) * 2007-05-14 2007-08-09 Fujitsu Ltd Clock synchronizing type memory device and its scheduler circuit
WO2022022537A1 (en) * 2020-07-29 2022-02-03 华为技术有限公司 Processor, signal adjustment method, and computer system
CN115114198A (en) * 2022-04-20 2022-09-27 腾讯科技(深圳)有限公司 Signal delay control method, device, equipment and medium
CN115113926A (en) * 2022-04-22 2022-09-27 腾讯科技(深圳)有限公司 Instruction word processing circuit, chip and method
CN115113686A (en) * 2022-04-25 2022-09-27 腾讯科技(深圳)有限公司 Timing adjustment method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN115113926A (en) 2022-09-27

Similar Documents

Publication Publication Date Title
CN111367495B (en) Asynchronous first-in first-out data cache controller
US7036053B2 (en) Two dimensional data eye centering for source synchronous data transfers
TWI433150B (en) Apparatus and method for data strobe and timing variation detection of an sdram interface
US8667347B2 (en) Active calibration for high-speed memory devices
US8495440B2 (en) Fully programmable parallel PRBS generator
US20180165023A1 (en) Memory controller for receiving differential data strobe signals and application processor having the memory controller
US8477543B2 (en) Data input circuit with a valid strobe signal generation circuit
US7889578B2 (en) Single-strobe operation of memory devices
WO2023202242A1 (en) Instruction word processing circuit and method, and chip
US20160172018A1 (en) Apparatuses and methods for capturing data using a divided clock
US11762017B2 (en) Performing scan data transfer inside multi-die package with SERDES functionality
US8582376B2 (en) Timing adjustment circuit for a memory interface and method of adjusting timing for memory interface
US7224638B1 (en) Reliability clock domain crossing
US8754656B2 (en) High speed test circuit and method
US10204005B2 (en) Error detection circuit and semiconductor apparatus using the same
CN112017727A (en) Interface test method and device, processor and electronic equipment
KR102471531B1 (en) Semiconductor apparatus and system capable of performing high speed test in low speed operation environment
WO2022193607A1 (en) Refresh control circuit and memory
US8751853B2 (en) Quad-data rate controller and implementing method thereof
US20090180335A1 (en) Integrated circuit with reduced pointer uncertainly
US11803437B1 (en) Write hardware training acceleration
US20230326504A1 (en) Semiconductor devices capable of performing write training without read training, and memory system including the same
US10684797B2 (en) Command-in-pipeline counter for a memory device
US11467620B1 (en) Architecture and methodology for tuning clock phases to minimize latency in a serial interface
WO2023019658A1 (en) Memory testing method, device and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23790905

Country of ref document: EP

Kind code of ref document: A1