Programmable DDR (Double Data Rate) connecting device based on FPGA (Field Programmable Gate Array)
By designing the soft-core analog circuit unit of the DDR connection device on the FPGA, the lack of flexibility and compatibility of traditional hard-core design is solved, and higher system flexibility and FPGA logic compatibility are achieved.
Patent Information
- Application Number
- CN202323025195.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-08
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2033-11-08
AI Technical Summary
The traditional DDR and DDR controller connection devices adopt a hard-core design, lack flexibility, poor portability, and have poor compatibility with programmable logic in FPGAs.
Design a DDR connection device programmable based on FPGA. By separating the digital logic unit sdram_phy and the improved analog circuit unit phy_io, using FPGA general logic devices to build the soft core design of the simulation unit part, realizing serial-parallel conversion and clock domain switching. Improve system flexibility and compatibility.
It improves the flexibility of the system and compatibility with FPGA programmable logic, making the hard-core DDRC and soft-core phy architectures more flexible and adapt to different application needs.
Smart Images

Figure CN221960538U_ABST
Abstract
Description
Technical Field
[0001] The utility model belongs to the field of FPGA design, and in particular relates to a DDR connection device programmable based on FPGA. Background Art
[0002] With the continuous development of high-performance embedded systems, the application of DDR (Double Data Rate) is becoming more and more common. Double Data Rate Synchronous Dynamic Random Access Memory DDR is also increasingly used in FPGA (Field Programmable Gate Array) design.
[0003] However, the traditional connection device between DDR and DDR controller adopts a hard-core design, which lacks flexibility, has poor portability, and has poor compatibility with the programmable logic in the FPGA. Utility Model Content
[0004] In order to solve the above problems existing in the prior art, the utility model provides a DDR connection device programmable based on FPGA. The technical problem to be solved by the utility model is achieved through the following technical solutions:
[0005] A DDR connection device programmable based on FPGA, comprising:
[0006] The controller DDRC, DFI interface, digital logic unit sdram_phy, and improved analog circuit unit phy_io for the target DDR; wherein,
[0007] The controller DDRC for the target DDR is connected to the digital logic unit sdram_phy through the DFI interface; the controller DDRC for the target DDR is used to convert a user command into a serial control signal, and transmit the serial control signal to the digital logic unit sdram_phy through the DFI interface;
[0008] The improved analog circuit unit phy_io includes: a clock module, an improved IOL and an improved IOB; the clock module provides a clock signal for the DDR connection device;
[0009] The digital logic unit sdram_phy is connected to the improved IOL, and the digital logic unit sdram_phy is used to convert the received serial control signal into a parallel response signal, and transmit the parallel response signal to the improved analog circuit unit phy_io;
[0010] The improved IOL is connected to the improved IOB, and the improved IOL is used to perform serial-to-parallel conversion and single-edge double-edge conversion of data;
[0011] The improved IOB is connected to the target DDR, and the improved IOB is used to perform information exchange with the target DDR.
[0012] Preferably, the digital logic unit sdram_phy comprises:
[0013] Initialization logic INIT, read training logic RT, read equalization logic RL, write equalization logic WL and command data selection logic.
[0014] Preferably, the digital logic unit sdram_phy is also used to control the normal enabling of the target DDR; adjust the read / write signals and the sampling signals, and control the normal operation of the read / write data path.
[0015] The clock module includes a pll circuit, a dll circuit and a frequency division circuit; among them,
[0016] The pll circuit generates an eclk clock according to an external reference clock refclk;
[0017] The frequency division circuit is used to generate an sclk clock according to the eclk clock;
[0018] The dll circuit is used to generate a 90° phase-shifted code according to the eclk clock, and send the 90° phase-shifted code to the improved IOL.
[0019] Preferably, the improved IOL comprises:
[0020] Input module input, control module DQSBUF, output module output and delay module io delay; among them,
[0021] The first input terminal of the input module input is connected to the first output terminal of the DQSBUF module, the second input terminal of the input module input is connected to the second output terminal of the delay module io delay, and the output terminal of the input module input is connected to the first input terminal of the digital logic unit sdram_phy;
[0022] The first input end of the control module DQSBUF is connected to the second output end of the digital logic unit sdram_phy, the second input end of the control module DQSBUF is connected to the clock module, the third input end of the control module DQSBUF is connected to the first output end of the delay module io delay, and the second output end of the control module DQSBUF is connected to the third input end of the output module output;
[0023] The first input terminal of the output module output is connected to the clock module, the second input terminal of the output module output is connected to the first output terminal of the digital logic unit sdram_phy, and the output terminal of the output module output is connected to the improved IOB;
[0024] An input end of the delay module io delay is connected to the improved IOB.
[0025] Preferably, the input module input comprises an edge detection module edgemon and a serial-to-parallel circuit module iDDR.
[0026] Preferably, the output module output module includes:
[0027] dqs tri out module, dqs out module, dq tri out module, dq out module, dm out module and cmd module; wherein,
[0028] The dqs tri out module is used to receive a first group of parallel response signals output from the digital logic unit sdram_phy, convert the received first group of parallel response signals into a first group of serial signals, and send the first group of serial signals to the T input terminal of the improved IOB;
[0029] The dqs out module is used to receive the second group of parallel response signals output from the digital logic unit sdram_phy, convert the received second group of parallel response signals into a second group of serial signals, and send the second group of serial signals to the I input terminal of the improved IOB;
[0030] The dq tri out module is used to receive the third group of parallel response signals output from the digital logic unit sdram_phy, convert the received third group of parallel response signals into a third group of serial signals, and send the third group of serial signals to the T input terminal of the improved IOB;
[0031] The dq out module is used to receive the fourth group of parallel response signals output from the digital logic unit sdram_phy, convert the received fourth group of parallel response signals into a fourth group of serial signals, and send the fourth group of serial signals to the I input terminal of the improved IOB;
[0032] The structure of the dm out module is the same as that of the dq out module, and is used to output the flag bit of the 8-bit data mask;
[0033] The CMD module is used to receive the fifth group of parallel response signals output from the digital logic unit sdram_phy, convert the received fifth group of parallel response signals into a fifth group of serial signals, and send the fifth group of serial signals to the I input terminal of the improved IOB.
[0034] Preferably, the circuit connection relationship of the improved IOB includes:
[0035] The T input terminal of the improved IOB is connected to the first output terminal of the output module, the I input terminal of the improved IOB is connected to the second output terminal of the output module, the O output terminal of the improved IOB is connected to the input terminal of the delay module io delay, and the bidirectional port B of the improved IOB is connected to the target DDR.
[0036] Beneficial effects of the utility model:
[0037] In the solution provided by the embodiment of the utility model, the digital logic unit sdram_phy and the improved analog circuit unit phy_io in phy (Port Physical Layer) are separated, and the improved analog circuit unit phy_io is constructed with FPGA general logic devices to realize the soft core design of the analog unit part. By improving the soft core design, the architecture of the hard core DDRC and soft core phy adopted is made more flexible, which improves the flexibility of the system and also makes it more compatible with the programmable logic in the FPGA. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A schematic diagram of a DDR connection device programmable based on FPGA provided by an embodiment of the utility model;
[0039] Figure 2 A schematic diagram of the structure of a DDR connection device programmable based on FPGA provided by an embodiment of the utility model;
[0040] Figure 3A schematic diagram of a command transmission structure of a DDR connection device programmable based on FPGA provided by an embodiment of the utility model;
[0041] Figure 4 A schematic diagram of the structure of a FPGA-programmable DDR connection device in a read state provided by an embodiment of the utility model;
[0042] Figure 5 The present invention is a schematic structural diagram of an FPGA-programmable DDR connection device in a write state provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the utility model to clearly and completely describe the technical solutions in the embodiments of the utility model. Obviously, the described embodiments are only part of the embodiments of the utility model, not all of the embodiments. Based on the embodiments in the utility model, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the utility model.
[0044] Embodiment 1
[0045] A DDR connection device programmable based on FPGA, such as Figure 1 As shown, including:
[0046] The controller DDRC, DFI interface (Digital Facility Interface), digital logic unit sdram_phy, and improved analog circuit unit phy_io of the target DDR; wherein,
[0047] The controller DDRC for the target DDR is connected to the digital logic unit sdram_phy through the DFI interface; the controller DDRC for the target DDR is used to convert the user command into a serial control signal, and transmit the serial control signal to the digital logic unit sdram_phy through the DFI interface;
[0048] The improved analog circuit unit phy_io includes: a clock module, an improved IOL and an improved IOB; the clock module provides a clock signal for a DDR connection device;
[0049] The digital logic unit sdram_phy is connected to the improved IOL, and the digital logic unit sdram_phy is used to convert the received serial control signal into a parallel response signal, and transmit the parallel response signal to the improved analog circuit unit phy_io;
[0050] The improved IOL is connected to the improved IOB, and the improved IOL is used for performing serial-to-parallel conversion and single-edge and double-edge conversion of data;
[0051] The improved IOB is connected to the target DDR, and the improved IOB is used to perform information exchange with the target DDR.
[0052] The embodiment of the utility model separates the digital logic unit sdram_phy and the improved analog circuit unit phy_io in phy, builds the improved analog circuit unit phy_io with FPGA general logic devices, and has built-in delay units, serial-to-parallel conversion logic and clock modules to realize the soft core design of the analog unit part.
[0053] For ease of understanding, each module of the DDR connection device is introduced below.
[0054] DDRC controller for target DDR
[0055] The controller DDRC (Double Data Rate Controller) for the target DDR converts the received user commands into serial control signals: CS, RAS, CAS and WE signals, and transmits them to the digital logic unit sdram_phy through the standard DFI interface.
[0056] DFI Interface
[0057] The DFI interface is a common interface between the controller DDRC and the phy for the target DDR. For the parameters of the interface, please refer to the prior art.
[0058] Digital logic unit sdram_phy
[0059] The digital logic unit sdram_phy only includes digital logic. Specifically, the digital logic unit sdram_phy, see Figure 2 The sdram_phy section includes:
[0060] Initialization logic INIT (initialization), read training logic RT (Read Training), read equalization logic RL (Read Leveling), write equalization logic WL (Write Leveling) and command data selection logic.
[0061] The digital logic unit sdram_phy is also used to control the normal enabling of the target DDR; adjust the read and write signals and sampling signals, and control the normal operation of the read and write data paths.
[0062] The digital logic unit controls the normal activation of the target DDR through the initialization logic INIT; adjusts the value of the internal delay chain of the improved IOL through the reading training logic RT, the read equalization logic RL and the write equalization logic WL, thereby adjusting the read and write signals and the sampling signals to control the normal operation of the read and write data paths; and converts the received serial control signal into a parallel response signal through the command data selection logic.
[0063] For command transmission of DDR connection devices, please refer to Figure 3 , the digital logic unit sdram_phy performs data selection and control signal selection according to the specific read and write delay values. The sclk clock is 4 times the eclk clock, and the serial control signals such as cs_n, ras_n, cas_n, we_n, dq_tri, dqs_tri, dqs_out from DFI are converted into parallel response signals cs_da, cs_db, cs_dc, cs_dd, etc. (taking this as an example, other signals are the same) and sent to the improved analog circuit unit phy_io, which correspond to the four cycles of the eclk clock respectively, so as to achieve the precise control of clock domain switching and command delay.
[0064] The first input terminal of sdram_phy is used to receive the read data from the improved analog circuit unit phy_io, the datavalid signal indicating that the read data is valid, and the rd_data signal related to the read training logic RT and the read equalization logic RL.
[0065] The second input terminal of sdram_phy is used to receive the clock signal output by the clock module.
[0066] Improved analog circuit unit phy_io
[0067] The improved analog circuit unit phy_io includes: a clock module, an improved IOL and an improved IOB.
[0068] Specifically, the clock module includes a pll circuit, a dll circuit and a frequency division circuit; wherein,
[0069] The pll circuit generates the eclk clock based on the external reference clock refclk;
[0070] The frequency division circuit is used to generate the sclk clock according to the eclk clock;
[0071] The dll circuit is used to generate a 90° phase-shifted code according to the eclk clock and send the 90° phase-shifted code to the improved IOL.
[0072] The clock module sends the generated sclk clock to the controller DDRC for the target DDR, so that the working clock of the controller DDRC for the target DDR is the sclk clock.
[0073] The frequency division circuit generates a 4-frequency sclk clock based on the eclk clock.
[0074] The clock module sends the generated eclk clock and sclk clock to the improved IOL.
[0075] For more information, see Improved IOL Figure 2 The improved IOL part includes:
[0076] Input module input, control module DQSBUF, output module output and delay module io delay; among them,
[0077] The first input terminal of the input module input is connected to the first output terminal of the control module DQSBUF, the second input terminal of the input module input is connected to the second output terminal of the delay module io delay, and the output terminal of the input module input is connected to the first input terminal of the digital logic unit sdram_phy;
[0078] A first input terminal of the control module DQSBUF is connected to a second output terminal of the digital logic unit sdram_phy, a second input terminal of the control module DQSBUF is connected to the clock module, a third input terminal of the control module DQSBUF is connected to a first output terminal of the delay module io delay, and a second output terminal of the control module DQSBUF is connected to a third input terminal of the output module output;
[0079] A first input terminal of the output module output is connected to the clock module, a second input terminal of the output module output is connected to a first output terminal of the digital logic unit sdram_phy, and an output terminal of the output module output is connected to the improved IOB;
[0080] The input end of the delay module io delay is connected to the improved IOB.
[0081] The improved IOL is used for serial-to-parallel conversion and single-edge-to-double-edge conversion of data.
[0082] The input module input includes an edge detection module edgemon and a serial-to-parallel circuit module iDDR.
[0083] The input module input is used to receive the delayed dq signal output by the delay module io delay, the dqsr90 signal, rdpntr signal, wrpntr signal output by the control module DQSBUF, and the eclk signal and sclk signal output by the clock module. And it generates the corresponding datavalid signal according to the delay of the read data.
[0084] The control module DQSBUF receives the read, readclksel, rdloadn, rd_move, rd_dir and other signals output from the read equalization logic RL and the reading training logic RT in the digital logic unit sdram_phy to adjust the delay value of dqsr90, the wrloadn, wr_move, wr_dir signals are used to adjust the delay value of dqsw270, and the rdloadn, rd_move, rd_dir signals are used to control the direction of the dqsr90 delay to increase or decrease the delay. When Readclksel changes, the control module DQSBUF will detect whether the read_ena generated by read covers the valid area of DQS. And generate a corresponding feedback signal to send to the digital logic unit sdram_phy.
[0085] Output module output, see Figure 2 The output part includes:
[0086] dqs tri out module, dqs out module, dq tri out module, dq out module, dm out module and cmd module; wherein,
[0087] The dqs tri out module is used to receive a first group of parallel response signals outputted from the digital logic unit sdram_phy, convert the received first group of parallel response signals into a first group of serial signals, and send the first group of serial signals to the T input terminal of the improved IOB;
[0088] The dqs out module is used to receive the second group of parallel response signals outputted from the digital logic unit sdram_phy, convert the received second group of parallel response signals into a second group of serial signals, and send the second group of serial signals to the I input terminal of the improved IOB;
[0089] The dq tri out module is used for receiving the third group of parallel response signals outputted from the digital logic unit sdram_phy, converting the received third group of parallel response signals into a third group of serial signals, and sending the third group of serial signals to the T input terminal of the improved IOB;
[0090] The dq out module is used for receiving the fourth group of parallel response signals outputted from the digital logic unit sdram_phy, converting the received fourth group of parallel response signals into a fourth group of serial signals, and sending the fourth group of serial signals to the I input terminal of the improved IOB;
[0091] The structure of the DM out module is the same as that of the DQ out module, and is used to output the flag bit of the 8-bit data mask;
[0092] The CMD module is used for receiving the fifth group of parallel response signals outputted from the digital logic unit sdram_phy, converting the received fifth group of parallel response signals into a fifth group of serial signals, and sending the fifth group of serial signals to the I input terminal of the improved IOB.
[0093] The specific functions of each module are as follows:
[0094] dqs tri out module: receives the parallel dqs_tri_da, dqs_tri_db, dqs_tri_dc, dqs_tri_dd signals from the digital logic unit sdram_phy and the DQSW clock domain output by the control module DQSBUF. The parallel signal under the sclk clock is converted into a serial signal under the eclk clock across the clock domain and output in the DQSW clock domain. This serial signal is sent to the T input of the improved IOB as the enable of z in the dqs tri-state signal.
[0095] dqs out module: receives the parallel dqsout_da, dqsout_db, dqsout_dc, dqs_dd signals output from the digital logic unit sdram_phy and the dqsw output from the control module DQSBUF. Because the serial signal of dqs is always in the form of alternating 0 and 1, dqsout is inserted into the middle of the four 0 signals, and the dqs signal can be obtained through parallel-to-serial conversion. Similarly, the parallel signal under the sclk clock is converted into a serial signal under the eclk clock across the clock domain, and output in the DQSW clock domain, but it must be inverted with DQSW, so that dqs and dq have a 90-degree phase difference to ensure the correctness of DDR sampling and writing data.
[0096] dq tri out module: receives the parallel dq_tri_da, dq_tri_db, dq_tri_dc, dq_tri_dd signals from the digital logic unit sdram_phy and the DQSW270 clock domain output by the control module DQSBUF. The parallel signal under the sclk clock is converted into a serial signal under the eclk clock across the clock domain and output in the DQSW270 clock domain. This serial signal is sent to the T input of the improved IOB as the enable of z in the dq tri-state signal.
[0097] DQ out module: receives the parallel write data wr_data (one DQ out receives 8 bits) output from the digital logic unit sdram_phy and converts the parallel signal under the sclk clock into a serial signal under the eclk clock across the clock domain, and outputs it in the DQSW270 clock domain. The output serial data is the burst length of a dq channel, so the input parallel data corresponds to the 4 rising edge data and 4 falling edge data of the dqs after parallel-to-serial conversion. According to the data width, the number of this module can be increased or decreased to achieve the purpose of changing the bit width.
[0098] DM out module: The DM out module is exactly the same as the DQ out module, except that the input data becomes 8-bit DM, which corresponds to 8 cycles of DQ, respectively, which is the flag of the data mask.
[0099] CMD module: receives the parallel cs_da, cs_db, cs_dc, cs_dd signals output from the digital logic unit sdram_phy (taking this as an example, other signals have the same structure except for different inputs), and receives the sclk clock and eclk clock from the clock module. The internal serial-to-parallel circuit converts the parallel signals under the sclk clock into serial signals under the eclk clock across the clock domain.
[0100] The command transmission structure in the DDR connection device is as follows Figure 3As shown, the cas_da, cas_db, cas_dc, and cas_dd signals are parallel cas response signals generated by the digital logic unit sdram_phy under the sclk clock, and the CMD module has a serial-to-parallel circuit inside. The clock frequency of sclk is four times that of eclk. The parallel response signal is transmitted to the improved analog circuit unit phy_io in the eclk clock domain, which requires 4 eclk acquisitions, corresponding to the four control signals cas_da, cas_db, cas_dc, and cas_dd, respectively, so that the control signal can be accurately acquired and output in eclk. Then, the cas parallel signal under the SCLK clock is converted into the cas_n serial signal under the eclk through the CMD module, and transmitted to the DDR through the improved IOB. Other control signals are basically the same, including the clock signal, which is also output under the eclk clock domain. Therefore, the function of the improved analog circuit unit phy_io as a soft core is mainly to convert the parallel signal of DDRC and the serial signal of DDR to each other, and convert them to the corresponding clock domain, and then output or input through the IOB interface.
[0101] The delay module io delay is used to receive the dq and dqs signals from the improved IOB output.
[0102] For the circuit connection relationship of the improved IOB, see Figure 2 The IOB part includes:
[0103] The T input terminal of the improved IOB is connected to the first output terminal of the output module, the I input terminal of the improved IOB is connected to the second output terminal of the output module, the O output terminal of the improved IOB is connected to the input terminal of the delay module io delay, and the bidirectional port B of the improved IOB is connected to the target DDR.
[0104] The improved IOB is actually a plurality of tri-state gates or buffers. When writing, it receives the serial signal from the output module output, transmits the tri-state signal through the tri-state gate, and inputs other signals from the I input terminal. Then it outputs to the target DDR through the bidirectional port B, or outputs to the control module DQSBUF from the O output terminal. When reading, it receives the read data and dqs signal from the target DDR, and then outputs to the control module DQSBUF through the O output terminal.
[0105] The embodiment of the utility model utilizes the controller DDRC for the target DDR, the DFI interface, the digital logic unit sdram_phy, and the improved analog circuit unit phy_io to form a DDR connection device programmable based on FPGA. By separating the digital logic unit sdram_phy and the improved analog circuit unit phy_io in phy, the improved analog circuit unit phy_io is constructed with FPGA general logic devices to realize the soft core design of the analog unit part. Among them, the soft core refers to the functional block described by the hardware description language such as VHDL, which has the advantages of short design cycle, low design investment and flexible layout and wiring. It effectively makes up for the lack of flexibility and poor portability brought about by the use of pure hard core design.
[0106] Example 2
[0107] When the DDR connected device reads data from the target DDR, see Figure 4 , the specific reading process is as follows:
[0108] ① The dq and dqs in the target DDR enter through the bidirectional port B of the improved IOB. The T input is a three-state control signal (from dq tri out or dqs tri out). It is output from the O output to the delay module io delay. The delayed dq and dqs are transmitted to the input module input through the delay module io delay. The delay module io delay delays the dq input of the target DDR according to the delay value adjusted by the digital logic unit sdram_phy. The clock module contains a dll circuit, a pll circuit and a frequency division circuit. The frequency division circuit is used to generate a 4-frequency clock sclk through eclk. sclk is the internal clock of the controller DDRC for the target DDR. The dll circuit can generate a 90-degree phase shift code based on the eclk clock.
[0109] ② The control module DQSBUF generates dqsr90 for collecting dq according to the dqsin signal output by the delay module io delay, which delays the phase by 90 degrees (the phase shift code comes from the clock module). And according to the collected path of dq, it outputs the datavalid signal in the sclk clock domain, indicating that the read_data output to the digital logic unit sdram_phy is valid.
[0110] ③ Taking dq[0] as an example, ddrin[0] is the delayed dq[0]. There is an asynchronous fifo in the edge detection module edgemon in the input module input, which stores the dqrin[0] data collected by the rising and falling edges of dqsr90. Then iddr reads the single-edge data stored in the fifo, and converts the serial data ddrin[0] into parallel data read_data through the serial-to-parallel logic in the eclk clock domain, and converts it to the sclk clock domain, so that read_data can operate in the sclk clock domain of the controller DDRC for the target DDR. The dqs of the read data has 4 rising edges and 4 falling edges.
[0111] Therefore, each dq can be collected into 8-bit data. Figure 4 Where n is the number of dq channels. At the same time, in the process of reading the equalization logic RL, the distance between the dq edge and the dqsr90 edge can be monitored to generate the corresponding edge_plus and edge_minus flag signals. When edge_plus and edge_minus are pulled high, they will be fed back to the read equalization logic RL in the digital logic unit sdram_phy, indicating that there is a risk of not being able to collect dq at this time, and the delay should be increased or decreased. The process of reading data from the target DDR is completed through the above process.
[0112] Example 3
[0113] When the DDR connected device writes data to the target DDR, see Figure 5 , the specific writing process is as follows:
[0114] ① The control module DQSBUF generates the DQSW clock domain and the DQSW270 clock domain according to the eclk clock. The DQSW270 clock domain is generated by the DQSW clock domain with a phase shift of 270 degrees.
[0115] ②dqs out, in the DQSW clock domain, converts the parallel data dqs from the digital logic unit sdram_phy into serial data and outputs it to the I input of the tri-state gate IOBB. dqs tri out, in the DQSW clock domain, converts the parallel data dqs_tri from the digital logic unit sdram_phy into serial data and outputs it to the T control end of the tri-state gate. dq out, in the DQSW270 clock domain, converts the parallel write data wr_data into serial data and transmits it to the I input of the tri-state gate. dq triout, in the DQSW270 clock domain, converts the parallel data dq_tri into serial data and transmits it to the T control end of the tri-state gate.
[0116] ③ The B end of the tri-state gate is a bidirectional port, the I end is the input end, the T end is the z-state control port, and the O end is a two-state output end. The tri-state gate can output the z-state at the B end when the T end is pulled low. When the T end is pulled high, the input dqs of the I end is output to the B end and the O end. The B end is connected to the bidirectional port dq or dqs of the target DDR, and dq and dqs are input to the target DDR. The O end is a two-state output end, connected to the input end of the control module DQSBUF, and is used as a dq input during the reading process.
[0117] The above modules actually use parallel-to-serial logic to convert parallel signals into serial signals required by DDR in the DQSW clock domain or DQSW270 clock domain, and then convert the dqs and dq signals when not reading or writing to z state (high impedance state) through the tri-state gate when outputting. Other control signals, such as ADDR, BA, CAS_n, RAS_n, WE_n, CS_n, CKE, and ODT, are also converted into serial signals by the parallel-to-serial module under the eclk clock and then output to DDR through the improved IOB.
[0118] In the solution provided by the embodiment of the utility model, the digital logic unit sdram_phy and the improved analog circuit unit phy_io in phy are separated, and the improved analog circuit unit phy_io is constructed with FPGA general logic devices to realize the soft core design of the analog unit part. By improving the soft core design, the architecture of the hard core DDRC and soft core phy adopted is made more flexible, which improves the flexibility of the system and also makes it more compatible with the programmable logic in the FPGA.
[0119] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0120] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0121] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A DDR connection device programmable based on FPGA, characterized in that: include: The controller DDRC, DFI interface, digital logic unit sdram_phy, and improved analog circuit unit phy_io for the target DDR; wherein, The controller DDRC for the target DDR is connected to the digital logic unit sdram_phy through the DFI interface; the controller DDRC for the target DDR is used to convert a user command into a serial control signal, and transmit the serial control signal to the digital logic unit sdram_phy through the DFI interface; The improved analog circuit unit phy_io includes: a clock module, an improved IOL and an improved IOB; the clock module provides a clock signal for the DDR connection device; The digital logic unit sdram_phy is connected to the improved IOL, and the digital logic unit sdram_phy is used to convert the received serial control signal into a parallel response signal, and transmit the parallel response signal to the improved analog circuit unit phy_io; The improved IOL is connected to the improved IOB, and the improved IOL is used to perform serial-to-parallel conversion and single-edge double-edge conversion of data; The improved IOB is connected to the target DDR, and the improved IOB is used to perform information exchange with the target DDR.
2. The FPGA-programmable DDR connection device according to claim 1, characterized in that: The digital logic unit sdram_phy comprises: Initialization logic INIT, read training logic RT, read equalization logic RL, write equalization logic WL and command data selection logic.
3. The FPGA-programmable DDR connection device according to claim 2, characterized in that: The digital logic unit sdram_phy is also used to control the normal enabling of the target DDR; adjust the read / write signal and the sampling signal, and control the normal operation of the read / write data path.
4. The FPGA-programmable DDR connection device according to claim 3, characterized in that: The clock module includes a pll circuit, a dll circuit and a frequency division circuit; wherein, The pll circuit generates an eclk clock according to an external reference clock refclk; The frequency division circuit is used to generate an sclk clock according to the eclk clock; The dll circuit is used to generate a 90° phase-shifted code according to the eclk clock, and send the 90° phase-shifted code to the improved IOL.
5. The FPGA-programmable DDR connection device according to claim 4, characterized in that: The improved IOL comprises: Input module input, control module DQSBUF, output module output and delay module io delay; among them, The first input terminal of the input module input is connected to the first output terminal of the control module DQSBUF, the second input terminal of the input module input is connected to the second output terminal of the delay module io delay, and the output terminal of the input module input is connected to the first input terminal of the digital logic unit sdram_phy; The first input end of the control module DQSBUF is connected to the second output end of the digital logic unit sdram_phy, the second input end of the control module DQSBUF is connected to the clock module, the third input end of the control module DQSBUF is connected to the first output end of the delay module io delay, and the second output end of the control module DQSBUF is connected to the third input end of the output module output; The first input terminal of the output module output is connected to the clock module, the second input terminal of the output module output is connected to the first output terminal of the digital logic unit sdram_phy, and the output terminal of the output module output is connected to the improved IOB; An input end of the delay module io delay is connected to the improved IOB.
6. The FPGA-programmable DDR connection device according to claim 5, characterized in that: The input module input comprises an edge detection module edgemon and a serial-to-parallel circuit module iDDR.
7. The FPGA-programmable DDR connection device according to claim 6, characterized in that: The output module output module includes: dqs triout module, dqs out module, dq triout module, dq out module, dm out module and cmd module; wherein, The dqs tri out module is used to receive a first group of parallel response signals output from the digital logic unit sdram_phy, convert the received first group of parallel response signals into a first group of serial signals, and send the first group of serial signals to the T input terminal of the improved IOB; The dqs out module is used to receive the second group of parallel response signals output from the digital logic unit sdram_phy, convert the received second group of parallel response signals into a second group of serial signals, and send the second group of serial signals to the I input terminal of the improved IOB; The dq tri out module is used to receive the third group of parallel response signals output from the digital logic unit sdram_phy, convert the received third group of parallel response signals into a third group of serial signals, and send the third group of serial signals to the T input terminal of the improved IOB; The dq out module is used to receive the fourth group of parallel response signals output from the digital logic unit sdram_phy, convert the received fourth group of parallel response signals into a fourth group of serial signals, and send the fourth group of serial signals to the I input terminal of the improved IOB; The structure of the dm out module is the same as that of the dq out module, and is used to output the flag bit of the 8-bit data mask; The CMD module is used to receive the fifth group of parallel response signals output from the digital logic unit sdram_phy, convert the received fifth group of parallel response signals into a fifth group of serial signals, and send the fifth group of serial signals to the I input terminal of the improved IOB.
8. The FPGA-programmable DDR connection device according to claim 7, characterized in that: The circuit connection relationship of the improved IOB includes: The T input terminal of the improved IOB is connected to the first output terminal of the output module, the I input terminal of the improved IOB is connected to the second output terminal of the output module, the O output terminal of the improved IOB is connected to the input terminal of the delay module iodelay, and the bidirectional port B of the improved IOB is connected to the target DDR.
