Time sequence adjustment method and apparatus, storage medium, and electronic device

By adjusting the transmission delay of the transmission circuit in the HBM device to align the data signal with the sampling signal, the problem of alignment of the data signal and the sampling signal in high-bandwidth memory devices is solved, and the accuracy of data reading and system stability are improved.

WO2023207376A9PCT designated stage expired Publication Date: 2024-09-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/081226
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-04-25
Filing Date
2023-03-14
Publication Date
2024-09-12

AI Technical Summary

Technical Problem

In high-bandwidth memory (HBM) devices, the data signal and the sampling signal cannot be aligned, resulting in reading data sampling errors and affecting the normal operation of the entire subsystem and chip.

Method used

By generating the sampling signal and adjusting the transmission delay of the transmission circuit, the center of the data signal is aligned with the sampling edge of the sampling signal to ensure accurate alignment of the data signal and the sampling signal.

Benefits of technology

It improves the accuracy of reading data, solves the problem of reading data sampling errors caused by the inability to align the data signal and the sampling signal, and ensures the normal operation of the HBM subsystem and chip.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023081226_12092024_PF_FP_ABST
    Figure CN2023081226_12092024_PF_FP_ABST
Patent Text Reader

Abstract

A time sequence adjustment method and apparatus, a storage medium, and an electronic device. The method comprises: generating a sampling signal in response to an obtained first read instruction; sampling, on a sampling edge of the sampling signal, data signals transmitted on N transmission circuits to obtain first sampling data; according to the value of the same bit in training data and the first sampling data, determining a first transmission circuit in the N transmission circuits; and adjusting a transmission delay on the first transmission circuit till the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal. The method solves the technical problem of reading data sampling errors caused by the fact that the data signal cannot be aligned with the sampling signal.
Need to check novelty before this filing date? Find Prior Art

Description

Timing adjustment method and device, storage medium and electronic device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 25, 2022, with application number 202210439634.1 and application name “Timing Adjustment Method and Device, Storage Medium and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computers, and in particular to timing adjustment technology. Background Art

[0003] According to HBM (High-Bandwidth Memory) protocols, HBM devices can achieve data read and write speeds up to 3.6GHz. At such a high operating frequency, data transmission can easily cause errors if it is affected by noise on the data communication link or crosstalk between data lines. High-frequency data reading and data transmission are susceptible to environmental variations during PVT (Process Verification Test) and crosstalk between signals, which can cause offsets between the read data and the sampled RDQS signal, resulting in read data sampling errors.

[0004] For example, when an HBM host initiates a read operation on an HBM DRAM (Dynamic Random Access Memory), the HBM DRAM returns the read data to the HBM host. Simultaneously, the HBM DRAM also returns a Read DQ Strobe (RDQS) signal that matches the read data. The HBM host uses this signal as the sampling signal for the read data. Therefore, misalignment between the read data and the sampled RDQS signal can result in read data sampling errors.

[0005] When errors occur when reading HBM DRAM data, it will affect the correct execution of the entire HBM subsystem, and in severe cases, it may even affect the normal operation of the entire chip.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a timing adjustment method and apparatus, a storage medium, and an electronic device to at least solve the technical problem in the related art that a data signal and a sampling signal cannot be aligned, resulting in errors in reading data sampling.

[0008] According to one aspect of an embodiment of the present application, a timing adjustment method is provided, which is executed by an electronic device and includes: generating a sampling signal in response to an acquired first read instruction, wherein the first read instruction is used to read training data, wherein the training data is known data represented by N bits, and N is a positive integer greater than or equal to 2; sampling data signals transmitted on N transmission circuits on a sampling edge of the sampling signal to obtain first sampling data, wherein the data signals transmitted on the N transmission circuits include the N bits in the training data, and the first sampling data is data represented by N bits; determining a first transmission circuit among the N transmission circuits based on the values ​​of the same bits in the training data and the first sampling data, the first transmission circuit being a transmission circuit among the N transmission circuits that has a timing offset; and adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal.

[0009] According to another aspect of an embodiment of the present application, a timing adjustment device is further provided, which is deployed on an electronic device and includes: a generation module for generating a sampling signal in response to an acquired first read instruction, wherein the first read instruction is used to read training data, wherein the training data is known data represented by N bits, and N is a positive integer greater than or equal to 2; a sampling module for sampling data signals transmitted on N transmission circuits on a sampling edge of the sampling signal to obtain first sampling data, wherein the data signals transmitted on the N transmission circuits include the N bits in the training data, and the first sampling data is data represented by N bits; a determination module for determining a first transmission circuit among the N transmission circuits based on the values ​​of the same bits in the training data and the first sampling data, wherein the first transmission circuit is a transmission circuit among the N transmission circuits that has a timing offset; and an adjustment module for adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal.

[0010] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned timing adjustment method when running.

[0011] According to another aspect of the present application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the timing adjustment method described above.

[0012] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the timing adjustment method through the computer program.

[0013] In an embodiment of the present application, when data needs to be read, a sampling signal is generated in response to a received first read instruction, wherein the first read instruction is used to read training data, wherein the training data is known data represented by N bits, where N is a positive integer greater than or equal to 2. At a sampling edge of the sampling signal, data signals transmitted on N transmission circuits are sampled to obtain first sampled data, wherein the data signals transmitted on the N transmission circuits include the N bits in the training data, and the first sampled data is data represented by N bits. Based on the values ​​of the same bits in the training data and the first sampled data, a first transmission circuit among the N transmission circuits having a timing offset is determined, and the transmission delay of the first transmission circuit is adjusted until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal. By performing pin training for reading data, the offset between the data signal read by the electronic device and the sampling signal can be adjusted, thereby ensuring that the sampling signal is aligned with the center of the data signal of the read data, thereby achieving the technical effect of improving the accuracy of the read data and thereby solving the technical problem in the related art of the misalignment between the data signal and the sampling signal, resulting in read data sampling errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0015] FIG1 is a schematic diagram of an application environment of an optional timing adjustment method according to an embodiment of the present application;

[0016] FIG2 is a flow chart of an optional timing adjustment method according to an embodiment of the present application;

[0017] FIG3 is a schematic diagram of an optional timing adjustment method according to an embodiment of the present application;

[0018] FIG4 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0019] FIG5 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0020] FIG6 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0021] FIG7 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0022] FIG8 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0023] FIG9 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0024] FIG10 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0025] FIG11 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0026] FIG12 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0027] FIG13 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0028] FIG14 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0029] FIG15 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0030] FIG16 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0031] FIG17 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application;

[0032] FIG18 is a schematic structural diagram of an optional timing adjustment device according to an embodiment of the present application;

[0033] FIG19 is a schematic structural diagram of an optional timing adjustment product according to an embodiment of the present application;

[0034] FIG20 is a schematic structural diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0037] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretations:

[0038] HBM: High-Bandwidth Memory.

[0039] MISR: Multiple-input Shift Register, multiple-input shift register.

[0040] Loopback Test: self-loop test.

[0041] At Speed: At-speed working mode.

[0042] DWORD: Data Word, data word.

[0043] Read Register Mode: Read register mode.

[0044] Training: Training.

[0045] RDQS: Read DQ Strobe, read data selection pulse.

[0046] The present application will be described below with reference to the following embodiments:

[0047] According to one aspect of an embodiment of the present application, a timing adjustment method is provided. In one possible implementation, the timing adjustment method can be applied to a hardware environment consisting of a server 101 and a terminal device 103, as shown in Figure 1. As shown in Figure 1, server 101 is connected to terminal device 103 via a network and can be used to provide services for the terminal device or an application installed on the terminal device. The application can be a video application, an instant messaging application, a browser application, an educational application, a game application, etc. A database 105 may be set up on the server or independently of the server to provide data storage services for the server 101, for example, a game data storage server. The above-mentioned network may include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication. The terminal device 103 may be a terminal configured with an application, and may include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop computer, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft and other computer devices. The above-mentioned server may be a single server, or a server cluster consisting of multiple servers, or a cloud server. The application 107 using the above-mentioned timing adjustment method is displayed through the terminal device 103 or other connected display devices.

