Data management method, device, storage medium and electronic device
By acquiring the priority and transmission time slot of the core input port and adjusting the data output sequence, the problems of data transmission delay and low efficiency in the prior art are solved, and the load balancing circuit optimization and data transmission efficiency improvement are achieved.
Patent Information
- Application Number
- CN202411120737.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-08-15
AI Technical Summary
In the prior art, when reducing the delay in data transmission between cores, the arbitrator adopts fixed priority management, resulting in low data transmission efficiency and inability to effectively achieve load balancing.
By obtaining the priority of each load input port, determining the transmission cycle and polling sequence based on the priority, using an arbitrator to poll and output data, ensuring that the data is transmitted in priority order, and optimizing the load balancing circuit structure.
It improves the load balancing capability of multi-data input port circuits, reduces data transmission delay, and reduces resource loss.
Smart Images

Figure CN118631759B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data management method, device, storage medium and electronic device. Background Art
[0002] Nowadays, with the continuous development of electronic science and technology, in order to reduce the development time and cost of electronic equipment, chiplet technology is used for semiconductor device design. In order to improve the data processing capability of chiplets, reducing the delay of data transmission between chiplets is an urgent problem to be solved. Summary of the invention
[0003] The embodiments of the present application provide a data management method, device, storage medium and electronic device, which can determine the polling order according to the priority of the load input port, and output the transmission data of each load input port based on the output port in sequence according to the polling order, thereby realizing structural optimization of the load balancing circuit, and adaptively adjusting the output order of the transmission data of each load input port according to the priority of the load input port, thereby improving the load balancing capability of the circuit with multiple data input ports and reducing the data transmission delay.
[0004] In a first aspect, an embodiment of the present application provides a data management method, the method being applied to a load balancing circuit, the load balancing circuit comprising an output port, an arbitrator, and at least one load input port, the method comprising:
[0005] Obtaining the priority of each of the load input ports, and determining a transmission period corresponding to the load balancing circuit based on the priority, wherein the transmission period is used to transmit data of each of the load input ports, and the transmission period includes a transmission time slot corresponding to each of the load input ports;
[0006] The arbiter is used to sort the transmission time slots based on the priorities to obtain a polling order and a port traversal method corresponding to each load input port, wherein the transmission time slots are alternately arranged in the polling order;
[0007] The arbitrator is used to poll each of the load input ports based on the polling order and the port traversal method, and the transmission data of each of the load input ports is output in sequence based on the output port.
[0008] In a second aspect, an embodiment of the present application provides a data management device, the device comprising:
[0009] a cycle acquisition unit, used to acquire the priority of each load input port, and determine a transmission cycle corresponding to the load balancing circuit based on the priority, wherein the transmission cycle is used to transmit data of each load input port, and the transmission cycle includes a transmission time slot corresponding to each load input port;
[0010] A sequence generating unit, configured to use an arbitrator to sort the transmission time slots based on the priorities, to obtain a polling sequence and a port traversal mode corresponding to each load input port, wherein the transmission time slots are alternately arranged in the polling sequence;
[0011] The arbitrator is used to poll each of the load input ports based on the polling order and the port traversal method, and the transmission data of each of the load input ports is output in sequence based on the output port.
[0012] In a third aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of the above-mentioned method.
[0013] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a memory for storing executable program code;
[0014] The processor is used to call and run the executable program code from the memory so that the device executes the above method.
[0015] In an embodiment of the present application, the priority of each load input port is obtained, the transmission time slots are sorted according to the priority to obtain a polling order, an arbitrator is used to poll each load input port based on the polling order, and the transmission data of each load input port is output in sequence based on the output port, so that the polling order is determined according to the priority of the load input port, and the transmission data of each load input port is output in sequence based on the output port according to the polling order, thereby achieving structural optimization of the load balancing circuit, and adaptively adjusting the output order of the transmission data of each load input port according to the priority of the load input port, thereby improving the load balancing capability of the circuit with multiple data input ports and reducing data transmission delay. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present application or 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 those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 A system architecture diagram of a data management method provided in an embodiment of the present application;
[0018] Figure 2 A flowchart of a data management method provided in an embodiment of the present application;
[0019] Figure 3An example schematic diagram of a polling sequence provided in an embodiment of the present application;
[0020] Figure 4 A flowchart of a data management method provided in an embodiment of the present application;
[0021] Figure 5 An example schematic diagram of a polling sequence provided in an embodiment of the present application;
[0022] Figure 6 An example schematic diagram of output transmission data provided by an embodiment of the present application;
[0023] Figure 7 A schematic diagram of the structure of a data management device provided in an embodiment of the present application;
[0024] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the features and advantages of the present application more obvious and easy to understand, the technical solutions in the present application will be described clearly and completely in conjunction with the drawings in the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0026] See also Figure 1 , which is a system architecture diagram of a data management method provided in an embodiment of the present application. Figure 1 As shown, the data management method provided in the embodiment of the present application can be applied to the load balancing circuit to realize the process of output management of the transmission data of the load input port. The system architecture provided in the embodiment of the present application mainly includes a load input port 10, an arbitrator 20 and an output port 30. Among them, the load input port 10 can be a port in the load balancing circuit that has a data receiving function and is in an enabled state, the arbitrator 20 can be a port in the load balancing circuit that is used to manage the data output sequence of the load input port 10; the output port 30 can be a port in the load balancing circuit that is used to output transmission data.
[0027] In the related art, when reducing the delay of data transmission between chiplets, the method adopted is to use a preset format for data transmission. When high-speed data streams with different transmission priorities are transmitted on the same physical channel, it is necessary to implement a load-balanced arbitrator to reduce the cache pressure of each channel. However, when the arbitrator manages data, it uses a fixed priority of each channel for data management, resulting in the inability to efficiently transmit data on each channel and the data delay between chiplets cannot be reduced.
[0028] In an embodiment of the present application, the arbiter 20 obtains the priority of each load input port 10, determines the transmission cycle corresponding to the load balancing circuit based on the priority, and sorts the transmission time slots in the transmission cycle based on each priority to obtain the polling order and port traversal method corresponding to each load input port 10. The transmission time slots are arranged alternately in the polling order, and the arbiter 10 is used to poll each load input port 10 based on the polling order and the port traversal method, and the transmission data of each load input port 10 is output in sequence based on the output port 30, so that the polling order is determined according to the priority of the load input port 10, and the transmission data of each load input port is output in sequence based on the output port according to the polling order, thereby realizing the structural optimization of the load balancing circuit, and adaptively adjusting the output order of the transmission data of each load input port according to the priority of the load input port, thereby improving the load balancing capability of the circuit with multiple data input ports and reducing the data transmission delay.
[0029] based on Figure 1 The system architecture shown below will be combined with Figure 2 , the data management method provided in the embodiment of the present application is introduced in detail.
[0030] See also Figure 2 , which is a flow chart of a data management method provided in an embodiment of the present application. Figure 2 As shown, the method may include the following steps S101-S103.
[0031] S101, obtaining the priority of each load input port, and determining the transmission period corresponding to the load balancing circuit based on the priority;
[0032] In one embodiment, when semiconductor design is performed based on chiplets, a load balancing circuit for data transmission between chiplets includes an output port, an arbitrator, and at least one load input port. The output port is used to output data corresponding to the load input port. The arbitrator is used to manage the data output order of each load input port. The load input port is an input port whose working state is in an enabled state in the load balancing circuit. Therefore, in order to manage the data of each load input port, the priority of each load input port is obtained. The priority can be used to indicate the data transmission priority of the load input port, wherein the greater the priority of the load input port, the higher the priority of the load input port is, and the data of the load input port is outputted with higher priority. Calculation is performed based on each priority to obtain the transmission cycle corresponding to each load input port output by the load balancing circuit.
[0033] The transmission period is used to transmit data of each load input port. The transmission period includes a transmission time slot corresponding to each load input port. The transmission time slot may be a preset time length required for transmitting data once.
[0034] Specifically, the method for determining the transmission period according to the priority may be: adding up the priorities to obtain the sum of the priorities, and obtaining the transmission period based on the sum of the transmission time slot and the priority.
[0035] S102, using an arbitrator to sort the transmission time slots based on each priority level to obtain a polling order and a port traversal method corresponding to each load input port;
[0036] In one embodiment, an arbitrator is used to sort the transmission time slots of each load input port for transmitting data based on the size of each priority and in an alternating arrangement, so as to obtain a polling order and a port traversal method corresponding to each load input port. In the polling order, each transmission time slot is arranged alternately, and the port traversal method can be a method of traversing each load input port in the polling order, for example, traversing a certain column in the polling order.
[0037] For example, Figure 3 As shown, Figure 3 There are 4 load input ports, "p0", "p1", "p4" and "p7". The load input ports include "p0", "p1", "p4" and "p7". The priority of "p0" is 4, the priority of "p1" is 2, the priority of "p4" is 3, and the priority of "p7" is 1. The corresponding polling order can be: p0, p0, p4, p0, p1, p4, p0, p1, p4, p7, and the port traversal method can be to traverse each load input port in the third column, etc.
[0038] S103, using an arbitrator to poll each load input port based on a polling order and a port traversal method, and outputting the transmission data of each load input port in sequence based on the output port;
[0039] In one embodiment, after determining the polling order of the load input port, an arbitrator is used to access each load input port in turn based on the polling order and port traversal method, and outputs the transmission data of each load input port in turn based on the output port. The transmission data can be the data cached by the buffer corresponding to the load input port, and the buffer can be a module in the load balancing circuit for caching the transmission data of the load input port.
[0040] Specifically, the method for outputting transmission data based on polling order can be: the arbitrator determines the load input port of the current transmission according to a predetermined polling order, and outputs the transmission data of the load input port based on the output port in the load balancing circuit, so as to improve the efficiency of data transmission and the load balancing capability of the circuit with multiple data input ports by managing the output order of the transmission data of the load input port.
[0041] In an embodiment of the present application, the priority of each load input port is obtained, the transmission time slots are sorted according to the priority to obtain a polling order, an arbitrator is used to poll each load input port based on the polling order, and the transmission data of each load input port is output in sequence based on the output port, thereby determining the polling order and the port traversal method according to the priority of the load input port, and according to the polling order and the port traversal method, the transmission data of each load input port is output in sequence based on the output port, thereby achieving structural optimization of the load balancing circuit, and adaptively adjusting the output order of the transmission data of each load input port according to the priority of the load input port, thereby improving the load balancing capability of the circuit with multiple data input ports and reducing data transmission delay.
[0042] See also Figure 4 , provides a flow chart of another data management method for the embodiment of the present application. Figure 4 As shown, the method is applied to a data management system and may include the following steps S201 to S206.
[0043] S201, obtaining the priority of each load input port, and determining the transmission period corresponding to the load balancing circuit based on the priority;
[0044] In one embodiment, when semiconductor design is performed based on chiplets, a load balancing circuit for data transmission between chiplets includes an output port, an arbitrator, and at least one load input port. The output port is used to output data corresponding to the load input port. The arbitrator is used to manage the data output order of each load input port. The load input port is an input port whose working state is in an enabled state in the load balancing circuit. Therefore, in order to manage the data of each load input port, the priority of each load input port is obtained. The priority can be used to indicate the data transmission priority of the load input port, wherein the greater the priority of the load input port, the higher the priority of the load input port is, and the data of the load input port is outputted with higher priority. Calculation is performed based on each priority to obtain the transmission cycle corresponding to each load input port output by the load balancing circuit.
[0045] The transmission period is used to transmit data of each load input port. The transmission period includes a transmission time slot corresponding to each load input port. The transmission time slot may be a preset time length required for transmitting data once.
[0046] Specifically, the method for determining the transmission period according to the priority can be: adding up the priorities to obtain the sum of the priorities, and based on the sum of the transmission time slots and the priorities, obtaining the time required for the load balancing circuit to transmit a batch of data, and determining the time as the transmission period corresponding to the batch of data.
[0047] Exemplarily, the load input ports in the load balancing circuit that are in an enabled state include "p0", "p1", "p4" and "p7", the priority of "p0" is 4, the priority of "p1" is 2, the priority of "p4" is 3, and the priority of "p7" is 1, then the sum of the priorities of the load input ports is 10, and the transmission period of the load balancing circuit is 10 transmission time slots.
[0048] Furthermore, each load input port is provided with a corresponding register, which is used to store the priority and working status corresponding to the load input port. The working status of the load input port is an enabled state, which is used to instruct the load input port to transmit data in this transmission cycle.
[0049] It should be noted that the load balancing circuit includes at least one data input port. In order to determine the transmission period corresponding to the load balancing circuit, it is necessary to determine the data input port that is in an enabled state. Specifically, the working status of each data input port can be obtained, and the data input port whose working status is an enabled state can be determined as the load input port, so as to determine the transmission period based on the priority of the load input port.
[0050] Specifically, the data input port can be divided into a load input port and an idle input port according to the working status. If the working status of the data input port is an enabled state, the data input port is a load input port, and data is transmitted in this transmission cycle; if the load input port is in an idle state, the data input port is an idle input port, and no data is transmitted in this transmission cycle.
[0051] Exemplarily, if the data input ports include "p0", "p1", "p2", "p3", "p4", "p5", "p6" and "p7", where the working state of "p0", "p1", "p4" and "p7" is an enabled state, then "p0", "p1", "p4" and "p7" are load input ports, and "p2", "p3", "p5" and "p6" are idle input ports.
[0052] Further, each data input port is provided with a register, and the register includes two types, namely, a software configuration register and a hardware register. The hardware register is used to provide the arbitrator with the priority and working status corresponding to each data input port, and the software configuration register can be used to update the priority and working status of the data input port. Specifically, if the software configuration register receives update data, the software configuration register is controlled to perform data update based on the update data. The update data can be data set according to application requirements, including the priority and working status that need to be updated. After the software configuration register is updated, if the load balancing circuit is in an idle period and no data transmission is performed, the hardware register is controlled to synchronize data with the software configuration register. The idle period can be used to characterize that the load balancing circuit does not perform data transmission, for example, it can be the interval between the transmission of two batches of data, and the interval can be determined as the idle period corresponding to the load balancing circuit. It can be understood that by updating the data in the register during the idle period, errors in data transmission caused by data update can be avoided, thereby improving the accuracy of data transmission by the load balancing circuit.
[0053] S202, using an arbitrator to decode the priority in each register to obtain a transmission weight corresponding to each load input port, and determining a transmission state of each load input port based on the transmission weight;
[0054] In one embodiment, after obtaining the priority stored in the register corresponding to each load input port, in order to save the design resources of the load balancing circuit, the priority of each register can be decoded so that the digital resources required to identify the value of the priority are less. For example, the priority can be decoded to 4 bits to reduce the design resources required for data analysis and other processing for the priority. Specifically, the priority stored in each register can be decoded by an arbitrator to obtain the transmission weight corresponding to each load input port. The transmission weight can be a code that represents the priority after decoding. The transmission state of each load input port is determined based on the transmission weight. The transmission state can be used to indicate whether the load input port is transmitting data.
[0055] Exemplarily, the load input ports include "p0", "p1", "p4" and "p7", the priority of "p0" is 4, the priority of "p1" is 2, the priority of "p4" is 3, and the priority of "p7" is 1. After decoding the priorities, the transmission weights obtained are "2b11", "2b01", "2b10", and "2b00", respectively. Among them, "2b" is used to indicate that the transmission weight is binary, and "11" is used to indicate the priority corresponding to the load input port.
[0056] S203, using an arbitrator to sort each transmission time slot based on the transmission state and the port traversal method to obtain a polling order corresponding to each load input port;
[0057] In one embodiment, an arbitrator is used to sort each transmission time slot based on the transmission status and port traversal method, and each load input port is input respectively to obtain the polling order corresponding to each load input port. The polling order can be the order in which the arbitrator visits each load input port.
[0058] For example, Figure 3 As shown, Figure 3 There are four load input ports "p0", "p1", "p4" and "p7". Figure 3 The content shown determines the polling order of each load input port as: p0, p0, p4, p0, p1, p4, p0, p1, p4, p7.
[0059] It should be noted that based on the same transmission state and transmission status, the polling order of each load input port can be different, for example, it can be as follows: Figure 5 The polling order shown in the figure can be set according to the actual situation.
[0060] S204, using an arbitrator to determine a port traversal mode for each load input port based on a polling order and a transmission state;
[0061] In one embodiment, after determining the polling order of the load balancing circuit, an arbitrator is used to determine a port traversal method for traversing each load input port in the polling order based on the polling order and transmission status of each load input port. The port traversal method can be a method for traversing each load input port, for example, it can be a method for traversing each column, row, or diagonal line in the polling order.
[0062] For example, Figure 3 When traversing the third column in the polling sequence shown, data is acquired in sequence for each load input port "p0", "p1", "p4" and "p7" in the third column, and the third column is traversed; or the traversal can be performed in a diagonal manner, and the diagonal line formed by the first row of the fourth column to the fourth row of the fourth column is traversed in sequence to both sides. The specific setting can be made according to the actual situation.
[0063] S205, using a state machine to determine a target input port corresponding to a current time slot in a transmission cycle based on a polling order and a port traversal method;
[0064] In one embodiment, the current time slot in the transmission cycle is obtained, and traversal is performed in a polling order based on the port traversal method to determine the transmission status of each load input port. The transmission status may be the status of whether the load input port is transmitting data in the current time slot. The transmission status may include a standby state, a to-be-transmitted state, and a transmitted state. The to-be-transmitted state may be a state that characterizes the load input port and does not transmit data. The load input port that is in the to-be-transmitted state and corresponds to the current time slot is determined as the target input port.
[0065] Specifically, the method for determining the target input port can be: obtaining the transmission status of the load input ports traversed by the port traversal method, screening according to the transmission status of each load input port, determining the load input port in the state to be transmitted, and then determining the target input port according to the transmission weight of each load input port in the state to be transmitted.
[0066] Exemplarily, the polling order is as follows Figure 3 In the order shown, the current time slot is the third transmission time slot in the transmission cycle. Based on the port traversal method, each load input port in the third column is traversed to obtain the transmission status of each load input port. Since the current time slot is the third transmission time slot, it can be based on Figure 3 Determine that the working state of "p0" is in the transmitting state, the transmission states of "p1" and "p7" are in the standby state, and "p4" is in the waiting-to-transmit state, then determine "p4" as the target input port.
[0067] Furthermore, if the current time slot is the fourth transmission time slot in the transmission cycle, based on the port traversal method, it can be determined that the column corresponding to the previous transmission time slot does not include a load input port in the waiting state, and each load input port in the second column is traversed to determine "p0", "p1" and "p4" in the waiting state and "p7" in the idle state. Since the transmission weight of "p0" is the largest among "p0", "p1" and "p4", "p0" is determined as the target input port.
[0068] It should be noted that if there are multiple load input ports with the same transmission weight, they can be sorted according to the port identifier of the load input port. For example, if the transmission weights of "p1" and "p4" are the same, "p1" can be arranged before "p4", or "p4" can be arranged before "p1". The specific setting can be made according to the actual situation.
[0069] S206, using a state machine to output the transmission data of the target input port based on the selection circuit and the output port;
[0070] In one embodiment, after determining the target input port corresponding to the current time slot, a state machine is used to select the transmission data cached in the buffer of the target input port step by step based on the selection circuit, and the transmission data of the target input port is output based on the output port. The transmission data is the data cached in the buffer corresponding to the target input port, and the buffer can be a module set for the load input port for caching transmission data.
[0071] It is understandable that since the buffer may or may not cache data, different methods of data transmission are used for different situations. Specifically, the data transmission method may be: if there is data cached in the buffer of the target input port, a state machine is used to control the selection circuit to select the data of each load input port step by step to obtain the transmission data corresponding to the target input port, and the transmission data corresponding to the target input port is output based on the output port.
[0072] For example, Figure 6 As shown, Figure 6 The "p0" in the figure is the target input port, and the transmission data cached in the buffer corresponding to "p0" is selected step by step through the selection circuit, and the transmission data is output through the output port.
[0073] Further, if the transmission data in the buffer of the load input port is output based on the output port in the current time slot, the transmission data in the buffer is updated.
[0074] Furthermore, if there is no data cached in the buffer of the target input port, the next load input port adjacent to the target input port in the polling order is determined as the target input port, so that the load balancing circuit can efficiently determine the target input port, thereby improving the efficiency of the load balancing circuit and the operating frequency of the load balancing circuit.
[0075] In the embodiment of the present application, by obtaining the priority of each load input port, the transmission time slot is sorted according to the priority to obtain the polling order, and the arbitrator is used to poll each load input port based on the polling order, and the transmission data of each load input port is outputted in sequence based on the output port, so as to determine the polling order according to the priority of the load input port, and output the transmission data of each load input port in sequence based on the output port according to the polling order, so as to achieve the structural optimization of the load balancing circuit, and adaptively adjust the output order of the transmission data of each load input port according to the priority of the load input port, thereby improving the load balancing capability of the multi-data input port circuit and reducing the data transmission delay. Further, by re-decoding the priority of the load input port, the resource loss of the load balancing circuit is reduced; the port traversal mode of the load input port is determined according to the priority, and the target input port of the current time slot is determined according to the transmission state of the load input port, so as to improve the smoothness of the target input port of the load balancing circuit, thereby improving the load balancing capability of the multi-data input port circuit.
[0076] based on Figure 1 The system architecture shown below will be combined with Figure 7 , the data management device provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 7 The data management device in the embodiment of the present application is used to execute Figures 2 to 6 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the embodiment of the present application. Figures 2 to 6 The embodiment shown.
[0077] See also Figure 7 , is a schematic diagram of the structure of a data management device provided in an embodiment of the present application. Figure 7 As shown, the data management device 1 of the embodiment of the present application may include: a period acquisition unit 11, a sequence generation unit 12 and a data output unit 13.
[0078] A cycle acquisition unit 11 is used to acquire the priority of each load input port, and determine a transmission cycle corresponding to the load balancing circuit based on the priority, wherein the transmission cycle is used to transmit data of each load input port, and the transmission cycle includes a transmission time slot corresponding to each load input port;
[0079] A sequence generating unit 12, configured to use an arbitrator to sort the transmission time slots based on the priorities, to obtain a polling sequence and a port traversal mode corresponding to each load input port, wherein the transmission time slots are alternately arranged in the polling sequence;
[0080] The data output unit 13 is used to use the arbitrator to poll each of the load input ports based on the polling order and the port traversal method, and output the transmission data of each of the load input ports in sequence based on the output port.
[0081] Optionally, the sequence generating unit 12 is further used for:
[0082] The arbitrator is used to decode the priority in each of the registers to obtain a transmission weight corresponding to each of the load input ports, and a transmission state of each of the load input ports is determined based on the transmission weight;
[0083] Using the arbitrator to sort the transmission time slots based on the transmission state and the transmission weight to obtain a polling order corresponding to each load input port;
[0084] The arbitrator is used to determine the port traversal mode of each of the load input ports based on the polling order and the transmission status.
[0085] Optionally, the data output unit 13 is further used for:
[0086] Determine the target input port corresponding to the current time slot in the transmission cycle using the state machine based on the polling order and the port traversal method;
[0087] The state machine is used to output the transmission data of the target input port based on the selection circuit and the output port, and the transmission data is the data cached in the buffer corresponding to the target input port.
[0088] Optionally, the data output unit 13 is further used for:
[0089] Obtaining a current time slot in the transmission cycle, traversing in the polling order based on the port traversal method, and determining a transmission state of each of the load input ports;
[0090] The load input port that is in a waiting-for-transmission state and corresponds to the current time slot is determined as a target input port.
[0091] Optionally, the data output unit 13 is further used for:
[0092] If data is cached in the buffer of the target input port, the state machine is used to control the selection circuit to select the data of each load input port step by step to obtain the transmission data corresponding to the target input port, and the transmission data corresponding to the target input port is output based on the output port;
[0093] If no data is cached in the buffer of the target input port, the next load input port adjacent to the target input port in the polling sequence is determined as the target input port.
[0094] Optionally, the data management device 1 further includes a port determination unit 14, configured to:
[0095] The working state of each of the data input ports is acquired, and the data input port whose working state is an enabled state is determined as the load input port.
[0096] Optionally, the data management device 1 further includes a data synchronization unit 15, which is used to:
[0097] If the software configuration register receives update data, controlling the software configuration register to perform data update based on the update data;
[0098] If the load balancing circuit is in an idle period, the hardware register is controlled to perform data synchronization with the software configuration register, and the idle period is used to indicate that the load balancing circuit is not performing data transmission.
[0099] In the embodiment of the present application, by obtaining the priority of each load input port, the transmission time slot is sorted according to the priority to obtain the polling order, and the arbitrator is used to poll each load input port based on the polling order, and the transmission data of each load input port is outputted in sequence based on the output port, so as to determine the polling order according to the priority of the load input port, and output the transmission data of each load input port in sequence based on the output port according to the polling order, so as to achieve the structural optimization of the load balancing circuit, and adaptively adjust the output order of the transmission data of each load input port according to the priority of the load input port, thereby improving the load balancing capability of the multi-data input port circuit and reducing the data transmission delay. Further, by re-decoding the priority of the load input port, the resource loss of the load balancing circuit is reduced; the port traversal mode of the load input port is determined according to the priority, and the target input port of the current time slot is determined according to the transmission state of the load input port, so as to improve the smoothness of the target input port of the load balancing circuit, thereby improving the load balancing capability of the multi-data input port circuit.
[0100] The present application also provides a computer storage medium, which can store multiple program instructions, and the program instructions are suitable for being loaded and executed by a processor as described above. Figure 1-Figure 6 The method steps of the embodiment shown in the figure can be found in the specific implementation process. Figure 1-Figure 6 The specific description of the illustrated embodiment will not be repeated here.
[0101] The embodiment of the present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1-Figure 6 The data management method of the embodiment shown in the figure can be specifically executed by referring to Figure 1-Figure 6 The specific description of the illustrated embodiment will not be repeated here.
[0102] See also Figure 8 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, an input / output interface 1003, a memory 1005, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. Figure 8 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, an input / output interface module, and a data management application.
[0103] exist Figure 8 In the electronic device 1000 shown, the input-output interface 1003 is mainly used to provide an input interface for the user and obtain data input by the user.
[0104] In one embodiment, the processor 1001 may be used to call the data management application stored in the memory 1005, and specifically perform the following operations:
[0105] Obtaining the priority of each of the load input ports, and determining a transmission period corresponding to the load balancing circuit based on the priority, wherein the transmission period is used to transmit data of each of the load input ports, and the transmission period includes a transmission time slot corresponding to each of the load input ports;
[0106] The arbiter is used to sort the transmission time slots based on the priorities to obtain a polling order and a port traversal method corresponding to each load input port, wherein the transmission time slots are alternately arranged in the polling order;
[0107] The arbitrator is used to poll each of the load input ports based on the polling order and the port traversal method, and the transmission data of each of the load input ports is output in sequence based on the output port.
[0108] Optionally, when the processor 1001 uses the arbitrator to sort the transmission time slots based on the priorities to obtain a polling order corresponding to each load input port, the processor 1001 specifically performs the following operations:
[0109] The arbitrator is used to decode the priority in each of the registers to obtain a transmission weight corresponding to each of the load input ports, and a transmission state of each of the load input ports is determined based on the transmission weight;
[0110] Using the arbitrator to sort the transmission time slots based on the transmission state and the transmission weight to obtain a polling order corresponding to each load input port;
[0111] The arbitrator is used to determine the port traversal mode of each of the load input ports based on the polling order and the transmission status.
[0112] Optionally, when the processor 1001 uses the arbitrator to poll each of the load input ports based on the polling order and the port traversal method, and outputs the transmission data of each of the load input ports in sequence based on the output port, the processor 1001 specifically performs the following operations:
[0113] Determine the target input port corresponding to the current time slot in the transmission cycle using the state machine based on the polling order and the port traversal method;
[0114] The state machine is used to output the transmission data of the target input port based on the selection circuit and the output port, and the transmission data is the data cached in the buffer corresponding to the target input port.
[0115] Optionally, when the processor 1001 determines the target input port corresponding to the current time slot in the transmission cycle based on the polling order and the port traversal mode by using the state machine, the processor 1001 specifically performs the following operations:
[0116] Obtaining a current time slot in the transmission cycle, traversing in the polling order based on the port traversal method, and determining a transmission state of each of the load input ports;
[0117] The load input port that is in a waiting-for-transmission state and corresponds to the current time slot is determined as a target input port.
[0118] Optionally, when the processor 1001 executes the following operations when outputting the transmission data of the target input port based on the selection circuit and the output port using the state machine:
[0119] If data is cached in the buffer of the target input port, the state machine is used to control the selection circuit to select the data of each load input port step by step to obtain the transmission data corresponding to the target input port, and the transmission data corresponding to the target input port is output based on the output port;
[0120] If no data is cached in the buffer of the target input port, the next load input port adjacent to the target input port in the polling sequence is determined as the target input port.
[0121] Optionally, the processor 1001 further performs the following operations:
[0122] The working state of each of the data input ports is acquired, and the data input port whose working state is an enabled state is determined as the load input port.
[0123] Optionally, the processor 1001 further performs the following operations:
[0124] If the software configuration register receives update data, controlling the software configuration register to perform data update based on the update data;
[0125] If the load balancing circuit is in an idle period, the hardware register is controlled to perform data synchronization with the software configuration register, and the idle period is used to indicate that the load balancing circuit is not performing data transmission.
[0126] In the embodiment of the present application, by obtaining the priority of each load input port, the transmission time slot is sorted according to the priority to obtain the polling order, and the arbitrator is used to poll each load input port based on the polling order, and the transmission data of each load input port is outputted in sequence based on the output port, so as to determine the polling order according to the priority of the load input port, and output the transmission data of each load input port in sequence based on the output port according to the polling order, so as to achieve the structural optimization of the load balancing circuit, and adaptively adjust the output order of the transmission data of each load input port according to the priority of the load input port, thereby improving the load balancing capability of the multi-data input port circuit and reducing the data transmission delay. Further, by re-decoding the priority of the load input port, the resource loss of the load balancing circuit is reduced; the port traversal mode of the load input port is determined according to the priority, and the target input port of the current time slot is determined according to the transmission state of the load input port, so as to improve the smoothness of the target input port of the load balancing circuit, thereby improving the load balancing capability of the multi-data input port circuit.
[0127] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0128] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A data management method, characterized in that: The method is applied to a load balancing circuit, the load balancing circuit comprising an output port, an arbitrator and at least one load input port, and the method comprises: Obtaining the priority of each of the load input ports, and determining a transmission period corresponding to the load balancing circuit based on the priority, wherein the transmission period is used to transmit data of each of the load input ports, and the transmission period includes a transmission time slot corresponding to each of the load input ports; The arbiter is used to sort the transmission time slots based on the priorities to obtain a polling order and a port traversal method corresponding to each load input port, wherein the transmission time slots are alternately arranged in the polling order; The arbitrator is used to poll each of the load input ports based on the polling order and the port traversal method, and the transmission data of each of the load input ports is output in sequence based on the output port; Wherein, each of the load input ports sets a corresponding register, and the arbiter is used to sort the transmission time slots based on each of the priorities to obtain a polling order and a port traversal method corresponding to each of the load input ports, including: The arbitrator is used to decode the priority in each of the registers to obtain a transmission weight corresponding to each of the load input ports, and a transmission state of each of the load input ports is determined based on the transmission weight; Using the arbitrator to sort the transmission time slots based on the transmission state and the transmission weight to obtain a polling order corresponding to each load input port; The arbitrator is used to determine the port traversal mode of each of the load input ports based on the polling order and the transmission status.
2. The method according to claim 1, characterized in that The arbiter includes a state machine and a selection circuit, and each of the load input ports is provided with a corresponding buffer; The step of using the arbitrator to poll each of the load input ports based on the polling order and the port traversal method, and sequentially outputting the transmission data of each of the load input ports based on the output port, includes: Determine the target input port corresponding to the current time slot in the transmission cycle using the state machine based on the polling order and the port traversal method; The state machine is used to output the transmission data of the target input port based on the selection circuit and the output port, and the transmission data is the data cached in the buffer corresponding to the target input port.
3. The method according to claim 2, characterized in that The step of using the state machine to determine the target input port corresponding to the current time slot in the transmission cycle based on the polling order and the port traversal method includes: Obtaining a current time slot in the transmission cycle, traversing in the polling order based on the port traversal method, and determining a transmission state of each of the load input ports; The load input port that is in a waiting-for-transmission state and corresponds to the current time slot is determined as a target input port.
4. The method according to claim 2, characterized in that: The step of using the state machine to output the transmission data of the target input port based on the selection circuit and the output port includes: If data is cached in the buffer of the target input port, the state machine is used to control the selection circuit to select the data of each load input port step by step to obtain the transmission data corresponding to the target input port, and the transmission data corresponding to the target input port is output based on the output port; If no data is cached in the buffer of the target input port, the next load input port adjacent to the target input port in the polling sequence is determined as the target input port.
5. The method according to claim 1, characterized in that The load balancing circuit includes a data input port, and the method further includes: The working state of each of the data input ports is acquired, and the data input port whose working state is an enabled state is determined as the load input port.
6. The method according to claim 5, characterized in that Each of the data input ports is provided with a register, the register comprising a software configuration register and a hardware register, the hardware register being used to provide the arbitrator with a priority and a working status corresponding to each of the data input ports; The method further comprises: If the software configuration register receives update data, controlling the software configuration register to perform data update based on the update data; If the load balancing circuit is in an idle period, the hardware register is controlled to perform data synchronization with the software configuration register, and the idle period is used to indicate that the load balancing circuit is not performing data transmission.
7. A data management device, characterized in that: The device comprises: a cycle acquisition unit, used to acquire the priority of each load input port, and determine a transmission cycle corresponding to the load balancing circuit based on the priority, wherein the transmission cycle is used to transmit data of each load input port, and the transmission cycle includes a transmission time slot corresponding to each load input port; A sequence generating unit, configured to use an arbitrator to sort the transmission time slots based on the priorities, to obtain a polling sequence and a port traversal mode corresponding to each load input port, wherein the transmission time slots are alternately arranged in the polling sequence; A data output unit, configured to use the arbitrator to poll each of the load input ports based on the polling order and the port traversal method, and output the transmission data of each of the load input ports in sequence based on the output port; Wherein, each of the load input ports is provided with a corresponding register, and the sequence generation unit is further used for: The arbitrator is used to decode the priority in each of the registers to obtain a transmission weight corresponding to each of the load input ports, and a transmission state of each of the load input ports is determined based on the transmission weight; Using the arbitrator to sort the transmission time slots based on the transmission state and the transmission weight to obtain a polling order corresponding to each load input port; The arbitrator is used to determine the port traversal mode of each of the load input ports based on the polling order and the transmission status.
8. A computer storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the method according to any one of claims 1 to 6.
9. An electronic device, characterized in that: The device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the device executes the method according to any one of claims 1 to 6.
