Bus data underclocking circuit, data processing system and FPGA (Field Programmable Gate Array) device

By designing the bus data downconversion circuit in the FPGA device and using the same source clock signal and multiple output data registers for data processing, the problem that the downconversion circuit in the existing technology is difficult to meet the deterministic delay is solved, and the frequency reduction process is realized. Maintain the certainty and stability of data transmission.

CN118626422APending Publication Date: 2024-09-10SHANGHAI FUDAN MICROELECTRONICS GROUP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310233081.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-10
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing frequency reduction circuits are difficult to meet the deterministic delay requirements while reducing frequency. Especially in FPGA devices, the high-speed AXI-Stream bus data processed by high-speed data processing module components needs to be processed by frequency reduction before it can be exchanged between modules. Transmission over the wire.

Method used

A bus data downconversion circuit is designed, including a state controller and a data buffer. The initial output bus transmission enable signal and the input bus reception enable signal are controlled through the same source clock signal. The data is deredundant through multiple output data registers. The remaining sum is stored to ensure that the data transmission meets the requirements of the bus protocol, and the transmission of N times the data bit width is realized through handshake signal control.

Benefits of technology

It achieves the requirement of deterministic delay while reducing frequency, avoids asynchronous clock domain processing, ensures the certainty and stability of data transmission, and is suitable for data processing systems that require deterministic delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626422A
    Figure CN118626422A
Patent Text Reader

Abstract

The invention discloses a bus data underclocking circuit, a data processing system and an FPGA (Field Programmable Gate Array) device. The circuit comprises a state controller; the data cache is suitable for receiving input bus data and caching the input bus data; the first output data register is suitable for storing the data output by the data buffer; the second output data register is suitable for performing redundancy elimination on the data output by the first output data register, storing and outputting the data, storing an enabling signal sent by the initial output bus, and outputting the enabling signal sent by the bus; wherein the input bus sending enable signal is obtained based on the input bus clock signal, and the output bus receiving enable signal is obtained based on the output bus clock signal; the input bus clock signal and the output bus clock signal are homologous clock signals. By adopting the scheme, the requirement of deterministic delay can be met while the frequency is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of bus data processing, and in particular to a bus data frequency reduction circuit, a data processing system and an FPGA device. Background Art

[0002] The AXI4 protocol specification of the Advanced Microcontroller Bus Architecture (AMBA) defines a variety of buses including AXI-Stream. The AXI-Stream bus is widely used in the continuous transmission of large amounts of data and is suitable as a 1-to-1 unidirectional data transmission bus.

[0003] In a Field Programmable Gate Array (FPGA) device, input data is first processed by a high-speed data processing module component before it can be transmitted through the interconnection lines between modules. The high-speed data processing module component can operate at a higher clock frequency and output high-speed AXI-Stream bus data. The operating frequency of the interconnection lines between modules is lower, and low-speed AXI-Stream bus data is transmitted. Therefore, the high-speed AXI-Stream bus data processed by the high-speed data processing module component needs to be down-clocked before it can be transmitted on the interconnection lines of the FPGA.

[0004] Existing data signal processing systems often require fixed data processing time to avoid unexpected uncertainties, that is, there is a requirement for deterministic delay.

[0005] However, it is difficult for existing frequency reduction circuits to meet the requirements of deterministic delay while reducing the frequency. Summary of the invention

[0006] The problem to be solved by the present invention is to meet the requirement of deterministic delay while reducing the frequency.

[0007] In order to solve the above problems, an embodiment of the present invention provides a bus data frequency reduction circuit, the circuit comprising:

[0008] A state controller adapted to receive an input bus send enable signal and obtain an initial output bus send enable signal based on the input bus send enable signal; receive an output bus receive enable signal and obtain an input bus receive enable signal based on the output bus receive enable signal; and an output cache enable signal;

[0009] A data buffer, adapted to receive input bus data and cache it under the control of the cache enable signal;

[0010] A first output data register, connected to the data buffer, adapted to store the data output by the data buffer at a frequency of an input bus clock signal as an operating frequency;

[0011] a second output data register connected to the first output data register, adapted to use the frequency of the output bus clock signal as the operating frequency, store and output the data output by the first output data register after de-redundancy, store the initial output bus sending enable signal, and output the bus sending enable signal;