[0048] 1 , the timing adjustment method may be implemented in the terminal device 103 (ie, the electronic device executing the timing adjustment method may be the terminal device) through the following steps:

[0049] S1, generating a sampling signal on the terminal device 103 in response to a first read instruction obtained, wherein the first read instruction is used to read training data, wherein the training data is known data represented by N bits, where N is a positive integer greater than or equal to 2;

[0050] S2, on the terminal device 103, sampling the data signals transmitted on the N transmission circuits at a sampling edge of the sampling signal to obtain first sampled data, wherein the data signals transmitted on the N transmission circuits include N bits in the training data, and the first sampled data is data represented by the N bits;

[0051] S3, determining, on the terminal device 103, a first transmission circuit among the N transmission circuits based on values ​​of identical bits in the training data and the first sampled data, where the first transmission circuit is a transmission circuit among the N transmission circuits that has a timing offset;

[0052] S4, adjusting the transmission delay on the first transmission circuit on the terminal device 103 until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal.

[0053] In one possible implementation, in this embodiment, the above-mentioned timing adjustment method can also be implemented by a server (that is, the electronic device that executes the timing adjustment method can be a server), for example, implemented in the server 101 shown in Figure 1; or implemented jointly by a terminal device and a server (that is, the electronic device that executes the timing adjustment method can include a terminal device and a server).

[0054] The above is only an example and is not specifically limited in this embodiment.

[0055] In a possible implementation, as an optional embodiment, as shown in FIG2 , the timing adjustment method includes:

[0056] S202, generating a sampling signal in response to a first read instruction obtained, wherein the first read instruction is used to read training data, wherein the training data is known data represented by N bits, where N is a positive integer greater than or equal to 2;

[0057] S204, sampling data signals transmitted on the N transmission circuits at a sampling edge of the sampling signal to obtain first sampled data, wherein the data signals transmitted on the N transmission circuits include N bits in the training data, and the first sampled data is data represented by the N bits;

[0058] S206, determining a first transmission circuit among the N transmission circuits based on values ​​of identical bits in the training data and the first sampled data, where the first transmission circuit is a transmission circuit among the N transmission circuits that has a timing offset;

[0059] S208 , adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal.

[0060] In an embodiment of the present application, the above-mentioned timing adjustment method can include but is not limited to being applied to any scenario where data needs to be read through an electronic device, for example, in the data reading process of game applications, live broadcast applications, video production applications, instant messaging applications, traffic applications, artificial intelligence, etc.

[0061] In an embodiment of the present application, the above-mentioned first read instruction may include but is not limited to an instruction for reading data sent by the host. Taking the electronic device as an HBM device as an example, according to the relevant HBM protocol, the data reading and writing speed of the HBM 2E device can reach a bit rate of up to 3.6GHz. Since HBM reads and writes data on both the rising and falling edges of the clock, the actual HBM 2E communication clock frequency is up to 1.8GHz. At such a high operating frequency, if the data transmission is interfered by noise on the data communication link, or crosstalk occurs between the data lines, it is easy to cause errors in data reading and writing in the high-speed working mode.

[0062] HBM device read operations are typically organized in burst form, with the initiation of a read burst operation signaled by the issuance of a READ instruction. Figure 3 is a schematic diagram of an optional timing adjustment method according to an embodiment of the present application. As shown in Figure 3, after a READ instruction is issued, both the rising and falling edges read 8 bits of data. The burst length of HBM READ instructions is either 2 or 4.

[0063] When the HBM DRAM receives a READ command, it returns read data (DQ), a data mask (DM), and a data bus inversion (DBI) to the HBM Host. FIG4 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. The format of the data returned by the HBM DRAM is shown in FIG4 . The relevant timing parameters included in FIG4 are as follows:

[0064] 1. tDQSCK (min / max): The minimum and maximum time range between the rising edge of RDQS_c (or the falling edge of RDQS_t) and the rising edge of CK_c (or the falling edge of CK_t);

[0065] 2.tDQSCK: describes the time delay between the rising edge of RDQS and the rising edge of CK;

[0066] 3.tQSH: describes the time delay of the RDQS signal being continuously high;

[0067] 4.tQSL: describes the time delay of the RDQS signal remaining at a low level;

[0068] 5. tLZ (min / max): describes the minimum and maximum time range for reading data from a high-impedance state to a low-impedance state;

[0069] 6. tHZ (min / max): describes the minimum and maximum time range for reading data from a low-impedance state to a high-impedance state;

[0070] 7.tDQSQ: describes the time delay between the rising edge of RDQS_t (or the falling edge of RDQS_c) and the readout of DQ, DM, and DBI data;

[0071] 8.tQH: describes the time delay from the rising edge of RDQS_t (or the falling edge of RDQS_c) to the time when the readout DQ, DM, and DBI data remain stable.

[0072] FIG5 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. If the HBM DRAM adopts a BL (Burst Length) of 2, the read data output timing is shown in FIG5 . As can be seen from FIG5 , the data reading lasts for two consecutive cycles.

[0073] Figure 6 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. If the HBM DRAM uses a BL (Burst Length) of 4, the read data output timing is shown in Figure 6. As can be seen from Figure 6, data reading lasts for four consecutive cycles.

[0074] The above is only an example, and this embodiment does not impose any specific limitation.

[0075] In an embodiment of the present application, the above-mentioned generation of sampling signals may include but is not limited to assembling corresponding sampling clocks based on different services using differential clock signals corresponding to CK_c or CK_t. That is, different sampling signals may include but are not limited to being generated based on the above-mentioned differential clock signals.

[0076] FIG7 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. As shown in FIG7 , taking an HBM read operation as an example, the method may include but is not limited to the following steps:

[0077] When the HBM host initiates a read operation to the HBM DRAM, the HBM DRAM returns the read data to the HBM host. Simultaneously, the HBM DRAM also returns a RDQS (read data select pulse) signal that matches the read data. In Figure 6, ACT represents a one-time activation instruction, and PRE represents a one-time precharge instruction. The HBM host uses this signal as the sampling signal for the read data. Therefore, ensuring that the sampling signal RDQS is aligned with the center of the read data maximizes sampling accuracy.

[0078] The above is only an example, and this embodiment does not impose any specific limitation.

[0079] In an embodiment of the present application, the above-mentioned training data is known and may include but is not limited to pre-configured data for training read data pins. The training data may include but is not limited to data represented by N bits, for example, training data generated by 128-bit DQ, 16-bit DM and 16-bit DBI paths.

[0080] In an embodiment of the present application, the sampling edge of the above-mentioned sampling signal may include but is not limited to the rising edge or falling edge of the sampling signal, and the data signal transmitted on the N transmission circuits may include but is not limited to data represented by N bits, each transmission circuit transmits data represented by one bit, and the above-mentioned sampling of the data signal transmitted on the N transmission circuits may include but is not limited to when the read data is returned, by returning a read data selection pulse signal that matches the read data to achieve sampling of the data signal to obtain the above-mentioned first sampling data.

[0081] It should be noted that the data signals transmitted on the above-mentioned N transmission circuits include N bits in the training data, which can be understood as each bit of training data is transmitted as a data signal on the corresponding transmission circuit, so that the training data represented by N bits can be read through the N transmission circuits.

