A data distribution circuit, method, medium and chip

By designing a data distribution circuit in multi-channel data transmission, using the matching relationship of the target data packet read twice, the data storage in the register is reduced, and the problem of excessive register demand in multi-channel data transmission is solved, and the problem of excessive registration demand in multi-channel data transmission is realized. More efficient data transmission and lower power consumption.

CN118802816BActive Publication Date: 2024-11-19ZHONGHAO XINYING (HANGZHOU) TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411276603.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-11-19
Estimated Expiration
2044-09-12

AI Technical Summary

Technical Problem

In multi-channel data transmission, a large amount of register temporary storage data is required, resulting in the problem of increasing chip area and increasing power consumption.

Method used

Design a data distribution circuit, including memory interaction module, header information processing module, data processing module and data output module, by reading the target data packet twice, determine the matching relationship between the data header and sub-data and the downstream channel, and reduce the data in Storage requirements in registers.

Benefits of technology

It reduces storage overhead, reduces the area and power consumption of the processing chip, and improves data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802816B_ABST
    Figure CN118802816B_ABST
Patent Text Reader

Abstract

The present application discloses a data distribution circuit, method, medium and chip. The circuit includes: a memory interaction module, a header information processing module, a data processing module and a data output module; the memory interaction module reads the data header and each sub-data of the target data packet for the first time, and sends it to the header information processing module; the header information processing module determines the first matching relationship between the data header and each sub-data and each downstream channel; the memory interaction module reads the target data packet for the second time and sends it to the data processing module; the data processing module determines the second matching relationship between the first-in-first-out cache sequence of the data output module and each downstream channel, and based on the first and second matching relationships, sends the data to the data output module; the data output module sends the data to the corresponding downstream channel. The data distribution circuit in this embodiment reads the target data packet twice in succession, and does not need to store each sub-data of the target data packet during the data processing process, so there is no need for too many registers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing in computing devices, and in particular to a data distribution circuit, method, medium and chip. Background Art

[0002] In modern digital systems, the efficiency of data processing and transmission is crucial to system performance. As the complexity of digital systems continues to increase, traditional single processing units can no longer meet the needs of high-throughput, low-latency data processing. Multi-channel architecture has become the mainstream design trend to solve this problem.

[0003] In the field of multi-channel data, existing designs usually read data from memory, process it, and then transmit it to the corresponding downstream channel. However, due to the need to wait for the data processing process, the data needs to be stored in registers during data processing, so a large number of registers are required to temporarily store data, which in turn leads to an increase in the area of ​​the corresponding processing chip and an increase in power consumption. Summary of the invention

[0004] The main purpose of the present application is to propose a data distribution circuit, method, medium and chip, aiming to solve the problem that a large number of registers are needed to temporarily store data in multi-channel data transmission, resulting in an increase in processing chip area and power consumption.

[0005] To achieve the above-mentioned purpose, the present application proposes a data distribution circuit, comprising: a memory interaction module, a header information processing module, a data processing module and a data output module;

[0006] The memory interaction module is configured to: in response to receiving a data read instruction, read a data header and each sub-data of a target data packet corresponding to the data read instruction for the first time, and send the data header and each sub-data to the header information processing module;

[0007] The header information processing module is configured to: in response to receiving the data header and each sub-data, determine a first matching relationship between the data header and each sub-data and each downstream channel, send the first matching relationship to the data processing module, and send a matching completion signal to the memory interaction module;

[0008] The memory interaction module is further configured to: in response to receiving the matching completion signal, read the data header and each sub-data of the target data packet for a second time, and send the data header and each sub-data to the data processing module;

[0009] The data processing module is configured to: in response to receiving the data header and the respective sub-data, determine a second matching relationship between a first-in-first-out cache sequence of the data output module and the respective downstream channels, and send the data header and the respective sub-data to the first-in-first-out cache sequence of the data output module based on the first matching relationship and the second matching relationship;

[0010] The data output module is configured to: in response to the received data header and the respective sub-data, send the data header and the respective sub-data to a corresponding downstream channel.

[0011] In the implementation of this application, the memory interaction module is also configured as:

[0012] After receiving the data read instruction, parsing the data read instruction, determining the first address of the target data packet in the preset storage module;

[0013] Reading a data header of the target data packet from a preset storage module based on the first address;

[0014] Determining the number of sub-data contained in the target data packet based on the data header;

[0015] Based on the first address and the number of the sub-data, each sub-data is read from the storage module.

[0016] In the implementation of the present application, the memory interaction module is further configured to: read the data header and the various sub-data in parallel from the various storage blocks of the storage module.

[0017] In the implementation of this application, the memory interaction module is also configured as:

[0018] After each acquisition of the data header and each sub-data of the target data packet, the acquired data header and each sub-data are rearranged so that the data header and each sub-data are cached in the first-in-first-out cache sequence of the memory interaction module according to their respective order in the target data packet.

[0019] In the implementation of this application, the header information processing module is also configured to:

[0020] Extracting the first characteristic value of the data header and each sub-data;

[0021] Based on the first characteristic values ​​of the data header and each sub-data and the preset registration information, a downstream channel matching the data header and each sub-data is determined.

[0022] In the implementation of this application, the data processing module is also configured as:

[0023] After receiving the sub-data, the valid information of the sub-data is extracted to obtain the target output data, which includes the data header of the target data packet and the extracted sub-data, and based on the first matching relationship and the second matching relationship, the target output data is sent to the first-in-first-out cache sequence of the data output module.

[0024] In the implementation of this application, the data processing module is also configured as:

[0025] After acquiring the target data packet, extracting a second characteristic value of the target data packet;

[0026] Based on the second characteristic value, a second matching relationship between the first-in-first-out cache sequence of the data output module and each of the downstream channels is determined.

[0027] In the implementation of this application, the data processing module is also configured as:

[0028] Based on the first matching relationship and the second matching relationship, determining a target first-in-first-out cache sequence corresponding to the data header and each sub-data in the data output module, wherein the target first-in-first-out cache sequence corresponding to the data header and any of the sub-data matches the same downstream channel in both the first matching relationship and the second matching relationship;

[0029] The data header and each sub-data are respectively sent to the corresponding target first-in-first-out cache sequence in the data output module.

[0030] In the implementation of this application, the data output module is also configured as:

[0031] After sending the data header and each sub-data to the corresponding downstream channel, sending a transmission completion instruction to the memory interaction module;

[0032] The memory interaction module is further configured to: in response to receiving the transmission completion instruction, send synchronization information to the preset synchronization memory module, the synchronization information including the number of sub-data sent to the downstream channel in this data transmission.

[0033] The present application also proposes a data distribution method, which is applied to the data distribution circuit described in any of the above embodiments. The data distribution method includes:

[0034] In response to receiving a data read instruction, the memory interaction module reads a data header and each sub-data of a target data packet corresponding to the data read instruction for the first time, and sends the data header and each sub-data to the header information processing module;

[0035] Determine a first matching relationship between the data header and each sub-data and each downstream channel based on the header information processing module, and after obtaining the first matching relationship, send the first matching relationship to the data processing module, and send a matching completion signal to the memory interaction module;

[0036] In response to the memory interaction module receiving the matching completion signal, the memory interaction module reads the data header and each sub-data of the target data packet for the second time, and sends the data header and each sub-data to the data processing module;

[0037] Determine a second matching relationship between a first-in-first-out cache sequence of the data output module and each downstream channel based on the data processing module, and send the data header and each sub-data to the first-in-first-out cache sequence of the data output module based on the first matching relationship and the second matching relationship;

[0038] The data header and each sub-data are sent to a corresponding downstream channel based on the data processing module.

[0039] In the implementation of the present application, after the memory interaction module receives the data reading instruction, the data distribution method further includes:

[0040] Parsing the data read instruction based on the memory interaction module to determine the first address of the target data packet in the preset storage module;

[0041] Reading a data header of the target data packet from a preset storage module based on the first address;

[0042] Determining the number of sub-data contained in the target data packet based on the data header;

[0043] Based on the first address and the number of the sub-data, each sub-data is read from the storage module.

[0044] In the implementation of the present application, the data header and the various sub-data are read in parallel from the various storage blocks of the storage module based on the memory interaction module.

[0045] In the implementation of the present application, after the memory interaction module reads the data header and each sub-data of the target data packet, the data distribution method further includes:

[0046] The acquired data header and each sub-data are rearranged so that the data header and each sub-data are cached in a first-in-first-out cache sequence of the memory interaction module according to their respective sequences in the target data packet.

[0047] In the implementation of the present application, after the header information processing module obtains the data header and each sub-data, the first matching relationship is determined in the following manner:

[0048] Extracting the first characteristic value of the data header and each sub-data;

[0049] Based on the first characteristic values ​​of the data header and each sub-data and the preset registration information, a downstream channel matching the data header and each sub-data is determined.

[0050] In the implementation of the present application, after the data processing module receives each sub-data, the data distribution method further includes:

[0051] Extract valid information of each sub-data to obtain target output data, wherein the target output data includes a data header of the target data packet and each extracted sub-data, and based on the first matching relationship and the second matching relationship, send the target output data to a first-in-first-out cache sequence of the data output module.

[0052] In the implementation of the present application, after the data processing module obtains the target data packet, the second matching relationship is determined in the following manner:

[0053] Extracting a second characteristic value of the target data packet;

[0054] Based on the second characteristic value, a second matching relationship between the first-in-first-out cache sequence of the data output module and each of the downstream channels is determined.

[0055] In the implementation of this application, the data distribution method further includes:

[0056] Based on the first matching relationship and the second matching relationship, determining a target first-in-first-out cache sequence corresponding to the data header and each sub-data in the data output module, wherein the target first-in-first-out cache sequence corresponding to the data header and any of the sub-data matches the same downstream channel in both the first matching relationship and the second matching relationship;

[0057] Based on the data processing module, the data header and each sub-data are respectively sent to the corresponding target first-in-first-out cache sequence in the data output module.

[0058] In the implementation of the present application, after the data output module sends the data header and each sub-data to the corresponding downstream channel, the data distribution method further includes:

[0059] Sending a transmission completion instruction to the memory interaction module based on the data output module;

[0060] The memory interaction module sends synchronization information to the preset synchronization memory module, where the synchronization information includes the number of sub-data sent to the downstream channel for this data transmission.

[0061] The present application also proposes a readable storage medium, which includes instructions. When the instructions are executed on a computing device, the computing device executes any of the above methods.

[0062] The present application also proposes a chip, comprising the data distribution circuit described in any of the above embodiments.