[0012] Among them, the input bus send enable signal is obtained based on the input bus clock signal, and the output bus receive enable signal is obtained based on the output bus clock signal; the frequency of the input bus clock signal is N times the frequency of the output bus clock signal; the input bus clock signal and the output bus clock signal are homologous clock signals, wherein N≥2 and N is an integer.

[0013] The state controller is suitable for performing handshake enable control on the input bus and the output bus so that the data transmission on the input bus and the output bus meets the bus protocol requirements; and enabling control on the data buffer so that the output data bit width of the second output data register is N times the input data bit width of the data buffer.

[0014] Optionally, the state controller includes:

[0015] A handshake signal control unit, adapted to control the initial output bus send enable signal and the input bus receive enable signal based on the number of data buffered by the data buffer, and the input bus send enable signal and the output bus receive enable signal;

[0016] The cache control unit is adapted to output a corresponding cache enable signal based on the number of data cached by the data cache, the input bus send enable signal and the output bus receive enable signal; the cache enable signal includes a cache send enable signal and a cache receive enable signal.

[0017] Optionally, the handshake signal control unit includes:

[0018] The first handshake signal control subunit is adapted to control the initial output bus to send an enable signal at a low level and control the input bus to receive an enable signal at a high level when the number of data cached in the data cache is less than N.

[0019] Optionally, the handshake signal control unit includes:

[0020] The second handshake signal control subunit is suitable for controlling the initial output bus sending enable signal and the input bus receiving enable signal to be high level at a preset trigger edge of the output bus clock signal when the number of data cached in the data buffer is equal to N and the output bus receiving enable signal is high level.

[0021] Optionally, the handshake signal control unit includes:

[0022] The third handshake signal control subunit is suitable for controlling the initial output bus to send an enable signal to a high level and controlling the input bus to receive an enable signal to a low level when the number of data cached in the data buffer is equal to N and the output bus receive enable signal is a low level, or the output bus receive enable signal is a high level but a preset trigger edge of the output bus clock signal is detected.

[0023] Optionally, the cache control unit includes:

[0024] a receiving enable control subunit, adapted to send a cache receiving enable signal to the data buffer when the number of data cached in the data buffer is less than N and the input bus sending enable signal is at a high level; and to send a cache receiving enable signal to the data buffer when the number of data cached in the data buffer is equal to N, the output bus receiving enable signal is at a high level, and a preset trigger edge of the output clock signal is detected;

[0025] The sending enable control subunit is suitable for sending an enable signal to the data buffer output buffer when the number of data cached in the data buffer is equal to N, the input bus sending enable signal is high level, the output bus receiving enable signal is high level, and the preset trigger edge of the output bus clock signal is detected.

[0026] Optionally, the preset trigger edge is a rising edge.

[0027] Optionally, N=2.

[0028] Optionally, the input bus and the output bus are both AXI-Stream buses;

[0029] An embodiment of the present invention further provides a data processing system, the system comprising:

[0030] The high frequency data processing circuit is adapted to receive input data and process the input data to obtain input bus data;

[0031] A bus data frequency reduction circuit, as described in any one of the above; the bus data frequency reduction circuit is connected to the high-frequency data processing circuit, and is suitable for performing frequency reduction processing on the input bus data;

[0032] The low-frequency data processing circuit is connected to the bus data frequency reduction circuit via an output bus.

[0033] An embodiment of the present invention further provides an FPGA device, wherein the FPGA device includes the above-mentioned data processing system.

[0034] Compared with the prior art, the technical solution of the embodiment of the present invention has the following advantages:

[0035] By applying the scheme of the present invention, on the one hand, since the frequency of the input bus clock signal is N times the frequency of the output bus clock signal, frequency reduction can be achieved. On the other hand, the initial output bus sending enable signal and the input bus receiving enable signal are controlled by the state converter, and the initial output bus sending enable signal is obtained after passing through the second output data register to obtain the output bus sending enable signal. Since the input bus sending enable signal is obtained based on the input bus clock signal, and the output bus receiving enable signal is obtained based on the output bus clock signal, the input bus clock signal and the output bus clock signal are homologous clock signals, and the homologous clock signals can maintain a fixed phase difference, so that there is only a homologous clock inside the bus data frequency reduction circuit, and there is no asynchronous clock, and there is no need to perform cross-clock domain processing on the signal in the asynchronous clock domain, so that the requirements of deterministic delay can be met while frequency reduction. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a structural schematic diagram of a data processing system in an embodiment of the present invention;