[0082] In the embodiment of the present application, the first sampling data is data represented by N bits, which can be understood as the first sampling data being regarded as data to be read by the first read instruction.

[0083] In an embodiment of the present application, the values ​​of the same bits in the above-mentioned training data and the first sampling data can be understood as the transmission of the corresponding bit data signal on each transmission channel in the process of transmitting N bits of data signal on N transmission circuits. At this time, the training data is known, and it is determined whether the data signal transmitted by the first sampling data on the N transmission circuits is the same as the value of the training data.

[0084] For example, the training data can be configured to transmit "1" as the value of the data signal on N transmission circuits, and it can be determined whether the value of the data signal transmitted by the first sampling data on the N transmission circuits is equal to 1. Then, the transmission circuit whose value of the data signal transmitted on the N transmission circuits is not equal to 1 is determined as the first transmission circuit.

[0085] FIG8 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. As shown in FIG8 , taking an HBM read operation as an example, the method may include but is not limited to the following steps:

[0086] Figure 8 shows the use of CLK to sample data. In an HBM data read scenario, CLK is the RDQS signal returned by the HBM DRAM, and Data contains the DQ, DM, and DBI data returned by the HBM DRAM. In Figure I, the CLK sampling edge is located at the center of the data center, which maximizes sampling accuracy. In Figures II and III, the read data and the sampled RDQS signal are misaligned, offset from the center of the data.

[0087] In case II, the clock sampling edge will drift outside the data read window. In case III, although the clock sampling edge does not drift outside the data read window, the close proximity between the sampling edge and the data setup (or drop) edge causes a setup timing (or hold timing) violation. Both cases will result in read data sampling errors.

[0088] When errors occur when reading HBM DRAM data, it will affect the correct execution of the entire HBM subsystem, and in severe cases, it may even affect the normal operation of the entire chip.

[0089] Therefore, the transmission circuit corresponding to II and III above can be determined as the first transmission circuit above.

[0090] In the embodiment of the present application, the above-mentioned adjustment of the transmission delay on the first transmission circuit may include but is not limited to being achieved by adding a delay circuit to the first transmission circuit. The delay circuit may be, for example, an inverter circuit.

[0091] In the embodiment of the present application, the above-mentioned alignment of the center of the data signal transmitted on the first transmission circuit with the sampling edge of the sampling signal can be understood as the center of the data signal transmitted on the first transmission circuit and the sampling edge of the sampling signal are both as shown in I of Figure 8, and the sampling edge of CLK is located at the center of the data signal of Data.

[0092] In an embodiment of the present application, when data needs to be read, a sampling signal is generated in response to a received first read instruction, wherein the first read instruction is used to read training data, wherein the training data is known data represented by N bits, where N is a positive integer greater than or equal to 2. At a sampling edge of the sampling signal, data signals transmitted on N transmission circuits are sampled to obtain first sampled data, wherein the data signals transmitted on the N transmission circuits include the N bits in the training data, and the first sampled data is data represented by N bits. Based on the values ​​of the same bits in the training data and the first sampled data, a first transmission circuit among the N transmission circuits having a timing offset is determined, and the transmission delay of the first transmission circuit is adjusted until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal. By performing pin training for reading data, the offset between the data signal read by the electronic device and the sampling signal can be adjusted, thereby ensuring that the sampling signal is aligned with the center of the data signal of the read data, thereby achieving the technical effect of improving the accuracy of the read data and thereby solving the technical problem in the related art of the misalignment between the data signal and the sampling signal, resulting in read data sampling errors.

[0093] In one possible implementation, determining a first transmission circuit among N transmission circuits according to values ​​of identical bits in training data and first sampled data includes:

[0094] S1, determining whether the values ​​of the same bits in the training data and the first sampled data are the same;

[0095] S2. If there are M bits with different values ​​among the N bits, determine M transmission circuits among the N transmission circuits as first transmission circuits, where the M transmission circuits are used to transmit data signals corresponding to the M bits, where M is greater than or equal to 1 and less than or equal to N.

[0096] In an embodiment of the present application, the above-mentioned determination of whether the values ​​of the same bits in the training data and the first sampling data are the same may include but is not limited to determining whether the value of bit1 of the training data is the same as the value of bit1 of the first sampling data. If they are the same, it is considered that there is no timing offset in the transmission circuit where bit1 is located; if they are different, it is considered that there is a timing offset in the transmission circuit where bit1 is located, and the transmission circuit where it is located can be determined as the first transmission circuit. Similarly, the above-mentioned determination is performed on bit2, bit3, ..., bitN.

[0097] In the embodiment of the present application, the existence of M bits with different values ​​in the N bits can be understood as M transmission circuits in the N transmission circuits being the first transmission circuits with timing offset.

[0098] Through the above-mentioned method, the first transmission circuit with the timing offset can be determined more accurately, so that the timing offset can be adjusted in time, thereby improving the accuracy of reading data.

[0099] In one possible implementation, adjusting a transmission delay on the first transmission circuit until a center of a data signal transmitted on the first transmission circuit is aligned with a sampling edge of a sampling signal includes:

[0100] S1, performing a first round of adjustment on the transmission delay of the first transmission circuit until the center of the data signal transmitted on each of the N transmission circuits is aligned with a sampling edge of the sampling signal;

[0101] S2. If, after performing the first round of adjustment, there is a second transmission circuit among the N transmission circuits obtained, in which the transmitted data signal is not aligned with the target sampling edge, a second round of adjustment is performed on the transmission delay of the second transmission circuit until the center of the data signal transmitted on each transmission circuit in the N transmission circuits is aligned with the target sampling edge, wherein the number of times the target sampling edge is aligned with the center of the data signal transmitted on the N transmission circuits is the largest among all the sampling edges.

[0102] In an embodiment of the present application, the above-mentioned first round of adjustment may include but is not limited to aligning the center of the data signal transmitted on each transmission circuit in the N transmission circuits with a sampling edge of the sampling signal, that is, the center of the data signal transmitted on each transmission circuit in the N transmission circuits is aligned with the same or different sampling edges.

[0103] For example, Figure 9 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. As shown in Figure 9, clock is a sampling signal, including multiple sampling edges (sampling edge 902, sampling edge 904, sampling edge 906), wherein the centers of the data signals of bit0 and biti are not aligned with the sampling edge 904, while the centers of the data signals of bit1 and bitj are aligned with the sampling edge 904. At this time, it is necessary to perform the above-mentioned first round of adjustment on bit0 and biti so that the centers of the data signals of bit0 and biti are aligned with at least any one of the sampling edges 902, sampling edge 904, and sampling edge 906.

[0104] In an embodiment of the present application, the second round of adjustment may include, but is not limited to, first determining a target sampling edge, and then moving the center of the data signal transmitted on the second transmission circuit that is not aligned with the target sampling edge to be aligned with the target sampling edge. In one possible implementation, the center of the data signal transmitted on the second transmission circuit may be moved to be aligned with the target sampling edge by adding a delay unit having a duration corresponding to one sampling period, thereby moving the center of the data signal aligned with sampling edges other than the target sampling edge to be aligned with the target sampling edge.

[0105] For example, taking Figure 9 as an example, the centers of the data signals of bit1 and bitj are aligned with the sampling edge 904. After the first round of adjustment, the centers of the data signals of bit0 and biti are aligned with the sampling edge 902 and the sampling edge 906, respectively. At this time, by adjusting the transmission delay of the transmission circuit of the data signal corresponding to bit0 and biti, bit0 and biti are also aligned with the sampling edge 904, until the center of the data signal transmitted on each transmission circuit in the N transmission circuits is aligned with the sampling edge 904.

[0106] In an embodiment of the present application, if the center of the data signal transmitted on each of the N transmission circuits obtained after the first round of adjustment is aligned with the target sampling edge, the N transmission circuits obtained after the first round of adjustment are determined as N target transmission circuits.