[0063] In the embodiment of the present application, the functions of data reading, data parsing, header information generation and data distribution are modularized into a memory interaction module, a data processing module, a header information processing module and a data output module, so that the data transmission system is easier to expand and maintain, and the modules can be flexibly increased or decreased according to actual needs to adapt to applications of different scales. In addition, in the prior art, when data is sent, after the target data packet is read from the storage module, the target data packet needs to be processed to determine the matching relationship between the data header and each sub-data in the target data packet and the downstream channel. In this process, the data header and each sub-data need to wait for the processing process and cannot be sent to the downstream channel, so a large number of registers are required to store the data header and each sub-data. In the embodiment of the present application, for a data reading instruction, the target data packet is read twice successively. When the first reading is performed, the first matching relationship between the data header and each sub-data in the target data packet and the downstream channel is determined. After the first matching relationship is obtained, the target data packet is read for the second time. Since the first matching relationship between the data header and each sub-data and the downstream channel has been obtained when the target data packet is read for the first time, therefore, when the second reading is performed, it can be directly sent without storage, thereby not requiring a large number of registers, thereby reducing storage overhead. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0065] Figure 1 This is a diagram of an application scenario of a data distribution circuit in the field of multi-channel data transmission in an embodiment of the present application;

[0066] Figure 2 A schematic diagram of storing a target data packet in a storage module in an embodiment of the present application;

[0067] Figure 3A sorting diagram of each data read from the storage module in a first-in-first-out cache sequence (FIFO) of the memory interaction module in an embodiment of the present application;

[0068] Figure 4 A sorting diagram of the first-in-first-out cache sequence (FIFO) of the memory interaction module after the data read from the storage module are rearranged in one embodiment of the present application;

[0069] Figure 5 A step diagram of a data distribution method in an embodiment of the present application;

[0070] Figure 6 A module diagram of a readable storage medium in an embodiment of the present application.

[0071] Reference numerals:

[0072] 100 - data distribution circuit, 110 - memory interaction module, 120 - head information processing module, 130 - data processing module, 140 - data output module, 200 - storage module, 300 - controller, 400 - synchronous memory module, 500 - control and status register, 600 - data transmission system.

[0073] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0074] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present application, and are not intended to limit the scope of the present application in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0075] Those skilled in the art know that the embodiments of the present application can be implemented as a system, device, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0076] According to the implementation manner of the present application, a data distribution circuit, method, medium and chip are proposed.

[0077] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.

[0078] The principles and spirit of the present application are explained in detail below with reference to several representative implementations of the present application.

[0079] Exemplary Devices

[0080] This exemplary embodiment provides a data distribution circuit 100, such as Figure 1 As shown, the data distribution circuit 100 includes:

[0081] Memory interaction module 110, header information processing module 120, data processing module 130 and data output module 140;

[0082] The memory interaction module 110 is configured to: in response to receiving a data read instruction, read a data header and each sub-data of a target data packet corresponding to the data read instruction for the first time, and send the data header and each sub-data to the header information processing module 120;

[0083] The header information processing module 120 is configured to: in response to receiving the data header and each sub-data, determine a first matching relationship between the data header and each sub-data and each downstream channel, send the first matching relationship to the data processing module 130, and send a matching completion signal to the memory interaction module 110;

[0084] The memory interaction module 110 is further configured to: in response to receiving the matching completion signal, read the data header and each sub-data of the target data packet for a second time, and send the data header and each sub-data to the data processing module 130;

[0085] The data processing module 130 is configured to: in response to receiving the data header and the respective sub-data, determine a second matching relationship between the first-in-first-out cache sequence of the data output module 140 and the respective downstream channels, and send the data header and the respective sub-data to the first-in-first-out cache sequence of the data output module 140 based on the first matching relationship and the second matching relationship;

[0086] The data output module 140 is configured to: in response to the received data header and each sub-data, send the data header and each sub-data to a corresponding downstream channel.

[0087] like Figure 1 As shown, Figure 1 The data distribution circuit 100 is an application scenario diagram of the data distribution circuit 100 in the multi-channel data transmission field in the embodiment of the present application. The data transmission system 600 includes a controller 300, a storage module 200, a synchronous memory module 400, a downstream channel and a data distribution circuit 100.

[0088] Among them, a plurality of data packets are pre-stored in the storage module 200, each of which includes a data header and a plurality of sub-data. When the data packet is stored in the storage module 200, the storage address of the data header is located in front of each sub-data. In addition, the data header usually includes information such as the source, the first address, the protocol type, the data size, the number of sub-data, etc. of the corresponding data packet. For example, in network communication, a data packet is composed of a binary data sequence composed of electrical pulses, which includes two parts: header information (data packet) and data (each sub-data). Header information such as the source IP address, the destination IP address, etc. is used to determine the routing of the data packet to ensure that the data is correctly transmitted in the network.

[0089] The controller 300 is used to send data read instructions to the data distribution circuit 100 according to demand. It should be noted that the data packets read by the data read instructions are pre-stored in the storage module 200; after the data distribution circuit 100 receives the data read instruction, it reads the data packet corresponding to the data read instruction from the storage module 200, processes it and then distributes it to each downstream channel. After completing a data distribution, the synchronous memory module 400 synchronizes the information of this data distribution.

[0090] In an embodiment of the present application, the memory interaction module 110 is further configured to: after receiving the data read instruction, parse the data read instruction to determine the first address of the target data packet in the preset storage module 200; read the data header of the target data packet from the preset storage module 200 based on the first address; determine the number of sub-data contained in the target data packet based on the data header; and read each sub-data from the storage module 200 based on the first address and the number of sub-data.