[0037] Figure 2 It is a structural schematic diagram of a bus data frequency reduction circuit in an embodiment of the present invention;

[0038] Figure 3 It is a timing diagram of various signals in the working process of a bus data frequency reduction circuit in an embodiment of the present invention;

[0039] Figure 4 It is a schematic diagram of a data buffer performing state transition in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In FPGA devices, input data is processed by high-speed data processing module components before being transmitted through the interconnection lines between modules. High-speed data processing modules can operate at a higher clock frequency, while the operating frequency of the interconnection lines between modules is lower.

[0041] For example, a high-speed data processing module may operate at 400 MHZ, thereby generating 400 MHZ high-speed AXI-Stream bus data, while the clock frequency of the interconnection line between modules is 200 MHZ, which can transmit 200 MHZ low-speed AXI-Stream bus data.

[0042] Therefore, the high-speed AXI-Stream bus data output by the high-speed data processing module component needs to be down-converted before it can be transmitted on the interconnection lines of the FPGA.

[0043] Existing data signal processing systems all have requirements for deterministic delay, however, the existing frequency reduction circuits for processing high-frequency AXI Stream bus data cannot meet the requirements of deterministic delay while reducing the frequency. The so-called deterministic delay is the delay from the start of input at the sender to the output of data at the receiver, and this delay is consistent after each power-on or re-establishment of the connection.

[0044] To solve this problem, the present invention provides a bus data frequency reduction circuit. The frequency reduction circuit can control the initial output bus send enable signal and the input bus receive enable signal through a state converter while reducing the frequency. The initial output bus send enable signal obtains the output bus send enable signal after passing through the second output data register. Since the input bus send enable signal is obtained based on the input bus clock signal, and the output bus receive enable signal is obtained based on the output bus clock signal, the input bus clock signal and the output bus clock signal are homologous clock signals, and the homologous clock signals can maintain a fixed phase difference. Therefore, there is only the homologous clock inside the bus data frequency reduction circuit, and there is no asynchronous clock. Therefore, there is no need to perform cross-clock domain processing on the signal in the asynchronous clock domain, so that the deterministic delay requirement can be met while reducing the frequency.

[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0046] First, in order to facilitate understanding of the bus data frequency reduction circuit according to the embodiment of the present invention, a data processing system in which the bus data frequency reduction circuit is located is described.

[0047] Figure 1 A schematic diagram of the structure of a data processing system. Figure 1 , the data processing system 1 may include: a high-frequency data processing circuit 11, a bus data frequency reduction circuit 12 and a low-frequency data processing circuit 13. Wherein:

[0048] The high frequency data processing circuit 11 is adapted to receive input data and process the input data to obtain input bus data;

[0049] The bus data frequency reduction circuit 12 is connected through the high-frequency data processing circuit and is suitable for performing frequency reduction processing on the input bus data;

[0050] The low-frequency data processing circuit 13 is connected to the bus data frequency reduction circuit 12 via an output bus.

[0051] In a specific implementation, the data output by the high-frequency data processing circuit 11 is high-speed AXI-Stream bus data, which is used as input bus data and input at high speed to the AXI-Stream bus data frequency reduction circuit 12. After the bus data frequency reduction circuit 12 performs frequency reduction processing on the input bus data, it can be transmitted at a low frequency on the output bus, and then the low-frequency data processing circuit 13 performs subsequent processing.

[0052] In FPGA devices, the output bus is implemented by interconnection lines inside the FPGA. The data processing circuit 13 can be a data bus frequency up-conversion circuit, that is, it performs frequency up-conversion processing on the data transmitted on the output bus, and then performs high-frequency data transmission with other data processing circuits.

[0053] It is understandable that the above-mentioned data processing system, including but not limited to application in FPGA devices, can also be applied in other devices, which are not listed here one by one.

[0054] Figure 2 FIG. 1 is a schematic diagram of the structure of a bus data frequency reduction circuit 12 according to an embodiment of the present invention. Figure 3 FIG. 1 is a timing diagram of various signals during the operation of the bus data frequency reduction circuit 12 .

[0055] Reference Figure 2 and Figure 3 The bus data frequency reduction circuit 12 may include: a state controller 121, a data buffer 122, a first output data register 123 and a second output data register 124. Wherein:

[0056] The state controller 121 is adapted to receive an input bus send enable signal s_tvalid, and obtain an initial output bus send enable signal m'_tvalid based on the input bus send enable signal s_tvalid; receive an output bus receive enable signal m_tready, and obtain an input bus receive enable signal s_tready based on the output bus receive enable signal m_tready; and output a cache enable signal en.

[0057] The data buffer 122 is adapted to receive and cache input bus data s_tdata under the control of the cache enable signal en;

[0058] The first output data register 123 is connected to the data buffer 122 and is adapted to store the data output by the data buffer 122 at the frequency of the input bus clock signal s_clk as the operating frequency;

[0059] The second output data register 124 is connected to the first output data register 123, and is adapted to use the frequency of the output bus clock signal m_clk as the operating frequency, store and output the data output by the first output data register 123 after de-redundancy, and store the initial output bus sending enable signal m'_tvalid, and output the bus sending enable signal m_tvalid;

[0060] The input bus sending enable signal s_tvalid is obtained based on the input bus clock signal s_clk. The output bus receiving enable signal m_tready is obtained based on the output bus clock signal m_clk. The frequency of the input bus clock signal s_clk is N times the frequency of the output bus clock signal m_clk. The input bus clock signal s_clk and the output bus clock signal m_clk are homologous clock signals.

[0061] In a specific implementation, the state controller 121, the data buffer 122 and the first output data register 123 all use the frequency of the input bus clock signal s_clk as the operating frequency, that is, they work in the high-speed clock domain. The second output data register 124 uses the frequency of the output bus clock signal m_clk as the operating frequency, that is, it works in the low-speed clock domain. The frequency of the input bus clock signal s_clk is N times the frequency of the output bus clock signal m_clk, thereby realizing the conversion of the input bus to the output bus data transmission frequency.

[0062] Taking N=2 as an example, at this time, the output bus clock cycle is twice the input bus clock cycle, and the data buffer 122 can store one input bus data s_tdata in one input bus clock cycle, or output two input bus data s_tdata. The first output data register 123 can store two input bus data s_tdata in one input bus clock cycle, or output two input bus data s_tdata. The second output data register 124 can be controlled (i.e., the input bus receives the enable signal m_tready=1, and the preset trigger edge of the output bus clock m_clk is detected) to store two input bus data s_tdata in one output bus clock cycle, or output two input bus data s_tdata.

[0063] In a specific implementation, the host computer of the input bus provides an input bus sending handshake enable signal s_tvalid based on the input bus clock s_clk, and the slave computer of the output bus provides an output bus sending handshake enable signal s_tready based on the output bus clock m_clk. The host computer of the input bus can be a high-frequency data processing circuit, or other circuits, ports or devices other than the high-frequency data processing circuit. The slave computer of the output bus can be a low-frequency data processing circuit, or other circuits, ports or devices other than the low-frequency data processing circuit. In a specific implementation, since the initial output bus sending enable signal m'_tvalid is a high-speed clock domain signal, the second output data register 124 stores the initial output bus sending enable signal m'_tvalid and then outputs it, so that the output bus sending enable signal m_tvalid in the output bus clock domain can be obtained. In addition, the second output data register 124 stores the initial output bus sending enable signal m'_tvalid before outputting it, which can also align the data transmitted on the output bus by the output bus sending enable signal m_tvalid, so as to control the data transmission on the output bus.

[0064] In a specific implementation, the input bus clock signal s_clk and the output bus clock signal m_clk are co-source clock signals. In other words, the input bus clock signal s_clk and the output bus clock signal m_clk are generated by the same clock source. In this way, the input bus clock signal s_clk and the output bus clock signal m_clk have a relatively fixed phase difference. Therefore, there is only a co-source clock inside the bus frequency reduction data circuit, and there is no asynchronous clock, so there is no need to perform cross-clock domain processing on the asynchronous clock.

[0065] In a specific implementation, the input bus sending enable signal s_tvalid and the input bus receiving enable signal m_tready are both connected to the state controller 121 , and the state controller 121 completes the related handshake process.

[0066] In a specific implementation, the input bus sending enable signal s_tvalid and the input bus receiving enable signal s_tready constitute the input bus handshake enable signal. Among them, the input bus sending enable signal s_tvalid indicates that the high-frequency data processing circuit is ready to send data. The input bus receiving enable signal s_tready indicates that the bus data frequency reduction circuit 12 is ready to receive data. When the input bus sending enable signal s_tvalid and the input bus receiving enable signal s_tready are both high level, the input bus data s_tdata corresponding to the input bus clock cycle is transmitted.

