Data processing circuit, device and method
By designing data processing circuits, including data input interfaces, packet header generation circuits and data output interfaces, to adapt to the data formats and bit widths of different networks, the problems of complex data packet forwarding and large delays in the existing technology are solved, and high efficiency is achieved. data processing and transmission.
Patent Information
- Application Number
- CN201911148502.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-21
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2039-11-21
AI Technical Summary
Existing chips have complex circuits, high costs, high power consumption and large delays when forwarding data packets, and cannot effectively handle the rapidly growing amount of data.
A data processing circuit is designed, including a data input interface, a header generation circuit, a data buffer memory and a data output interface. Through header analysis and latch signal generation, it adapts to the data format and bit width of different networks and realizes the data format and bit width. Wide conversion simplifies the data forwarding process.
It reduces the complexity and power consumption of data forwarding, improves the processing speed, adapts to the data transmission needs between different networks, and solves the problem of large delay in the existing technology.
Smart Images

Figure CN112825065B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular to a data processing circuit, device and method. Background Art
[0002] With the development of science and technology, human society is rapidly entering the intelligent era. An important feature of the intelligent era is that people obtain more and more types of data, the amount of data obtained is increasing, and the speed of processing data is getting higher and higher. Chips are the cornerstone of data processing, which fundamentally determines people's ability to process data. From the perspective of application fields, there are two main routes for chips: one is the general chip route, such as CPU (Central Processing Unit), etc., which can provide great flexibility, but the effective computing power is relatively low when processing algorithms in specific fields; the other is the dedicated chip route, such as TPU (Tensor Processing Unit), etc., which can play a higher effective computing power in certain specific fields, but in the face of flexible and changeable more general fields, their processing capabilities are relatively poor or even unable to process. Due to the wide variety and huge amount of data in the intelligent era, chips are required to have both extremely high flexibility, able to process algorithms in different fields and changing with each passing day, and extremely strong processing capabilities, able to quickly process huge and rapidly growing amounts of data.
[0003] In existing chips, generally only the data exchange between buses that implement multiple different protocols will be converted into data packet formats through a bridge. Figure 1 The figure shows a schematic diagram of data packet forwarding between buses through a bridge structure in the prior art, wherein bus 1 and bus 2 use different protocols, for example, bus 1 is an SPI (Serial Peripheral Interface) bus, and bus 2 is an AXI (Advanced eXtensible Interface) bus, and the two are interconnected through a bridge structure. If data is transmitted from bus 1 to bus 2, the bridge needs to unpack the data packet on bus 1 according to the SPI protocol, and then package the data in the format of the AXI protocol and transmit it to bus 2. Usually, the bridge needs to implement all protocol parsing, which is complex in circuit, high in cost, and high in power consumption. In addition, since a complete unpacking and packaging process is required, the delay during data packet transmission is relatively large. Summary of the invention
[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] In order to solve the technical problems of complex circuits, high cost, high power consumption and long delay when the bridge forwards data in the prior art, the present disclosure proposes the following technical solutions:
[0006] In a first aspect, an embodiment of the present disclosure provides a data processing circuit for processing data sent from a source network to a destination network, characterized in that it includes:
[0007] Data input interface, packet header generation circuit, data buffer memory, data generation circuit and data output interface;
[0008] The data input interface sends the source packet header of the original data packet received from the source network to the packet header generation circuit;
[0009] The data input interface sends the source data of the original data packet received from the source network to the data buffer memory;
[0010] The packet header generation circuit generates a data control signal and a destination packet header conforming to the destination network data format according to the source packet header;
[0011] The data generating circuit takes out the source data from the data buffer memory according to the data control signal, and generates the destination data conforming to the destination network data format;
[0012] The data output interface sends the destination packet header and the destination data to the destination network.
[0013] Furthermore, the source network and the destination network use the same protocol but different bit widths.
[0014] Furthermore, there are multiple data generation circuits and data output interfaces, and different data generation circuits and data output interfaces correspond to different destination networks.
[0015] Furthermore, the packet header generating circuit includes:
[0016] Packet header parser, packet header latch circuit and latch signal generator;
[0017] The packet header generation circuit generates a data control signal and a destination packet header conforming to a destination network data format according to the source packet header, including:
[0018] The packet header parser generates a destination network selection signal according to the source packet header;
[0019] The latch signal generator generates a latch signal according to the destination network selection signal;
[0020] The packet header latch circuit latches the source packet header according to the latch signal and modifies the control information in the source packet header according to the bit width of the destination network to generate a destination packet header.
[0021] Furthermore, the data generation circuit takes out the source data from the data buffer memory according to the data control signal and generates destination data conforming to the destination network data format, including:
[0022] The data generation circuit latches the source data read from the data buffer memory according to the latch signal;
[0023] The data generation circuit converts the latched source data into destination data according to the bit width of the destination network.
[0024] Further, the packet header generation circuit further includes: a packet header buffer memory, used to cache the source packet header of the original data packet received from the data input interface;
[0025] The packet header parser also includes a packet header input interface and a parser start signal receiving interface, wherein the packet header input interface is connected to the packet header buffer memory, and the parser start signal receiving interface is connected to the packet header buffer memory and the data buffer memory through a first logic circuit, and when the packet header buffer memory and the data buffer memory both receive data, the first logic circuit generates the parser start signal.
[0026] Further, the latch signal generator includes a latch signal start interface, a latch signal output interface, a counter and a second logic circuit, wherein the latch signal start interface is connected to the packet header parser, and the latch signal output interface is connected to the packet header latch circuit and the data generation circuit; the latch signal generator generates the latch signal according to the destination network selection signal, including:
[0027] The counter generates a counting signal by receiving the destination network selection signal through the latch signal start input interface;
[0028] The second logic circuit generates a latch signal according to the destination network selection signal and the counting signal.
[0029] In a second aspect, an embodiment of the present disclosure provides a data processing device, including:
[0030] A plurality of data processing circuits as described in any one of the first aspects.
[0031] In a third aspect, an embodiment of the present disclosure provides a data processing method for processing data sent from a source network to a destination network, characterized by comprising:
[0032] Receiving an original data packet from the source network, wherein the original data packet includes a source packet header and source data;
[0033] Generate a data control signal and a destination packet header conforming to the destination network data format according to the source packet header;
[0034] Generate destination data that conforms to the destination network data format according to the data control signal and the source data;
[0035] The destination packet header and the destination data are sent to the destination network.
[0036] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, comprising: a memory for storing computer-readable instructions; and one or more processors for executing the computer-readable instructions, so that when the processor is executed, any data processing method described in the third aspect is implemented.
[0037] In a fifth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium, characterized in that the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute any data processing method described in the third aspect.
[0038] In a sixth aspect, an embodiment of the present disclosure provides a computer program product, which is characterized in that it includes computer instructions, and when the computer instructions are executed by a computing device, the computing device can execute any of the data processing methods described in the aforementioned third aspect.
[0039] In a seventh aspect, an embodiment of the present disclosure provides a chip, characterized in that it includes the data processing device described in the second aspect.
[0040] In an eighth aspect, an embodiment of the present disclosure provides a computing device, characterized in that it includes the chip described in the seventh aspect.
[0041] The disclosed embodiment discloses a data processing circuit, device and method. The data processing circuit includes: a data input interface, a packet header generation circuit, a data buffer memory, a data generation circuit and a data output interface; the data input interface generates a data control signal and a destination packet header that conforms to the destination network data format from the source packet header of the original data packet received from the source network; the data generation circuit takes out the source data from the data buffer memory according to the data control signal, and generates destination data that conforms to the destination network data format; the data output interface sends the destination packet header and the destination data to the destination network. Through the above method, the technical problems of complex forwarding circuits, high power consumption and large delay in the prior art when forwarding data between two networks are solved.
[0042] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0044] Figure 1 A schematic diagram of forwarding data packets between buses through a bridge structure in the prior art;
[0045] Figure 2 A schematic diagram of an application scenario of a data processing circuit provided in an embodiment of the present disclosure;
[0046] Figure 3 A schematic diagram of data processing flow of a data processing device provided by an embodiment of the present disclosure;
[0047] Figure 4 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure;
[0048] Figure 5 A schematic diagram of the structure of a data processing circuit provided in an embodiment of the present disclosure;
[0049] Figure 6 A detailed structural diagram of a data processing circuit provided in an embodiment of the present disclosure;
[0050] Figure 7 A schematic diagram of the process of generating target data provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0051] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0052] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0053] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0054] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0055] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0056] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0057] Figure 2 FIG. 1 is a schematic diagram of an application scenario of the data processing circuit in the embodiment of the present disclosure. Figure 2 The figure shows a chip including the data processing circuit of the present disclosure. The chip includes multiple processing cores, the multiple processing cores are divided into multiple processing core groups, each processing core group shares a network on chip, all the networks on chip use the same protocol, but the data bit width is different, the processing cores sharing the same network on chip can be isomorphic or heterogeneous, but the data bit width of the data transmitted by these processing cores is the same. Multiple networks on chip supporting different data bit widths are connected through a data processing device PS (Package Station), and the data processing device is used to forward data between the multiple networks on chip.
[0058] like Figure 2 As shown, K M _C NM Represents a processing core on a chip, where M represents the group number, i.e., the number of the on-chip network, and NM (where M represents the number of N, i.e., the Mth N) represents the number of the processing core in the group. A processing core can be uniquely located by M and NM. M represents a network on chip, where M represents the number of the network on chip.
[0059] Figure 3 FIG. 2 is a schematic diagram of the data processing flow of the data processing device in the embodiment of the present disclosure. Figure 3 As shown, the input of the data processing device PS is connected to each on-chip network NoC, and the output is also connected to each on-chip network NoC. An on-chip network is connected to other on-chip networks through the internal structure, such as Figure 3 What is shown is a fully connected network, ie each network on chip is connected to every other network on chip via the data processing device.
[0060] Figure 4 FIG. 1 is a schematic diagram of the structure of a data processing device in an embodiment of the present disclosure. Figure 4 As shown, the data processing device includes a plurality of data processing circuits, and a plurality of on-chip networks are interconnected through the plurality of data processing circuits in the data processing device. Figure 4 The example in the figure is that three on-chip networks are interconnected through three data processing circuits of a data processing device, and each on-chip network corresponds to a fixed data processing circuit, wherein the data bit width of NoC1 is 16 bits, the data bit width of NoC2 is 32 bits, and the data bit width of NoC3 is 64 bits. The data of NoC1 can be converted into data with a bit width of 32 bits by the data processing circuit PG1 of the PS and forwarded to NoC2, or it can be converted into data with a bit width of 64 bits and forwarded to NoC3. The data transmission between other networks is similar to the above method and will not be repeated.
[0061] Figure 5 Schematic diagram of the structure of the data processing circuit provided by the embodiment of the present disclosure. Figure 5 As shown, the data processing circuit 500 includes: a data input interface 501, a packet header generation circuit 502, a data buffer memory 503, a data generation circuit 504 and a data output interface 505; wherein the data input interface 501 sends the source packet header H1 of the original data packet P1 received from the source network NoC1 to the packet header generation circuit 502; the data input interface 501 sends the source data D1 of the original data packet P1 received from the source network NoC1 to the data buffer memory 503; the packet header generation circuit generates a data control signal L[1:0] and a destination packet header H2 or H3 that conforms to the destination network data format according to the source packet header H1; the data generation circuit 504 takes out the source data D1 from the data buffer memory according to the data control signal L[1:0], and generates the destination data D2 or D3 that conforms to the destination network data format; the data output interface 505 sends the destination packet header H2 or H3 and the destination data D2 or D3 to the destination network NoC2 or NoC3.
[0062] Understandable, although Figure 5The data processing circuit shown in the figure includes two data generation circuits and two data output interfaces. However, in actual applications, the number of the data generation circuits 504 and the data output interfaces 505 corresponds to the number of destination networks. If the source network needs to connect to T destination networks, the data generation circuits and the data output interfaces are set to T.
[0063] Figure 6 Detailed structural diagram of the data processing circuit provided by the embodiment of the present disclosure. Since the structure of the data processing circuit is basically the same, Figure 6 The data processing circuit including a data generating circuit 504 is taken as an example for description. Figure 6 The structure diagram described in the above example corresponds to the specific bit width, that is, Figure 6 The figure shows the structure of the data processing circuit for transferring data from NoC1 with a 16-bit width to NoC2 with a 32-bit width.
[0064] Specifically, Figure 6 As shown, the packet header generation circuit 502 also includes: a packet header parser 601, a packet header latch circuit 602 and a latch signal generator 603; the packet header generation circuit 502 generates a data control signal and a destination packet header that conforms to the destination network data format according to the source packet header, including: the packet header parser 601 generates a destination network selection signal according to the source packet header; the latch signal generator 603 generates a latch signal according to the destination network selection signal; the packet header latch circuit 602 latches the source packet header according to the latch signal and modifies the control information in the source packet header according to the bit width of the destination network to generate a destination packet header. The following table is an exemplary format of the source packet header:
[0065] Ctrl_bit(4bit) ID_NoC(2bit) ID_Core(10bit) Addr_Mem(16bit)
[0066] The control information bit Ctrl_bit in the source packet header is 4 bits, of which the upper two bits indicate the total number of data packets, and the lower two bits indicate the number of valid bytes in the data packet. The destination address consists of 28 bits, of which the upper 2 bits indicate the ID number of the on-chip network, the next 10 bits indicate the ID number of the processing core, and the last 16 bits are the storage address of the data.
[0067] After receiving the source packet header, the packet header parser 601 parses the 2-bit data corresponding to the ID_NoC therein. For example, ID_NoC[0]=1 indicates that the destination network is NoC2, and ID_NoC[1]=1 indicates that the destination network is NoC3. In this example, the ID_NoC[0]=1, or the ID_NoC[1]=0, indicates that the destination network is NoC2. The packet header parser generates a destination network selection signal EN_NoC2 according to the source packet header. After receiving the EN_NoC2, the latch signal generator generates a latch signal L_DL. The packet header latch circuit 602 also includes a packet header latch signal receiving interface for receiving the latch signal to latch the source packet header.
[0068] After receiving the source packet header, the packet header generation circuit stores the source packet header in the packet header latch circuit. After receiving the latch signal L_DL, the packet header latch circuit latches the source packet header. The source packet header received during the latching period will not be latched. The packet header latch circuit modifies the control information in the source packet header according to the bit width of the destination network to generate the destination packet header. Since the bit width of the destination network is pre-set information, the packet header generation circuit can modify the control information Ctrl_bit in the source packet header according to the bit width of the destination network to generate the destination packet header after parsing the ID of the destination network.
[0069] Furthermore, the packet header generation circuit 502 also includes: a packet header buffer memory 604, which is used to cache the source packet header of the original data packet received from the data input interface; the packet header parser also includes a packet header input interface and a parser start signal receiving interface, wherein the packet header input interface is connected to the packet header buffer memory, and the parser start signal receiving interface is connected to the packet header buffer memory and the data buffer memory through a first logic circuit 605, and when the packet header buffer memory and the data buffer memory both receive data, the first logic circuit 605 generates the parser start signal.
[0070] like Figure 6 As shown, the source packet header is cached in the packet header buffer memory 604 after being input from the data input interface. The packet header parser includes two input interfaces and multiple output interfaces, one of which is a packet header input interface, which is connected to the packet header buffer memory; the other input interface is a parser start signal receiving interface, which is connected to the output interface of the first logic circuit 605; the first logic circuit 605 also includes two input interfaces, which are respectively connected to the packet header buffer memory 604 and the data buffer memory 503. When there are data in both the packet header buffer memory and the data buffer memory, the first logic circuit 605 generates the parser start signal.
[0071] Furthermore, the first logic circuit 605 is an AND gate circuit, such as Figure 6 As shown, after the packet header buffer memory 604 and the data buffer memory 503 receive the source packet header and source data of the original data packet respectively, they generate nEH signal and nED signal respectively. Both of these signals are high level and are input into the two input interfaces of the first logic circuit 605. The first logic circuit 605 is an AND gate, so its output signal EN is high level. The EN signal is the parser start signal, which is input into the parser start signal receiving interface so that the packet header parser parses the source packet header received from the packet header input interface.
[0072] Furthermore, the latch signal generator 603 includes a latch signal start interface, a latch signal output interface, a counter 606 and a second logic circuit 607, wherein the latch signal start interface is connected to the packet header parser, and the latch signal output interface is respectively connected to the packet header latch circuit 602 and the data generation circuit; the latch signal generator generates the latch signal according to the destination network selection signal, including: the counter 606 receives the destination network selection signal through the latch signal start interface to generate a counting signal; the second logic circuit 607 generates a latch signal according to the destination network selection signal and the counting signal.
[0073] Specifically, Figure 6 As shown, the latch signal generator 603 includes a latch signal generation start interface, which is connected to the output interface of the packet header parser and is used to receive the destination network selection signal sent by the packet header parser. If the packet header parser parses out that the destination network is the network corresponding to the latch signal generator 603, it sets the corresponding output interface to a high level, thereby triggering the latch signal generator to generate a latch signal. After receiving the destination network selection signal, the counter generates a counting signal at each clock according to the pre-set settings. Since the target network is NoC2, the data bit width of NoC2 is 32 bits, which is twice the data bit width of NoC1, 16 bits. Figure 6 In the example shown, the counter needs to count two numbers, and generates a signal C0 in the first clock cycle and a signal C1 in the second clock cycle, and then resets the counter. The inputs of the second logic circuit are respectively input with the counting signal of the counter and the destination network selection signal. When both signals are at a high level, a latch signal is output. An example of the second logic circuit is an AND gate circuit, such as Figure 6As shown, since the counter needs to count two numbers, the second logic circuit includes two AND gate circuits to generate a latch signal L_DL in the first clock cycle and a latch signal L_DH in the second clock cycle, wherein the latch signal L_DL is used to latch the source packet header in the packet header latch. In this example, the source packet header is latched for two clock cycles.
[0074] Furthermore, the packet header generation circuit 502 also includes: a third logic circuit 608, wherein the two input interfaces of the third logic circuit 608 are respectively connected to the data buffer memory 503 and the packet header parser 601, and the output interface of the third logic circuit is connected to the data buffer memory 503 and the packet header buffer memory 604; when the data buffer memory 503 and the packet header buffer memory 604 receive the source packet header and the source data respectively and the packet header parser 601 outputs the destination network selection signal, the third logic circuit 608 outputs a read signal to the data buffer memory 503 and the packet header buffer memory 604 to make the data buffer memory 503 and the packet header buffer memory 604 readable.
[0075] like Figure 6 As shown, exemplarily, the third logic circuit is an AND gate circuit, and the inputs of the AND gate circuit are nED indicating that the data is received in the data buffer memory and the destination network selection signal EN_NoC2. When nED and EN_NoC2 are both high levels, the output Rd of the third logic circuit is high level, and the Rd signal is output to the data buffer memory 503 and the packet header buffer memory 604, so that the data buffer memory 503 and the packet header buffer memory 604 can be read.
[0076] Furthermore, the data generation circuit 504 takes out the source data from the data buffer memory 503 according to the data control signal and generates the destination data conforming to the data format of the destination network, including: the data generation circuit 504 latches the source data read from the data buffer memory 503 according to the latch signal; the data generation circuit 504 converts the latched source data into the destination data according to the bit width of the destination network. Specifically, in Figure 6In the example shown, the NoC1 is a 16-bit wide network, and the NoC2 is a 32-bit wide network, so the data generation circuit needs to combine two 16-bit source data into a 32-bit destination data. Therefore, in this example, the data generation circuit includes two latches, namely D_L, which is used to latch the lower 16 bits of the 32-bit data, and D_H, which is used to latch the upper 16 bits of the 32-bit data. The data generation circuit reads source data from the data buffer memory in the clock cycle when the Rd signal is valid. In the first clock cycle, one source data is read from the data buffer memory and latched in the lower 16 bits of the data latch; in the second clock cycle, another source data is read from the data buffer memory and latched in the upper 16 bits of the data latch. The 32-bit data latched in the data latch is the data in a data packet in NoC2.
[0077] like Figure 7 As shown in this example, the process of generating the destination data is as follows: the source data D1 is stored in the data buffer memory, and in two clock cycles, two 16-bit source data are respectively read into the data latch to form 32-bit destination data D2. It can be understood that although the above example shows data transmission from a 16-bit network to a 32-bit network, it can actually be data transmission from a network of any bit width to another network of any bit width. In this case, it is only necessary to pre-set the bit width of the data latch and the reading or sending method of the source data. The above example is for example only and does not constitute a limitation of the present disclosure.
[0078] When transmitting data from a network with a small bit width to a network with a large bit width, the packet header generation circuit generates a destination packet header by modifying the control information bits of the source packet header. In this case, the storage address in the destination packet header does not need to be modified, and only the storage address in the first source packet header needs to be used to store the low-order data in the destination data, while the high-order data only needs to continue to be stored sequentially. In one example, the upper two bits of the control information bits of the source packet header represent the total number of source data, and the information is as follows:
[0079]
[0080]
[0081] The lower two bits of the control information bits of the source packet header represent the valid byte information in the source data, and the information is as follows:
[0082] Ctrl_bit[1] Ctrl_bit[0] Notes 0 0 invalid 0 1 Low byte is valid 1 0 High byte is valid 1 1 Both bytes are valid
[0083] At the same time, the control information of the destination packet header has the highest two bits, which are the total number of destination data. The information is as follows:
[0084] Ctrl_bit[3] Ctrl_bit[2] Notes 0 0 Continuously transmit 4 packets 0 1 Only one packet is transmitted 1 0 Continuously transmit 2 packets 1 1 Continuously transmit 3 packets
[0085] The lower two bits of the control information bits of the destination packet header represent the valid byte information in the destination data, as follows:
[0086] Ctrl_bit[1] Ctrl_bit[0] Notes 0 0 invalid 0 1 The lower byte is valid 1 0 The lower 2 bytes are valid 1 1 All 4 bytes are valid
[0087] As in the above example, the source network is a 16-bit wide network, and the destination network is a 32-bit wide network. If the control information bit of the source packet header indicates that there are two consecutive source data transmissions, and all bytes in each source data are valid, that is, Ctrl_bit = '1011', then the control information bit in the destination packet header is Ctrl_bit = '0111', indicating that there is only one destination data, and all 4 bytes in the packet are valid and need to be transmitted; after the second latch signal, the destination data and the destination packet header are sent out.
[0088] It can be understood that when transmitting data from a network with a large bit width to a network with a small bit width, the packet header generation circuit generates a destination packet header by modifying the control information bit and storage address of the source packet header. Since the source data needs to be divided into multiple parts for transmission from a network with a large bit width to a network with a small bit width, such as transmitting data from a network with a 32-bit bit width to a network with a 16-bit bit width, the 32-bit source data needs to be split into two 16-bit destination data. Therefore, in addition to the control information bit needing to be modified, the storage address in the destination packet header needs to be calculated. For the first destination packet header, its storage address does not need to be modified, and the previous storage address is directly used to store the 16-bit destination data. For another destination packet header, it needs to be calculated based on the storage address of the source packet header plus a 16-bit offset to obtain the storage address in the second destination packet header to store the other 16-bit destination data.
[0089] It can be understood that when transmitting data from a large bit width network to a small bit width network, the data latch circuit in the data generation circuit has the same bit width as the large bit width network. For example, when transmitting data from a 32-bit bit width network to a 16-bit bit width network, the data latch circuit in the data generation circuit is 32 bits, which reads the source data in the data buffer memory into the data latch circuit once, and then outputs a 16-bit destination data in each cycle. At the same time, the packet header generation circuit outputs the corresponding destination packet header.
[0090] The presently disclosed embodiment also provides a data processing method, which is characterized in that it includes: receiving an original data packet from the source network, the original data packet including a source packet header and source data; generating a data control signal and a destination packet header that conforms to the data format of the destination network according to the source packet header; generating destination data that conforms to the data format of the destination network according to the data control signal and the source data; and sending the destination packet header and the destination data to the destination network.
[0091] The disclosed embodiment further provides a data processing device, characterized in that it comprises: a plurality of data processing circuits as described in any one of the above embodiments.
[0092] The disclosed embodiments further provide a chip, characterized in that it includes a plurality of processing core groups, an on-chip network connected to each processing core group, and the plurality of on-chip networks are connected via a data processing device as described in the above embodiments.
[0093] An embodiment of the present disclosure provides a computer program product, wherein the product is characterized in that it includes computer instructions. When the computer instructions are executed by a computing device, the computing device can execute any of the data processing methods in the aforementioned embodiments.
[0094] An embodiment of the present disclosure provides a computing device, characterized by comprising a chip as described in any one of the aforementioned embodiments.
[0095] The flowchart and block diagram in the accompanying drawings of the present disclosure illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0096] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0097] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0098] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Claims
1. A data processing circuit for processing data sent from a source network to a destination network, characterized in that: include: Data input interface, packet header generation circuit, data buffer memory, data generation circuit and data output interface; The data input interface sends the source packet header of the original data packet received from the source network to the packet header generation circuit; The data input interface sends the source data of the original data packet received from the source network to the data buffer memory; The packet header generation circuit generates a data control signal and a destination packet header that conforms to a destination network data format according to the source packet header, wherein the network data format is a bit width; The data generating circuit takes out the source data from the data buffer memory according to the data control signal, and generates the destination data conforming to the destination network data format; The data output interface sends the destination packet header and the destination data to the destination network; The source network and the destination network use the same protocol but different bit widths.
2. The data processing circuit as claimed in claim 1, wherein there are multiple data generation circuits and multiple data output interfaces, and different data generation circuits and data output interfaces correspond to different destination networks.
3. The data processing circuit according to claim 1, wherein the packet header generation circuit comprises: Packet header parser, packet header latch circuit and latch signal generator; The packet header generation circuit generates a data control signal and a destination packet header conforming to a destination network data format according to the source packet header, including: The packet header parser generates a destination network selection signal according to the source packet header; The latch signal generator generates a latch signal according to the destination network selection signal; The packet header latch circuit latches the source packet header according to the latch signal and modifies the control information in the source packet header according to the bit width of the destination network to generate the destination packet header.
4. The data processing circuit according to claim 3, wherein the data generating circuit fetches the source data from the data buffer memory according to the data control signal and generates the destination data conforming to the destination network data format, comprising: The data generation circuit latches the source data read from the data buffer memory according to the latch signal; The data generation circuit converts the latched source data into the destination data according to the bit width of the destination network.
5. The data processing circuit according to claim 3, wherein the packet header generation circuit further comprises: A packet header buffer memory, used for caching the source packet header of the original data packet received from the data input interface; The packet header parser also includes a packet header input interface and a parser start signal receiving interface, wherein the packet header input interface is connected to the packet header buffer memory, and the parser start signal receiving interface is connected to the packet header buffer memory and the data buffer memory through a first logic circuit, and when the packet header buffer memory and the data buffer memory both receive data, the first logic circuit generates the parser start signal.
6. The data processing circuit according to claim 4 or 5, wherein the latch signal generator comprises a latch signal start interface, a latch signal output interface, a counter and a second logic circuit, wherein the latch signal start interface is connected to the packet header parser, and the latch signal output interface is connected to the packet header latch circuit and the data generation circuit respectively; The latch signal generator generates the latch signal according to the destination network selection signal, including: The counter generates a counting signal by receiving the destination network selection signal through the latch signal startup input interface; The second logic circuit generates the latch signal according to the destination network selection signal and the counting signal.
7. A data processing device, characterized in that: include: A plurality of data processing circuits as claimed in any one of claims 1 to 6.
8. A chip, characterized in that: It comprises a plurality of processing core groups and an on-chip network connected to each of the processing core groups, wherein the plurality of on-chip networks are connected via the data processing device as claimed in claim 7.
9. A data processing method for processing data sent from a source network to a destination network, characterized in that: include: Receiving an original data packet from the source network, wherein the original data packet includes a source packet header and source data; Generate a data control signal and a destination packet header that conforms to a destination network data format according to the source packet header, wherein the network data format is bit width; Generate destination data that conforms to the destination network data format according to the data control signal and the source data; Sending the destination packet header and the destination data to the destination network; The source network and the destination network use the same protocol but different bit widths.
Citation Information
Patent Citations
Method, device and route device for forwarding data packages
CN103748842A
Method and apparatus for software defined frame header mapping between multiple protocols
CN109218301A
Network processor system for supporting QoS based on FPGA and data packages processing method
CN1431806A
Method for converting packet mode data from high-bit width format to low-bit width format using frame alignment
CN1467956A
Method for implementing packing and unpacking of giga optical Ethernet label switching network
CN1633105A