[0091] For example, in the embodiment of the present application, when a target data packet needs to be sent to a data reading device through a downstream channel, a data reading instruction about the target data packet is sent to the memory interaction module 110 through the controller 300. After receiving the data reading instruction, the memory interaction module 110 can parse the data reading instruction to determine the first address of the target data packet to be read in the data reading instruction in the preset storage module 200. Generally speaking, the data header and multiple sub-data included in the data packet are stored continuously in the storage module 200, and the data header is located at the front position, that is, the first address position, and each sub-data is stored continuously after the first address. Therefore, after the memory interaction module 110 determines the first address of the target data packet, the data header of the target data packet can be read from the first address in the storage module 200. After the memory interaction module 110 obtains the data header of the target data packet, the number of sub-data contained in the target data packet can be determined by parsing the data header. Then, after the first address, after continuously reading the storage bits in the storage module 200 that are the same as the number of sub-data in the target data packet, all the sub-data of the target data packet can be read.

[0092] In the embodiment of the present application, the memory interaction module 110 is further configured to: read the data header and the sub-data in parallel from the storage blocks of the storage module 200 .

[0093] The storage module 200 includes a plurality of storage blocks, each of which has a storage depth. Figure 2 As shown, in the embodiment of the present application, the storage module 200 includes storage blocks Bank0-Bank15, and the storage depth of each storage block is 16 (0-15). The target data packet includes Data0-Data18, Data0 is the data header, Data1-Data18 are the sub-data, and Data0-Data18 are pre-stored in the storage blocks of the storage module 200. If the memory interaction module 110 reads serially from the storage module 200, it reads the data in one storage block each time in the order of Bank0-Bank15, for example, the first time to read Data0 and Data16 in Bank0, the second time to read Data1 and Data17 in Bank1, the third time to read Data2 and Data18 in Bank3, and so on, until Data15 in Bank15 is read. This reading method is slow and time-consuming when reading serially one by one according to the storage blocks. Therefore, in the embodiment of the present application, the memory interaction module 110 can be configured to read in parallel from the storage module 200.

[0094] For example, assuming that in the embodiment of the present application, the memory interaction module 110 is configured to read data in parallel with a parallelism of 4, then the data in four storage blocks are read each time, for example, the first read is: (Data0, Data16) (Data1, Data17) (Data2, Data18) (Data3), the second read is (Data4, Data5) (Data6, Data7), and so on, the last read is (Data12) (Data13) (Data14) (Data15). Setting the memory interaction module 110 to read data from the storage module 200 in parallel can reduce the time of data reading, increase the reading speed, reduce the overall delay of the system, and improve the ability of real-time data processing.

[0095] In the embodiment of the present application, the memory interaction module 110 is further configured as follows:

[0096] After each acquisition of the data header and each sub-data of the target data packet, the acquired data header and each sub-data are rearranged so that the data header and each sub-data are cached in the first-in-first-out cache sequence of the memory interaction module 110 according to their respective order in the target data packet.

[0097] like Figure 3 As shown, when the memory interaction module 110 reads the target data packet from the storage module 200, it reads it according to the storage block in the storage module 200. Therefore, the order of each data read in the first-in-first-out cache sequence (FIFO) of the memory interaction module 110 is as follows: Figure 3 As shown, Data0-Data18 contained in the target data packet are not cached in the FIFO of the memory interaction module 110 according to their respective order in the target data packet. When the memory interaction module 110 sends the target data packet to the header information processing module 120, it is also cached in the FIFO of the memory interaction module 110 according to the order in which they are in the target data packet. Figure 3 Therefore, in the embodiment of the present application, the memory interaction module 110 is configured to, after acquiring the data header and each sub-data of the target data packet, rearrange them according to the order in which they are in the target data packet, and then cache them in the FIFO of the memory interaction module 110, that is, Figure 4 As shown, when the memory interaction module 110 sends the data header and each sub-data to the header information processing module 120, they are sent in the order in which they are in the target data packet, so that the header information processing module 120 can process the target data packet conveniently.

[0098] In the embodiment of the present application, the header information processing module 120 is further configured to:

[0099] Extracting the first characteristic value of the data header and each sub-data;

[0100] Based on the first characteristic values ​​of the data header and each sub-data and the preset registration information, a downstream channel matching the data header and each sub-data is determined.

[0101] In the embodiment of the present application, after the header information processing module 120 obtains the data header and each sub-data of the target data packet sent by the memory interaction module 110, the first characteristic value can be extracted from the data header and the sub-data. Among them, the registration information corresponding to the header data and each sub-data is pre-stored in the control and status register 500, and the first characteristic value of the header data and each sub-data contains the feature address (featureid) of the corresponding registration information in the control and status register 500. Therefore, based on the feature address of the header data and each sub-data, the corresponding registration information can be read from the control and status register 500, and the corresponding registration information can indicate the corresponding downstream channel ID. Therefore, the header information processing module 120 can obtain the corresponding registration information from the control and status register 500 based on the first characteristic value of the header data and each sub-data, and then determine the downstream channel corresponding to the data header and each sub-data, that is, the first matching relationship.

[0102] For example, in the embodiment of the present application, Figure 1 As shown, the downstream channels include channel 0 to channel n. Taking the above target data packets including Data0 to Data18 as an example, the first matching relationship can indicate the channel IDs corresponding to Data0 to Data18, as shown in Table 1 below:

[0103] Table 1

[0104]

[0105] As shown in Table 1 above, Data0-3 in the target data packet needs to be sent through downstream channel 0, Data4-7 in the target data packet needs to be sent through downstream channel 1, Data8-11 in the target data packet needs to be sent through downstream channel 2, Data12-15 in the target data packet needs to be sent through downstream channel 3, and Data16-18 in the target data packet needs to be sent through downstream channel 4.