[0067] In a specific implementation, the output bus sending enable signal m_tvalid and the output bus receiving enable signal m_tready constitute an output bus handshake signal. Among them, the output bus sending enable signal m_tvalid indicates that the bus data frequency reduction circuit 12 is ready to send data. The output bus receiving enable signal m_tready indicates that the low-frequency data processing circuit is ready to receive data. When the output bus sending enable signal m_tvalid and the output bus receiving enable signal m_tready are both high, the output bus data m_tdata corresponding to the output bus clock cycle is transmitted.

[0068] In a specific implementation, the input bus data s_tdata and the output bus data m_tdata may include the data itself and a data flag, etc. Under the control of the input bus send enable signal s_tvalid and the input bus receive enable signal s_tready, the input bus data s_tdata is cached in the data buffer 122, wherein the cache depth of the data buffer 122 is greater than or equal to N, that is, at least N input bus data s_tdata can be cached.

[0069] The data buffer 122 performs data transmission under the control of the state controller 121 , and the output data of the data buffer 122 is output to the subsequent circuit via the first output data register 123 and the second output data register 124 .

[0070] In one embodiment of the present invention, the state controller 121 is adapted to perform handshake enable control on the input bus and the output bus so that the data transmission on the input bus and the output bus meets the bus protocol requirements; and to perform enable control on the data buffer so that the output data bit width of the second output data register 124 is N times the input data bit width of the data buffer 122. Thus, when the high-frequency input bus transmits data, it does not need to intermittently wait for the low-frequency output bus to complete the data transmission, so that the data on the input bus and the output bus can be continuously transmitted, ensuring deterministic delay.

[0071] In a specific implementation, the state controller 121 can control the initial output bus transmission enable signal m'_tvalid, the input bus reception enable signal s_tready and the cache enable signal en according to the number of data currently cached in the data buffer 122. The cache enable signal en includes a cache reception enable signal en1 and a cache transmission enable signal en2. The cache reception enable signal en1 is used to control the data buffer 122 to receive data. The cache transmission enable signal en2 is used to control the data buffer 122 to send data.

[0072] In an embodiment of the present invention, the state controller 121 may include: a handshake signal control unit 1211 and a cache control unit 1212. Wherein:

[0073] The handshake signal control unit 1211 is adapted to control the initial output bus send enable signal m'_tvalid and the input bus receive enable signal s_tready based on the number of data cached in the data buffer 122, the input bus send enable signal s_tvalid and the output bus receive enable signal m_tready;

[0074] The cache control unit 1212 is adapted to output a corresponding cache enable signal based on the number of data cached in the data cache 122 , the input bus sending enable signal s_tvalid and the output bus receiving enable signal m_tready.

[0075] In a specific implementation, the cache control unit 1212 may include: a receiving enable control subunit (not shown) and a sending enable control subunit (not shown).

[0076] The receive enable control subunit is suitable for sending a cache receive enable signal to the data buffer 122 when the number of data cached in the data buffer 122 is less than N and the input bus send enable signal s_tvalid is at a high level; and sending a cache receive enable signal to the data buffer 122 when the number of data cached in the data buffer 122 is equal to N, the output bus receive enable signal m_tready is at a high level, and the preset trigger edge of the output clock signal is detected.

[0077] The sending enable control subunit is suitable for sending an enable signal to the data buffer 122 output cache when the number of data cached in the data buffer 122 is equal to N, the input bus sending enable signal s_tvalid is at a high level, the output bus receiving enable signal m_ready is at a high level, and the preset trigger edge of the output clock signal is detected.

[0078] In one embodiment of the present invention, the handshake signal control unit 1211 may include: a first handshake signal control subunit (not shown). The first handshake signal control subunit is adapted to control the initial output bus to send an enable signal m'_tvalid to a low level and control the input bus to receive an enable signal s_tready to a high level when the number of data cached in the data buffer 122 is less than N.

[0079] The data cached by the data buffer 122 is the input bus data s_tdata. In the present invention, one data refers to data transmitted once, and the data bit width of each transmission can be 1 bit, or 2 bits or more.

