Asynchronous PCIE interface verification module and method based on FPGA
By designing an asynchronous PCIE interface verification module on the FPGA platform, using asynchronous FIFO, bit width conversion and clock conversion modules, the data bit width mismatch and timing problems between the PCIE interface control module and the physical media layer are solved, and the data bit width mismatch and timing problems are achieved. The layout and wiring on the two FPGAs improves chip verification efficiency and IP multiplexing rate.
Patent Information
- Application Number
- CN202411312940.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-09-20
AI Technical Summary
The effective data bit width between the PCIE interface control module on the FPGA platform does not match the physical media layer, and the synchronization signal cannot meet the timing requirements of FPGA sharding, resulting in insufficient resources when the design is too large and the layout and wiring on the two FPGAs cannot be laid out.
Design an asynchronous PCIE interface verification module based on FPGA. Through the asynchronous FIFO control module, bit width conversion module and clock conversion module, asynchronous logic is realized, and the data bit width and timing problems are solved, so that data can be effective between two FPGAs. transmission.
The data bit width matching between the PCIE interface control module and the FPGA platform interface is realized, which meets the timing requirements of FPGA sharding, improves chip verification efficiency and IP multiplexing rate, and solves the problem of insufficient resources.
Smart Images

Figure CN118821689B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of chip verification technology, and in particular to an FPGA prototype verification technology for IP multiplexing, and in particular to an asynchronous PCIE interface verification module and method based on FPGA. Background Art
[0002] As the complexity of chip design increases, the steps and processes involved in successfully designing a chip are becoming more complex, and the funds and time required are also increasing exponentially. Before the chip is manufactured, a lot of energy will be spent on RTL code verification. In addition, related software development work will also begin before the chip is obtained. Both aspects require the use of FPGA prototypes to simulate the behavior of the chip, helping hardware developers and software developers to jointly improve work efficiency.
[0003] FPGA prototype verification is the mainstream and mature chip verification method for current prototype verification. It verifies the functions of ASIC by transplanting RTL to field programmable gate array (FPGA). After the basic functions of the chip are verified, driver development can begin. Driver and application development can be carried out until the chip is Tape Out and returned.
[0004] Since software typically accounts for more than half of the design effort, the FPGA implementation of the SoC RTL can also be used as a basis for software development, hardware / software co-verification, and software verification, all before the final silicon chip is available. All of these factors help reduce design costs and shorten time to market with reduced risk of re-spinning. For example, software that has been extensively verified on an FPGA prototype should be easier to combine with the first piece of silicon from the foundry. The FPGA prototype can also be used to set up any possible post-silicon debug paths.
[0005] PCIE is a common bus interface, and its effective data bit width is generally 32 bits, while the effective bit width of the PCIE physical media layer interface on the FPGA platform is 16 bits, so it cannot be directly instantiated and used. In addition, the signals between the PCIE controller and the physical media layer are generally synchronous signals. If the design is too large and needs to be laid out and routed on two FPGAs, the synchronous signal cannot meet the timing requirements of the FPGA slices. Summary of the invention
[0006] The purpose of the present invention is to provide an asynchronous PCIE interface verification module and method based on FPGA. The present invention not only solves the problem of effective bit width mismatch between the PCIE interface control module and the PCIE physical media layer of the FPGA platform, but also adds asynchronous logic between the PCIE controller and the physical media layer, thereby meeting the timing requirements of FPGA slicing, enabling it to be laid out and wired on two FPGAs, solving the problem of insufficient resources of one FPGA due to over-large design, and improving chip verification efficiency and IP reuse rate.
[0007] In order to solve the above technical problems, the present invention provides an asynchronous PCIE interface verification module based on FPGA, comprising:
[0008] A transmission path, in which the asynchronous FIFO control module writes the asynchronous data sent by the PCIE interface control module into the asynchronous FIFO module, the asynchronous FIFO module synchronizes the asynchronous data to the PCIE_PHY module clock domain, and then sends the data to the bit width conversion module, the bit width conversion module sends the converted data to the PCIE_PHY module for serialization, and finally transmits the serialized data to the Serdes transmission TX differential path of the PCIE_PHY module;
[0009] A receiving path, in which the clock conversion module drives the PCIE_PHY module to initialize, the PCIE_PHY module deserializes the serial data on the Serdes receiving RX differential path, and sends it to the bit width conversion module, the bit width conversion module writes the converted data into the asynchronous FIFO module under the control of the asynchronous FIFO control module, and the asynchronous FIFO module synchronizes the asynchronous data to the PCIE interface control module clock domain and sends it to the PCIE interface control module;
[0010] Wherein, the asynchronous FIFO control module is used to control the read and write timing of the asynchronous FIFO module; when the FIFO_Full signal of the asynchronous FIFO module is at a low level, the asynchronous FIFO control module pulls up the FIFO_Write signal, otherwise it pulls down; when the FIFO_Empty signal of the asynchronous FIFO module is at a low level, the asynchronous FIFO control module pulls up the FIFO_Read signal, otherwise it pulls down;
[0011] The bit width conversion module is used to convert the 62.5Mhz, 32-bit effective bit data of the PCIE interface control module and the 125Mhz, 16-bit effective bit data of the PCIE_PHY module.
[0012] Preferably, a global clock management module is also included, which serves as the internal logic of the FPGA platform and is used to generate four asynchronous master clocks to drive the PCIE interface control module.
[0013] Preferably, the PCIE interface control module is used to load and parse the high-speed data protocol.
[0014] Preferably, the clock conversion module is used to divide and process the reference clock to drive the PCIE_PHY module.
[0015] Preferably, the clock conversion module includes: a differential input buffer IBUF_DS and a global clock buffer BUFG_GT; wherein a pair of differential clocks Refclk with a frequency of 100Mhz respectively output a Sys_clk_gt clock signal and a Sys_clk clock signal after passing through the differential input buffer IBUF_DS, and the Sys_clk_gt clock signal is used to drive the PCIE_PHY module; the Sys_clk clock signal outputs a Sys_clk_bufg signal after passing through the global clock buffer BUFG_GT, and the Sys_clk_bufg signal is used to drive the PCIE_PHY module.
[0016] Preferably, the specific process of the bit width conversion module converting the valid bit data between the PCIE interface control module and the PCIE_PHY module comprises:
[0017] The PCIE_PHY module sends the 125Mhz Pipe_clk to the bit width conversion module, and generates a 62.5Mhz clock Pipe_clk62.5 after dividing by two.
[0018] In the transmission path, the PCIE interface control module sends 256 bits of parallel data phy_txdata, 64 bits per lane, and the lower 32 bits of data are valid; the 32 bits of data converted by the asynchronous FIFO module are aligned with Pipe_clk62.5, and the high 16 bits and low 16 bits of data of 32 bits are split into two groups of data respectively. In one Pipe_clk62.5 cycle, the rising edge sends the high 16 bits of data, and the falling edge sends the low 16 bits of data to the PCIE_PHY module;
[0019] The valid signal phy_txdatak of the PCIE interface control module for sending data is 16 bits, 4 bits per lane; the upper two bits and lower two bits of data of 4 bits are split into two groups of data respectively. In one Pipe_clk62.5 cycle, the upper two bits of data are sent on the rising edge, and the lower two bits of data are sent on the falling edge to the PCIE_PHY module;
[0020] To ensure data alignment, the remaining TX control signals are sent to the PCIE_PHY module with two beats at the Pipe_clk62.5 clock.
[0021] In the receiving path, the parallel data phy_rxdata after deserialization by the PCIE_PHY module is 128 bits, 32 bits per lane, and the lower 16 bits of data are valid; within two Pipe_clk62.5 cycles, two groups of 16 bits of data are sent, and the two groups of 16 bits of data are assembled into a group of 32 bits of data and sent to the asynchronous FIFO module under the drive of the Gclk clock;
[0022] After the PCIE_PHY module deserializes, the valid data signal phy_rxdatak is 8 bits, 2 bits per lane; within two Pipe_clk62.5 cycles, two groups of 2 bits of data are sent, and the two groups of 2 bits of data are assembled into a group of 4 bits of data and sent to the asynchronous FIFO module under the drive of the Gclk clock.
[0023] The present invention also provides an FPGA-based asynchronous PCIE interface verification method, which uses the FPGA-based asynchronous PCIE interface verification module as described above, and includes the following steps:
[0024] Step S1: The sending clock of the PCIE interface control module is provided by the global clock management module, and the PCIE interface control module sends data to the asynchronous FIFO module under the synchronization of the sending clock;
[0025] Step S2: the asynchronous FIFO control module controls the asynchronous FIFO module to send the synchronized data to the bit width conversion module, and finally sends the converted data to the PCIE_PHY module;
[0026] Step S3: the PCIE_PHY module sends the deserialized parallel data to the bit width conversion module, and the bit width conversion module then sends the data in the clock domain of the PCIE_PHY module to the asynchronous FIFO module;
[0027] Step S4: the asynchronous FIFO control module controls the asynchronous FIFO module to send the synchronized data to the PCIE interface control module.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] The present invention discloses an asynchronous PCIE interface verification module and method based on FPGA, which not only solves the problem of mismatch between the effective data bit width of the PCIE interface control module and the PCIE physical media layer interface of the FPGA platform, but also adds asynchronous logic between the PCIE controller and the physical media layer, thereby meeting the timing requirements of FPGA slicing, enabling layout and routing on two FPGAs, solving the problem of insufficient resources of one FPGA due to over-large design, and improving chip verification efficiency and IP reuse rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a principle block diagram of an asynchronous PCIE interface verification module based on FPGA provided by the present invention.
[0031] Figure 2 It is a principle block diagram of the asynchronous FIFO control module of the present invention.
[0032] Figure 3 It is a principle block diagram of the clock conversion module of the present invention.
[0033] Figure 4 It is a principle block diagram of the bit width conversion module of the present invention. DETAILED DESCRIPTION
[0034] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description. It should be noted that the accompanying drawings are in very simplified form and in non-precise proportions, and are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention. Embodiment 1
[0035] like Figure 1 As shown, an embodiment of the present invention provides an asynchronous PCIE interface verification module based on FPGA, including a global clock management module, a PCIE interface control module, an asynchronous FIFO control module, an asynchronous FIFO module, a bit width conversion module, a clock conversion module and a PCIE_PHY module.
[0036] The global clock management module is the internal logic of the FPGA, and its main function is to generate four asynchronous master clocks to drive the PCIE interface control module. In the transmission path, the asynchronous FIFO control module controls each PCIE controller to send the TX data signal, TX control signal and respective synchronous clock Gclk to the asynchronous FIFO module. After the clock conversion module drives the PCIE_PHY module to initialize, it sends the four asynchronous clocks Pipe_clk to the asynchronous FIFO module. After clock synchronization, the TX data in the original Gclk clock domain becomes the data in the Pipe_clk clock domain. The synchronized data is sent to the bit width conversion module. After the effective data bit conversion, the TX parallel data is sent to the PCIE_PHY module for serialization, and finally the serialized data is transmitted to the Serdes transmission TX differential path of the PCIE_PHY module. In the receiving path, after the clock conversion module drives the PCIE_PHY module to initialize, the serial data on the Serdes receiving RX differential path is deserialized and sent to the bit width conversion module. The bit width conversion module writes the converted data into the asynchronous FIFO module under the control of the asynchronous FIFO control module, and the asynchronous FIFO module synchronizes the asynchronous data to the clock domain of the PCIE interface control module and then sends it to the PCIE interface control module.
[0037] like Figure 2 As shown, the asynchronous FIFO control module mainly controls the read and write timing of the asynchronous FIFO module. The asynchronous FIFO module sends the FIFO_Full and FIFO_Empty signals to the asynchronous FIFO control module. When FIFO_Full is high, the FIFO_Write signal output by the asynchronous FIFO control module is pulled low, otherwise it is pulled high; when FIFO_Empty is high, the FIFO_Read signal output by the asynchronous FIFO control module is pulled low, otherwise it is pulled high.
[0038] like Figure 3 As shown, the clock conversion module includes: a differential input buffer IBUF_DS and a global clock buffer BUFG_GT; a pair of differential clocks Refclk with a frequency of 100Mhz output a Sys_clk_gt signal after passing through IBUFDS to drive the PCIE_PHY module, and a Sys_clk signal outputs a Sys_clk_bufg signal after passing through BUFG_GT to drive the PCIE_PHY module.
[0039] like Figure 4As shown, the working principle of the bit width conversion module is as follows: the PCIE_PHY module sends the 125Mhz Pipe_clk to the bit width conversion module, and generates a 62.5Mhz clock Pipe_clk62.5 after binary division. In the transmission path, the PCIE interface control module sends 256 bits of parallel data phy_txdata, 64 bits per lane (link), and the lower 32 bits of data are valid. The 32 bits of data converted by the asynchronous FIFO module are aligned with Pipe_clk62.5. The high 16 bits and low 16 bits of 32 bits are split into two groups of data respectively. In a Pipe_clk62.5 cycle, the high 16 bits of data are sent on the rising edge, and the low 16 bits of data are sent on the falling edge to the PCIE_PHY module. The PCIE interface control module sends data valid signal phy_txdatak of 16 bits, 4 bits per lane. The upper two bits and lower two bits of 4 bits are split into two groups of data respectively. In one Pipe_clk62.5 cycle, the upper two bits of data are sent on the rising edge, and the lower two bits of data are sent on the falling edge to the PCIE_PHY module. In order to ensure data alignment, the remaining TX control signals (including Txelecidle, txdetectrx_loopback and txcompliance signals) are sent to the PCIE_PHY module in two beats under the Pipe_clk62.5 clock. In the receiving path, the parallel data phy_rxdata after deserialization of the PCIE_PHY module is 128 bits, 32 bits per lane, and the lower 16 bits of data are valid. In two Pipe_clk62.5 cycles, two groups of 16 bits of data are sent. These two groups of 16 bits of data are assembled into a group of 32 bits of data and sent to the asynchronous FIFO module under the Gclk clock drive. The data valid signal phy_rxdatak after deserialization of the PCIE_PHY module is 8 bits, 2 bits per lane. Within two Pipe_clk62.5 cycles, two groups of 2-bit data are sent, and these two groups of 2-bit data are assembled into a group of 4-bit data and sent to the asynchronous FIFO module under the drive of the Gclk clock. Embodiment 2
[0040] The embodiment of the present invention further provides an FPGA-based asynchronous PCIE interface verification method, which is based on the design and construction of a new asynchronous PCIE interface verification module and includes the following steps:
[0041] Step S1: The sending clock of the PCIE interface control module is provided by the global clock management module, and the PCIE interface control module sends data to the asynchronous FIFO module under the synchronization of the sending clock;
[0042] Step S2: the asynchronous FIFO control module controls the asynchronous FIFO module to send the synchronized data to the bit width conversion module, and finally sends the converted data to the PCIE_PHY module;
[0043] Step S3: the PCIE_PHY module sends the deserialized parallel data to the bit width conversion module, and the bit width conversion module then sends the data in the clock domain of the PCIE_PHY module to the asynchronous FIFO module;
[0044] Step S4: the asynchronous FIFO control module controls the asynchronous FIFO module to send the synchronized data to the PCIE interface control module.
[0045] In summary, the present invention places the PCIE interface control module separately on a piece of FPGA_A, and places the PCIE physical layer interface on another piece of FPGA_B. In order to meet the timing requirements across FPGAs, the interfaces are all designed asynchronously. At the same time, the bit width conversion logic is added to solve the problem of mismatch between the valid data bits of the PCIE interface control module and the valid data bits of the physical media layer of the FPGA platform. Not only does it improve the reuse rate of IP verification, but this invention can also be used as a reference for prototype verification of larger-scale PCIE designs in the future to reduce efficiency and reduce the cost of separate design or separate purchase of IP.
[0046] The above description is only a description of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any changes or modifications made by a person skilled in the art in the field of the present invention based on the above disclosure shall fall within the scope of protection of the claims.
Claims
1. An asynchronous PCIE interface verification module based on FPGA, characterized in that: include: A transmission path, in which the asynchronous FIFO control module writes the asynchronous data sent by the PCIE interface control module into the asynchronous FIFO module, the asynchronous FIFO module synchronizes the asynchronous data to the PCIE_PHY module clock domain, and then sends the data to the bit width conversion module, the bit width conversion module sends the converted data to the PCIE_PHY module for serialization, and finally transmits the serialized data to the Serdes transmission TX differential path of the PCIE_PHY module; A receiving path, in which the clock conversion module drives the PCIE_PHY module to initialize, the PCIE_PHY module deserializes the serial data on the Serdes receiving RX differential path, and sends it to the bit width conversion module, the bit width conversion module writes the converted data into the asynchronous FIFO module under the control of the asynchronous FIFO control module, and the asynchronous FIFO module synchronizes the asynchronous data to the PCIE interface control module clock domain and sends it to the PCIE interface control module; Wherein, the asynchronous FIFO control module is used to control the read and write timing of the asynchronous FIFO module; when the FIFO_Full signal of the asynchronous FIFO module is at a low level, the asynchronous FIFO control module pulls up the FIFO_Write signal, otherwise it pulls down; when the FIFO_Empty signal of the asynchronous FIFO module is at a low level, the asynchronous FIFO control module pulls up the FIFO_Read signal, otherwise it pulls down; The bit width conversion module is used to convert the 62.5Mhz, 32-bit effective bit data of the PCIE interface control module and the 125Mhz, 16-bit effective bit data of the PCIE_PHY module.
2. The FPGA-based asynchronous PCIE interface verification module according to claim 1, characterized in that: It also includes a global clock management module, which serves as the internal logic of the FPGA platform and is used to generate four asynchronous master clocks to drive the PCIE interface control module.
3. The FPGA-based asynchronous PCIE interface verification module according to claim 1, characterized in that: The PCIE interface control module is used to load and parse the high-speed data protocol.
4. The FPGA-based asynchronous PCIE interface verification module according to claim 1, characterized in that: The clock conversion module is used to divide and process the reference clock to drive the PCIE_PHY module.
5. The FPGA-based asynchronous PCIE interface verification module according to claim 4, characterized in that: The clock conversion module includes: a differential input buffer IBUF_DS and a global clock buffer BUFG_GT; a pair of differential clocks Refclk with a frequency of 100Mhz respectively output a Sys_clk_gt clock signal and a Sys_clk clock signal after passing through the differential input buffer IBUF_DS, and the Sys_clk_gt clock signal is used to drive the PCIE_PHY module; the Sys_clk clock signal outputs a Sys_clk_bufg signal after passing through the global clock buffer BUFG_GT, and the Sys_clk_bufg signal is used to drive the PCIE_PHY module.
6. The FPGA-based asynchronous PCIE interface verification module according to claim 1, characterized in that: The specific process of the bit width conversion module converting the valid bit data between the PCIE interface control module and the PCIE_PHY module includes: The PCIE_PHY module sends the 125Mhz Pipe_clk to the bit width conversion module, and generates a 62.5Mhz clock Pipe_clk62.5 after dividing by two. In the transmission path, the parallel data phy_txdata sent by the PCIE interface control module is 256 bits, each lane is 64 bits, and the lower 32 bits of data are valid; the 32 bits of data converted by the asynchronous FIFO module are aligned with Pipe_clk62.5, and the high 16 bits and low 16 bits of data of 32 bits are split into two groups of data respectively. In one Pipe_clk62.5 cycle, the high 16 bits of data are sent on the rising edge, and the low 16 bits of data are sent on the falling edge to the PCIE_PHY module; The valid signal phy_txdatak of the PCIE interface control module for sending data is 16 bits, 4 bits per lane; the upper two bits and lower two bits of data of 4 bits are split into two groups of data respectively. In one Pipe_clk62.5 cycle, the upper two bits of data are sent on the rising edge, and the lower two bits of data are sent on the falling edge to the PCIE_PHY module; To ensure data alignment, the TX control signal is sent to the PCIE_PHY module with two beats at the Pipe_clk62.5 clock. In the receiving path, the parallel data phy_rxdata after deserialization by the PCIE_PHY module is 128 bits, 32 bits per lane, and the lower 16 bits of data are valid; within two Pipe_clk62.5 cycles, two groups of 16 bits of data are sent, and the two groups of 16 bits of data are assembled into a group of 32 bits of data and sent to the asynchronous FIFO module under the drive of the Gclk clock; After the PCIE_PHY module deserializes, the valid data signal phy_rxdatak is 8 bits, 2 bits per lane; within two Pipe_clk62.5 cycles, two groups of 2 bits of data are sent, and the two groups of 2 bits of data are assembled into a group of 4 bits of data and sent to the asynchronous FIFO module under the drive of the Gclk clock.
7. An FPGA-based asynchronous PCIE interface verification method, using an FPGA-based asynchronous PCIE interface verification module as described in any one of claims 1 to 6, characterized in that: The steps include: Step S1: The sending clock of the PCIE interface control module is provided by the global clock management module, and the PCIE interface control module sends data to the asynchronous FIFO module under the synchronization of the sending clock; Step S2: the asynchronous FIFO control module controls the asynchronous FIFO module to send the synchronized data to the bit width conversion module, and finally sends the converted data to the PCIE_PHY module; Step S3: the PCIE_PHY module sends the deserialized parallel data to the bit width conversion module, and the bit width conversion module then sends the data in the clock domain of the PCIE_PHY module to the asynchronous FIFO module; Step S4: the asynchronous FIFO control module controls the asynchronous FIFO module to send the synchronized data to the PCIE interface control module.