[0106] In the embodiment of the present application, after the header information processing module 120 obtains the first matching relationship, the header information processing module 120 can send the obtained first matching relationship to the data processing module 130 and the data output module 140. In addition, the header information processing module 120 can also send a matching completion signal to the memory interaction module 110. When the memory interaction module 110 receives the matching completion signal sent by the header information processing module 120, it can read the data header and each sub-data of the target data packet from the storage module for the second time, wherein the second reading process is the same as the first reading process, and will not be repeated here. When the memory interaction module 110 reads the data header and each sub-data of the target data packet for the second time, it can send it to the data processing module 130. It should be noted that after the memory interaction module 110 obtains the data header and each sub-data of the target data packet for the second time, it can also reorder them and cache them in the FIFO of the memory interaction module 110 according to their respective order in the target data packet, so that when the target data packet sends the header data and each sub-data to the data processing module 130, it can also be sent in the order of their respective order in the target data packet.

[0107] In the embodiment of the present application, the data processing module 130 is further configured as follows:

[0108] After acquiring the target data packet, extracting a second characteristic value of the target data packet;

[0109] Based on the second characteristic value, a second matching relationship between the first-in-first-out cache sequence of the data output module 140 and each of the downstream channels is determined.

[0110] In the embodiment of the present application, after the data processing module 130 obtains the data header and each sub-data of the target data packet, it can process the data header and the sub-data to obtain the second characteristic value of the target data packet, and the second characteristic value includes its characteristic address. The data processing module 130 can obtain the relevant storage information in the state and control register 500 based on the characteristic address, wherein the storage information at least includes the matching relationship between the first-in-first-out buffer sequence (FIFO) of the data output module 140 and each downstream channel. For example, as shown in the following Table 2:

[0111] Table 2

[0112]

[0113] As shown in Table 2 above, the data cached in the data output module 140FIFO 0-1 will be sent to the downstream channel 0 by the data output module 140, the data cached in the data output module 140FIFO 2-3 will be sent to the downstream channel 1 by the data output module 140, the data cached in the data output module 140FIFO 4-5 will be sent to the downstream channel 2 by the data output module 140, the data cached in the data output module 140FIFO 6-7 will be sent to the downstream channel 3 by the data output module 140, and the data cached in the data output module 140FIFO 8-9 will be sent to the downstream channel 4 by the data output module 140.

[0114] In the embodiment of the present application, the data processing module 130 is further configured as follows:

[0115] Based on the first matching relationship and the second matching relationship, determining a target first-in-first-out cache sequence corresponding to the data header and each sub-data in the data output module 140, wherein the target first-in-first-out cache sequence corresponding to the data header and any of the sub-data matches the same downstream channel in both the first matching relationship and the second matching relationship;

[0116] The data header and each sub-data are sent to their corresponding target first-in-first-out cache sequences in the data output module 140 respectively.

[0117] As shown in Table 1 and Table 2, Data 0-3 in the target data packet needs to be sent through downstream channel 0, and downstream channel 0 corresponds to FIFO 0-1 of the data processing module 130. Therefore, FIFO 0-1 of the data output module 140 is the target first-in-first-out cache sequence of Data 0-3, and Data 0-3 can be sent to FIFO 0-1 of the data output module 140 based on the data processing module 130; similarly, Data 4-7 in the target data packet needs to be sent through downstream channel 1, and downstream channel 1 corresponds to FIFO 2-3 of the data processing module 130. Therefore, FIFO 2-3 of the data output module 140 is the target first-in-first-out cache sequence of Data 4-7, and Data 0-3 can be sent to FIFO 0-1 of the data output module 140 based on the data processing module 130; Data 8-11 in the target data packet needs to be sent through downstream channel 2, and downstream channel 2 corresponds to FIFO 4-5 of the data processing module 130. Therefore, FIFO 2-3 of the data output module 140 is the target first-in-first-out cache sequence of Data 4-7. 4-5 is the target first-in-first-out cache sequence of Data 8-11, and Data 8-11 can be sent to FIFO 4-5 of the data output module 140 based on the data processing module 130; Data 12-15 in the target data packet needs to be sent through downstream channel 3, and downstream channel 3 corresponds to FIFO 6-7 of the data processing module 130. Therefore, FIFO 6-7 of the data output module 140 is the target first-in-first-out cache sequence of Data 12-15, and Data 12-15 can be sent to FIFO 6-7 of the data output module 140 based on the data processing module 130; Data 16-18 in the target data packet needs to be sent through downstream channel 4, and downstream channel 4 corresponds to FIFO 8-9 of the data processing module 130. Therefore, FIFO 8-9 of the data output module 140 is the target first-in-first-out cache sequence of Data 16-18, and Data 16-18 can be sent to FIFO 6-7 of the data output module 140 based on the data processing module 130. 8-9.

[0118] In an embodiment of the present application, the data output module 140 is connected to the controller 300 of each downstream channel through a credit-based interface. When each downstream channel controller 300 can receive data, the data will be discharged from the FIFO of the data output module 140 and sent to the corresponding downstream channel. Therefore, it can be ensured that transmission is only performed when each downstream channel is able to receive data, thereby reducing the probability of data loss and transmission errors and improving the reliability of data transmission.

[0119] In the embodiment of the present application, the data processing module 130 is further configured as follows:

[0120] After receiving the sub-data, the valid information of the sub-data is extracted to obtain the target output data, which includes the data header of the target data packet and the extracted sub-data, and based on the first matching relationship and the second matching relationship, the target output data is sent to the first-in-first-out cache sequence of the data output module 140.