[0080] reg_state represents the number of data currently cached in the data buffer 122. When reg_state<N, the state controller 121 can control the initial output bus to send the enable signal m'_tvalid as logic "0" (ie, m'_tvalid=0), and the input bus to receive the enable signal s_tready as logic "1" (ie, s_tready=1).

[0081] The receiving enable control subunit may send a buffer receiving enable signal to the data buffer 122 to control the data buffer 122 to receive data.

[0082] Figure 4 FIG. 1 is a schematic diagram of a state transition of a data buffer 122 in an embodiment of the present invention. Figure 4 , when N<2, after reset (Reset) and initialization, if reg_state=0 or reg_state=1, and the input bus transmission enable signal s_tvalid is at a high level, the state controller 121 can send a cache reception enable signal to the data buffer 122, so that the data buffer 122 receives data. Specifically, if reg_state=0, the number of data cached by the data buffer 122 will jump from 0 to 1. If reg_state=1, the number of data cached by the data buffer 122 will jump from 1 to 2.

[0083] In one embodiment of the present invention, the handshake signal control unit 1211 may include: a second handshake signal control subunit. The second handshake signal control subunit is adapted to control the initial output bus sending enable signal m'_tvalid and the input bus receiving enable signal s_tready to be both high level at a preset trigger edge of the output bus clock signal m_clk when the number of data cached in the data buffer 122 is equal to N and the output bus receiving enable signal m_tready is high level.

[0084] The preset trigger edge may be a rising edge or a falling edge. Taking the case where the preset trigger edge is a rising edge as an example, the preset trigger edge of the output bus clock signal m_clk is detected using the input bus clock signal, which can be expressed as m_clk_rise=1.

[0085] In a specific implementation, the second handshake signal control subunit may use the input bus clock signal to sample the output bus clock signal m_clk when the number of data cached in the data buffer 122 is equal to N. When m_tready=1 and a preset trigger edge is detected, the initial output bus sending enable signal m'_tvalid=1 and the input bus receiving enable signal s_tready=1 are controlled.

[0086] If the input bus receiving enable signal s_tready=1, at this time, if the input bus sending enable signal s_tvalid is high, the input bus stores data into the data buffer 122. If the input bus sending enable signal s_tvalid is low, the input bus does not store data into the data buffer 122. If the output bus receiving enable signal m_tready is high, and the output bus sending enable signal m_tvalid=1, the second output data register 124 will output data.

[0087] Accordingly, the cache control unit may determine whether to output only the cache transmit enable signal, or output the cache transmit enable signal and the cache receive enable signal to the data buffer 122 based on the state of the input bus transmit enable signal s_tvalid.

[0088] Reference Figure 4 When reg_state=2 and m_tready is at a high level, when the rising edge of the output bus clock signal m_clk is detected using the input clock, the second handshake signal control subunit can control the initial output bus send enable signal m'_tvalid to a high level, and control the input bus receive enable signal s_tready to a high level.

[0089] At this time, the output bus receiving enable signal m_tready is at a high level, and the output bus sending enable signal m'_tvalid is also at a high level, then the second output data register 124 outputs a data. If the input bus sending enable signal s_tvalid is at a high level, the input bus can input a data to the data buffer 122. If the input bus sending enable signal s_tvalid is at a low level, the input bus does not input a data to the data buffer 122.

[0090] In other words, when reg_state=2, when s_tvalid=1, m_tready=1, and m_clk_rise=1, the input bus inputs one data to the data buffer 122, and the second output data register 124 outputs one data. Since one data output by the second output data register 124 is equivalent to two data input by the input bus to the data buffer 122, the data cached in the data buffer 122 will jump from 2 to 1. When s_tvalid=0, m_tready=1, and m_clk_rise=1, the input bus does not input one data to the data buffer 122, but the second output data register 124 outputs one data, so that the data cached in the data buffer 122 jumps from 2 to 0.

[0091] When the input bus inputs data to the data buffer 122, the receive enable control subunit may send a cache receive enable signal to the data buffer 122, so that the data buffer 122 receives data. When the second output data register 124 needs to output data, the transmit enable control subunit may send a cache transmit enable signal to the data buffer 122, so that the data buffer 122 transmits data.

[0092] In one embodiment of the present invention, the handshake signal control unit includes: a third handshake signal control subunit. The third handshake signal control subunit is adapted to control the initial output bus sending enable signal m'_tvalid to be high level and control the input bus receiving enable signal s_tready to be low level when the number of data cached in the data buffer 122 is equal to N, if the output bus receiving enable signal m_tready is low level, or the output bus receiving enable signal m_tready is high level but the preset trigger edge of the output bus clock signal is detected.

