Data transmission device, data transmission method and chip
Through the isolation of data prefetch latch registers and two-level scheduling logic, the complex and delayed scheduling logic in the data transmission of multi-source interfaces to multi-destination interfaces in the chip is solved, and simplified data transmission logic and optimized timing are achieved.
Patent Information
- Application Number
- CN202111095971.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-18
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-09-18
AI Technical Summary
In a chip, when multiple source interfaces need to transmit data to multiple destination interfaces, the scheduling logic in the prior art is complex, resulting in increased timing difference and delay, especially in large-scale chip designs, logic complexity and delay problems are prominent.
Using data prefetch latch registers and two-level scheduling logic, the independent prefetching and distribution of source interfaces and destination interfaces is realized through polling scheduling methods, isolating the dependencies between the first scheduler and the second scheduler, and ensuring each clock cycle Each destination interface has data output.
The chip's data transmission logic is simplified, the timing is optimized, the logic complexity and delay are reduced, and a clearer structure and efficient data transmission are achieved.
Smart Images

Figure CN113744774B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technology, and in particular to a data transmission device, a data transmission method and a chip. Background Art
[0002] In some application scenarios, the scale of chips is getting larger and larger, especially in the fields of artificial intelligence, network switching, etc., which require large amounts of data to be classified, stored and processed. In these chips, data from multiple interfaces often need to be transmitted to multiple different interfaces. Assume that there are m input interfaces, and each interface alternately outputs data of the same size sent to n destination interfaces. Each data contains the destination interface number, which indicates which destination interface it is transmitted to.
[0003] like Figure 1 As shown in the figure, how to select from the source interface in each clock cycle, output at most one data to each destination interface, and ensure that the source interface gets a fair scheduling opportunity is a problem that must be solved in chip design. At the same time, the design method for scheduling the source interface directly affects the timing and performance of the chip.
[0004] Use the memory to partition the data of each source interface according to the destination interface, and store the data transmitted to each destination interface. Figure 2 As shown, for the convenience of description, the memory is referred to as the source interface memory below. The first source interface memory is first selected by polling, and the information of a destination interface is selected from it by polling. It is assumed that the selected destination interface is a; the second source interface memory is selected by polling, and the information of a destination interface other than a is selected from it by polling. It is assumed that the selected destination interface is b; the third source interface memory is selected by the same method and a destination interface different from both a and b is selected from it. It is assumed that the selected destination interface is c. And so on, until all n destination interfaces are selected. This method requires two schedulings in each step, first selecting the source interface memory, and then selecting the destination interface. In order to ensure fairness and selection efficiency, it must be ensured that the source interface memory selected in each step stores the data of the destination interface that is different from the selected destination interface. In this way, the later the steps, the greater the constraints of the selected destination interface when selecting the source interface memory and the destination interface from it, and the more complicated the logic becomes.
[0005] The selection of the final source interface memory and the destination interface is subject to the most constraints and the logic is the most complex. When the number n becomes larger, the timing of the combinational logic on the chip implementation may become very poor. At the same time, since the front and rear interface selection behaviors are interrelated, they need to be divided into multiple stages of pipeline implementation, and there is no rule to follow. The control logic is complex, and the delay is also increased.
[0006] Therefore, it is necessary to improve the existing data transmission devices and methods. Summary of the invention
[0007] In view of the above-mentioned technical problems existing in the prior art, the present application provides a data transmission device, which is used to transmit multiple data of M source interfaces to N destination interfaces, including: M source interface memories, used to store the multiple data; a latch register, used to store N data pre-fetched from each source interface memory corresponding to each destination interface; M first schedulers, configured to implement pre-fetching of N data of each source interface memory through polling scheduling; and N second schedulers, configured to distribute the data stored in the latch register to each destination interface through polling scheduling in the same clock cycle; wherein M and N are both integers, M≥2, N≥1.
[0008] Optionally, the source interface memory has partitions corresponding to the destination interfaces, and the source interface memory is configured as follows:
[0009] Based on the partition, a first sending request is sent to the first scheduler, and the first scheduler responds to the request of one of the partitions through polling scheduling, and pre-fetches a data stored in the partition to the corresponding latch register, wherein if the data stored on the latch register corresponding to a partition is invalid, the first sending request is set to 1; otherwise, the first sending request is cleared to 0, and only the partition with the first sending request set to 1 can participate in the polling scheduling of the first scheduler, and this operation is executed in parallel by all the source interface memories.
[0010] Optionally, the source interface can send a second sending request to each of the destination interfaces corresponding to the data latched in the latch register, and the second scheduler can select one of the source interfaces that sends the second sending request through polling scheduling, and send the data stored in the latch register corresponding to the source interface to the destination interface corresponding to the second scheduler.
[0011] Optionally, the destination interface is capable of sending a third sending request to the latch register to which the second sending request is sent, and in response to the second sending request of the latch register, the third sending request of the destination interface corresponding to the selected source interface is set to 1, and this operation is executed in parallel by all the second schedulers.
[0012] Optionally, the latch register is configured to: when the third sending request received by the corresponding source interface from the destination interface is 1, clear the second sending request corresponding to the corresponding source interface and the destination interface that sends the third sending request.
[0013] In order to achieve the above-mentioned invention object, the present application provides a data transmission method, which uses the above-mentioned data transmission device to transmit data, including the steps of:
[0014] S1, pre-fetching one data for each source interface memory corresponding to each destination interface and latching it in the latch register;
[0015] S2, using the second scheduler to retrieve one piece of data for each of the destination interfaces from the latch register within one clock cycle in a polling scheduling manner;
[0016] S3. Pre-fetch data from the corresponding partition of the source interface memory for the latch register in step S2 in a round-robin manner through the first scheduler.
[0017] In order to achieve the above-mentioned invention object, the present application provides a data transmission method, which is applied to transmit multiple data of M source interfaces to N destination interfaces, comprising the steps of:
[0018] Data pre-fetching step: pre-fetching N data based on each source interface and corresponding to each destination interface respectively and latching them in a latch register;
[0019] The first scheduling step: retrieving one piece of data for each destination interface through a polling scheduling method for the data latched in the latch register;
[0020] The second scheduling step: pre-fetching a maximum of N data for the latch register by means of polling scheduling to fill the gaps in the data retrieved in the first scheduling step.
[0021] Optionally, each of the source interfaces can send a second sending request to each of the destination interfaces corresponding to the data latched in the latch register. In the first scheduling step, a source interface that sends the second sending request can be selected through polling scheduling, and the data stored in the latch register corresponding to the source interface can be sent to the destination interface corresponding to the second scheduler.
[0022] Optionally, the destination interface is capable of sending a third sending request to the latch register to which the second sending request is sent. In the second scheduling step, in response to the third sending request received by the corresponding source interface being 1, data is pre-fetched from the corresponding source interface corresponding to the destination interface.
[0023] In order to achieve the above-mentioned purpose of the invention, the present application provides a chip, which uses the data transmission device or data transmission method described above.
[0024] The data transmission device and data transmission method provided in this application have at least the following advantages:
[0025] Through the isolation of data pre-fetch latch and two-level scheduling logic, the first scheduler and the second scheduler can run simultaneously without any restriction on each other. The data transmission device has a clear structure and simple logic, which optimizes the chip timing and is conducive to back-end implementation. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a structural diagram of interface data transmission in the prior art;
[0027] Figure 2 It is a structural schematic diagram of a data storage method in the prior art;
[0028] Figure 3 It is a structural schematic diagram of a data transmission device in an embodiment of the present application;
[0029] Figure 4 for Figure 3 A schematic diagram of the structure of one of the source interfaces of the data transmission device;
[0030] Figure 5 for Figure 3 A schematic diagram of the structure of a source interface and a first destination interface in a data transmission device;
[0031] Figure 6 A schematic diagram of a data transmission method provided in an embodiment of the present application;
[0032] Figure 7 The present invention is a flowchart of another data transmission method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] Hereinafter, exemplary embodiments will be described in detail with reference to the accompanying drawings. However, the present application is not limited to the following embodiments, but includes various changes, substitutions and deformations within the technical scope of the present disclosure. The terms "first", "second", etc. can be used to explain various elements, and the number of elements is not limited by such terms. These terms are only used to distinguish one element from another element. Therefore, an element referred to as the first element in one embodiment can be referred to as the second element in another embodiment. Unless the context requires otherwise, the singular form does not exclude the plural form. The following is an explanation of the embodiments of the present application by specific specific embodiments, and those familiar with the technology can easily understand other advantages and effects of the present application from the content disclosed in this specification.
[0034] The present embodiment provides a data transmission device and a data transmission method for scheduling multiple interface data suitable for chip design implementation, so as to solve the technical problems of complex data scheduling control logic and large delay in the prior art.
[0035] The data transmission device 100 provided in this embodiment is used to transmit multiple data of M source interfaces to N destination interfaces, where M≥2 and N≥1. For ease of description, M=3 and N=2 are taken as examples below.
[0036] like Figure 3 As shown, the data transmission device 100 includes: three source interfaces 20, each source interface 20 includes a source interface memory 10 for storing multiple data of each source interface 20; a latch register 30 for storing two data pre-taken by each source interface memory 10 corresponding to two destination interfaces 40 respectively.
[0037] Alternatively, if Figure 3 and Figure 4 As shown, each source interface memory 10 is partitioned based on the destination interface 40 of the data stored therein. This arrangement can facilitate pre-fetching of data from the source interface memory 10 .
[0038] Specifically, the three source interface memories 10 are respectively a first source interface memory 11, a second source interface memory 12 and a third source interface memory 13, the destination interface 40 includes a first destination interface 41 and a second destination interface 42, and each source interface memory 10 has a first partition 01 corresponding to the first destination interface 41 and a second partition 02 corresponding to the second destination interface 42.
[0039] The first source interface memory 11 stores data A and data B corresponding to the first destination interface 41, and data C and data D corresponding to the second destination interface 42; the second source interface memory 12 stores data E and data F corresponding to the first destination interface 41, and data G and data H corresponding to the second destination interface 42; the third source interface memory 13 stores data I and data J corresponding to the first destination interface 41, and data K and data L corresponding to the second destination interface 42.
[0040] Then, “two data pre-fetched by each source interface memory 10 corresponding to two destination interfaces 40” can be specifically:
[0041] The latch register 30 stores data A, data C, data E, data G, data I, and data K.
[0042] Optionally, the data transmission device 100 includes three first schedulers 50 configured to store data in three source interface memories 10 into the latch register 30 in a polling scheduling manner.
[0043] Optionally, the first partition 01 and the second partition 02 of each source interface memory 10 can send a request (hereinafter referred to as the first sending request) to the latch register 30. If the data stored on the latch register 30 corresponding to a partition (for example, the first partition 01 of the first source interface memory 11) is invalid, the first sending request corresponding to the partition can be set to 1; otherwise, the first sending request is cleared. Only the partitions with the first sending request of 1 can participate in the polling scheduling. This operation is performed in parallel by all source interface memories 10, thereby realizing data pre-fetching of each source interface memory 10 for the destination interface 40.
[0044] Optionally, in this embodiment, if Figure 5 As shown, a second scheduler 60 is provided for each destination interface 40, and the latch register 30 can send a request (hereinafter referred to as the second sending request) to each destination interface 40 corresponding to the data latched by it; correspondingly, the destination interface 40 can send a request (hereinafter referred to as the third sending request) to the latch register 30 that sends the second sending request to it.
[0045] The second scheduler 60 can collect latched data and second sending requests from different source interfaces 20 and send them to the corresponding destination interface 40. Theoretically, each second scheduler 60 can receive up to three second sending requests (corresponding to three source interface memories 10 respectively). Each second scheduler 60 adopts polling scheduling to select a source interface 20 that sends a second sending request, and sends the data stored in the latch register 30 corresponding to the source interface 20 to the destination interface 40 corresponding to the second scheduler 60. At the same time, the third sending request of the destination interface 40 corresponding to the selected source interface 20 is set to 1. The destination interface 40 with the third sending request of 1 indicates that the data from the latch register 30 can be received within the clock cycle. This operation is executed in parallel by all second schedulers 60. Such a setting can ensure that each destination interface 40 has a data output within each clock cycle.
[0046] Optionally, for each first scheduler 50, when the third sending request received by the corresponding source interface 20 is 1, the second sending request of the latch corresponding to the third sending request can be cleared to zero. At the same time, if there is still data in the partition corresponding to the latch register 30, the first sending request of the partition is reset to 1, and the partition can re-participate in the polling scheduling and read and latch data from the corresponding area of the source interface memory 10. With this arrangement, data can be pre-fetched from the source interface memory 10 again after the data in the latch register 30 is transmitted to the destination interface 40.
[0047] The data transmission device 100 provided in this embodiment has at least the following advantages:
[0048] Through the isolation of data pre-fetch latch and two-level scheduling logic, the first scheduler 50 and the second scheduler 60 can run simultaneously without any restriction on each other. The data transmission device 100 has a clear structure, simple logic, optimized chip timing, and is conducive to back-end implementation.
[0049] Alternatively, if Figure 6 As shown, this embodiment also provides a data transmission method, which is applied to distribute multiple data from M source interfaces 20 to N destination interfaces 40, including the steps of:
[0050] Data pre-fetching step: pre-fetching N data based on each source interface 20 corresponding to each destination interface 40 and latching them in the latch register 30;
[0051] The first scheduling step: the data latched in the latch register 30 is retrieved for each destination interface 40 through a polling scheduling method;
[0052] The second scheduling step: pre-fetching a maximum of N data for the latch register 30 by means of polling scheduling to fill the gaps in the data retrieved in the first scheduling step.
[0053] Optionally, each source interface 20 can send a second sending request to each destination interface 40 corresponding to the data latched in the latch register 30. In the first scheduling step, a source interface 20 that sends the second sending request can be selected through polling scheduling, and the data stored in the latch register 30 corresponding to the source interface 20 is sent to the destination interface 40 corresponding to the second scheduler 60.
[0054] Optionally, the destination interface 40 is capable of sending a third sending request to the latch register 30 to which the second sending request is sent. In the second scheduling step, in response to the third sending request received by the corresponding source interface 20 being 1, data is pre-fetched from the corresponding source interface 20 corresponding to the destination interface 40.
[0055] Alternatively, if Figure 7 As shown, this embodiment also provides a data transmission method, which is applied to schedule data using the data transmission device 100 described above.
[0056] Optionally, the data transmission method comprises the steps of:
[0057] S1, pre-fetch one data for each source interface memory 10 corresponding to each destination interface 40 and latch it in the latch register 30;
[0058] S2, the second scheduler 60 retrieves one data for each destination interface 40 from the latch register 30 in one clock cycle in a polling scheduling manner;
[0059] S3 , pre-fetching data from the corresponding partition of the source interface memory 10 for the latch register 30 in step S2 in a round-robin manner through the first scheduler 50 .
[0060] The data transmission method provided in this embodiment realizes data transmission through data anticipation and two-level independent scheduling, has simple logic, is easy to implement, and optimizes chip timing.
[0061] The specific implementation of step S2 and step S3 can refer to the above description of the data transmission device 100 and the data transmission method, which will not be repeated here.
[0062] Optionally, this embodiment further provides a chip (not shown), which applies the data transmission device 100 or the data transmission method described above.
[0063] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A data transmission device, used to transmit multiple data from M source interfaces to N destination interfaces, characterized in that: include: M source interface memories, used to store the plurality of data; A latch register, used for storing N data pre-fetched by each source interface memory corresponding to each destination interface respectively; M first schedulers are configured to implement pre-fetching of N data of each source interface memory by polling scheduling; as well as N second schedulers, configured to distribute the data stored in the latch register to each destination interface by means of round-robin scheduling; Wherein, M and N are both integers, M≥2, N≥1; The source interface memory has partitions corresponding to the destination interfaces, and the source interface memory is configured to perform the following operations in parallel: Based on the partition, a first sending request is sent to the first scheduler, and the first scheduler responds to the request of a partition by polling scheduling, and pre-fetches a data stored in the partition to the corresponding latch register, wherein if the data stored in the latch register corresponding to a partition is invalid, the first sending request is set to 1; otherwise, the first sending request is cleared to 0, and only the partition with the first sending request set to 1 can participate in the polling scheduling of the first scheduler; The source interface can send a second sending request to each of the destination interfaces corresponding to the data latched in the latch register, and the second scheduler can select a source interface that sends the second sending request through polling scheduling, and send the data stored in the latch register corresponding to the source interface to the destination interface corresponding to the second scheduler.
2. The data transmission device according to claim 1, characterized in that All the second schedulers perform the following operations in parallel: the destination interface is able to send a third sending request to the latch register to which the second sending request is sent, and in response to the second sending request of the latch register, the third sending request of the destination interface corresponding to the selected source interface is set to 1.
3. The data transmission device according to claim 2, characterized in that: The latch register is configured to: when the third sending request received by the corresponding source interface from the destination interface is 1, clear the second sending request sent to the corresponding destination interface to zero.
4. A data transmission method, using the data transmission device according to any one of claims 2 to 3 to transmit data, characterized in that: Includes steps: S1, pre-fetching one data for each source interface memory corresponding to each destination interface and latching it in the latch register; S2, using the second scheduler to retrieve one piece of data for each of the destination interfaces from the latch register within one clock cycle in a polling scheduling manner; S3. Pre-fetch data from the corresponding partition of the source interface memory for the latch register in step S2 in a round-robin manner through the first scheduler.
5. A data transmission method, using the data transmission device according to any one of claims 2 to 3 to schedule data, the method being applied to transmit multiple data of M source interfaces to N destination interfaces, characterized in that: Includes steps: Data pre-fetching step: pre-fetching N data based on each source interface and corresponding to each destination interface respectively and latching them in a latch register; The first scheduling step: retrieving one piece of data for each destination interface through a polling scheduling method for the data latched in the latch register; The second scheduling step: pre-fetching a maximum of N data for the latch register by means of polling scheduling to fill the gaps in the data retrieved in the first scheduling step.
6. The data transmission method according to claim 5, characterized in that: Each of the source interfaces can send a second sending request to each of the destination interfaces corresponding to the data latched in the latch register. In the first scheduling step, a source interface that sends the second sending request can be selected through polling scheduling, and the data stored in the latch register corresponding to the source interface can be sent to the destination interface corresponding to the second scheduler.
7. The data transmission method according to claim 5, characterized in that: The destination interface is capable of sending a third sending request to the latch register to which the second sending request is sent. In the second scheduling step, in response to the third sending request received by the corresponding source interface being 1, data is pre-fetched from the corresponding source interface corresponding to the destination interface.
8. A chip, characterized in that: A data transmission device as described in any one of claims 1 to 3 or a data transmission method as described in any one of claims 4 to 7 is applied.