[0121] Among them, in the process of extracting valid information, only each sub-data is processed, and each valid information is extracted from each sub-data. For invalid information, it is not necessary to send it to the data output module 140, thereby reducing the overhead of data transmission and improving the transmission speed. In addition, it should be noted that when the data processing module 130 extracts valid information based on each sub-data and obtains each extracted sub-data, the number and order of each extracted sub-data are the same as the number and order of each original sub-data. For example, the sub-data contained in the target data packet include Data1-18, then after extracting valid information from each sub-data, it still includes 18 extracted sub-data, and they correspond to Data1-18 one by one, for example, the valid information corresponding to Data1 is Data'1, then Data'1 is the extracted sub-data corresponding to Data1, the valid information corresponding to Data2 is Data'2, Data'2 is the extracted sub-data corresponding to Data2, and so on, the valid information corresponding to Data18 is Data'18, and Data'18 is the extracted sub-data corresponding to Data18.

[0122] In addition, it should be noted that when valid information is extracted from each sub-data, the first matching relationship between the data header and each sub-data and the downstream channel determined by the header information processing module 120 is still applicable to the extracted valid information, such as the matching relationship between Data1-Data18 and the downstream channel, that is, the matching relationship between Data'1-18 and the downstream; in addition, when sending to the data transmission module, the data header and each extracted sub-data can be sent according to the first matching relationship and the second matching relationship. For example, based on the data processing module 130, Data 0 and Data'1-3 are sent to FIFO 0-1 of the data output module 140; based on the data processing module 130, Data'4-7 are sent to FIFO 0-1 of the data output module 140; based on the data processing module 130, Data'8-11 are sent to FIFO 4-5 of the data output module 140; based on the data processing module 130, Data'12-15 are sent to FIFO 6-7 of the data output module 140; based on the data processing module 130, Data'16-18 are sent to FIFO 8-9 of the data output module 140.

[0123] In the embodiment of the present application, the functions of data reading, data parsing, header information generation and data distribution are modularized into a memory interaction module 110, a data processing module 130, a header information processing module 120 and a data output module 140, so that the data transmission system 600 is easier to expand and maintain, and the modules can be flexibly increased or decreased according to actual needs to adapt to applications of different scales. In addition, in the prior art, when data is sent, after the target data packet is read from the storage module 200, the target data packet needs to be processed to determine the matching relationship between the data header and each sub-data in the target data packet and the downstream channel. In this process, the data header and each sub-data need to wait for the processing process and cannot be sent to the downstream channel, so a large number of registers are required to store the data header and each sub-data. In the embodiment of the present application, for a data read instruction, the target data packet is read twice in succession. During the first read, the first matching relationship between the data header and each sub-data in the target data packet and the downstream channel is determined. After the first matching relationship is obtained, the target data packet is read a second time. Since the first matching relationship between the data header and each sub-data and the downstream channel has been obtained during the first read of the target data packet, it can be sent directly during the second read without storage, thereby not requiring a large number of registers, thereby reducing storage overhead.

[0124] Exemplary Methods

[0125] like Figure 5 As shown, this exemplary embodiment proposes a data distribution method, which is applied to the data distribution circuit described in any embodiment of the above exemplary device. In the embodiment of the present application, the data distribution method includes the following steps S100-S500:

[0126] Step S100: in response to receiving a data read instruction, the memory interaction module reads a data header and each sub-data of a target data packet corresponding to the data read instruction for the first time, and sends the data header and each sub-data to the header information processing module;

[0127] Step S200: determining a first matching relationship between the data header and each sub-data and each downstream channel based on the header information processing module, and after obtaining the first matching relationship, sending the first matching relationship to the data processing module, and sending a matching completion signal to the memory interaction module;

[0128] Step S300: in response to the memory interaction module receiving the matching completion signal, the memory interaction module reads the data header and each sub-data of the target data packet for the second time, and sends the data header and each sub-data to the data processing module;

[0129] Step S400: determining a second matching relationship between a first-in-first-out buffer sequence of the data output module and each downstream channel based on the data processing module, and sending the data header and each sub-data to the first-in-first-out buffer sequence of the data output module based on the first matching relationship and the second matching relationship;

[0130] Step S500: sending the data header and each sub-data to a corresponding downstream channel based on the data processing module.

[0131] The specific implementation of steps S100-S500 refers to the various embodiments of the exemplary device, which will not be described in detail here.

[0132] In the embodiment of the present application, after the memory interaction module receives the data reading instruction, the data distribution method further includes:

[0133] Parsing the data read instruction based on the memory interaction module to determine the first address of the target data packet in the preset storage module;

[0134] Reading a data header of the target data packet from a preset storage module based on the first address;

[0135] Determining the number of sub-data contained in the target data packet based on the data header;

[0136] Based on the first address and the number of the sub-data, each sub-data is read from the storage module.

[0137] In the embodiment of the present application, the data header and the sub-data are read in parallel from the storage blocks of the storage module based on the memory interaction module.

[0138] In the embodiment of the present application, after the memory interaction module reads the data header and each sub-data of the target data packet, the data distribution method further includes:

[0139] The acquired data header and each sub-data are rearranged so that the data header and each sub-data are cached in a first-in-first-out cache sequence of the memory interaction module according to their respective data orders in the target data packet.

[0140] In the embodiment of the present application, after the header information processing module obtains the data header and each sub-data, the first matching relationship is determined in the following manner:

[0141] Extracting the first characteristic value of the data header and each sub-data;

[0142] Based on the first characteristic values ​​of the data header and each sub-data and the preset registration information, a downstream channel matching the data header and each sub-data is determined.