[0093] In a specific implementation, when the output bus receiving enable signal m_tready is at a low level, it indicates that the low-frequency data processing circuit is not ready to receive data. At this time, the initial output bus sending enable signal m'_tvalid can be controlled to be at a high level to inform the low-frequency data processing circuit that the bus data frequency reduction circuit 12 is ready to send data, so that the handshake process can be completed as soon as possible. When the output bus receiving enable signal m_tready is at a high level but the preset trigger edge of the output bus clock signal is detected, it indicates that although the bus data frequency reduction circuit 12 is ready to send data, it is not the time for data transmission. At this time, the initial output bus sending enable signal m'_tvalid is controlled to be at a high level. Once the data transmission time (preset trigger edge) arrives, data transmission can be performed.

[0094] At the same time, the input bus receiving enable signal s_tready is controlled to be low level, indicating that the bus data frequency reduction circuit 12 is not ready to receive data, so as to avoid the input bus sending data to the data buffer 122 and causing the data to be unable to be stored.

[0095] During the period when the initial output bus transmission enable signal m′_tvalid is high and the input bus reception enable signal s_tready is low, the data buffer 122 does not perform data transmission. Therefore, the buffer control unit does not need to send a buffer reception enable signal and a buffer transmission enable signal to the data buffer 122 .

[0096] In a specific implementation, the input bus and the output bus may both be AXI-Stream buses.

[0097] It should be noted that the bus data frequency reduction circuit in the above embodiment does not process the data related flag bits itself, so the processing method of the data flag bits is the same as the data itself, and the bit width of the data flag bits of the output bus is also N times the bit width of the input data flag bits.

[0098] Figure 3 When N=2, the timing diagram of each signal in the process of processing data by the bus data frequency reduction circuit in the embodiment of the present invention. Figure 3 In FIG. 1 , d295 to d304 represent one input bus data. When N=2, the period of the output bus clock signal m_clk is twice the period of the input bus clock signal s_clk, and one output bus data includes two input bus data.

[0099] The input bus handshake enable signal and the output bus handshake enable signal are completed in the corresponding clock domain. In the case of stable transmission, the transmission delay of the bus frequency reduction circuit is fixed and unchanged, and is a fixed value T0, which is about 4 input bus clock cycles.

[0100] When the input bus sends the enable signal s_tvalid=0, the input bus data s_tdata is invalid data, but after s_tvalid=1, the input bus data s_tdata will continue to be transmitted without data loss.

[0101] Similarly, when the output bus sends the enable signal m_tvalid=0, the output bus data m_tdata is invalid data, but after m_tvalid=1, the output bus data m_tdata will continue to be transmitted without data loss.

[0102] When the input bus receiving enable signal s_tready=0, the input bus data s_tdata is invalid data, but after s_tready=1, the input bus data s_tdata will continue to be transmitted without data loss.

[0103] from Figure 3 It can be seen that by adopting the bus frequency reduction circuit in the embodiment of the present invention, the state controller controls the input bus handshake enable signal and the output bus handshake enable signal, so that data can be transmitted stably, and even if the enable signal is interrupted, data loss will not occur.

[0104] By using the above bus data frequency reduction circuit, since the input bus clock and the output bus clock are of the same source, the bus data frequency reduction circuit does not need to use cross-clock domain processing, and is suitable for data processing systems that require deterministic delay. In addition, the input bus clock frequency is N times the output bus clock frequency, and the output data bit width is N times the input data bit width. During the frequency conversion process, the data bandwidth can be kept unchanged, and the data transmission on the input bus and the output bus complies with the bus protocol, and no data loss will occur.

[0105] The embodiment of the present invention further provides an FPGA device, the FPGA device comprising Figure 1 The data processing system 1 is shown in FIG.

[0106] By using the above FPGA device, the bus data frequency reduction circuit is set up, which can reduce the frequency of the input bus data while meeting the requirements of deterministic delay. In addition, by controlling the handshake enable signal, stable data transmission can be achieved without data loss.

[0107] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.

Claims