[0107] Through multiple rounds of adjustment, the center of the data signal transmitted on each transmission circuit after adjustment can be aligned with the target sampling edge, which improves the adjustment effect and solves the technical problem in related technologies that the data signal and the sampling signal cannot be aligned, resulting in data sampling errors.

[0108] Through the embodiments of the present application, the read data pins can be trained before the HBM chip initially operates, thereby ensuring that sampling errors in the chip's read data path caused by back-end timing non-convergence and HBM chip production failures can be avoided during the chip's initial operation, thereby ensuring the stability of the read data path during the chip's initial operation. When the HBM chip detects significant PVT drift, the software can configure the chip to train the read data pins to ensure that the chip will not cause data transmission errors in the chip's read data path due to PVT drift. The periodic read data training mechanism included in the hardware can be used to regularly train the HBM chip to ensure that the chip will not experience read data sampling errors during operation. Software-configured single-step read data training is supported, so read data training for the entire chip can also be completed by software alone. Since the software can complete this action when the system is not busy, it can ensure that the read data pins will not experience sampling errors while maintaining the efficiency of the entire system.

[0109] In this application, an automatic training method implemented using hardware circuits is employed. Alternatively, the entire training process can be completed using software-configured registers. This means that the step counter value can be manually configured using software-configured registers. The host can also be configured to send read data instructions and configure the MR7 register to read and verify the content of the read data received by the HBM DRAM. Therefore, the software can independently initiate each step of single-step training of the read data.

[0110] As an optional solution, a first round of adjustment is performed on the transmission delay on the first transmission circuit until the center of the data signal transmitted on each of the N transmission circuits is aligned with a sampling edge of the sampling signal, including:

[0111] Perform the following operations on each first transmission circuit among the N transmission circuits, wherein when performing the following operations, each first transmission circuit is a current transmission circuit:

[0112] If the data signal currently transmitted on the transmission circuit corresponds to a high level of the sampling signal, a first edge of the target time window is determined as the first position, and a second edge of the target time window is determined as the second position, where the target time window is the time window in which the data signal currently transmitted on the transmission circuit is located;

[0113] increasing a transmission delay on the current transmission circuit until the first edge moves from the first position to the target position, and determining a first delay amount of the transmission delay increased on the current transmission circuit, wherein the target position corresponds to a sampling edge of the sampling signal;

[0114] reducing the transmission delay of the current transmission circuit until the second edge moves from the second position to the target position, and determining a second delay amount of the reduced transmission delay on the current transmission circuit;

[0115] The target time window is adjusted according to the first delay amount and the second delay amount so that the center of the data signal currently transmitted on the transmission circuit is aligned with the sampling edge of the sampling signal.

[0116] In the embodiment of the present application, the data signal transmitted on the current transmission circuit corresponds to the high level of the sampling signal, which may include but is not limited to any part of the time window where the data signal is located overlapping with the high level interval of the sampling signal.

[0117] For example, Figure 10 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. As shown in Figure 10, the partial area corresponding to the left edge of the time window of the data signal to point A in (1) coincides with the high level interval of the sampling signal. At this time, it is considered that the data signal corresponds to the high level of the sampling signal. The entire area corresponding to the left edge to the right edge of the time window of the data signal in (2) does not coincide with the high level interval of the sampling signal. At this time, it is considered that the data signal corresponds to the low level of the sampling signal.

[0118] In an embodiment of the present application, the above-mentioned time window can be used as the target time window, the rising edge of the target time window is determined as the first edge, and the right rising edge of the target time window is determined as the second edge. The above-mentioned first position is the initial position of the above-mentioned left edge, and the above-mentioned second position is the initial position of the above-mentioned right edge.

[0119] In an embodiment of the present application, the above-mentioned increase in the transmission delay on the current transmission circuit may include but is not limited to adding a delay circuit on the current transmission circuit to achieve increased transmission delay, and the above-mentioned reduction in the transmission delay on the current transmission circuit may include but is not limited to reducing the delay circuit on the current transmission circuit to achieve reduced transmission delay.

[0120] In an embodiment of the present application, the movement of the first edge from the first position to the target position may include, but is not limited to, adding a delay circuit so that the time window containing the data signal transmitted on the current transmission circuit moves backward until the left edge of the time window is aligned with the sampling edge of the sampling signal. The movement of the second edge from the second position to the target position may include, but is not limited to, reducing the delay circuit so that the time window containing the data signal transmitted on the current transmission circuit moves forward until the right edge of the time window is aligned with the sampling edge of the sampling signal.

[0121] It should be noted that the delay circuit amount increased when the first edge moves from the first position to the target position is the first delay amount, and the delay circuit amount reduced when the second edge moves from the second position to the target position is the second delay amount.

[0122] In an embodiment of the present application, the above-mentioned adjustment of the target time window according to the first delay amount and the second delay amount so that the center of the data signal transmitted on the current transmission circuit is aligned with the sampling edge of the sampling signal may include but is not limited to using half of the sum of the first delay amount and the second delay amount as the transmission delay required to adjust for aligning the center of the data signal transmitted on the above-mentioned current transmission circuit with the sampling edge of the sampling signal.

[0123] That is, by adjusting half of the sum of the first delay amount and the second delay amount, the center of the data signal currently transmitted on the transmission circuit is aligned with the sampling edge of the sampling signal.

[0124] For example, FIG11 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. As shown in FIG11 , during the first round of adjustment, the initial state of the bit of the read data (corresponding to the aforementioned current transmission circuit) is phase 0. At this time, the value of the bit read back should be 1 (corresponding to the data signal transmitted on the aforementioned current transmission circuit corresponding to the high level of the sampling signal). By adjusting the Step Counter to continuously increase the circuit delay of the bit, eventually, the value of the bit read back should be 0 (corresponding to the aforementioned target position). At this time, the value of the Step Counter is recorded as R_CNT (corresponding to the aforementioned first delay amount).

[0125] After that, the initial state of Phase 1 to Phase 0 is set, and the circuit delay of the bit is continuously reduced by adjusting the Step Counter. Eventually, the value of the bit read back should be 0 (corresponding to the aforementioned target position). At this time, the value of the Step Counter is recorded as L_CNT (corresponding to the aforementioned second delay amount).

[0126] At this point, it can be calculated that when the circuit delay of this bit is (R_CNT+L_CNT) / 2, this bit can achieve the purpose of aligning the edge of the sampling clock and the edge of the time window of the data signal.

[0127] Continue to adjust and calculate the circuit delay for each bit according to this step, and the sampling RDQS edge and data edge of each read data bit will be aligned. This completes the first round of adjustment.

[0128] As an optional solution, if a second transmission circuit exists among the N transmission circuits obtained after the first round of adjustment, in which the transmitted data signal is not aligned with the target sampling edge, a second round of adjustment is performed on the transmission delay of the second transmission circuit until the center of the data signal transmitted by each transmission circuit in the N transmission circuits is aligned with the target sampling edge, including:

[0129] Repeat the following steps until the center of the data signal transmitted by each transmission circuit in the N transmission circuits is aligned with the target sampling edge, wherein the current sampling edge is initialized to a sampling edge adjacent to the target sampling edge:

[0130] By clock gating, the first group of sampling edges in the sampling signal except the target sampling edge is turned off, and the target sampling edge is retained;

[0131] determining whether a first group of data signals not aligned with the target sampling edge exists among the data signals transmitted on the N transmission circuits according to whether centers of the data signals transmitted on the N transmission circuits are aligned with the target sampling edge;

