A data packet processing system
By introducing parallel packet processing modules into the packet processing system, including queue management, scheduling firmware, and buffers, efficient and accurate packet processing is achieved, solving the problems of low efficiency and accuracy in existing technologies.
Patent Information
- Application Number
- CN202611657601.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-26
- Publication Date
- 2026-11-24
AI Technical Summary
In existing technologies, data packet processing efficiency and accuracy are low, especially in situations requiring non-blocking synchronization, information return, and state changes, where frequent interaction with the CPU or other modules is necessary, resulting in low synchronization efficiency and poor accuracy.
Multiple parallel packet processing modules are employed, each containing a queue management module, scheduling firmware, packet buffer, packet reading module, and execution processing module. By selecting the queue corresponding to the same user to process packets in parallel, processing efficiency and accuracy are improved.
By designing a parallel processing module, the efficiency and accuracy of data packet processing are improved, interaction with the CPU or other modules is reduced, and the synchronization efficiency and accuracy of the system are enhanced.
Smart Images

Figure CN123157459A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chip technology, and more particularly to a data packet processing system. Background Technology
[0002] During chip development, chip pipelines face various data packet processing requirements, such as controlling the execution of data packets from different users and controlling data packet synchronization. These requirements can be met through operations like blocking execution, non-blocking execution, returning information, and changing state. Current technologies typically employ a blocking approach to execute each service data packet one by one, resulting in significant time delays. For requirements such as non-blocking synchronization, returning information, and changing state, existing methods cannot directly achieve this; they require frequent interaction with the CPU (Central Processing Unit) or other related modules, leading to low synchronization efficiency and poor accuracy, consequently resulting in low data packet processing efficiency and accuracy. Therefore, improving the efficiency and accuracy of data packet processing is a pressing technical problem that needs to be solved. Summary of the Invention
[0003] The purpose of this invention is to provide a data packet processing system that improves the efficiency and accuracy of data packet processing.
[0004] According to a first aspect of the present invention, the system is provided to include M parallel packet processing modules {P1, P2, ..., P...} m ,...,P M}, P m Let m be the m-th packet processing module, where m ranges from 1 to M, and M is the total number of packet processing modules. P m Includes f(m) queues {PQ1} m PQ2 m ,...,PQ i m ,...,PQ f(m) m}, PQ i m For P m The i-th queue, where i ranges from 1 to f(m), and the queue corresponding to the i-th user in the system is {PQ}. i 1 PQ i 2 ,...,PQ i m ,...,PQ i M The system can only serve one user at a time, and each P m Operates independently; P m Including the corresponding queue management module PA m , scheduling firmware PB m Packet buffer PC m Packet reading module PD m Local cache PE m Execution processing module PF m ; PC m Including P m Each PQ i m The corresponding packet buffer PCA i m PE m Including P m Each PQ i m Corresponding local cache PCB i m ; PC m Used to receive data packets sent by the software and store the data packets in the corresponding PCA. i m Update PCA i m The corresponding write pointer; PA m Used to select the user serial number of the currently needed service, and to assign the PQ corresponding to the selected user serial number of the currently needed service. i m Once identified as the foreground queue identifier, the foreground queue identifier is sent to the PowerBuilder (PB). m PD m PF m ; PD m Used to retrieve the front-end PCA corresponding to the current front-end queue. i m Data packets are read and stored in the corresponding front-end PCB. i m middle; PB m Used from front-end PCB i m The system reads and parses data packets, then sends the parsing results to the corresponding PF. m Execute and update the front-end PCA i m The corresponding read pointer.
[0005] Compared with existing technologies, this invention has significant advantages and beneficial effects. Through the above technical solution, the data packet processing system provided by this invention achieves considerable technological advancement and practicality, and has broad industrial application value, possessing at least the following beneficial effects: The system described in this invention improves the efficiency and accuracy of data packet processing by setting up a queue management module, scheduling firmware, data packet buffer, data packet reading module, local cache and execution processing module in each data packet processing module. Multiple data packet processing modules select the queue corresponding to the same user to process the data packets of the same user in parallel. Attached Figure Description
[0006] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0007] Figure 1 This is an architecture diagram of the data packet processing module provided in an embodiment of the present invention; Figure 2 A flowchart of an event-based data packet order preservation method provided in an embodiment of the present invention; Figure 3 This is a flowchart of a data packet processing method based on event configuration information provided in an embodiment of the present invention; Figure 4 This is a flowchart of a data packet processing method for preventing deadlock provided in an embodiment of the present invention; Figure 5 A flowchart of an event packet processing method based on asynchronous recycling provided in an embodiment of the present invention; Figure 6 This is a flowchart of an event-based data packet processing and tracking method provided in an embodiment of the present invention. Detailed Implementation
[0008] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0009] Example 1 Example 1 provides a packet processing system, which includes M parallel packet processing modules {P1, P2, ..., P...} m ,...,P M}, P m Let m be the m-th packet processing module, where m ranges from 1 to M, and M is the total number of packet processing modules.
[0010] P m Includes f(m) queues {PQ1} m PQ2 m ,...,PQ i m ,...,PQ f(m) m}, PQ i m For P m The i-th queue, where i ranges from 1 to f(m), and f(m) is a function of P. m The total number of queues, m, may result in f(m) being the same or different depending on the value of m. Preferably, f(m) remains the same regardless of the value of m, meaning that the total number of queues in each packet processing module is the same. In a virtualization scenario, the queue corresponding to the i-th user in the system is {PQ}. i 1 PQ i 2 ,...,PQ i m ,...,PQ i M The system can only serve one user at a time, and each P m Only one queue can be selected at a time, namely the queue corresponding to the user currently being served by the system. As a specific example, M equals 2, all f(m) equal 4, P1 is specifically used to process data packets corresponding to drawing services, and P2 is specifically used to process data packets corresponding to calculation services that assist in drawing.
[0011] Each P m Runs independently, each P m The selected queue also runs independently. Therefore, the following only applies to a single P. m Expand, each P m Their structures and operating principles are the same. As an example, P... m It is based on the RISC-V architecture, which is an open-source Reduced Instruction Set Computer (RISC) architecture, and will not be elaborated on here.
[0012] As an example, such as Figure 1 As shown, P m Including the corresponding queue management module PA m , scheduling firmware PB m Packet buffer PC m Packet reading module PD mLocal cache PE m Execution processing module PF m Among them, the queue management module PA m Respectively with scheduling firmware PB m Packet reading module PD m and execution processing module PF m Connected, scheduling firmware PB m Each with the local cache PE m Packet buffer PC m Execution processing module PF m Connected, data packet reading module PD m Each with the packet buffer PC m and local cache PE m Connected.
[0013] PC m Including P m Each PQ i m The corresponding packet buffer PCA i m As an example, PCA i m All are set as ring buffers. PE m Including P m Each PQ i m Corresponding local cache PCB i m PC m Used to interact with software, receive data packets sent by the software, and store the data packets in the corresponding PCA. i m Update PCA i m The corresponding write pointer. PA m Used to select the user serial number of the currently needed service, and to assign the PQ corresponding to the selected user serial number of the currently needed service. i m Once identified as the foreground queue identifier, the foreground queue identifier is sent to the PowerBuilder (PB). m PD m PF m As an example, PA m You can first select the user sequence number of the currently required service based on the read / write pointers that are conflicting with the queue data, and then switch the user sequence number of the currently required service according to the specific application requirements.
[0014] PD m Used to retrieve the front-end PCA corresponding to the current front-end queue. i mData packets are read and stored in the corresponding front-end PCB. i m In the middle. It should be noted that PD m It can be configured to be used only for the foreground PCA corresponding to the current foreground queue. i m Data packets are read and stored in the corresponding front-end PCB. i m In order to further improve packet processing efficiency, PD... m It can also be set to work from the PCA in the background. i m Data packets are read and stored in the corresponding backend PCB. i m Specifically, it can be found in PA. m and PB m Upon initial connection, background packet retrieval begins and continues until PA is reached. m If a deletion queue or abnormal suspension occurs, the corresponding background packet retrieval operation will be stopped.
[0015] PB m Used from front-end PCB i m The system reads and parses data packets, then sends the parsing results to the corresponding PF. m Execute and update the front-end PCA i m The corresponding read pointer, as can be understood, needs to be sent to PCA. i m When storing a new data packet, storage begins from the position corresponding to the write pointer. When it is needed to retrieve data from PCA... i m When reading data packets, reading begins from the position corresponding to the read pointer. It should be noted that the PQ not currently selected... i m For background queues, PB m PD m PF m All operations are performed based on the foreground queue.
[0016] As an example, the system can switch the user sequence number of the currently needed service based on time-slice polling. It is understood that the system is not limited to obtaining the user sequence number of the currently needed service through time-slice polling; other methods can also be used to determine the user sequence number of the currently needed service. m Used to first send a request to the PB when a user needs to be switched to another service. m PD m PF m Send pause command; PB m PD m PFm Based on the received halt instruction, the execution status information corresponding to the current foreground queue is stored, and a halt ack instruction is generated. PA m Used to receive PB m PD m PF m After generating a pause reply command, reselect the user serial number for the currently needed service, and then assign the PQ corresponding to the reselected user serial number to the service. i m Once identified as the foreground queue identifier, the foreground queue identifier is sent to the PowerBuilder (PB). m PD m PF m .
[0017] As an example, PA m Used to select the user sequence number for the currently needed service for the first time in the initial state of the current foreground queue, based on the current foreground queue identifier, and then to send the request to the PB. m PD m PF m Send a start command to begin execution; otherwise, send a command to the PB based on the current foreground queue identifier. m PD m PF m Send a resume instruction. PB m PD m PF m Based on the start execution instruction, the corresponding operation is executed in the current foreground queue in its initial state. PB m PD m PF m Based on the continue execution instruction, the corresponding operation continues to be executed according to the execution status information currently stored in the current foreground queue.
[0018] As an example, when a queue becomes abnormal or other situations arise that require deleting a queue, PA... m It is also used to receive queue deletion commands. If the queue to be deleted is not the current foreground queue, then when switching to the queue to be deleted is needed again, the command will be sent to the PB. m PD m PF m Send a reset command based on the queue to be deleted; if the queue to be deleted is the current foreground queue, then after the pause reply command is generated in the current foreground queue, send a reset command to the PB. m PD m PF mSend a reset command based on the queue to be deleted. It should be noted that when deleting a queue, if the queue to be deleted is not a foreground queue, you must wait for the foreground queue's time slice to complete and automatically switch to the queue to be deleted before sending the command to the PowerBuilder (PB). m PD m PF m Send a reset command based on the queue to be deleted.
[0019] As an example, PB m PD m PF m This is used to clear the status information of the queue to be deleted based on the received reset command, resetting it to the initial state corresponding to the queue to be deleted. PB m Used to PF m Send monitoring event packets based on the queue to be deleted, PF m This is used to monitor whether the downstream processes have completed executing the data packets corresponding to the queue to be deleted, based on monitoring event packets. When the downstream processes have completed executing the data packets corresponding to the queue to be deleted, the information indicating that the data packets corresponding to the queue to be deleted have been completed is fed back to PB. m .
[0020] PB m The deletion operation is performed based on the completion information of the data packets corresponding to the queue to be deleted. Monitoring event packets ensures that the queue to be deleted is only deleted after the corresponding data packet has been executed, improving the accuracy of data packet processing.
[0021] As an example, PCA i m The stored data packets include business-type data packets and event-type data packets. Business-type data packets include Direct Memory Access (DMA) type data packets and non-DMA type data packets. Non-DMA type data packets include computation-type (kernel) data packets and drawing-type (draw) data packets. The business execution engine includes DMA execution engines and non-DMA execution engines. The non-DMA execution engines include computation execution engines and drawing execution engines. Both the DMA execution engine and the event processing engine are located in the execution processing module. The non-DMA execution engine is located downstream. The execution processing module includes computation interfaces and drawing interfaces. The execution processing module sends computation-type data packets to the computation execution engine through the computation interface and draw-type data packets to the drawing execution engine through the drawing interface. The event processing engine is used to process event-type data packets. It should be noted that since the DMA execution engine requires less space than other engines, placing the DMA execution engine in the execution processing module and placing other business execution engines downstream further improves data packet processing efficiency.
[0022] The system described in Example 1 improves the efficiency and accuracy of data packet processing by setting up a queue management module, scheduling firmware, data packet buffer, data packet reading module, local cache and execution processing module in each data packet processing module. Multiple data packet processing modules select the queue corresponding to the same user to process the data packets of the same user in parallel.
[0023] Example 2 Based on the data packet processing system provided in Embodiment 1, Embodiment 2 provides an event-based data packet ordering method, such as... Figure 2 As shown, it includes: Step A1: Obtain the sequence of data packets to be processed {A1, A2, ..., A...} n ,...,A N}, A n This refers to the nth data packet to be processed, where n ranges from 1 to N, and N is the total number of data packets to be processed. n Including A1 n A2 n A3 n A1 n For event identifier or service identifier, if A1 n If A2 is the event identifier, then n Is it a blocking or non-blocking indicator, if A1 n If it is a business identifier, then A2 n Empty, A3 n This refers to the content information of the data packet.
[0024] The service identifier includes DMA type identifier and non-DMA type identifier. The non-DMA type identifier includes kernel type identifier and draw type identifier.
[0025] Step A2: Set n=1 and execute step A3.
[0026] Step A3, if A1 n If it is a business identifier, then A3 will be used. n Send to A1 n The corresponding business execution engine, if A1 n If it is an event identifier, then proceed to step A4.
[0027] It should be noted that if A1 n If it is a DMA type identifier, then the scheduling firmware PB m A3 n Send to the execution processing module PF m The DMA execution engine in the process executes. If A1 n If it is a non-DMA type identifier, then the scheduling firmware PBm First, put A3 n Send to the execution processing module PF m In the middle, and then through the processing module PF m The corresponding interface sends the data to the downstream non-DMA execution engine. The non-DMA execution engines include the computational service execution engine and the drawing service execution engine.
[0028] Step A4, if A2 n If it is a non-blocking flag, then proceed to step A6; if A2... n If the flag is blocked, proceed to step A5.
[0029] It should be noted that if A2 n If it is a non-blocking flag, then A3 can be sent without waiting for the associated data packet to complete. n If A2 n If the flag is blocked, it is necessary to determine whether the associated data packet has been completed. Therefore, step A5 is executed for further judgment.
[0030] Step A5: Determine if the current preset event First-In-First-Out (FIFO) queue is empty. If it is empty, proceed to step A6. Otherwise, wait until the current preset event FIFO is empty before proceeding to step A6. The event data packet content information in the current preset event FIFO is executed in the order it was stored. After the event data packet content information is executed, it is popped out of the current preset event FIFO.
[0031] It should be noted that the sequence of data packets to be processed {A1,A2,...,A...} n ,...,A N All event packets in the `}` function need to be executed in order. Therefore, a preset event FIFO is set up to store the content information of the event data packets. The event data packet content information in the preset event FIFO is executed in the order it is stored, and the event data packet content information is popped out of the preset event FIFO after execution. In addition, the execution order of some business data packets requires multiple business data packets to maintain the order. For example, the execution of a business data packet requires the completion of multiple preceding business data packets. The completion of multiple business data packets requires multiple event data packets to maintain the order. Therefore, the data packet that requires the completion of multiple preceding business data packets needs to be set to the blocking type, and the related multiple event data packets are placed before the data packet that requires the completion of multiple preceding business data packets.
[0032] Step A6, take A3 n Store the data in the preset event FIFO and proceed to step A7.
[0033] Step A7: If n < N, set n = n + 1 and return to Step A3; if n = N, wait for all data packets to be completely processed and end the process.
[0034] It should be noted that the processes of Step A1 to Step A7 may be specifically implemented based on the scheduling firmware PB in the data packet processing system m and the execution processing module PF m . The to-be-processed data packet sequence {A1, A2, ..., A n , ..., A N}is specifically a data packet sequence obtained by the scheduling firmware PB m corresponding to the current foreground queue from the local buffer area PE m .
[0035] As an example, the method includes: Step A10: Generate service data packets in sequence according to service processing requirements.
[0036] The service data packets include DMA-type data packets, computation-type data packets, drawing-type data packets, and the like.
[0037] Step A20: If the completion of execution of AX consecutive service data packets needs to trigger the AY-th event, where AX ≥ 1, insert a corresponding AY-th event data packet after the AX consecutive service data packets, and set the trigger condition of the AY-th event data packet to be the completion of execution of the AX consecutive service data packets. If a data packet next to the AY-th event data packet needs to depend on the AY-th event data packet, set the AY-th event data packet as a blocking identifier; if the next data packet does not need to depend on the AY-th event data packet, set the AY-th event data packet as a non-blocking identifier.
[0038] It should be noted that AX ≥ 1, which means that the AX consecutive service data packets may refer to a single data packet or multiple consecutive data packets. Through Step S20, the execution order between service data packets can be configured based on event packets, especially the execution order between service data packets of the same service type.
[0039] Step A30: If the completion of execution of AZ event data packets needs to trigger the AW-th event, where AZ > 1, insert a corresponding AW-th event data packet after the AZ-th event data packet, and set the trigger condition of the AW-th event data packet to be the completion of execution of the AZ event data packets. If a data packet next to the AW-th event data packet needs to depend on the AW-th event data packet, set the AW-th event data packet as a blocking identifier; if the next data packet does not need to depend on the AW-th event data packet, set the AW-th event data packet as a non-blocking identifier, and generate a to-be-processed data packet sequence {A1, A2, ..., A n , ..., AN}
[0040] It should be noted that if the execution of an event requires the completion of data packets of different business types, then based on step A30, multiple event data packets can be used to constrain the execution conditions and order of the event packets to ensure that the sequence of data packets to be processed is executed in order.
[0041] It should be noted that steps A10-A30 are specifically implemented through software, generating the sequence of data packets to be processed {A1, A2, ..., A...}. n ,...,A N} and then stored in the corresponding packet buffer PCA i m Data packet reading module, PD m From packet buffer PCA i m Data packets are read and stored in the corresponding local buffer PCB. i m In step A1, the scheduling firmware PB is... m From PCB i m Obtain the sequence of data packets to be processed {A1,A2,...,A...} n ,...,A N}
[0042] As an example, if A1 n If A3 is the event identifier, then... n This includes triggering conditions and the content of the event to be executed. The triggering conditions include receiving a response message to be received. The content of the event to be executed is set to empty, or set to perform an interrupt operation, or set to perform a memory update operation.
[0043] As an example, a preset event FIFO is set in the event processing engine, which is used to process event data packets. In step A5, the event information to be executed in the currently preset event FIFO is executed according to the order in which it is stored. After execution, the events are popped out of the currently preset event FIFO, including: Step A51: The event processing engine monitors each A3 in the preset event FIFO. n Has the corresponding trigger condition been met? If so, there exists an A3 that meets the trigger condition. n Then proceed to step A52.
[0044] Step A52: If the current preset event FIFO does not contain an event that meets the triggering condition, then... n If the previous data packet content information is used, then proceed to step A53.
[0045] Step A53, if the triggering condition A3 is met. n If the content of the event to be executed is set to empty, then the A3 of the triggering condition will be directly applied. n Pop from the currently preset event FIFO; otherwise, execute trigger condition A3. n The corresponding pending event content will then pop up.
[0046] This invention improves the efficiency and accuracy of data packet processing by setting event packets in the sequence of data packets to be processed, configuring the event packets as blocking or non-blocking modes, and storing the event packets in a preset event FIFO. The preset event FIFO ensures the processing order of all event data packets, and the blocking and non-blocking modes of the event packets, along with the preset event FIFO, ensure the processing order of business data packets with processing order requirements.
[0047] Example 3 Based on the data packet processing system provided in Embodiment 1, Embodiment 3 provides a data packet processing method based on event configuration information, such as... Figure 3 As shown, it includes: Step B1: Sequentially parse the sequence of data packets to be processed {A1, A2, ..., A...} n ,...,A N For each data packet to be processed in}, A n This refers to the nth data packet to be processed, where n ranges from 1 to N, and N is the total number of data packets to be processed. n Including A1 n A2 n A3 n A1 n For event identifier or service identifier, if A1 n If A2 is the event identifier, then n Is it a blocking or non-blocking indicator, if A1 n If it is a business identifier, then A2 n Empty, A3 n This refers to the content information of the data packet.
[0048] The service identifier includes DMA type identifier and non-DMA type identifier. The non-DMA type identifier includes kernel type identifier and draw type identifier.
[0049] It should be noted that the sequence of data packets to be processed {A1,A2,...,A...} n ,...,A N Specifically, this can be achieved through steps A10-A30 in Embodiment 2, which will not be elaborated here. This generates a sequence of data packets to be processed: {A1, A2, ..., A...}. n ,...,AN} and then stored in the corresponding packet buffer PCA i m Data packet reading module, PD m From packet buffer PCA i m Data packets are read and stored in the corresponding local buffer PCB. i m In step B1, the scheduling firmware PB is... m From PCB i m Obtain the sequence of data packets to be processed {A1,A2,...,A...} n ,...,A N The parsing process is performed.
[0050] Step B2, if the A1 of the currently parsed data packet to be processed... n If it is an event identifier, then it is based on A2 of the data packet to be processed. n and A3 n Event configuration information is generated according to a preset event configuration data structure, which includes a response type data segment, a register response data segment, a data packet response data segment, a data stream response data segment, a blocking type data segment, and an event execution data segment.
[0051] The response type data segment is used to select register response type, data packet response type, and data stream response type. The register response data segment is used to configure a register response interface that needs to obtain response information when the response type data segment is set to register response type. The data packet response data segment is used to configure a data packet response interface that needs to obtain response information when the response type data segment is configured to data packet response type. The data stream response data segment is used to configure a data stream response interface that needs to obtain response information when the response type data segment is configured to data stream response type. The blocking type data segment is used to configure blocking or non-blocking. The event execution data segment configures the content of the event to be executed.
[0052] It should be noted that this can be achieved based on a preset event configuration data structure without changing the hardware structure. This enables flexible configuration of event type data packet processing information. Each data segment can have its corresponding bits configured, and the specific information of each data segment can be configured by setting the values of these bits.
[0053] It should be noted that if the A1 of the currently parsed data packet to be processed... n If it is a business identifier, then A3 will be used. n Send to A1 n The corresponding business execution engine. If A1n If it is a DMA type identifier, then the scheduling firmware PB m A3 n Send to the execution processing module PF m The DMA execution engine in the process executes. If A1 n If it is a non-DMA type identifier, then the scheduling firmware PB m A3 first n Send to the execution processing module PF m In the middle, and then through the processing module PF m The corresponding interface sends the data to the downstream non-DMA execution engine. The non-DMA execution engines include the computational service execution engine and the drawing service execution engine.
[0054] Step B3: Configure the interface corresponding to the event processing engine based on the event configuration information. When all configured interfaces receive the corresponding response information, execute the corresponding event according to the information configured in the blocking type data segment and the event execution data segment.
[0055] It should be noted that the process of steps B1-B3 can be specifically based on the scheduling firmware PB in the packet processing system. m and execution processing module PF m To achieve this. The sequence of data packets to be processed {A1,A2,...,A...} n ,...,A N Specifically, this refers to the scheduling firmware PB corresponding to the current foreground queue. m From local cache PE m The sequence of data packets obtained from the process.
[0056] As an example, A3 n This includes triggering conditions and the content of the event to be executed. The triggering conditions include receiving a reply message to be received. It should be noted that when the corresponding data packet is executed, the corresponding reply message is generated. Step B2 includes: Step B21: If the A1 of the currently parsed data packet to be processed... n If the event identifier is specified, the corresponding blocking type will be configured in the blocking type data segment of the preset event configuration data structure.
[0057] Step B22: Based on the A3 corresponding to the currently parsed data packet to be processed. n The triggering conditions determine the response type and the response interface that needs to be configured. The corresponding information is configured in the response type data segment, register response data segment (REG), data packet response data segment (EOP), and data stream response data segment (EOS) of the preset event configuration data structure.
[0058] Step B23: Based on the A3 corresponding to the currently parsed data packet to be processed.n The content of the event to be executed is configured in the event execution data segment of the preset event configuration data structure, and the event configuration information corresponding to the currently parsed data packet to be processed is generated.
[0059] As an example, the event execution data segment includes an interrupt operation data segment and an update memory operation data segment. The interrupt operation data segment is used to configure interrupt operation information, and the update memory operation data segment is used to configure memory operation information.
[0060] As an example, the data packet response types also include DMA data packet response types and non-DMA data packet response types. Both the DMA execution engine and the event handling engine are located in the execution processing module, while the non-DMA execution engine is located downstream. When the data packet response type is set to DMA, a DMA data packet response interface is configured in the data packet response data segment; when the response type is set to non-DMA, a non-DMA data packet response interface is configured in the data packet response data segment. It can be understood that configuring the response interface specifically refers to enabling the corresponding response interface. Only when the response interface is enabled is it necessary to obtain the corresponding response information based on the enabled response interface.
[0061] As an example, step B3 includes: Step B31: Based on the event configuration information, enable the interface on the event processing engine that needs to obtain response information.
[0062] Step B32: When the interface for reply information enabled on the event processing engine receives the corresponding reply information, step B33 is executed.
[0063] Step B33: If the blocking type data segment is set to non-blocking type, or if the blocking type data segment is set to blocking type, and the pending data packets before the current pending data packet have been executed, then the corresponding event content is executed based on the information configured in the event execution data segment.
[0064] It should be noted that the sequence of data packets to be processed {A1,A2,...,A...} n ,...,A N The process of maintaining the order of data packets to be processed in the process can be implemented in the manner described in Example 2, and will not be repeated here.
[0065] As an example, the preset configuration event data structure also includes a destination data segment, which is used to configure the destination location that the data packet to be processed needs to be sent to.
[0066] This invention enables flexible configuration of event information based on a preset event configuration data structure. Without changing the hardware structure, it configures the corresponding event by flexibly configuring the event information to execute the corresponding event, thereby configuring the interface of the event processing engine. By monitoring the corresponding response information through the configured event processing engine interface, the orderly execution of event packets is ensured, thus ensuring the orderly execution of the sequence of data packets to be processed, and improving the processing efficiency and accuracy of data packets.
[0067] Example 4 Example 4 provides a packet processing method to prevent deadlock, such as Figure 4 As shown, it includes: Step C1: Sequentially parse the sequence of data packets to be processed {A1, A2, ..., A...} n ,...,A N For each data packet to be processed in}, A n This refers to the nth data packet to be processed, where n ranges from 1 to N, and N is the total number of data packets to be processed. n Including A1 n A3 n A1 n For event identification or business identification, A3 n This refers to the data packet content information, and the service identifier includes DMA service type and non-DMA service type.
[0068] Among them, A n Also includes A2 n If A1 n If A2 is the event identifier, then n Is it a blocking or non-blocking indicator, if A1 n If it is a business identifier, then A2 n Empty.
[0069] It should be noted that the sequence of data packets to be processed {A1,A2,...,A...} n ,...,A N Specifically, this can be achieved through steps A10-A30 in Embodiment 2, which will not be elaborated here. This generates a sequence of data packets to be processed: {A1, A2, ..., A...}. n ,...,A N} and then stored in the corresponding packet buffer PCA i m Data packet reading module, PD m From packet buffer PCA i m Data packets are read and stored in the corresponding local buffer PCB. i m In step C1, the scheduling firmware PB is... m From PCB im Obtain the sequence of data packets to be processed {A1,A2,...,A...} n ,...,A N The parsing process is performed.
[0070] Step C2, if A n A1 n If A3 is the service identifier for the DMA service type, then... n Send to the DMA execution engine for execution; if A n A1 n If it is a service identifier for a non-DMA service type, then A3 will be used. n Send to the execution engine for non-DMA service types for execution; if A n A1 n As an event identifier, and A3 n If it is related to DMA, then A3 will be used. n Simultaneously sent to both the DMA execution engine and the event handling engine; if A n A1 n As an event identifier, and A3 n If it is not related to DMA, then A3 will be used. n Simultaneously sent to both the non-DMA execution engine and the event processing engine; both the DMA execution engine and the event processing engine are located within the execution processing module, with the non-DMA execution engine located downstream. The event processing engine receives A3... n Stored in a preset event FIFO in the order of receipt.
[0071] It should be noted that the preset event FIFO is used to store event data packet content information. The event data packet content information in the preset event FIFO is executed in the order it is stored. After the event data packet content information is executed, it is popped from the preset event FIFO. The preset event FIFO also stores DMA-related events and non-DMA-related events. It should also be noted that because the DMA execution engine requires less space than other engines, it is placed in the execution processing module, while other business execution engines are placed downstream, further improving data packet processing efficiency. Non-DMA execution engines include the drawing execution engine and the calculation execution engine.
[0072] Step C3: If an anomaly occurs in the current sequence of data packets to be processed, a pause execution instruction is generated, and the currently issued A1... n When the pending data packet identified by the business is completed, a pause execution response instruction is generated, and then a reset instruction corresponding to the current pending data packet sequence is generated.
[0073] It should be noted that the current sequence of data packets to be processed is abnormal, specifically referring to the queue PQ corresponding to the previous sequence of data packets to be processed.i m An error occurred. The system generates a reset instruction corresponding to the current sequence of data packets to be processed. Specifically, it generates a queue PQ corresponding to the current sequence of data packets to be processed. i m Reset command.
[0074] Step C4: If the data packet content information to be popped from the current preset event FIFO is related to DMA, then generate the corresponding virtual DMA event completion information and pop the data packet content information to be popped from the current preset event FIFO. If the data packet content information to be popped from the current preset event FIFO is not related to DMA, then when the corresponding non-DMA event completion information is received, pop the data packet content information to be popped from the current preset event FIFO until the current preset event FIFO is empty, and execute the exception post-processing operation corresponding to the current data packet sequence to be processed.
[0075] It should be noted that, since the DMA execution engine is located in the execution processing module, in step C3, after the pause execution reply instruction is generated, the DMA execution engine pauses all operations, while the downstream non-DMA execution engine continues to execute the unfinished operations. At this time, if the data packet content information to be popped from the current preset event FIFO is related to DMA, it will cause the preset event FIFO to deadlock, resulting in the current data packet sequence to be processed being unable to execute normally. Based on step C4, after generating the reset instruction corresponding to the current data packet sequence to be processed, if the data packet content information to be popped from the current preset event FIFO is related to DMA, the corresponding virtual DMA event completion information is generated, and the data packet content information to be popped from the current preset event FIFO is popped, thus avoiding the preset event FIFO deadlock and improving the processing efficiency and accuracy of the data packets in the data packet sequence to be processed.
[0076] As an example, step C2 includes: Step C21, if A n A1 n As an event identifier, and A3 n If it is related to DMA, then the DMA execution engine will complete the execution of A3. n After the corresponding DMA service data packet is processed, the corresponding DMA event completion information is generated and sent to the event processing engine.
[0077] Specifically, the DMA event completion information can be DMA data packet reply information. The DMA data packet reply information can be obtained by flexibly configuring the interface corresponding to the event processing engine in Embodiment 3, which will not be elaborated here.
[0078] Step C22, if A n A1n As an event identifier, and A3 n If it is related to non-DMA, then the non-DMA execution engine will complete the execution of A3. n After the corresponding non-DMA service data packet is processed, the corresponding non-DMA event completion information is generated and sent to the event processing engine.
[0079] Specifically, the non-DMA event completion information can be non-DMA data packet reply information. This information can be obtained by flexibly configuring the interface corresponding to the event processing engine in Example 3, which will not be elaborated here.
[0080] As an example, step C4 includes: Step C41: Obtain the data packet content information {CF1, CF2, ..., CF2} in the currently preset event FIFO. x ,...,CF X}, CF x This refers to the content information of the x-th data packet in the currently preset event FIFO, where x ranges from 1 to X, and X is the total number of data packets in the currently preset event FIFO, CF1, CF2, ..., CF x ,...,CF X Arranged in the order of deposit.
[0081] Step C42: Set x=1 and proceed to step C43.
[0082] Step C43, determine CF x If the data packet content information is related to DMA, then proceed to step C44; otherwise, proceed to step C45.
[0083] Step C44: Generate CF x The corresponding virtual DMA event completion information is popped from the currently preset event FIFO. x Proceed to step C46.
[0084] Step C45: Wait to receive CF x When the corresponding non-DMA event completes, pop the CF from the currently preset event FIFO. x Proceed to step C46.
[0085] Step C46: Determine if the current preset event FIFO is empty. If it is empty, execute the post-processing operation corresponding to the current data packet sequence to be processed. Otherwise, set x=x+1 and return to step C43.
[0086] The post-processing operations corresponding to the current data packet sequence to be processed include deleting the current data packet sequence to be processed.
[0087] This invention classifies service data packets into DMA service types and non-DMA service types. When an anomaly occurs in the current sequence of data packets to be processed, the A1 that has already been sent... n Once the pending data packet identified by the business is completed, a reset instruction corresponding to the current pending data packet sequence is generated. To avoid deadlock of the preset event FIFO caused by the DMA-related data packet content information in the current preset event FIFO, when the data packet content information to be popped from the current preset event FIFO is related to DMA, a corresponding virtual DMA event completion information is generated, and the data packet content information to be popped from the current preset event FIFO is popped, thus improving the processing efficiency and accuracy of data packets in abnormal handling scenarios.
[0088] Example 5 Example 5 provides an event packet processing method based on asynchronous recycling, such as... Figure 5 The place includes: Step D1: Sequentially parse the sequence of data packets to be processed {A1, A2, ..., A...} n ,...,A N For each data packet to be processed in}, A n This refers to the nth data packet to be processed, where n ranges from 1 to N, and N is the total number of data packets to be processed. n Including A1 n and A3 n A1 n For event identification or business identification, A3 n The data packet content information includes service identifiers such as DMA service type and non-DMA service type, and event types such as DMA data packet reply event type, non-DMA data packet reply event type, register reply event type, and data stream event reply type. Steps D2 and D5 are executed in parallel.
[0089] Among them, A n Also includes A2 n If A1 n If A2 is the event identifier, then n Is it a blocking or non-blocking indicator, if A1 n If it is a business identifier, then A2 n Empty. Non-DMA type identifiers include computation type identifiers and plotting type identifiers.
[0090] It should be noted that the sequence of data packets to be processed {A1,A2,...,A...} n ,...,A N Specifically, this can be achieved through steps A10-A30 in Embodiment 2, which will not be elaborated here. This generates a sequence of data packets to be processed: {A1, A2, ..., A...}.n ,...,A N} and then stored in the corresponding data packet buffer PCA i m , the data packet reading module PD m reads the data packet from the data packet buffer PCA i m and stores it in the corresponding local buffer area PCB i m , in the step D1, the scheduling firmware PB m obtains the to-be-processed data packet sequence {A1, A2,..., A i m from the PCB n ,..., A N} for parsing.
[0091] Step D2, if A1 n of the current A n is an event identifier, comparing the current number DA0 of data packet content information stored in a preset event FIFO with a preset event FIFO storage space threshold E0, if DA0 < E0, executing step D3, and if DA0 = E0, executing step D3 after DA0 < E0 is satisfied, where E0 = E1 + E2 + E3 + E4, E1 is a DMA data packet reply event number threshold, E2 is a non-DMA data packet reply event number threshold, E3 is a register reply event number threshold, and E4 is a data stream event reply number threshold.
[0092] It should be noted that the preset event FIFO is used to store event data packet content information, the event data packet content information in the preset event FIFO is executed in the order of storage, and the event data packet content information is popped from the preset event FIFO after the execution is completed. Since the types of the data packet content information stored in the preset event FIFO include DMA data packet reply event type, non-DMA data packet reply event type, register reply event and data stream event reply type, the preset event FIFO storage space threshold is jointly determined by the DMA data packet reply event number threshold, the non-DMA data packet reply event number threshold, the register reply event number threshold and the data stream event reply number threshold. After the preset event FIFO is full, the data packet content information cannot be stored in the preset event FIFO temporarily, and the data packet content information is stored in the preset event FIFO after the data packet content information is popped from the subsequent preset event FIFO, that is, after resources are recycled.
[0093] Step D3, obtaining the event type corresponding to the current A n , and comparing the A stored in the current preset event FIFO nThe number of data packet contents for the corresponding event type (DA) k and E k k=1, 2, 3 or 4, if DA k <E k Then proceed to step D4. If DA k =E k Then wait for DA k <E k At that time, proceed to step D4.
[0094] It should be noted that, in order to further ensure the ordered and accurate execution of data packets in the sequence of data packets to be processed, after determining that the preset event FIFO space is satisfied, it is also necessary to further determine the current A n Whether the amount of data packet content information for the corresponding event type has reached the corresponding threshold is determined through two layers of judgment to ensure that the data packet sequence {A1,A2,...,A...} to be processed is within the specified threshold. n ,...,A N The pending data packets in the} are executed accurately and quickly.
[0095] Step D4: Set the current A n The corresponding A3 n Store in the preset event FIFO and update DA. k =DA k +1, based on the next A n Return to step D2.
[0096] It should be noted that the current A n The corresponding A3 n Storing an event into a preset event FIFO occupies one storage space within that preset event FIFO; therefore, updating DA... k =DA k +1.
[0097] Step D5: If the first event in the current preset event FIFO meets the trigger condition, then execute the first event in the current preset event FIFO. After execution, pop the first event in the current preset event FIFO and update DA. j =DA j -1, DA0 = DA0 - 1, DA j The number of data packets containing the event type corresponding to the first event in the currently preset event FIFO, j = 1, 2, 3 or 4.
[0098] It should be noted that the events in the preset event FIFO specifically refer to the data packet content information. After execution is complete and the first event in the current preset event FIFO is popped, one storage space in the preset event FIFO is released. Correspondingly, one storage space is also released for the corresponding event type. Therefore, DA is updated. j =DA j -1, DA0 = DA0 - 1, by asynchronously reclaiming the storage space of the preset event FIFO and the storage space of each event type, ensure that A1 n A3 for event identifier n It can be processed accurately and quickly.
[0099] It should be noted that the process of steps D1-D4 can be specifically based on the scheduling firmware PB in the packet processing system. m and execution processing module PF m To achieve this. The sequence of data packets to be processed {A1,A2,...,A...} n ,...,A N Specifically, this refers to the scheduling firmware PB corresponding to the current foreground queue. m From local cache PE m The sequence of data packets obtained from the process.
[0100] As an example, step D2 includes: Step D21, if the current A n A1 n If it is a business identifier, then determine the previous A. n If the packet is blocked, proceed to step D22; otherwise, proceed to step D23. If the current A... n A1 n If the event identifier is specified, then step D24 is executed.
[0101] Step D22, when the previous A is received n When the corresponding execution completion information is received, the current A will be... n Send to the corresponding business engine for execution, based on the next A n Return to step D21.
[0102] Step D23: When the previous A is received n When the corresponding completion message is sent, the current A will be... n Send to the corresponding business engine for execution, based on the next A n Return to step D21.
[0103] The service identifiers include DMA type identifiers, computation type identifiers, and drawing type identifiers; the service execution engines include DMA service execution engines, computation service execution engines, and drawing service execution engines. Step D24, upon receiving the previous A n corresponding transmission completion information, compare the number DA0 of packet content information currently stored in the preset event FIFO with the preset event FIFO storage space threshold E0. If DA0<E0, execute Step D3; if DA0=E0, wait until DA0<E0 is satisfied before executing Step D3.
[0104] As an example, if A1 n is an event identifier, then A3 n includes a trigger condition and content of an event to be executed. The content of the event to be executed may be set to empty, set to execute an interrupt operation, or set to perform a memory update operation.
[0105] As an example, the Step D5 includes: Step D51, monitoring whether the first event in the current preset event FIFO satisfies a trigger condition. If yes, execute Step D52; otherwise, wait until the trigger condition is satisfied before executing Step D52. The trigger condition includes execution completion of at least one A1 n packet of a service type, and / or execution completion of at least one A1 n packet of an event identifier type.
[0106] The trigger condition may specifically include receiving a reply information to be received. Specifically, the non-DMA packet reply information may be obtained by flexibly configuring an interface corresponding to an event processing engine in the third embodiment, which will not be described in detail herein.
[0107] Step D52, executing the to-be-executed event content corresponding to the first event in the current preset event FIFO, and after the execution is completed, updating DA j =DA j -1, DA0=DA0-1.
[0108] In the fifth embodiment, a storage space threshold of an event FIFO is preset based on a DMA packet reply event quantity threshold, a non-DMA packet reply event quantity threshold, a register reply event quantity threshold, and a data stream event reply quantity threshold. By comparing the number of packet content information currently stored in the preset event FIFO with the preset event FIFO storage space threshold, and comparing the number of packet content information of an event type corresponding to the current A n with a corresponding reply event quantity threshold, it is determined whether A3 n corresponding to the current A n can be stored in the preset event FIFO. Through two levels of judgment, event packets in a to-be-processed packet sequence are accurately and quickly distributed, which improves the processing efficiency and accuracy of packets.
[0109] Example 6 Example 6 provides an event-based data packet processing and tracking method, such as... Figure 6 As shown, it includes: Step E1: Sequentially parse the sequence of data packets to be processed {A1, A2, ..., A...} n ,...,A N For each data packet to be processed in}, A n This refers to the nth data packet to be processed, where n ranges from 1 to N, and N is the total number of data packets to be processed. n Including A1 n A3 n A1 n For event identification or business identification, A3 n For data packet content information, A3 n This includes the triggering conditions and the content of the event to be executed.
[0110] Among them, A n Also includes A2 n If A1 n If A2 is the event identifier, then n Is it a blocking or non-blocking indicator, if A1 n If it is a business identifier, then A2 n Empty.
[0111] It should be noted that the sequence of data packets to be processed {A1,A2,...,A...} n ,...,A N Specifically, this can be achieved through steps A10-A30 in Embodiment 2, which will not be elaborated here. This generates a sequence of data packets to be processed: {A1, A2, ..., A...}. n ,...,A N} and then stored in the corresponding packet buffer PCA i m Data packet reading module, PD m From packet buffer PCA i m Data packets are read and stored in the corresponding local buffer PCB. i m In step E1, the scheduling firmware PB is... m From PCB i m Obtain the sequence of data packets to be processed {A1,A2,...,A...} n ,...,A N The parsing process is performed.
[0112] The triggering condition includes receiving a pending reply message. It should be noted that the corresponding reply message is generated when the corresponding data packet is completed. The event execution data segment includes an interrupt operation data segment and a memory update operation data segment. The interrupt operation data segment is used to configure interrupt operation information, and the memory update operation data segment is used to configure memory operation information.
[0113] Step E2, if A n A1 n If it is a business identifier, then A3 will be used. n Send it to the corresponding business execution engine for execution, if A n A1 n If it is an event identifier, then A3 will be used. n Store the data in a preset event FIFO according to the order of receipt, and set A3 as an example. n It is stored in a pre-defined cache structure.
[0114] It should be noted that the preset event FIFO is used to store the content information of event data packets. The event data packet content information in the preset event FIFO is executed in the order it is stored, and is popped from the preset event FIFO after execution is complete. The business execution engine includes DMA execution engine execution and non-DMA execution engine execution. The non-DMA execution engine includes the computation business execution engine and the drawing business execution engine. If A1 n If it is a DMA type identifier, then the scheduling firmware PB m A3 n Send to the execution processing module PF m The DMA execution engine in the process executes. If A1 n If it is a non-DMA type identifier, then the scheduling firmware PB m A3 first n Send to the execution processing module PF m In the middle, and then through the processing module PF m The corresponding interface in the middle sends the data to the corresponding non-DMA execution engine downstream.
[0115] Specifically, the preset cache structure can be set as a linked list, hash table, or unordered set, and the preset cache structure follows the A3 standard. n The events are popped out in the order they are completed. The preset cache structure does not need to strictly follow the first-in-first-out order. The preset event FIFO follows A3. n Pop-ups are displayed in a first-in, first-out (FIFO) order. It should be noted that the preset event FIFO follows the A3 format. n The first-in-first-out (FIFO) popping order ensures that the sequence of data packets to be processed {A1, A2, ..., A...} is maintained. n ,...,A NThe data packets in the sequence are processed sequentially, but if the recording of tracking information is also based on a preset event FIFO, it will lead to inaccurate tracking information because some A3 data may exist in the preset event FIFO. n The corresponding data packet execution is complete, but due to the limitation of the preset event FIFO order, A3 in the preset event FIFO is not processed. n We need to wait for the A3 ahead. n Execution complete. Based on this, settings are configured according to A3. n The preset cache structure is popped out in the order of execution completion.
[0116] Step E3: If the current pending process A3 n Corresponding A1 n If the event is identified and the corresponding triggering condition is met, then steps E4 and E7 are executed synchronously.
[0117] Step E4: Determine the currently pending event A3 in the preset event FIFO. n If the previous value was empty, proceed to step E5; otherwise, proceed to step E6.
[0118] Step E5: Pop the currently pending A3 from the preset event FIFO. n Execute the corresponding pending event content and return to step E3.
[0119] Step E6: The currently pending event A3 in the event FIFO to be preset. n If the previous condition was empty, execute the currently pending A3. n Execute the corresponding pending event content and return to step E3.
[0120] Step E7: Pop the currently pending A3 from the preset cache structure. n If the content of the corresponding event to be executed includes recording tracking information, then the corresponding tracking information is obtained and stored in the preset memory, and the process returns to step E3.
[0121] It should be noted that the tracking information can be read from the preset memory for analysis according to application requirements.
[0122] It should be noted that the process of steps E1-E7 can be specifically based on the scheduling firmware PB in the packet processing system. m and execution processing module PF m To achieve this. The sequence of data packets to be processed {A1,A2,...,A...} n ,...,A N Specifically, this refers to the scheduling firmware PB corresponding to the current foreground queue. m From local cache PE m The sequence of data packets obtained from the process.
[0123] As an example, when A3 n The corresponding pending event content includes A3 when recording tracking information. n The corresponding triggering conditions include the completion of the corresponding business data packet, and step E7 includes: Step E71: Pop the currently pending A3 from the preset cache structure. n If the content of the corresponding pending event includes record tracking information, then proceed to step E72.
[0124] Step E72: Obtain the currently pending A3 n The corresponding trigger conditions, including the start and end times of the business data packet execution and the corresponding execution instructions, will determine the current pending A3. n The start time, end time, and corresponding execution instruction of the business data packet in the corresponding triggering condition are stored as the current pending trace information in the preset memory.
[0125] As an example, the service identifier includes a DMA service type identifier and a non-DMA service type identifier. Data packets to be processed for DMA service types are processed in the order they are parsed. If only data packets to be processed for DMA service types need to be traced, then after step E1, the following steps are executed: Step F2, if A n A1 n If A3 is used as the DMA service type identifier, then... n Send to the DMA execution engine for execution, if A n A1 n If it is a non-DMA service type identifier, then A3 will be... n Send to a non-DMA execution engine for execution, if A n A1 n If it is an event identifier and related to DMA, then A3 will be... n Store it in the preset DMA event FIFO, if A n A1 n If it is an event identifier and not related to DMA, then A3 will be... n Stored in a pre-defined non-DMA event FIFO.
[0126] Step F3: If the current pending process is A3 n Corresponding A1 n If the event identifier is met and the corresponding triggering condition is satisfied, then determine that the current pending event A3 is... n Is it related to DMA? If so, proceed to step F5; otherwise, proceed to step F4.
[0127] Step F4: Determine the currently pending A3 event in the preset non-DMA event FIFO. nIf the previous state was empty, then pop the currently pending A3 from the preset DMA event FIFO. n Execute the corresponding pending event content; otherwise, process the currently pending event A3 in the pre-set non-DMA event FIFO. n If the current A3 is empty, pop it from the preset DMA event FIFO. n Execute the corresponding pending event content.
[0128] Step F5: Determine the currently pending A3 events in the preset DMA event FIFO. n If the previous state was empty, proceed to step F6; otherwise, check if the current pending event A3 is in the preset DMA event FIFO. n If the previous value was empty, proceed to step F6.
[0129] Step F6: Pop the currently pending A3 from the preset DMA event FIFO. n Execute the corresponding pending event content, if the current pending event is A3. n If the corresponding event to be executed includes recording tracking information, then the corresponding tracking information is retrieved and stored in a preset memory.
[0130] It should be noted that if only DMA service type pending data packets need to be tracked, a preset cache structure is not required. Instead, a preset DMA event FIFO and a preset non-DMA event FIFO can be set separately. For scenarios where DMA service type pending data packets are executed in the order of parsing, the tracking information obtained based on the preset DMA event FIFO is also accurate. Furthermore, setting the preset DMA event FIFO and the preset non-DMA event FIFO separately ensures that non-DMA events will not affect the accurate acquisition of DMA event tracking information.
[0131] As an example, when A3 n The corresponding pending event content includes A3 when recording tracking information. n The corresponding triggering conditions include the completion of the corresponding business data packet, and step F6 includes: Step F61: Pop the currently pending A3 from the preset DMA event FIFO. n If the content of the corresponding pending event includes record tracking information, then proceed to step F62.
[0132] Step F62: Obtain the current pending A3 n The corresponding trigger conditions, including the start and end times of the business data packet execution and the corresponding execution instructions, will determine the current pending A3. nThe start time, end time, and corresponding execution instruction of the business data packet in the corresponding triggering condition are stored as the current pending trace information in the preset memory.
[0133] Example 6 stores the data packet content information corresponding to the event data packet simultaneously in a preset event FIFO and a preset cache structure. Based on the preset event FIFO, the data packets in the sequence to be processed are executed sequentially according to a first-in-first-out order. Based on the preset cache structure, corresponding tracking information is obtained to record the accurate actual execution time of the data packets. This invention improves the processing efficiency and accuracy of data packets and ensures the accuracy of the tracking information.
[0134] It should be noted that in the above embodiments, some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. A process can be terminated when its operation is complete, but it may also have additional steps not included in the figures. A process can correspond to a method, function, procedure, subroutine, subroutine, etc. One or more of the above embodiments can be implemented in combination.
[0135] Example 7 Embodiment 7 provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform the methods described in Embodiments 2-6 of the present invention.
[0136] Example 8 Example 8 provides a computer-readable storage medium storing computer-executable instructions for executing the methods described in Examples 2-6 of the present invention.
[0137] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A data packet processing system, characterized in that, The system comprises M parallel packet processing modules {P1, P2, ..., P...} m ,...,P M }, P m Let m be the m-th packet processing module, where m ranges from 1 to M, and M is the total number of packet processing modules. P m Includes f(m) queues {PQ1} m PQ2 m ,...,PQ i m ,...,PQ f(m) m }, PQ i m For P m The i-th queue, where i ranges from 1 to f(m), and the queue corresponding to the i-th user in the system is {PQ}. i 1 PQ i 2 ,...,PQ i m ,...,PQ i M The system can only serve one user at a time, and each P m Operates independently; P m Including the corresponding queue management module PA m , scheduling firmware PB m Packet buffer PC m Packet reading module PD m Local cache PE m Execution processing module PF m ; PC m Including P m Each PQ i m The corresponding packet buffer PCA i m PE m Including P m Each PQ i m Corresponding local cache PCB i m ; PC m Used to receive data packets sent by the software and store the data packets in the corresponding PCA. i m Update PCA i m The corresponding write pointer; PA m Used to select the user serial number of the currently needed service, and to assign the PQ corresponding to the selected user serial number of the currently needed service. i m Once identified as the foreground queue identifier, the foreground queue identifier is sent to the PowerBuilder (PB). m PD m PF m ; PD m Used to retrieve the front-end PCA corresponding to the current front-end queue. i m Data packets are read and stored in the corresponding front-end PCB. i m middle; PB m Used from front-end PCB i m The system reads and parses data packets, then sends the parsing results to the corresponding PF. m Execute and update the front-end PCA i m The corresponding read pointer.
2. The system according to claim 1, characterized in that, PA m Used to first send a request to the PB when a user needs to be switched to another service. m PD m PF m Send a pause command; PB m PD m PF m Based on the received pause command, store the execution status information corresponding to the current foreground queue and generate a pause reply command; PA m Used to receive PB m PD m PF m After generating the pause reply command, reselect the user serial number for the currently needed service, and then assign the PQ corresponding to the reselected user serial number to the service. i m Once identified as the foreground queue identifier, the foreground queue identifier is sent to the PowerBuilder (PB). m PD m PF m .
3. The system according to claim 2, characterized in that, PA m Used to select the user sequence number for the currently needed service for the first time in the initial state of the current foreground queue, based on the current foreground queue identifier, and then to send the request to the PB. m PD m PF m Send a start execution command; otherwise, send a command to the PB based on the current foreground queue identifier. m PD m PF m Send a continue execution command; PB m PD m PF m Based on the start execution instruction, execute the corresponding operation in the current foreground queue in its initial state. PB m PD m PF m Based on the continue execution instruction, the corresponding operation continues to be executed according to the execution status information currently stored in the current foreground queue.
4. The system according to claim 2, characterized in that, PA m It is also used to receive queue deletion commands. If the queue to be deleted is not the current foreground queue, then when switching to the queue to be deleted is needed again, the command will be sent to the PB. m PD m PF m Send a reset command based on the queue to be deleted; if the queue to be deleted is the current foreground queue, then after the current foreground queue generates a pause reply command, send a reset command to the PB. m PD m PF m Send a reset command based on the queue to be deleted.
5. The system according to claim 4, characterized in that, PB m PD m PF m Used to clear the status information of the queue to be deleted based on the received reset command, and reset it to the initial state corresponding to the queue to be deleted; PB m Used to PF m Send monitoring event packets based on the queue to be deleted, PF m This is used to monitor whether the downstream processes have completed executing the data packets corresponding to the queue to be deleted, based on monitoring event packets. When the downstream processes have completed executing the data packets corresponding to the queue to be deleted, the information indicating that the data packets corresponding to the queue to be deleted have been completed is fed back to PB. m ; PB m The deletion operation is performed based on the completion information of the data packets corresponding to the queue to be deleted.
6. The system according to claim 1, characterized in that, M equals 2, and all f(m) equals 4.
7. The system according to claim 1, characterized in that, P1 is used to process data packets for drawing operations, and P2 is used to process data packets for calculation operations that assist in drawing.
8. The system according to claim 1, characterized in that, PCA i m All are set as circular buffers.
9. The system according to claim 1, characterized in that, P m Generated based on RISC-V architecture.
10. The system according to claim 1, characterized in that, The system switches the user sequence number of the currently needed service based on a time-slice polling method.