[0143] In the embodiment of the present application, after the data processing module receives each sub-data, the data distribution method further includes:

[0144] Extract valid information of each sub-data to obtain target output data, wherein the target output data includes a data header of the target data packet and each extracted sub-data, and based on the first matching relationship and the second matching relationship, send the target output data to a first-in-first-out cache sequence of the data output module.

[0145] In the embodiment of the present application, after the data processing module obtains the target data packet, the second matching relationship is determined in the following manner:

[0146] Extracting a second characteristic value of the target data packet;

[0147] Based on the second characteristic value, a second matching relationship between the first-in-first-out cache sequence of the data output module and each of the downstream channels is determined.

[0148] In an embodiment of the present application, the data distribution method further includes:

[0149] Based on the first matching relationship and the second matching relationship, determining a target first-in-first-out cache sequence corresponding to the data header and each sub-data in the data output module, wherein the target first-in-first-out cache sequence corresponding to the data header and any of the sub-data matches the same downstream channel in both the first matching relationship and the second matching relationship;

[0150] Based on the data processing module, the data header and each sub-data are respectively sent to the corresponding target first-in-first-out cache sequence in the data output module.

[0151] In the embodiment of the present application, after the data output module sends the data header and each sub-data to the corresponding downstream channel, the data distribution method further includes:

[0152] Sending a transmission completion instruction to the memory interaction module based on the data output module;

[0153] The memory interaction module sends synchronization information to the preset synchronization memory module, where the synchronization information includes the number of sub-data sent to the downstream channel for this data transmission.

[0154] The data distribution method proposed in the embodiment of the present application is applied to the data distribution circuit described in any of the above embodiments, and therefore, it has at least all the beneficial effects of the above data distribution circuit, which will not be described one by one here.

[0155] Exemplary Media

[0156] After introducing the method, medium and system of the exemplary embodiments of the present application, next, reference is made to Figure 6 For a description of the computer-readable storage medium of the exemplary embodiment of the present application, please refer to Figure 6 , the computer-readable storage medium shown is a CD 70, on which a computer program (i.e., a program product) is stored. When the computer program is executed by the processor, the steps described in the above method implementation are implemented, for example, in response to receiving a data read instruction, the memory interaction module reads the data header and each sub-data of the target data packet corresponding to the data read instruction for the first time, and sends the data header and each sub-data to the header information processing module; Based on the header information processing module, determine the first matching relationship between the data header and each sub-data and each downstream channel, and after obtaining the first matching relationship, send the first matching relationship to the data processing module, and send a matching completion signal to the memory interaction module; in response to the memory interaction module receiving the matching completion signal, read the data header and each sub-data of the target data packet for the second time based on the memory interaction module, and send the data header and each sub-data to the data processing module; based on the data processing module, determine the second matching relationship between the first-in-first-out cache sequence of the data output module and each downstream channel, and based on the first matching relationship and the second matching relationship, send the data header and each sub-data to the first-in-first-out cache sequence of the data output module; based on the data processing module, send the data header and each sub-data to the corresponding downstream channel. The specific implementation method of each step will not be repeated here. It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.

[0157] Exemplary Chips

[0158] After introducing the method, circuit and medium of the exemplary embodiment of the present application, next, the chip of the exemplary embodiment of the present application is introduced.

[0159] In an embodiment of the present application, a chip is provided, including the data distribution circuit described in any of the above embodiments. Since the chip includes the data distribution circuit in any of the above embodiments, all the beneficial effects of the data distribution circuit described in the above embodiments are not described in detail here.

[0160] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

[0161] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

Claims

1. A data distribution circuit, comprising: Memory interaction module, header information processing module, data processing module and data output module; The memory interaction module is configured to: in response to receiving a data read instruction, read a data header and each sub-data of a target data packet corresponding to the data read instruction for the first time, and send the data header and each sub-data to the header information processing module; The header information processing module is configured to: in response to receiving the data header and each sub-data, determine a first matching relationship between the data header and each sub-data and each downstream channel, send the first matching relationship to the data processing module, and send a matching completion signal to the memory interaction module; The memory interaction module is further configured to: in response to receiving the matching completion signal, read the data header and each sub-data of the target data packet for a second time, and send the data header and each sub-data to the data processing module; The data processing module is configured to: in response to receiving the data header and the respective sub-data, determine a second matching relationship between a first-in-first-out cache sequence of the data output module and the respective downstream channels, and send the data header and the respective sub-data to the first-in-first-out cache sequence of the data output module based on the first matching relationship and the second matching relationship; The data output module is configured to: in response to the received data header and the respective sub-data, send the data header and the respective sub-data to a corresponding downstream channel.

2. The data distribution circuit according to claim 1, wherein the memory interaction module is further configured to: After receiving the data read instruction, parsing the data read instruction, determining the first address of the target data packet in the preset storage module; Reading a data header of the target data packet from a preset storage module based on the first address; Determining the number of sub-data contained in the target data packet based on the data header; Based on the first address and the number of the sub-data, each sub-data is read from the storage module.

3. According to the data distribution circuit as described in claim 2, the memory interaction module is also configured to: read the data header and the respective sub-data in parallel from the respective storage blocks of the storage module.

4. The data distribution circuit according to claim 1, wherein the memory interaction module is further configured to: After each acquisition of the data header and each sub-data of the target data packet, the acquired data header and each sub-data are rearranged so that the data header and each sub-data are cached in the first-in-first-out cache sequence of the memory interaction module according to their respective order in the target data packet.