[0132] In the presence of the first group of data signals, shutting down a second group of sampling edges in the sampling signal except the current sampling edge by clock gating, and retaining the current sampling edge, wherein the second group of sampling edges includes a target sampling edge, and the current sampling edge is different from the target sampling edge;

[0133] determining whether there is a second group of data signals in the first group of data signals that is not aligned with a second group of sampling edges according to whether a center of the first group of data signals is aligned with a current sampling edge;

[0134] When a target data signal exists in the first group of data signals, adjusting a transmission delay on a transmission circuit that transmits the target data signal, wherein a center of the target data signal is aligned with a current sampling edge before the adjustment and is aligned with a target sampling edge after the adjustment;

[0135] In the case where the second group of data signals exists, the current sampling edge is updated to a sampling edge in the sampling signal that has not been retained by clock gating.

[0136] In an embodiment of the present application, the above-mentioned clock gating can be an important means to reduce the power consumption of the microprocessor, mainly targeting the dynamic power consumption caused by register flipping. One or more sampling cycles of the sampling signal can be turned off to turn off the sampling edge that needs to be turned off and retain the sampling edge that needs to be retained.

[0137] In an embodiment of the present application, each data signal in the first group of data signals is a data signal whose center is aligned with a sampling edge but not aligned with a target sampling edge. When the first group of data signals exists, clock gating can be used to disable a second group of sampling edges in the sampling signals other than the current sampling edge, retaining the current sampling edge while also disabling the target sampling edge. A check is then performed to determine whether all of the first group of data signals are aligned with the current sampling edge. The data signals aligned with the current sampling edge are used as target data signals for transmission delay adjustment, so that the data signals are aligned with the target sampling edge instead of the current sampling edge after adjustment.

[0138] In an embodiment of the present application, each data signal in the above-mentioned second group of data signals is a data signal whose center is not aligned with the current sampling edge or the target sampling edge. At this time, by updating the current sampling edge to the sampling edge in the sampling signal that has not been retained by clock gating, it is continued to be determined whether the first group of data signals exists in the second group of data signals, and the data signal aligned with the current sampling edge is used as the target data signal to adjust the transmission delay.

[0139] For example, Figure 12 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. As shown in Figure 12, A in Figure 12 represents multiple transmission circuits in which the centers of data signals in N transmission circuits are aligned with the target sampling edge. B in Figure 12 represents closing the first group of sampling edges other than the target sampling edge through clock gating, retaining the target sampling edge, and determining whether there is a first group of data signals that are not aligned with the target sampling edge in the data signals transmitted on the N transmission circuits based on whether the centers of the data signals transmitted on the N transmission circuits are aligned with the target sampling edge. C in Figure 12 represents that in the presence of the first group of data signals, closing the second group of sampling edges in the sampling signals other than the current sampling edge through clock gating, retaining the current sampling edge, and adjusting the transmission delay on the transmission circuit that transmits the target data signal based on whether the center of the first group of data signals is aligned with the current sampling edge.

[0140] In an embodiment of the present application, in the presence of a second set of data signals, updating the current sampling edge to a sampling edge in the sampling signal that has not been retained by clock gating can be understood as first updating the current sampling edge to a sampling edge that is closest to the target sampling edge and has not been retained by clock gating.

[0141] As an optional solution, adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal includes:

[0142] A target delay unit is determined in a delay control unit provided on a first transmission circuit, and a corresponding data signal is transmitted from an output position of the target delay unit, wherein the center of the corresponding data signal is aligned with a sampling edge of a sampling signal. A delay control unit is provided on each transmission path of the N transmission circuits, and the delay control unit includes a preset number of delay units connected in series, each delay unit being used to adjust the transmission delay on the transmission circuit by a unit time length.

[0143] In an embodiment of the present application, the delay control unit may include, but is not limited to, a delay control circuit. The delay control circuit may support dynamic adjustment of the delay circuit on the read data transmission path, thereby increasing or decreasing the delay on the read data path. A delay circuit is added to each read data bit on the read data transmission path to adjust the delay of the bit path.

[0144] For example, FIG13 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. As shown in FIG13 , the read data path includes a total of 128-bit DQ, 16-bit DM, and 16-bit DBI paths. The DE is a delay element unit, which can include 128 DEs, each of which includes 4 inverter circuits. A tap interface (corresponding to the aforementioned output position) is included after each DE of the delay control unit. FIG14 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. As shown in FIG14 , the step counter can be used to control the value of the read data bit to be connected from a certain tap outlet. Therefore, the purpose of adjusting the path delay of the read data can be achieved, that is, the relative position of the read data and the RDQS sampling edge can be moved and adjusted.

[0145] Figure 15 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. The application environment of the aforementioned timing adjustment is shown in Figure 15 . The HBM Host includes four circuit components: HBM mode configuration, a read instruction sending unit, a read data path delay control circuit, and a read data training unit. The read data training unit is responsible for controlling the remaining three modules and comparing the read data, completing the entire read data training process.

[0146] As an optional solution, after the transmission delay on the first transmission circuit is adjusted, N target transmission circuits can be obtained, wherein the center of the data signal transmitted by each of the N target transmission circuits is aligned with the sampling edge of the sampling signal. In this case, in response to the obtained second read instruction, the data signals transmitted by the N target transmission circuits can be sampled at the sampling edge of the sampling signal to obtain second sampled data, wherein the second read instruction is used to read target data, wherein the target data is unknown data represented by N bits, the data signals transmitted by the N target transmission circuits include the N bits of the target data, and the second sampled data is data represented by N bits.

[0147] In an embodiment of the present application, after the pin training of the N transmission circuits is completed, that is, after the transmission delay on the transmission circuit with timing offset among the N transmission circuits is adjusted, the above-mentioned N target transmission circuits can begin to be used to transmit unknown target data.

[0148] As an optional solution, when the target memory is configured in read register mode, a second read instruction can also be sent, wherein the memory is divided into multiple double-byte registers, and the second read instruction is used to read the target data in the target double-byte register in the multiple double-byte registers through N target transmission circuits.

[0149] In an embodiment of the present application, the above-mentioned memory may include but is not limited to HBM memory, the above-mentioned second read instruction is used to read the target data, and the HBM mode configuration unit is used to configure the DWORD MISR circuit to DWORD read register mode (corresponding to the aforementioned read register mode), which is completed by configuring the HBM mode register MR7.

[0150] For example, FIG16 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. The specific mode of MR7 is shown in FIG16 . The steps of configuring the HBM DWORD to read register mode are as follows:

[0151] The value of configuration MR7 is: 8'b00000001, where OP0 is 1, indicating that the DWORD Loopback mode is enabled; OP[5:3] is 3'b000, which resets the default value in the DWORD register to 0xAAAAAh. The rest of the bits are the default values;

[0152] The value of MR7 is configured as follows: 8'b00010011, where OP0 is set to 1, indicating that the DWORD loopback mode is enabled; OP[2:1] is set to 2'b01, indicating that the value in the MISR register is read. Since the value was reset in step 1, the value is 0xAAAAAh; OP[5:3] is set to 3'b010, configuring the DWORD register to read or write register mode. The remaining bits are at their default values.

[0153] At this point, the HBM DRAM has been configured in DWORD read register mode, and the value in the DWORD register (corresponding to the aforementioned target data) can be read by sending a read instruction.

[0154] The aforementioned N can have different values. Depending on the value of N, the data signals transmitted on the N target transmission circuits may be different. As an alternative, N can be 160. In this case, the data signals transmitted on the 160 target transmission circuits may include a 128-bit memory read data bus signal, a 16-bit read data mask signal, and a 16-bit data bus flip signal.