1. A bus data frequency reduction circuit, characterized in that: include: a state controller adapted to receive an input bus send enable signal and obtain an initial output bus send enable signal based on the input bus send enable signal; Receiving an output bus reception enable signal, and obtaining an input bus reception enable signal based on the output bus reception enable signal; and an output cache enable signal; A data buffer, adapted to receive input bus data and cache it under the control of the cache enable signal; A first output data register, connected to the data buffer, adapted to store the data output by the data buffer at a frequency of an input bus clock signal as an operating frequency; a second output data register connected to the first output data register, adapted to use the frequency of the output bus clock signal as the operating frequency, store and output the data output by the first output data register after de-redundancy, store the initial output bus sending enable signal, and output the bus sending enable signal; Among them, the input bus send enable signal is obtained based on the input bus clock signal, and the output bus receive enable signal is obtained based on the output bus clock signal; the frequency of the input bus clock signal is N times the frequency of the output bus clock signal; the input bus clock signal and the output bus clock signal are homologous clock signals, wherein N≥2 and N is an integer.

2. The bus data frequency reduction circuit according to claim 1, characterized in that: The state controller is suitable for performing handshake enable control on the input bus and the output bus so that the data transmission on the input bus and the output bus meets the bus protocol requirements; and enabling control on the data buffer so that the output data bit width of the second output data register is N times the input data bit width of the data buffer.

3. The bus data frequency reduction circuit according to claim 2, characterized in that: The state controller comprises: A handshake signal control unit, adapted to control the initial output bus send enable signal and the input bus receive enable signal based on the number of data buffered by the data buffer, and the input bus send enable signal and the output bus receive enable signal; A cache control unit, adapted to output a corresponding cache enable signal based on the number of data cached by the data cache, the input bus sending enable signal and the output bus receiving enable signal; The cache enable signal includes a cache send enable signal and a cache receive enable signal.

4. The bus data frequency reduction circuit according to claim 3, characterized in that: The handshake signal control unit comprises: The first handshake signal control subunit is adapted to control the initial output bus to send an enable signal at a low level and control the input bus to receive an enable signal at a high level when the number of data cached in the data cache is less than N.

5. The bus data frequency reduction circuit according to claim 3, characterized in that: The handshake signal control unit comprises: The second handshake signal control subunit is suitable for controlling the initial output bus sending enable signal and the input bus receiving enable signal to be high level at a preset trigger edge of the output bus clock signal when the number of data cached in the data buffer is equal to N and the output bus receiving enable signal is high level.

6. The bus data frequency reduction circuit according to claim 3, characterized in that: The handshake signal control unit comprises: The third handshake signal control subunit is suitable for controlling the initial output bus to send an enable signal to a high level and controlling the input bus to receive an enable signal to a low level when the number of data cached in the data buffer is equal to N and the output bus receive enable signal is a low level, or the output bus receive enable signal is a high level but a preset trigger edge of the output bus clock signal is detected.

7. The bus data frequency reduction circuit according to any one of claims 4 to 6, characterized in that: The cache control unit comprises: a receiving enable control subunit, adapted to send a cache receiving enable signal to the data buffer when the number of data cached in the data buffer is less than N and the input bus sending enable signal is at a high level; and to send a cache receiving enable signal to the data buffer when the number of data cached in the data buffer is equal to N, the output bus receiving enable signal is at a high level, and a preset trigger edge of the output clock signal is detected; The sending enable control subunit is suitable for sending an enable signal to the data buffer output buffer when the number of data cached in the data buffer is equal to N, the input bus sending enable signal is high level, the output bus receiving enable signal is high level, and the preset trigger edge of the output bus clock signal is detected.

8. The bus data frequency reduction circuit according to claim 7, characterized in that: The preset trigger edge is a rising edge.

9. The bus data frequency reduction circuit according to claim 1, characterized in that: N=2。 10. The bus data frequency reduction circuit according to claim 1, characterized in that: The input bus and the output bus are both AXI-Stream buses.

11. A data processing system, characterized in that: include: The high frequency data processing circuit is adapted to receive input data and process the input data to obtain input bus data; A bus data frequency reduction circuit as claimed in any one of claims 1 to 9; the bus data frequency reduction circuit is connected to the high-frequency data processing circuit and is suitable for performing frequency reduction processing on the input bus data; The low-frequency data processing circuit is connected to the bus data frequency reduction circuit via an output bus.

12. An FPGA device, characterized in that: A data processing system comprising the data processing system of claim 11.