DDR (Double Data Rate) output circuit with pipeline structure and electronic equipment
By designing a pipeline structure in the DDR output circuit, using rising and falling edge data transmission, the problem of mismatch between clock and data timing is solved, the double rate and output synchronization of data transmission is achieved, and the efficiency and stability of the system are improved. .
Patent Information
- Application Number
- CN202410688215.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-11-05
AI Technical Summary
The timing mismatch between the clock and data in existing DDR data transmission results in errors, and the transmission rate is low, making it difficult to process more data per unit time.
A pipelined DDR output circuit is designed to transmit data on both the rising and falling edges of the clock signal, and to use logic circuits such as registers and exclusive-OR gates to ensure the output synchronization and achieve double the data transmission rate.
It significantly improves the efficiency of data transmission, system stability and flexibility, reduces system complexity, ensures the delay consistency of data on rising and falling edges of clock signals, and improves data processing capabilities.
Smart Images

Figure CN118899015A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of circuits, and in particular to a DDR output circuit and electronic equipment with a pipeline structure. Background Art
[0002] Figure 1 The timing diagram of DDR data transmission, DDR_CLK_2X is the double-speed clock signal of DDR memory, which means that DDR will try to transmit data at both the rising and falling edges of each clock cycle. DDR_DATA is the data line on the DDR memory, which is used to transmit data. DDR_CLK is the basic clock signal of DDR memory, and its frequency is usually half of DDR_CLK_2X, because DDR transmits data at both edges (rising and falling) of each clock cycle. DDR_CLK_DLY is a clock signal with delay control. The DDR memory system uses this delay control to ensure that the receiver can sample the data at the right time to avoid errors caused by the timing mismatch between the clock and data. It can be seen that in the process of transmitting 1 bit of n MHz DDR data, a 2n MHz basic clock signal is required for 1 bit of data line to generate n Mbps data, that is, the frequency of the basic clock signal is twice the data transmission rate. Summary of the invention
[0003] The DDR output circuit and electronic device with a pipeline structure provided in the embodiment of the present application can reduce the frequency of the clock signal and increase the data transmission rate. The technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides a pipelined DDR output circuit, comprising:
[0005] A rising edge data generating circuit, a falling edge data generating circuit and a DDR generating circuit;
[0006] The rising edge data generating circuit comprises: a rising edge data input terminal ddr_in_pos, an XOR gate xor_0, an invertor inv_0, a selector mux2_0, a register ff_0, and an XOR gate xor_2;
[0007] The falling edge data generating circuit comprises: a falling edge data input terminal ddr_in_neg, an XOR gate xor_1, an invertor inv_1, a selector mux2_1, a register ff_1 and the XOR gate xor_2;
[0008] The DDR generating circuit comprises: a register ff_2, a register ff_3, an XOR gate xor_3 and a DDR data output terminal ddr_out;
[0009] Wherein, the first input end of the xor_0 is respectively connected to the first input end of the xor_1 and the output end of the xor_2, the rising edge data input end ddr_in_pos is connected to the second input end of the XOR gate xor_0; the output end of the xor_0 is connected to the control end of the mux2_0, the first input end of the mux2_0 is respectively connected to the input end of the inv_0 and the first input end of the XOR gate xor_2, the second input end of the selector mux2_0 is connected to the output end of the NOT gate inv_0, the output end of the mux2_0 is connected to the data input end D of the register ff_0, the clock input end of the register ff_0 is respectively connected to the clock input end D of the register ff_1 and the first-level clock signal end ddr_clk_pre; the data output end Q of the register ff_0 is respectively connected to the first input end of the XOR gate xor_2, the data input end D of the register ff_2, and the input end of the NOT gate inv_0;
[0010] The falling edge data input terminal ddr_in_neg is connected to the second input terminal of the XOR gate xor_1, the output terminal of the XOR gate xor_1 is connected to the control terminal of the selector mux2_1, the first input terminal of the selector mux2_1 is connected to the input terminal of inv_1 and the second input terminal of the XOR gate xor_2, the second input terminal of the selector mux2_1 is connected to the output terminal of the NOT gate inv_1, the output terminal of the selector mux2_1 is connected to the data input terminal D of the register ff_1, and the data output terminal Q of the register ff_1 is respectively connected to the second input terminal of xor_2 and the data input terminal D of the register ff_3;
[0011] The clock input end of the register ff_2 and the clock input end of the register ff_3 are respectively connected to the second-level clock signal end ddr_clk_post; the data output end Q of the register ff_2 is connected to the first input end of the XOR gate xor_3, and the data output end of the register ff_3 is connected to the second input end of the XOR gate xor_3; the output end of the XOR gate xor_3 is connected to the DDR data output end ddr_out.
[0012] In a second aspect, the present application provides an electronic device, comprising the above-mentioned DDR output circuit with a pipeline structure.
[0013] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:
[0014] By performing data transmission on both the rising and falling edges of the clock signal and using a pipeline structure to ensure output synchronization, the efficiency of data transmission, system stability, flexibility, and system complexity are significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 This is the timing diagram of DDR data transmission in the prior art
[0017] Figure 2 is a structural diagram of a pipelined DDR output circuit provided in an embodiment of the present application;
[0018] Figure 3 is a timing diagram of a DDR circuit according to an embodiment of the present application;
[0019] Figure 4 It is a schematic diagram of the delay analysis of the DDR circuit according to the embodiment of the present application. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] See also Figure 2 The present invention provides a schematic diagram of a pipelined DDR output circuit according to an embodiment of the present invention, wherein the pipelined DDR output circuit comprises: a rising edge data generating circuit 20, a falling edge data generating circuit 21 and a DDR generating circuit 22. Each circuit of the present application can be implemented by a digital circuit, an analog circuit or a hybrid circuit.
[0022] Among them, the rising edge data generating circuit 20 includes: a rising edge data input terminal ddr_in_pos, an XOR gate xor_0, an invertor inv_0, a selector mux2_0, a rising edge register ff_0, and an XOR gate xor_2. The falling edge data generating circuit 21 includes: a falling edge data input terminal ddr_in_neg, an XOR gate xor_1, an invertor inv_1, a selector mux2_1, a falling edge register ff_1, and an XOR gate xor_2. The DDR generating circuit 22 includes: a rising edge register ff_2, a falling edge register ff_3, an XOR gate xor_3, and a DDR data output terminal ddr_out. The rising edge data input terminal ddr_in_pos is used to input data at the rising edge of the clock signal, and the falling edge data input terminal ddr_in_neg is used to input data at the falling edge of the clock signal.
[0023] The first input end of the XOR gate xor_0 is connected to the first input end of the XOR gate xor_1 and the output end of the XOR gate xor_2 respectively, and the rising edge data input end ddr_in_pos is connected to the second input end of the XOR gate xor_0; the output end of the XOR gate xor_0 is connected to the control end of the selector mux2_0, the first input end of the selector mux2_0 is connected to the input end of the NOT gate inv_0, the second input end of the selector mux2_0 is connected to the output end of the NOT gate inv_0, the output end of the selector mux2_0 is connected to the data input end of the rising edge register ff_0, the clock input end of the rising edge register ff_0 is connected to the clock input end of the falling edge register ff_1 and the first-level clock signal end respectively; the data output end of the rising edge register ff_0 is connected to the first input end of the XOR gate xor_2, the data input end of the rising edge register ff_2, and the input end of the NOT gate inv_0 respectively;
[0024] The falling edge data input terminal ddr_in_neg is connected to the second input terminal of the XOR gate xor_1, the output terminal of the XOR gate xor_1 is connected to the control terminal of the selector mux2_1, the first input terminal of the selector mux2_1 is connected to the input terminal of the NOT gate inv_1, the second input terminal of the selector mux2_1 is connected to the output terminal of the NOT gate inv_1, the output terminal of the selector mux2_1 is connected to the data input terminal of the falling edge register ff_1, and the data output terminal of the falling edge register ff_1 is respectively connected to the second input terminal of the XOR gate xor_2, the input terminal of the NOT gate inv_1, and the data input terminal of the falling edge register ff_3.
[0025] The clock input end of the rising edge register ff_2 and the clock input end of the falling edge register ff_3 are respectively connected to the second-level clock signal end ddr_clk_post; the data output end of the rising edge register ff_2 is connected to the first input end of the XOR gate xor_3, and the data output end of the falling edge register ff_3 is connected to the second input end of the XOR gate xor_3; the output end of the XOR gate xor_3 is connected to the DDR data output end.
[0026] In an embodiment of the present application, the register ff_0, the register ff_1, the register ff_2 and the register ff_3 are of the same model, which can ensure that the delay parameters of each register are equal or similar, thereby reducing the complexity of debugging.
[0027] In an embodiment of the present application, the XOR gate xor_0, the XOR gate xor_1, the XOR gate xor_2, and the XOR gate xor_3 are packaged in the same device, the NOT gate inv_0 and the NOT gate inv_1 are packaged in the same device, the selector mux2_0 and the selector mux2_1 are packaged in the same device, and the register ff_0, the register ff_1, the register ff_2, and the register ff_3 are packaged in the same device, which can improve the integration of the circuit.
[0028] See also Figure 3 As shown, it is a timing diagram of the DDR output circuit of the pipeline structure of the present application. The timing diagram indicates that the output data is 0x8765, a total of 4 bytes, the low byte and low bit are output first, and the falling edge outputs the data first. When the clock signal ddr_clk falls 1, the outputs of registers ff_0 and ff_1 are 0, the output of the XOR gate xor_2 is 0, data_in_neg needs to output 1, the inputs of the XOR gate xor_1 are 1 and 0, so the output of the XOR gate xor_1 is 1, and the output of register ff_1 is selected by the selector mux2_1 and updated to register ff_1 through the output 1 of the inverter inv_1, that is, ff_1 outputs 1, because ff_0 is still 0, the XOR gate xor_2 outputs 1. When the rising edge 2 of the clock signal ddr_clk is detected, register ff_0 is 0, ff_1 is 1, the output of the XOR gate xor_2 is 1, data_in_pos needs to output 0, the input of the XOR gate xor_0 is 1 and 0, so the output of the XOR gate xor_0 is 1, and the output of the register ff_0 is selected by mux2_0 and updated to the register ff_0 through the output of the inverter inv_0, that is, ff_0 outputs 1. Because ff_0 is 1, the XOR gate xor_2 outputs 0.
[0029] right Figure 2Static timing analysis is performed on the delay of the circuit in: Ideally, the delay from the clock source of the two registers in the second stage of the pipeline to the clock input port of the register is considered equal, that is, Tclk is equal, but in reality it is not equal. After the clock source of the two registers in the second stage of the pipeline reaches the clock input port of the register, the delay of the Q-end output is considered equal, that is, Tclk2q is equal. The delay from the Q output of the two registers in the second stage of the pipeline to ddr_out is also considered equal, that is, Tq2out is equal. There are also two concepts Tsu and Tho. Tsu is the setup time of the register, which is the time that the D end must be stable in advance before the rising edge of the clock reaches the register clock input port. Tho is the hold time of the register, which is the time that the D end must remain stable after the rising edge of the clock reaches the register clock input port. In fact, in the back-end physical implementation, the same type of registers can be considered to have the same Tsu and Tho, and Tclk2q, but the delay from the clock to each register is inconsistent, that is, Tclk is not equal, and there is a certain offset from the clock source to the clock input port of each register, which is generally considered to be Tskew. Therefore, to make the DDR output delay consistent, it is sufficient to have the Tskew and Tq2out of the two data generation registers on the rising and falling edges be equal, because the Tclk2q of the same type of registers is equal.
[0030] See also Figure 4 As shown, Figure 4 This is the first stage of the pipeline structure of this application. Generally, the ddr_in_pos port and ddr_in_neg port are the Q outputs of other registers under the ddr_clk_pre clock. There may be many registers under the same clock. The back-end physical implementation will add clk_buf between the clock source and the clock input port of the register to ensure that the Tskew of all registers is within an acceptable range. This is called clock tree generation. Figure 4 As shown in the figure, there may be n registers, ff_0_0, ff_0_1, ..., ff_0 and ff_1, etc. In the same clock domain, the range of Tskew is generally large. Therefore, it is basically difficult to achieve the above requirement of equal Tskew. In addition, it is necessary to ensure that the output of the double-edge registers to the port is consistent, that is, Tq2out is equal. The back-end physical implementation is generally in Figure 4On path 2, that is, when adding data_buf to the rising-edge output register, data_buf will also be added to the falling-edge output register, ensuring that Tq2out is equal. The problem with this is that there is a common path between path 2 and the D terminal Tsu of the register. Adding data_buf may increase the delay Tlogic of the common path, affecting the Tsu check and creating a vicious cycle. The formula for setup time check is Tskew_l + Tclk2q + Tlogic < Tskew_c + Tcycle - Tsu, where Tskew_l is the clock tree delay of the launch register, Tclk2q is the delay from the clock of the launch register to the Q-terminal output, and Tlogic is the delay of the combinational logic between the launch register and the capture register, that is Figure 4 In path 1, Tskew_c is the clock tree delay of the capture register, Tcycle is the clock period, and Tsu is the setup time of the register.
[0031] To solve the above-mentioned Tskew and Tq2out problems, the present application introduces the second stage of the pipeline structure. In the backend physical implementation, two registers in the second stage are redefined in a ddr_clk_post clock domain. The clock signals input to the ddr_clk_pre and ddr_clk_post ports are in a synchronous clock domain. Since there are only two registers ff_2 and ff_3 in the ddr_clk_post clock domain, the backend physical implementation tool can make Tskew very small and basically consider them equal. At the same time, there is no feedback path from the register to the ddr_out port, which can also solve the Tq2out problem. It realizes consistent delay from the double-edge register to the ddr_out port. The present application transmits data on both the rising edge and the falling edge of the clock signal, and at the same time uses the pipeline structure to ensure output synchronization, that is, to ensure that the data on the rising edge and the falling edge are synchronized to the output port with consistent delay.
[0032] In the embodiment of the present application, by transmitting data on both the rising edge and the falling edge of the clock signal, this technology realizes double the data transmission rate. Compared with the traditional method of transmitting data only on the rising edge or the falling edge of the clock signal, this technology significantly improves the data transmission efficiency, enabling more data to be processed per unit time. Using the design of the pipeline structure, this technology can ensure that the data transmitted on the rising edge and the falling edge of the clock signal have consistent delay when reaching the output port, and this synchronization is crucial for applications that require precise control of the data transmission timing.
[0033] The electronic device provided in the embodiments of the present application includes but is not limited to communication equipment, terminal equipment, computer equipment, etc. In addition to the DDR output circuit of the above-mentioned pipeline structure, the electronic device may also include: a housing for accommodating various components, a display screen and an input device (for example: a keyboard, a mouse or a touch screen), etc.
[0034] The above-described implementation methods do not constitute a limitation on the protection scope of the technical solution. Any modification, equivalent replacement and improvement made within the spirit and principle of the above-described implementation methods shall be included in the protection scope of the technical solution.
Claims
1. A pipeline structure DDR output circuit, characterized in that: include: A rising edge data generating circuit, a falling edge data generating circuit and a DDR generating circuit; The rising edge data generating circuit comprises: a rising edge data input terminal ddr_in_pos, an XOR gate xor_0, an invertor inv_0, a selector mux2_0, a register ff_0, and an XOR gate xor_2; The falling edge data generating circuit comprises: a falling edge data input terminal ddr_in_neg, an XOR gate xor_1, an invertor inv_1, a selector mux2_1, a register ff_1 and the XOR gate xor_2; The DDR generating circuit comprises: a register ff_2, a register ff_3, an XOR gate xor_3 and a DDR data output terminal ddr_out; Wherein, the first input end of the xor_0 is respectively connected to the first input end of the xor_1 and the output end of the xor_2, the rising edge data input end ddr_in_pos is connected to the second input end of the XOR gate xor_0; the output end of the xor_0 is connected to the control end of the mux2_0, the first input end of the mux2_0 is respectively connected to the input end of the inv_0 and the first input end of the XOR gate xor_2, the second input end of the selector mux2_0 is connected to the output end of the NOT gate inv_0, the output end of the mux2_0 is connected to the data input end D of the register ff_0, the clock input end of the register ff_0 is respectively connected to the clock input end D of the register ff_1 and the first-level clock signal end ddr_clk_pre; the data output end Q of the register ff_0 is respectively connected to the first input end of the XOR gate xor_2, the data input end D of the register ff_2, and the input end of the NOT gate inv_0; The falling edge data input terminal ddr_in_neg is connected to the second input terminal of the XOR gate xor_1, the output terminal of the XOR gate xor_1 is connected to the control terminal of the selector mux2_1, the first input terminal of the selector mux2_1 is connected to the input terminal of inv_1 and the second input terminal of the XOR gate xor_2, the second input terminal of the selector mux2_1 is connected to the output terminal of the NOT gate inv_1, the output terminal of the selector mux2_1 is connected to the data input terminal D of the register ff_1, and the data output terminal Q of the register ff_1 is respectively connected to the second input terminal of xor_2 and the data input terminal D of the register ff_3; The clock input end of the register ff_2 and the clock input end of the register ff_3 are respectively connected to the second-level clock signal end ddr_clk_post; the data output end Q of the register ff_2 is connected to the first input end of the XOR gate xor_3, and the data output end of the register ff_3 is connected to the second input end of the XOR gate xor_3; the output end of the XOR gate xor_3 is connected to the DDR data output end ddr_out.
2. The circuit according to claim 1, characterized in that The first-level clock signal terminal is used to input a first-level clock signal, and the second-level clock signal terminal is used to input a second-level clock signal. The first-level clock signal and the second-level clock signal belong to a synchronous clock domain.
3. The circuit according to claim 1 or 2, characterized in that: The register ff_0, the register ff_1, the register ff_2 and the register ff_3 are of the same model.
4. The circuit according to claim 3, characterized in that The XOR gate xor_0, the XOR gate xor_1, the XOR gate xor_2 and the XOR gate xor_3 are encapsulated in the same device, the NOT gate inv_0 and the NOT gate inv_1 are encapsulated in the same device, the selector mux2_0 and the selector mux2_1 are encapsulated in the same device, and the register ff_0, the register ff_1, the register ff_2 and the register ff_3 are encapsulated in the same device.
5. An electronic device, characterized in that: Comprising a circuit as claimed in any one of claims 1 to 4.