[0155] In an embodiment of the present application, the 128-bit memory read data bus signal transmitted on the above-mentioned 160 target transmission circuits may include but is not limited to a 128-bit DQ signal, the 16-bit read data mask signal may include but is not limited to a 16-bit DBI signal, and the 16-bit data bus flip signal may include but is not limited to a 16-bit DM signal.

[0156] It should be noted that the design is done by dividing the 128-bit DWORD of the HBM data path into DWORD0, DWORD1, DWORD2 and DWORD3. In each DWORD, according to the width of the MISR algorithm, it is divided into 4 data units, Byte0, Byte1, Byte2 and Byte3, for comparison.

[0157] For example, Figure 17 is a schematic diagram of another optional timing adjustment method according to an embodiment of the present application. As shown in Figure 17, in each Byte, from the 19th bit to the 0th bit are the falling edge data of DBI and the rising edge data of DBI, the falling edge data and rising edge data of each bit of 8-bit DQ, and the falling edge data and rising edge data of DM. The Byte in each DWORD (for example, DWORD0, DWORD1, DWORD2, DWORD3) contains a 20-bit value. When the DWORD register is reset, the value will become 0xAAAAAh. The read instruction sending unit is responsible for sending the read instruction to the HBM DRAM.

[0158] As an optional solution, adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal includes:

[0159] When the sampling edge is a rising edge, adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the rising edge of the sampling signal; or

[0160] When the sampling edge is a falling edge, the transmission delay on the first transmission circuit is adjusted until the center of the data signal transmitted on the first transmission circuit is aligned with the falling edge of the sampling signal.

[0161] Optionally, in an embodiment of the present application, the above-mentioned sampling edge may include but is not limited to a rising edge and a falling edge. Data sampling and reading can be achieved through either the rising edge or the falling edge, or data sampling and reading can be achieved through both the rising edge and the falling edge.

[0162] As an optional solution, adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal includes:

[0163] Adjusting the transmission delay on the first transmission circuit until a center point corresponding to the data signal transmitted on the first transmission circuit is aligned with a sampling edge of the sampling signal, wherein the center point is a center point of a time window in which the data signal is located; or

[0164] The transmission delay on the first transmission circuit is adjusted until the sampling edge of the sampling signal is located in a time subwindow corresponding to the data signal transmitted on the first transmission circuit, wherein the time subwindow is a subwindow including the center point in the time window.

[0165] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0166] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0167] According to another aspect of the embodiments of the present application, a timing adjustment device for implementing the above-mentioned timing adjustment method is also provided. As shown in FIG18 , the device includes:

[0168] a generating module 1802 configured to generate a sampling signal in response to a first read instruction obtained, wherein the first read instruction is configured to read training data, wherein the training data is known data represented by N bits, where N is a positive integer greater than or equal to 2;

[0169] a sampling module 1804 configured to sample data signals transmitted on the N transmission circuits at a sampling edge of the sampling signal to obtain first sampled data, wherein the data signals transmitted on the N transmission circuits include the N bits in the training data, and the first sampled data is data represented by N bits;

[0170] a determination module 1806, configured to determine a first transmission circuit among the N transmission circuits based on values ​​of identical bits in the training data and the first sampled data, where the first transmission circuit is a transmission circuit among the N transmission circuits that has a timing offset;

[0171] The adjusting module 1808 is configured to adjust the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal.

[0172] As an optional solution, the device is used to determine the first transmission circuit among the N transmission circuits based on the values ​​of the same bits in the training data and the first sampled data in the following manner: determine whether the values ​​of the same bits in the training data and the first sampled data are the same; if there are M bits with different values ​​among the N bits, determine M transmission circuits among the N transmission circuits as the first transmission circuit, wherein the M transmission circuits are used to transmit the data signals corresponding to the M bits, and M is greater than or equal to 1 and less than or equal to N.

[0173] As an optional solution, the apparatus is configured to adjust the transmission delay on the first transmission circuit in the following manner until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal:

[0174] Performing a first round of adjustment on the transmission delay of the first transmission circuit until the center of the data signal transmitted on each of the N transmission circuits is aligned with a sampling edge of the sampling signal;

[0175] If, after performing the first round of adjustment, there is a second transmission circuit among the N transmission circuits obtained, the transmitted data signal is not aligned with the target sampling edge, a second round of adjustment is performed on the transmission delay of the second transmission circuit until the center of the data signal transmitted by each transmission circuit in the N transmission circuits is aligned with the target sampling edge, wherein the number of times that the target sampling edge is aligned with the center of the data signal transmitted by the N transmission circuits is the largest among all the sampling edges.

[0176] As an optional solution, the apparatus is configured to perform a first round of adjustment on the transmission delay on the first transmission circuit in the following manner until the center of the data signal transmitted on each of the N transmission circuits is aligned with a sampling edge of the sampling signal:

[0177] Perform the following operations on each of the N transmission circuits, wherein when performing the following operations, each of the first transmission circuits is a current transmission circuit:

[0178] If the data signal transmitted on the current transmission circuit corresponds to a high level of the sampling signal, determining a first edge of a target time window as a first position, and determining a second edge of the target time window as a second position, the target time window being a time window in which the data signal transmitted on the current transmission circuit is located;

[0179] increasing a transmission delay on the current transmission circuit until the first edge moves from the first position to a target position, and determining a first delay amount of the transmission delay increased on the current transmission circuit, wherein the target position corresponds to a sampling edge of the sampling signal;

[0180] reducing the transmission delay of the current transmission circuit until the second edge moves from the second position to the target position, and determining a second delay amount of the reduced transmission delay on the current transmission circuit;

[0181] The target time window is adjusted according to the first delay amount and the second delay amount, so that the center of the data signal transmitted on the current transmission circuit is aligned with the sampling edge of the sampling signal.

[0182] As an optional solution, the apparatus is configured to, if a second transmission circuit exists in the N transmission circuits obtained after the first round of adjustment and the data signal transmitted is not aligned with the target sampling edge, perform a second round of adjustment on the transmission delay of the second transmission circuit until the center of the data signal transmitted by each transmission circuit in the N transmission circuits is aligned with the target sampling edge, in the following manner:

[0183] Repeat the following steps until a center of a data signal transmitted on each of the N transmission circuits is aligned with the target sampling edge, wherein a current sampling edge is initialized to a sampling edge adjacent to the target sampling edge:

[0184] Turning off a first group of sampling edges in the sampling signal except the target sampling edge by clock gating, and retaining the target sampling edge;

[0185] determining, based on whether centers of the data signals transmitted on the N transmission circuits are aligned with the target sampling edges, whether a first group of data signals not aligned with the target sampling edges exists among the data signals transmitted on the N transmission circuits;

[0186] In the presence of the first group of data signals, shutting down a second group of sampling edges in the sampling signals except a current sampling edge by the clock gating, and retaining the current sampling edge, wherein the second group of sampling edges includes the target sampling edge, and the current sampling edge is different from the target sampling edge;

[0187] determining whether there is a second group of data signals in the first group of data signals that is not aligned with the second group of sampling edges according to whether the centers of the first group of data signals are aligned with the current sampling edge;

[0188] In a case where a target data signal exists in the first group of data signals, adjusting a transmission delay on a transmission circuit that transmits the target data signal, wherein a center of the target data signal is aligned with the current sampling edge before the adjustment and is aligned with the target sampling edge after the adjustment;

[0189] In the case where the second group of data signals exists, the current sampling edge is updated to a sampling edge in the sampling signal that has not been retained by the clock gating.

[0190] As an optional solution, the apparatus is configured to adjust the transmission delay on the first transmission circuit in the following manner until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal:

[0191] A target delay unit is determined in a delay control unit provided on the first transmission circuit, and a corresponding data signal is transmitted from an output position of the target delay unit, wherein a center of the corresponding data signal is aligned with a sampling edge of the sampling signal. One delay control unit is provided on each transmission path of the N transmission circuits, and the delay control unit includes a preset number of delay units connected in series, each of the delay units being used to adjust the transmission delay on the transmission circuit by a unit time length.