5. The data distribution circuit according to claim 1, wherein the header information processing module is further configured to: Extracting the first characteristic value of the data header and each sub-data; Based on the first characteristic values ​​of the data header and each sub-data and the preset registration information, a downstream channel matching the data header and each sub-data is determined.

6. The data distribution circuit according to claim 1, wherein the data processing module is further configured to: After receiving the sub-data, the valid information of the sub-data is extracted to obtain the target output data, which includes the data header of the target data packet and the extracted sub-data, and based on the first matching relationship and the second matching relationship, the target output data is sent to the first-in-first-out cache sequence of the data output module.

7. The data distribution circuit according to claim 1, wherein the data processing module is further configured to: After acquiring the target data packet, extracting a second characteristic value of the target data packet; Based on the second characteristic value, a second matching relationship between the first-in-first-out cache sequence of the data output module and each of the downstream channels is determined.

8. The data distribution circuit according to claim 1, wherein the data processing module is further configured to: Based on the first matching relationship and the second matching relationship, a target first-in-first-out cache sequence corresponding to the data header and each sub-data in the data output module is determined, wherein: The target first-in-first-out cache sequence corresponding to the data header and any of the sub-data is matched with the same downstream channel in both the first matching relationship and the second matching relationship; The data header and each sub-data are respectively sent to the corresponding target first-in-first-out cache sequence in the data output module.

9. The data distribution circuit according to claim 1, wherein the data output module is further configured to: After sending the data header and each sub-data to the corresponding downstream channel, sending a transmission completion instruction to the memory interaction module; The memory interaction module is further configured to: in response to receiving the transmission completion instruction, send synchronization information to the preset synchronization memory module, the synchronization information including the number of sub-data sent to the downstream channel in this data transmission.

10. A data distribution method, applied to the data distribution circuit according to any one of claims 1 to 9, the data distribution method comprising: In response to receiving a data read instruction, the memory interaction module reads a data header and each sub-data of a target data packet corresponding to the data read instruction for the first time, and sends the data header and each sub-data to the header information processing module; Determine a first matching relationship between the data header and each sub-data and each downstream channel based on the header information processing module, and after obtaining the first matching relationship, send the first matching relationship to the data processing module, and send a matching completion signal to the memory interaction module; In response to the memory interaction module receiving the matching completion signal, the memory interaction module reads the data header and each sub-data of the target data packet for the second time, and sends the data header and each sub-data to the data processing module; Determine a second matching relationship between a first-in-first-out cache sequence of the data output module and each downstream channel based on the data processing module, and send the data header and each sub-data to the first-in-first-out cache sequence of the data output module based on the first matching relationship and the second matching relationship; The data header and each sub-data are sent to a corresponding downstream channel based on the data processing module.

11. The data distribution method according to claim 10, after the memory interaction module receives the data reading instruction, the data distribution method further comprises: Parsing the data read instruction based on the memory interaction module to determine the first address of the target data packet in the preset storage module; Reading a data header of the target data packet from a preset storage module based on the first address; Determining the number of sub-data contained in the target data packet based on the data header; Based on the first address and the number of the sub-data, each sub-data is read from the storage module.

12. The data distribution method according to claim 11, further comprising: The data header and the sub-data are read in parallel from the storage blocks of the storage module based on the memory interaction module.

13. The data distribution method according to claim 10, after the memory interaction module reads the data header and each sub-data of the target data packet, the data distribution method further comprises: The acquired data header and each sub-data are rearranged so that the data header and each sub-data are cached in a first-in-first-out cache sequence of the memory interaction module according to their respective sequences in the target data packet.

14. The data distribution method according to claim 10, after the header information processing module obtains the data header and each sub-data, the first matching relationship is determined in the following manner: Extracting the first characteristic value of the data header and each sub-data; Based on the first characteristic values ​​of the data header and each sub-data and the preset registration information, a downstream channel matching the data header and each sub-data is determined.

15. The data distribution method according to claim 10, after the data processing module receives the sub-data, the data distribution method further comprises: Extract valid information of each sub-data to obtain target output data, wherein the target output data includes a data header of the target data packet and each extracted sub-data, and based on the first matching relationship and the second matching relationship, send the target output data to a first-in-first-out cache sequence of the data output module.

16. The data distribution method according to claim 10, after the data processing module obtains the target data packet, the second matching relationship is determined in the following manner: Extracting a second characteristic value of the target data packet; Based on the second characteristic value, a second matching relationship between the first-in-first-out cache sequence of the data output module and each of the downstream channels is determined.

17. The data distribution method according to claim 10, further comprising: Based on the first matching relationship and the second matching relationship, determining a target first-in-first-out cache sequence corresponding to the data header and each sub-data in the data output module, wherein the target first-in-first-out cache sequence corresponding to the data header and any of the sub-data matches the same downstream channel in both the first matching relationship and the second matching relationship; Based on the data processing module, the data header and each sub-data are respectively sent to the corresponding target first-in-first-out cache sequence in the data output module.

18. The data distribution method according to claim 10, after the data output module sends the data header and the sub-data to the corresponding downstream channel, the data distribution method further comprises: Sending a transmission completion instruction to the memory interaction module based on the data output module; The memory interaction module sends synchronization information to the preset synchronization memory module, where the synchronization information includes the number of sub-data sent to the downstream channel for this data transmission.

19. A readable storage medium comprising instructions, which, when executed on a computing device, causes the computing device to execute the method according to any one of claims 10 to 18.

20. A chip comprising the data distribution circuit according to any one of claims 1 to 9.

Citation Information

Cited By

  • A smart storage chip integrating an edge computing data processing system

    CN119248521B