[0192] As an optional solution, the device is also used for:

[0193] After the transmission delay on the first transmission circuit is adjusted, N target transmission circuits are obtained, wherein the center of the data signal transmitted on each of the N target transmission circuits is aligned with the sampling edge of the sampling signal;

[0194] In response to the acquired second read instruction, the data signals transmitted on the N target transmission circuits are sampled on the sampling edge of the sampling signal to obtain second sampled data, wherein the second read instruction is used to read target data, wherein the target data is unknown data represented by N bits, the data signals transmitted on the N target transmission circuits include the N bits of the target data, and the second sampled data is data represented by N bits.

[0195] As an optional solution, the device is also used for:

[0196] When the memory is configured in a read register mode, the second read instruction is sent, wherein the memory is divided into multiple double-byte registers, and the second read instruction is used to read the target data in the target double-byte register among the multiple double-byte registers through the N target transmission circuits.

[0197] As an optional solution, the value of N is 160, and the data signals transmitted on the N target transmission circuits include a 128-bit memory read data bus signal, a 16-bit read data mask signal and a 16-bit data bus flip signal.

[0198] As an optional solution, the apparatus is configured to adjust the transmission delay on the first transmission circuit in the following manner until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal:

[0199] In a case where the sampling edge is a rising edge, adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the rising edge of the sampling signal; or

[0200] When the sampling edge is a falling edge, the transmission delay on the first transmission circuit is adjusted until the center of the data signal transmitted on the first transmission circuit is aligned with the falling edge of the sampling signal.

[0201] As an optional solution, the apparatus is configured to adjust the transmission delay on the first transmission circuit in the following manner until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal:

[0202] adjusting a transmission delay on the first transmission circuit until a center point corresponding to a data signal transmitted on the first transmission circuit is aligned with a sampling edge of the sampling signal, wherein the center point is a center point of a time window in which the data signal is located; or

[0203] The transmission delay on the first transmission circuit is adjusted until the sampling edge of the sampling signal is located in a time subwindow corresponding to the data signal transmitted on the first transmission circuit, wherein the time subwindow is a subwindow within the time window including the center point.

[0204] According to one aspect of the present application, a computer program product is provided, comprising a computer program containing program code for executing the method illustrated in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 1909 and / or installed from removable media 1911. When executed by central processing unit 1901, the computer program performs various functions provided in the embodiments of the present application.

[0205] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0206] FIG19 schematically shows a block diagram of a computer system structure of an electronic device for implementing an embodiment of the present application.

[0207] It should be noted that the computer system 1900 of the electronic device shown in FIG19 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present application.

[0208] As shown in Figure 19, the computer system 1900 includes a central processing unit (CPU) 1901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1902 or the program loaded from the storage part 1908 into the random access memory (RAM) 1903. Various programs and data required for system operation are also stored in the random access memory 1903. The CPU 1901, the read-only memory 1902, and the random access memory 1903 are connected to each other via a bus 1904. An input / output interface 1905 (i.e., an I / O interface) is also connected to the bus 1904.

[0209] The following components are connected to the input / output interface 1905: an input section 1906 including a keyboard, a mouse, and the like; an output section 1907 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 1908 including a hard disk; and a communication section 1909 including a network interface card such as a local area network card or a modem. The communication section 1909 performs communication processing via a network such as the Internet. A drive 1190 is also connected to the input / output interface 1905 as needed. Removable media 1911, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1190 as needed, so that computer programs read therefrom can be installed into the storage section 1908 as needed.

[0210] In particular, according to an embodiment of the present application, the processes described in the various method flow charts can be implemented as computer software programs. For example, an embodiment of the present application includes a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for executing the methods shown in the flow charts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1909 and / or installed from a removable medium 1911. When the computer program is executed by the central processing unit 1901, the various functions defined in the system of the present application are performed.

[0211] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned timing adjustment method is also provided. The electronic device may be the terminal device or server shown in Figure 1. This embodiment is described using the electronic device as an example of a terminal device. As shown in Figure 20, the electronic device includes a memory 2002 and a processor 2004. The memory 2002 stores a computer program, and the processor 2004 is configured to execute the steps of any of the above-mentioned method embodiments through the computer program.

[0212] In a possible implementation, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0213] In a possible implementation, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0214] S1, generating a sampling signal in response to a first read instruction obtained, wherein the first read instruction is used to read training data, wherein the training data is known data represented by N bits, where N is a positive integer greater than or equal to 2;

[0215] S2, sampling data signals transmitted on N transmission circuits at a sampling edge of a sampling signal to obtain first sampled data, wherein the data signals transmitted on the N transmission circuits include N bits in the training data, and the first sampled data is data represented by N bits;

[0216] S3, determining a first transmission circuit among the N transmission circuits based on values ​​of identical bits in the training data and the first sampled data, where the first transmission circuit is a transmission circuit among the N transmission circuits that has a timing offset;

[0217] S4, adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal.

[0218] In one possible implementation, it will be understood by those skilled in the art that the structure shown in FIG20 is for illustration only, and the electronic device may also be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile internet device (MID), a PAD, and other terminal devices. FIG20 does not limit the structure of the electronic device. For example, the electronic device may include more or fewer components (such as a network interface, etc.) than those shown in FIG20, or may have a configuration different from that shown in FIG20.

[0219] The memory 2002 can be used to store software programs and modules, such as the program instructions / modules corresponding to the timing adjustment method and device in the embodiments of the present application. The processor 2004 executes the software programs and modules stored in the memory 2002 to perform various functional applications and data processing, thereby implementing the timing adjustment method described above. The memory 2002 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 2002 may further include a memory remotely located relative to the processor 2004, and these remote memories may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. The memory 2002 may specifically, but is not limited to, be used to store information such as training data and target data. As an example, as shown in FIG20 , the memory 2002 may, but is not limited to, include the generation module 1802, sampling module 1804, determination module 1806, and adjustment module 1808 of the timing adjustment device described above. In addition, it may also include but is not limited to other module units in the above-mentioned timing adjustment device, which will not be repeated in this example.

[0220] In one possible implementation, the transmission device 2006 is configured to receive or transmit data via a network. Specific examples of the network may include a wired network and a wireless network. In one embodiment, the transmission device 2006 includes a network interface controller (NIC), which can be connected to other network devices and a router via a network cable to enable communication with the Internet or a local area network. In another embodiment, the transmission device 2006 is a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.

[0221] In addition, the electronic device further includes: a display 2008 for displaying the data signal; and a connection bus 2010 for connecting various module components in the electronic device.

[0222] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting multiple nodes through network communication. The nodes may form a peer-to-peer (P2P) network, and any computing device, such as a server, terminal, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.

[0223] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the timing adjustment method provided in various optional implementations of the above-mentioned timing adjustment.

[0224] In this embodiment, a person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by a program to instruct the hardware related to the terminal device, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0225] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0226] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application.

[0227] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0228] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, and can be electrical or other forms.

[0229] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0230] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0231] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A timing adjustment method, the method being performed by an electronic device, comprising: In response to the acquired first read instruction, a sampling signal is generated, wherein the first read instruction is used to read training data, wherein the training data is known data represented by N bits, where N is a positive integer greater than or equal to 2; Sampling data signals transmitted on N transmission circuits at a sampling edge of the sampling signal to obtain first sampled data, wherein the data signals transmitted on the N transmission circuits include the N bits in the training data, and the first sampled data is data represented by N bits; Determine a first transmission circuit among the N transmission circuits according to values ​​of the same bits in the training data and the first sampling data, where the first transmission circuit is a transmission circuit among the N transmission circuits that has a timing offset; The transmission delay on the first transmission circuit is adjusted until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal.

2. The method according to claim 1, wherein determining the first transmission circuit among the N transmission circuits according to the values ​​of the same bits in the training data and the first sampled data comprises: Determining whether values ​​of the same bit in the training data and the first sampled data are the same; If there are M bits with different values ​​among the N bits, M transmission circuits among the N transmission circuits are determined as the first transmission circuits, wherein the M transmission circuits are used to transmit data signals corresponding to the M bits, and M is greater than or equal to 1 and less than or equal to N.

3. The method according to claim 1, wherein adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal comprises: Performing a first round of adjustment on the transmission delay on the first transmission circuit until the center of the data signal transmitted on each transmission circuit of the N transmission circuits is respectively aligned with a sampling edge of the sampling signal; If there is a second transmission circuit whose transmitted data signal is not aligned with the target sampling edge among the N transmission circuits obtained after executing the first round of adjustment, a second round of adjustment is performed on the transmission delay on the second transmission circuit until the center of the data signal transmitted on each transmission circuit in the N transmission circuits is aligned with the target sampling edge, wherein the number of times the target sampling edge is aligned with the center of the data signal transmitted on the N transmission circuits is the largest among all the sampling edges.

4. The method according to claim 3, wherein the first round of adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on each transmission circuit of the N transmission circuits is aligned with a sampling edge of the sampling signal, comprises: Perform the following operations on each of the N transmission circuits, wherein when performing the following operations, each of the first transmission circuits is a current transmission circuit: If the data signal transmitted on the current transmission circuit corresponds to the high level of the sampling signal, a first edge of a target time window is determined as a first position, and a second edge of the target time window is determined as a second position, wherein the target time window is a time window in which the data signal transmitted on the current transmission circuit is located; increasing the transmission delay on the current transmission circuit until the first edge moves from the first position to a target position, and determining a first delay amount of the transmission delay increased on the current transmission circuit, wherein the target position corresponds to a sampling edge of the sampling signal; reducing the transmission delay of the current transmission circuit until the second edge moves from the second position to the target position, and determining a second delay amount of the reduced transmission delay on the current transmission circuit; The target time window is adjusted according to the first delay amount and the second delay amount so that the center of the data signal transmitted on the current transmission circuit is aligned with the sampling edge of the sampling signal.

5. The method according to claim 3, if there is a second transmission circuit whose transmitted data signal is not aligned with the target sampling edge among the N transmission circuits obtained after performing the first round of adjustment, performing a second round of adjustment on the transmission delay of the second transmission circuit until the center of the data signal transmitted on each transmission circuit in the N transmission circuits is aligned with the target sampling edge, comprising: Repeat the following operations until the center of the data signal transmitted on each transmission circuit of the N transmission circuits is aligned with the target sampling edge, wherein the current sampling edge is initialized as a sampling edge adjacent to the target sampling edge: Closing a first group of sampling edges in the sampling signal except the target sampling edge by clock gating, and retaining the target sampling edge; Determining whether there is a first group of data signals that are not aligned with the target sampling edge among the data signals transmitted on the N transmission circuits according to whether the centers of the data signals transmitted on the N transmission circuits are aligned with the target sampling edge; In the presence of the first group of data signals, closing a second group of sampling edges in the sampling signal except a current sampling edge by the clock gating, and retaining the current sampling edge, wherein the second group of sampling edges includes the target sampling edge, and the current sampling edge is different from the target sampling edge; determining whether there is a second group of data signals in the first group of data signals that are not aligned with the second group of sampling edges according to whether the centers of the first group of data signals are aligned with the current sampling edge; In the case where a target data signal exists in the first group of data signals, adjusting a transmission delay on a transmission circuit that transmits the target data signal, wherein a center of the target data signal is aligned with the current sampling edge before the adjustment and is aligned with the target sampling edge after the adjustment; In the case where the second group of data signals exists, the current sampling edge is updated to a sampling edge in the sampling signal that has not been retained by the clock gating.

6. The method according to claim 1, wherein adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal comprises: A target delay unit is determined in a delay control unit provided on the first transmission circuit, and a corresponding data signal is transmitted from an output position of the target delay unit, wherein the center of the corresponding data signal is aligned with a sampling edge of the sampling signal, and one delay control unit is provided on each transmission path of the N transmission circuits, the delay control unit comprises a preset number of delay units connected in series in sequence, and each of the delay units is used to adjust the transmission delay on the transmission circuit by a unit time length.

7. The method according to claim 1, further comprising: After the transmission delay on the first transmission circuit is adjusted, N target transmission circuits are obtained, wherein the center of the data signal transmitted on each of the N target transmission circuits is aligned with the sampling edge of the sampling signal; In response to the acquired second read instruction, the data signals transmitted on the N target transmission circuits are sampled on the sampling edge of the sampling signal to obtain second sampled data, wherein the second read instruction is used to read target data, wherein the target data is unknown data represented by N bits, the data signals transmitted on the N target transmission circuits include the N bits in the target data, and the second sampled data is data represented by N bits.

8. The method according to claim 7, further comprising: When the memory is configured as a read register mode, the second read instruction is sent, wherein the memory is divided into multiple double-byte registers, and the second read instruction is used to read the target data in the target double-byte register among the multiple double-byte registers through the N target transmission circuits.

9. According to the method of claim 7, the value of N is 160, and the data signals transmitted on the N target transmission circuits include a 128-bit memory read data bus signal, a 16-bit read data mask signal and a 16-bit data bus flip signal.

10. The method according to any one of claims 1 to 9, wherein adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal comprises: In the case where the sampling edge is a rising edge, adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the rising edge of the sampling signal; or When the sampling edge is a falling edge, the transmission delay on the first transmission circuit is adjusted until the center of the data signal transmitted on the first transmission circuit is aligned with the falling edge of the sampling signal.

11. The method according to any one of claims 1 to 9, wherein adjusting the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal comprises: adjusting the transmission delay on the first transmission circuit until a center point corresponding to the data signal transmitted on the first transmission circuit is aligned with a sampling edge of the sampling signal, wherein the center point is a center point of a time window in which the data signal is located; or The adjusting of the transmission delay on the first transmission circuit is performed until the sampling edge of the sampling signal is located in a time subwindow corresponding to the data signal transmitted on the first transmission circuit, wherein the time subwindow is a subwindow including the center point in the time window.

12. A timing adjustment device, the device being deployed on an electronic device, comprising: A generating module, configured to generate a sampling signal in response to a first read instruction obtained, wherein the first read instruction is used to read training data, wherein the training data is known data represented by N bits, where N is a positive integer greater than or equal to 2; a sampling module, configured to sample data signals transmitted on N transmission circuits at a sampling edge of the sampling signal to obtain first sampled data, wherein the data signals transmitted on the N transmission circuits include the N bits in the training data, and the first sampled data is data represented by N bits; A determination module, configured to determine a first transmission circuit among the N transmission circuits according to values ​​of the same bits in the training data and the first sampling data, wherein the first transmission circuit is a transmission circuit having a timing offset among the N transmission circuits; The adjustment module is used to adjust the transmission delay on the first transmission circuit until the center of the data signal transmitted on the first transmission circuit is aligned with the sampling edge of the sampling signal.

13. A computer-readable storage medium, the computer-readable storage medium comprising a stored computer program, wherein: The computer program can be executed by a terminal device or a computer to execute the method described in any one of claims 1 to 11.

14. A computer program product, comprising a computer program, which implements the method according to any one of claims 1 to 11 when executed by a processor.

15. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the method according to any one of claims 1 to 11 through the computer program.