Multi-channel management method and device
By selecting the target channel number and task data based on the channel status information and transmitting them to the engine unit in the engine module for processing, the channel blocking problem during multi-channel parallel processing is solved, achieving efficient multi-channel scheduling and network stability.
Patent Information
- Application Number
- CN202511735602.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-03-06
Smart Images

Figure CN121614434A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network transmission technology, and in particular to a multi-channel management method and apparatus. Background Technology
[0002] With the development of Remote Direct Memory Access (RDMA) technology, the complexity of the protocols that need to be adapted is increasing, and the amount of information that needs to be processed is also increasing. When multiple channels are running in parallel, each channel needs to access off-chip memory through the same bus to perform read and write operations. This can cause other channels to be blocked during the processing of the current channel, thereby delaying the data processing of other channels and causing network jitter. Summary of the Invention
[0003] Therefore, it is necessary to provide a multi-channel management method and apparatus capable of multi-channel parallel operation to address the aforementioned technical problems.
[0004] Firstly, this application provides a multi-channel management method, including:
[0005] The target channel number is determined based on the channel status information of the channel number, and the target channel task data is obtained from all the stored initial channel task data based on the target channel number; wherein, each initial channel task data corresponds to a channel number;
[0006] Based on the target channel task data, the engine number of the target engine unit is determined, and the engine number and the target channel task data are transmitted to each engine unit in the engine module so that the target engine unit executes the target channel task data;
[0007] Obtain the execution result information returned by the engine module, and update the channel status information corresponding to the execution result information.
[0008] In some embodiments, it also includes:
[0009] Update the target channel task data according to the execution result information;
[0010] If the execution result information includes the first external request information, the first external request information is sent to the external chip, and the channel status information corresponding to the execution result information is updated based on the first external request information;
[0011] Upon receiving the external return result of the first external request information, the corresponding channel status information is updated, and the target channel task data is updated based on the external return result; so that when the updated channel status information meets the channel scheduling conditions, the corresponding channel number is determined as the target channel number, so that the latest target channel task data is executed subsequently.
[0012] In some embodiments, the channel status information includes the outbound request status, and updating the channel status information corresponding to the execution result information based on the first outbound request information includes:
[0013] Based on the first outbound request information, the corresponding outbound request status is updated to "sent".
[0014] And / or,
[0015] The step of updating the corresponding channel status information when obtaining the return result of the first outgoing request information includes:
[0016] Upon receiving the return result of the first external request information, the corresponding external request status is updated to "received".
[0017] In some embodiments, the execution result information includes an execution location marker, and the method further includes:
[0018] Update the target channel task data according to the execution result information;
[0019] If the channel status information corresponding to the target channel task data meets the channel scheduling conditions, the corresponding channel number is determined as the target channel number, so that the corresponding engine unit executes the unexecuted data in the latest target channel task data according to the execution position mark.
[0020] In some embodiments, the channel status information includes at least one of channel master status, channel sub-status, and channel scheduling status;
[0021] After transmitting the engine number and the target channel task data to each engine unit in the engine module, the method further includes:
[0022] Update the corresponding channel sub-state to occupied state;
[0023] And / or,
[0024] The step of obtaining the execution result information returned by the engine module and updating the channel status information corresponding to the execution result information includes:
[0025] Obtain the execution result information returned by the engine module. If the execution result information includes a channel scheduling not-ending flag, update the corresponding channel sub-state to an unoccupied state and update the corresponding channel scheduling state to an unfinished scheduling state; and / or,
[0026] Obtain the execution result information returned by the engine module. If the execution result information includes a channel scheduling end flag, update the corresponding channel sub-state to an unoccupied state and update the corresponding channel scheduling state to an ended scheduling state; and / or,
[0027] If the execution result information returned by the engine module is obtained, and the execution result information includes a channel scheduling end flag, the corresponding channel sub-state is updated to an unoccupied state, and the corresponding channel scheduling state is updated to an end-scheduling state; and after the latest execution result information is returned to the external chip, the corresponding channel main state is updated to an unoccupied state.
[0028] In some embodiments, the channel status information includes the channel master status, channel sub-status, and outbound request status; determining the target channel number based on the channel status information of the channel number includes:
[0029] When the main channel state is occupied, the sub-channel state is unoccupied, and the external request state is returned or no request, the corresponding channel number is determined as the reserve channel number.
[0030] The target channel number is determined based on all the aforementioned preliminary channel numbers and channel arbitration rules.
[0031] In some embodiments, it also includes:
[0032] Obtain an external initial processing request, determine the channel number of the initial processing request, and update the corresponding channel status information; determine a second external request information based on the initial processing request and the channel number, and send the second external request information to the external device to obtain and store the initial channel task data.
[0033] In some embodiments, the channel status information includes the channel master status; determining the channel number of the initial processing request and updating the corresponding channel status information includes:
[0034] Determine the channel number of the initial processing request and update the corresponding channel master status to occupied status.
[0035] In some embodiments, determining the engine number of the target engine unit based on the target channel task data, and transmitting the engine number and the target channel task data to each engine unit in the engine module, so that the target engine unit executes the target channel task data, includes:
[0036] The latency duration is obtained, which is determined based on the hardware parameters of the target engine unit; wherein the hardware parameters include at least one of clock frequency, interface specification, combinational logic depth, and cache configuration;
[0037] The delay duration, the engine number, and the target channel task data are transmitted to each engine unit in the engine module, so that the target engine unit executes the target channel task data.
[0038] Secondly, this application also proposes a multi-channel management device, including a channel scheduling module, a data caching module, a channel status update module, and an engine module, wherein the engine module includes several engine units;
[0039] The channel scheduling module is used to determine the target channel number based on the channel status information of the channel number, and to obtain the target channel task data from all the initial channel task data in the data caching module based on the target channel number; wherein, each initial channel task data corresponds to a channel number;
[0040] The channel scheduling module is also used to determine the engine number of the target engine unit based on the target channel task data, and transmit the engine number and the target channel task data to each engine unit in the engine module;
[0041] The engine module is used to obtain the engine number and the target channel task data, and select the corresponding engine unit according to the engine number to execute the target channel task data and return the execution result information;
[0042] The channel status update module is used to obtain the execution result information and update the channel status information corresponding to the execution result information.
[0043] In some embodiments, it also includes:
[0044] The channel status maintenance module is used to obtain the first outgoing request information and channel status forwarded by the channel status update module, and update the corresponding channel status information based on the first outgoing request information and the channel status.
[0045] The channel status update module is used to forward the execution result information to the data cache module so that the data cache module updates the target channel task data according to the execution result information; and is also used to forward the first external request information and the obtained channel status when receiving the execution result information including the first external request information.
[0046] The external request management module is used to send the acquired first external request information to the external chip and update the corresponding channel status information;
[0047] The external receiving management module is used to obtain the external return result of the first external request information, update the corresponding channel status information, and forward the external return result to the data caching module; so that the data caching module updates the target channel task data based on the external return result.
[0048] The channel scheduling module is further configured to determine the corresponding channel number as the target channel number when the updated channel status information meets the channel scheduling conditions, so that the engine module can subsequently execute the latest target channel task data.
[0049] The aforementioned multi-channel management method and apparatus determine a target channel number based on the channel status information of the channel number, and retrieve target channel task data from all stored initial channel task data based on the target channel number; determine the engine number of the target engine unit based on the target channel task data, and transmit the engine number and the target channel task data to each engine unit in the engine module, so that the target engine unit executes the target channel task data; obtain the execution result information returned by the engine module, and update the channel status information corresponding to the execution result information. This application selects the target channel number through channel status information, transmits the target channel number and target channel task data to each engine unit in the engine module, and then the engine unit matches the channel number to determine whether it should execute the task. This allows multiple engine units to process channel task data simultaneously, effectively reducing congestion. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a diagram illustrating the application environment of a multi-channel management method in one embodiment;
[0052] Figure 2 This is one of the flowcharts illustrating a multi-channel management method in one embodiment;
[0053] Figure 3 This is a second flowchart illustrating a multi-channel management method in one embodiment;
[0054] Figure 4 This is the third flowchart of a multi-channel management method in one embodiment;
[0055] Figure 5 This is one of the structural block diagrams of a multi-channel management device in one embodiment;
[0056] Figure 6 This is a second structural block diagram of a multi-channel management device in one embodiment;
[0057] Figure 7 This is the third structural block diagram of a multi-channel management device in one embodiment;
[0058] Figure 8 This is one of the internal structural diagrams of a computer device in one embodiment;
[0059] Figure 9 This is a second internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0061] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0062] To address the issue of channel congestion, related technologies typically employ adding buffer space between each channel pipeline. This allows the received return information from the previous channel to be stored in the buffer space, while the request information for the next channel can be sent externally. Simultaneously, the return information from the previous channel can be processed, eliminating the need to complete the entire pipeline of the previous channel before starting the pipeline of the next channel, thus reducing congestion and improving efficiency.
[0063] This application proposes a new multi-channel management method and apparatus to solve the congestion problem when multiple channels are running in parallel.
[0064] The multi-channel management method provided in this application can be applied to, for example... Figure 1 The application environment shown is not intended to limit the method of this application. The channel management circuit 10 is used to execute the multi-channel management method to interact with the engine module 20, the data cache module 30, and the off-chip memory 40.
[0065] In one exemplary embodiment, such as Figure 2 As shown, a multi-channel management method is provided, which can be applied to... Figure 1 The channel management circuit 10 in the middle is used as an example for explanation, including the following steps S110 to S130.
[0066] Step S110: Determine the target channel number based on the channel status information of the channel number, and obtain the target channel task data from all the stored initial channel task data based on the target channel number; wherein, each initial channel task data corresponds to a channel number.
[0067] Understandably, the data cache module 30 stores several initial channel task data sets. These initial channel task data sets need to be processed by the engine module 20, such as data verification, data acquisition, and data transfer. Each initial channel task data set corresponds to a channel number, and each channel corresponds to one initial channel task data set and one channel number; that is, the channel, channel number, and initial channel task data sets are mutually corresponding. Therefore, the corresponding initial channel task data can be retrieved from the data cache module 30 based on the channel number for scheduling. Optionally, the initial channel task data may include at least one of the following: QueuePair Number (QPN), Packet Sequence Number (PSN), remote node representation, memory address information, data length and offset, and permission and security information.
[0068] Since each channel number corresponds to a channel in different states at different stages, these states can indicate whether the channel can currently process tasks, the types of tasks it can process, or its processing efficiency. To ensure the correctness, efficiency, and reliability of scheduling, it is necessary to determine when and how to schedule the corresponding channel based on the channel's state information. The channel state information includes at least one of the following: main channel state, sub-channel state, and external request state.
[0069] When multiple initial channel task data exist, it is necessary to determine the channel that needs to be scheduled based on the channel status information of all initial channel task data. The channel number of the channel to be scheduled is determined as the target channel number. Then, the channel task data corresponding to the target channel number is found from the data cache module 30 based on the target channel number, and this channel task data is used as the target channel task data. Understandably, if only one channel number is currently in use, and the channel status information of that channel number meets the scheduling conditions, then that channel number is the target channel number. If the channel status information of that channel number does not meet the scheduling conditions, then there is no target channel number, and no scheduling operation is required. If multiple channel numbers are currently in use, then the target channel number needs to be determined based on the channel status information of these multiple channel numbers.
[0070] It is important to note that in this embodiment, the channel number and the target channel task data are transmitted to each engine unit 21 in the engine module 20. The engine unit 21 then matches the data using the channel number to determine whether it should execute the task. This is done instead of directly transmitting the target channel task to a specific engine unit 21. This avoids adding a channel selection step, thereby reducing the data transmission burden on the channel management circuit 10, especially in multi-channel scheduling, effectively reducing congestion time. Furthermore, the approach of "only transmitting the target channel task data without a channel number to the engine module 20, and having the engine module 20 match it itself" is not adopted, as this approach not only increases hardware requirements but also requires the engine module 20 to spend more time matching, which reduces overall efficiency and increases costs.
[0071] Step S120: Determine the engine number of the target engine unit based on the target channel task data, and transmit the engine number and the target channel task data to each engine unit in the engine module so that the target engine unit executes the target channel task data.
[0072] Understandably, engine module 20 includes several engine units 21. When the number of engine units 21 is greater than one, it is necessary to select the engine unit 21 corresponding to the target channel task data. Each engine unit 21 may handle different data types, data volumes, processing speeds, etc., and each target channel task data also has different data volumes and data types. Therefore, in order to improve matching accuracy and processing efficiency, it is necessary to determine the corresponding engine unit 21 based on the target channel task data and use that engine unit 21 as the target engine unit 21. When engine unit 21 receives channel task data, it will match the obtained engine number with its own engine number. When the two are the same, it means that the target channel task data needs to be executed. Optionally, the engine number can be updated in the target channel task data to obtain new target channel task data.
[0073] Step S130: Obtain the execution result information returned by the engine module and update the channel status information corresponding to the execution result information.
[0074] Understandably, after engine unit 21 finishes executing the target channel task data, it will return the execution result information of the target channel task data, and then update the channel status information of the target channel task data. This indicates that engine unit 21 has completed processing for the current channel.
[0075] It should be noted that updating channel task data includes adding, deleting, or modifying data.
[0076] This embodiment adds channel numbers and corresponding channel status information, and calls the channel task data corresponding to the channel status information when certain conditions are met. Simultaneously, by matching the channel task data with multiple engine units 21, each channel task data can be executed by the most suitable engine unit 21, thereby improving execution efficiency. Furthermore, since there are multiple engine units 21, multiple channel task data can be processed simultaneously by different engine units 21, meaning multiple channel task data can be executed synchronously, thus realizing a parallel multi-channel scheduling mechanism. This not only effectively solves the multi-channel congestion problem but also significantly improves processing efficiency and reduces the probability of network jitter.
[0077] In some embodiments, the method further includes:
[0078] Obtain the initial processing request from outside the chip, determine the channel number of the initial processing request, and update the corresponding channel status information; determine the second external request information based on the initial processing request and the channel number, and send the second external request information to outside the chip to obtain the initial channel task data and store it.
[0079] Understandably, when the channel management circuit 10 receives an initial processing request, it assigns a channel number to the initial processing request. Optionally, the initial processing request includes a local memory address. The channel management circuit 10 can determine the corresponding second external request information based on the local memory address, and then send the second external request information to the off-chip memory 40 to obtain the corresponding execution data (e.g., work queue elements, context information, etc.). The circuit receives the execution data corresponding to the returned second external request information, updates the second external request information based on the execution data, and obtains the aforementioned initial channel task data. This initial channel task data is stored in the data cache module 30 for subsequent retrieval.
[0080] Optionally, the channel number can be added to the initial processing request to obtain an updated initial processing request, and then the corresponding second external request information can be determined based on the local memory address in the updated initial processing request.
[0081] In some embodiments, such as Figure 3 As shown, the method also includes steps S210 to S230.
[0082] Step S210: Update the target channel task data based on the execution result information.
[0083] Understandably, after each execution by engine unit 21, it needs to return execution result information and update the corresponding target channel task data in the data cache module 30 based on the execution result information. This involves adding / modifying the returned execution result information to the target channel task data to obtain new target channel task data.
[0084] Step S220: If the execution result information includes the first external request information, the first external request information is sent to the external chip, and the channel status information corresponding to the execution result information is updated based on the first external request information.
[0085] Understandably, engine unit 21 may need to make external requests during execution. When engine unit 21 needs to make an external request, it will add the first external request information to the execution result information. When channel management circuit 10 receives the execution result information, or detects that it includes the first external request information, it will send the first external request information to off-chip memory 40 and update the corresponding channel status information to indicate that the current channel task data has been sent out.
[0086] Step S230: Upon receiving the external return result of the first external request information, update the corresponding channel status information and update the target channel task data based on the external return result; so that if the updated channel status information meets the channel scheduling conditions, determine the corresponding channel number as the target channel number, so that the latest target channel task data can be executed subsequently.
[0087] Understandably, upon receiving the return result of the first external request, the corresponding channel status information needs to be updated to indicate that the return result has been received. When the channel status information corresponding to the latest target channel task data meets the channel scheduling conditions, the latest target channel task data is then transmitted to engine module 20 for execution.
[0088] This embodiment takes into account that the engine unit 21 needs to access the off-chip memory 40 to obtain the required information during the execution of the target channel task data. Throughout the process, the channel status information is updated to release the corresponding engine unit 21 in a timely manner, facilitating its processing of other channel task data. Simultaneously, the target channel task is updated in real time based on the execution result information of the engine unit 21 to prevent errors during subsequent execution of the target channel task.
[0089] In some embodiments, the channel status information includes the outbound request status. Updating the channel status information corresponding to the execution result information based on the first outbound request information includes:
[0090] Based on the first outbound request information, the status of the corresponding outbound request is updated to "sent".
[0091] and / or;
[0092] Upon receiving the return result of the first outbound request, update the corresponding channel status information, including:
[0093] Upon receiving the return result of the first outbound request, the corresponding outbound request status is updated to "received".
[0094] Optionally, a value of 1 for the outbound request status indicates that the request has been sent, a value of 2 indicates that the request has been received, and a value of 0 indicates that there is no request.
[0095] Understandably, the specific value of the external request status can clearly indicate the current external request status of a channel, so as to accurately and efficiently schedule each channel.
[0096] In some embodiments, such as Figure 4 As shown, the execution result information includes the execution location marker, and the method also includes steps S210 and S240.
[0097] Step S210: Update the target channel task data based on the execution result information.
[0098] Step S240: If the channel status information corresponding to the target channel task data meets the channel scheduling conditions, determine the corresponding channel number as the target channel number so that the corresponding engine unit executes the unexecuted data in the latest target channel task data according to the execution position mark.
[0099] Understandably, when engine unit 21 cannot execute all channel task data at once, it first returns the execution result information of the currently processed portion of the target channel task data. This execution result information includes an execution position marker, which indicates the current position of the target channel task data. When the target channel task data is called for execution again, processing continues from the position corresponding to the execution position marker, that is, only the remaining data after the previous execution (i.e., the unexecuted data) is processed, without repeating the data that was previously executed. This allows engine unit 21 to execute channel task data of various sizes, improving its applicability.
[0100] In some embodiments, the channel status information includes at least one of the channel master status, channel sub-status, and channel scheduling status;
[0101] After transmitting the engine number and target channel task data to each engine unit 21 in engine module 20, the process also includes updating the corresponding channel sub-state to an occupied state.
[0102] and / or;
[0103] Obtain the execution result information returned by engine module 20, and update the channel status information corresponding to the execution result information, including:
[0104] Obtain the execution result information returned by engine module 20. If the execution result information includes a channel scheduling not-ending flag, update the corresponding channel sub-state to unoccupied state and update the corresponding channel scheduling state to unfinished scheduling state; and / or,
[0105] Obtain the execution result information returned by engine module 20. If the execution result information includes a channel scheduling end flag, update the corresponding channel sub-state to the unoccupied state and update the corresponding channel scheduling state to the end-of-scheduling state; and / or,
[0106] The execution result information returned by the engine module 20 is obtained. If the execution result information includes a channel scheduling end flag, the corresponding channel sub-state is updated to the unoccupied state, and the corresponding channel scheduling state is updated to the end scheduling state. After the latest execution result information is returned to the external chip, the corresponding channel main state is updated to the unoccupied state.
[0107] It should be noted that a sub-state of "occupied" indicates that the channel is occupied and currently being used. A channel scheduling state of "not finished scheduling" indicates that the current target channel task data has not yet been completed. This may be because the target channel task data needs to be completed multiple times by engine unit 21; therefore, the completion of one execution by engine unit 21 does not necessarily mean that the target channel task data has been completed. A channel scheduling state of "finished scheduling" indicates that the target channel task data has been completed, meaning the channel can be released and reassigned to other channel task data. However, receiving the execution result information returned by engine module 20 does not immediately release the channel. This is because the target channel task data needs to be updated based on the execution result information, and then the latest target channel task data needs to be returned to the external system before the channel can be released. Therefore, the main state can only be updated to "unoccupied." In other words, a main state of "unoccupied" indicates that the corresponding channel has been released.
[0108] In some embodiments, channel status information includes channel master status, channel sub-status, and outbound request status; determining the target channel number based on the channel status information of the channel number includes:
[0109] When the main channel state is occupied, the sub-channel state is unoccupied, and the external request state is either returned or no request, the corresponding channel number is determined as the reserve channel number.
[0110] The target channel number is determined based on all the pre-selected channel numbers and channel arbitration rules.
[0111] Understandably, the first step is to determine which channels are eligible for scheduling. The channel numbers that are eligible for scheduling serve as reserve channel numbers. Although they are eligible for scheduling, they cannot be scheduled immediately. This is because during digital circuit scheduling, hardware resources cannot support the simultaneous reception and transmission of more bytes. For example, if the bus width is 128 bits, meaning 16 bytes are transmitted per cycle, and each channel task (i.e., the channel task) transmits 16 bytes of data, multiple channel tasks cannot be invoked simultaneously. Therefore, when multiple channels need to be scheduled simultaneously, arbitration is required to select the channel task that needs to be scheduled at the current moment. The channel arbitration rules can include at least one of priority, round-robin, load balancing, fair grouping, etc., without specific restrictions here. It should be noted that only one channel is scheduled per arbitration, and a scheduled channel can only be processed by one engine unit 21 at a time.
[0112] In some embodiments, the method further includes:
[0113] Obtain the initial processing request from outside the chip, determine the channel number of the initial processing request, and update the corresponding channel status information; determine the second external request information based on the initial processing request and the channel number, and send the second external request information to outside the chip to obtain the initial channel task data and store it.
[0114] Understandably, the initial processing request is the first off-chip request acquired by the channel management circuit 10. At this point, the initial processing request does not include channel task data. This is because, to adhere to principles such as efficient transmission, direct hardware access, and secure isolation, the initial processing request includes the address of the channel task data. The channel management circuit 10 needs to extract the address of the channel task data from the acquired initial processing request and determine the second external request information based on the address of the channel task data and the channel number. Then, the second external request information retrieves the channel task data that the initial processing request needs to execute, using the first acquired channel task data as the initial channel task data. It should be noted that the reason the second external request information includes the channel number is to quickly determine the channel corresponding to the received external return result.
[0115] In some embodiments, the channel status information includes the channel master status; determining the channel number of the initial processing request and updating the corresponding channel status information includes:
[0116] Determine the channel number for the initial processing request and update the corresponding channel master status to occupied.
[0117] It should be noted that the main state in this embodiment represents pre-occupation. This is because when allocating channel numbers to multiple initial processing requests, if the main state of a certain channel number is occupied, it means that the channel number has been allocated, and there is no need to continue allocating the channel number, thus avoiding the situation where a channel number is occupied by multiple channel task data at the same time.
[0118] In summary, this explains how to update the specific states in the corresponding channel status information under different circumstances, so as to accurately and efficiently schedule each channel.
[0119] In some embodiments, the engine number of the target engine unit 21 is determined based on the target channel task data, and the engine number and the target channel task data are transmitted to each engine unit 21 in the engine module 20, so that the target engine unit 21 executes the target channel task data, including:
[0120] The delay duration is obtained, which is determined based on the hardware parameters of the target engine unit 21; wherein, the hardware parameters include at least one of clock frequency, interface specification, combinational logic depth and cache configuration.
[0121] The delay duration, engine number, and target channel task data are transmitted to each engine unit 21 in engine module 20 so that the target engine unit 21 executes the target channel task data.
[0122] Understandably, when multiple engine units 21 execute channel task data simultaneously, there may be situations where execution result information is returned at the same time. This can lead to conflicts between execution result information and data loss. Therefore, to avoid this situation, it is necessary to send a delay duration along with the target channel task data to each target engine unit 21. This delay duration refers to how long the engine unit 21 will take to return the execution result information, that is, the duration of executing the corresponding target channel task data.
[0123] Optionally, the delay duration can range from 2 to 10 clock cycles, or other values. Each clock cycle refers to the clock period of the clock signal, which is the time interval from one edge (e.g., rising edge) to the next edge of the same type (the next rising edge). The clock period is related to the physical characteristics of the hardware. Optionally, the delay duration is the same for all target channel task data.
[0124] This application's multi-channel management method supports parallel scheduling of multiple channels and, while ensuring performance, makes reasonable use of hardware resources. It uses a channel management circuit 10 to uniformly manage all channel information, facilitating the functional design of the peripheral engine module 20. Compared to existing pipelined processing methods, this solution supports out-of-order scheduling between channels. Furthermore, this solution allows for flexible adjustment of parameters based on the complexity of the system's program. Moreover, this application's solution has broad applicability and can be widely applied in Application-Specific Integrated Circuits (ASICs).
[0125] Some embodiments of this application also propose a multi-channel management device, such as... Figure 5 As shown, the multi-channel management device includes a channel scheduling module 11, a data caching module 30, a channel status update module 12, and an engine module 20. The engine module 20 includes several engine units 21.
[0126] The channel scheduling module 11 is used to determine the target channel number based on the channel status information of the channel number, and to obtain the target channel task data from all the initial channel task data in the data cache module 30 based on the target channel number; wherein, each initial channel task data corresponds to a channel number.
[0127] The channel scheduling module 11 is also used to determine the engine number of the target engine unit 21 based on the target channel task data, and transmit the engine number and the target channel task data to each engine unit 21 in the engine module 20.
[0128] Engine module 20 is used to obtain engine number and target channel task data, select the corresponding engine unit 21 according to engine number to execute target channel task data, and return execution result information.
[0129] The channel status update module 12 is used to obtain execution result information and update the channel status information corresponding to the execution result information.
[0130] Understandably, the method performed by the device in this embodiment can refer to the multi-channel management method and corresponding options described above, and will not be repeated here.
[0131] In some embodiments, such as Figure 6 As shown, the device also includes: a channel status maintenance module 13, an external request management module 14, and an external reception management module 15.
[0132] The channel status update module 12 is used to forward the execution result information to the data cache module 30 so that the data cache module 30 updates the target channel task data according to the execution result information; it is also used to forward the first external request information and the obtained channel status when it receives the execution result information including the first external request information.
[0133] The channel status maintenance module 13 is used to obtain the first external request information and channel status forwarded by the channel status update module 12, and update the corresponding channel status information based on the first external request information and channel status.
[0134] The external request management module 14 is used to send the acquired first external request information to the external chip and update the corresponding channel status information.
[0135] The external receiving management module 15 is used to obtain the external return result of the first external request information, update the corresponding channel status information, and forward the external return result to the data cache module 30 so that the data cache module 30 updates the target channel task data based on the external return result.
[0136] The channel scheduling module 11 is also used to determine the corresponding channel number as the target channel number when the updated channel status information meets the channel scheduling conditions, so that the subsequent engine module 20 can execute the latest target channel task data.
[0137] Understandably, the channel status update module 12 writes the execution result information to the designated address corresponding to the data cache module 30. The external receiving management module 15 writes the external return result to the designated address corresponding to the data cache module 30 based on the channel number.
[0138] In some embodiments, channel status information includes outbound request status.
[0139] The external request management module 14 is also used to update the status of the corresponding external request to the sent status based on the first external request information.
[0140] and / or;
[0141] The external receiving management module 15 is also used to update the corresponding external request status to the received status when the external return result of the first external request information is obtained.
[0142] In some embodiments, the execution result information includes an execution location marker.
[0143] The channel status update module 12 is also used to forward the execution result information to the data cache module 30, so that the data cache module 30 updates the target channel task data according to the execution result information.
[0144] The channel scheduling module 11 is also used to determine the corresponding channel number as the target channel number when the channel status information corresponding to the target channel task data meets the channel scheduling conditions, so that the corresponding engine unit 21 executes the unexecuted data in the latest target channel task data according to the execution position mark.
[0145] In some embodiments, the channel status information includes at least one of the channel master status, channel sub-status, and channel scheduling status.
[0146] The channel scheduling module 11 is also used to update the corresponding channel sub-state to occupied state after transmitting the engine number and target channel task data to each engine unit 21 in the engine module 20.
[0147] and / or;
[0148] Channel status update module 12 is also used for:
[0149] Obtain the execution result information returned by engine module 20. If the execution result information includes a channel scheduling not-ending flag, update the corresponding channel sub-state to unoccupied state and the corresponding channel scheduling state to unfinished scheduling state. And / or;
[0150] Obtain the execution result information returned by engine module 20. If the execution result information includes a channel scheduling end flag, update the corresponding channel sub-state to the unoccupied state and the corresponding channel scheduling state to the ended scheduling state. And / or;
[0151] The module obtains the execution result information returned by the engine module 20. If the execution result information includes a channel scheduling end flag, it updates the corresponding channel sub-state to an unoccupied state and the corresponding channel scheduling state to an ended scheduling state. The entry request management module 16 is also used to update the corresponding channel main state to an unoccupied state after returning the latest execution result information to the off-chip memory 40.
[0152] In some embodiments, the channel status information includes the channel master status, channel sub-status, and outbound request status. The channel scheduling module 11 is also used for:
[0153] The channel scheduling module 11 is also used to determine the corresponding channel number as a reserve channel number when the channel main state is occupied, the channel sub state is unoccupied, and the external request state is returned or no request. And based on all the reserve channel numbers and the channel arbitration rules, it determines the target channel number.
[0154] In some embodiments, such as Figure 7 As shown, the device also includes:
[0155] The ingress request management module 16 is used to obtain the initial processing request from outside the chip, determine the channel number of the initial processing request, and update the corresponding channel status information.
[0156] The channel status maintenance module 13 is used to obtain the initial processing request from the entry request management module 16.
[0157] The external request management module 14 is used to obtain the initial processing request of the channel status maintenance module 13, determine the second external request information based on the initial processing request and the channel number, and send the second external request information to the off-chip memory 40.
[0158] The external receiving management module 15 is used to obtain the initial channel task data corresponding to the second external request information.
[0159] In some embodiments, the channel status information includes the channel master status.
[0160] The ingress request management module 16 is also used to determine the channel number of the initial processing request and update the corresponding channel master status to the occupied status.
[0161] In some embodiments, the channel scheduling module 11 is further configured to:
[0162] Based on the hardware parameters of the target engine unit 21 and the target channel task data, the delay duration of the target channel task data is determined; wherein, the hardware parameters include at least one of clock frequency, interface specification, combinational logic depth and cache configuration.
[0163] The target channel task data is transmitted to each engine unit 21 in engine module 20 according to the delay duration, engine number, and target channel task data, so that the target engine unit 21 executes the target channel task data.
[0164] In some embodiments, the data caching module 30 is configured as several cache spaces, the number of which is equal to the total number of channel numbers.
[0165] Understandably, each channel corresponds to a cache space, which enables data isolation, independent processing, simplified management, and improved parallel processing capabilities.
[0166] In some embodiments, a preprocessing module and a processing module are further connected between the off-chip memory 40 and the channel management circuit 10. When the off-chip memory 40 needs to process channel task data, it sends an initial processing request to the preprocessing module for preprocessing, and then sends the preprocessed initial processing request to the channel management circuit 10. The preprocessing module is used for at least one of the following: input / output data format conversion, data filtering, address resolution and mapping, and request classification. When the channel management circuit 10 needs to send external request information to the off-chip memory 40, it sends the external request information to the processing module, which processes the external request information and then sends it to the off-chip memory 40. The processing module is used for at least one of the following: filtering, amplification, protocol conversion, address conversion, and mapping.
[0167] Understandably, based on the same inventive concept, the solution to the problem provided by the device in the above embodiments is similar to the solution described in the above method. The specific limitations of the above device embodiments can be found in the limitations of the multi-channel management method above, and will not be repeated here.
[0168] To make it easier to understand, the most detailed implementation example is given below:
[0169] The ingress request management module 16 is used to obtain the initial processing request from outside the chip, determine the channel number of the initial processing request, and update the corresponding channel status information.
[0170] The channel status maintenance module 13 is used to obtain the initial processing request from the entry request management module 16.
[0171] The external request management module 14 is used to obtain the initial processing request of the channel status maintenance module 13, determine the second external request information based on the initial processing request and the channel number, and send the second external request information to the off-chip memory 40.
[0172] The external receiving management module 15 is used to obtain the initial channel task data corresponding to the second external request information and store the initial channel task data in the data cache module 30.
[0173] The channel scheduling module 11 is used to determine the target channel number based on the channel status information of the channel number, and to obtain the target channel task data from all the initial channel task data in the data cache module 30 based on the target channel number.
[0174] The channel scheduling module 11 is also used to determine the engine number of the target engine unit 21 based on the target channel task data, and transmit the engine number and the target channel task data to each engine unit 21 in the engine module 20.
[0175] Engine module 20 is used to obtain engine number and target channel task data, select the corresponding engine unit 21 according to engine number to execute target channel task data, and return execution result information.
[0176] The channel status update module 12 is used to obtain execution result information and update the channel status information corresponding to the execution result information. It is also used to forward the execution result information to the data cache module 30, so that the data cache module 30 updates the target channel task data according to the execution result information. Furthermore, if the execution result information includes a channel scheduling end flag, it updates the corresponding channel sub-state to an unoccupied state and the corresponding channel scheduling state to an ended scheduling state, and forwards the latest execution result information to the channel status maintenance module 13.
[0177] The channel status maintenance module 13 is used to forward the latest execution result information to the entry request management module 16.
[0178] The entry request management module 16 is used to update the corresponding channel master status to unoccupied status after returning the latest execution result information to the off-chip memory 40.
[0179] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0180] Each module in the aforementioned multi-channel management device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0181] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data for a multi-channel management method. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a multi-channel management method.
[0182] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a multi-channel management method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0183] Those skilled in the art will understand that Figure 8 and Figure 9The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0184] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0185] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described above.
[0186] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0187] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0188] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0189] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method of managing multiple channels, characterized by, The method comprises the following steps: determining a target channel number according to channel state information of a channel number, and obtaining target channel task data from all stored initial channel task data according to the target channel number; wherein each initial channel task data corresponds to a channel number; determining an engine number of a target engine unit based on the target channel task data, and transmitting the engine number and the target channel task data to each engine unit in an engine module, so that the target engine unit executes the target channel task data; obtaining execution result information returned by the engine module, and updating channel state information corresponding to the execution result information.
2. The method of claim 1, wherein, The method further comprises the following steps: updating the target channel task data according to the execution result information; in the case that the execution result information comprises first external request information, sending the first external request information to an external chip, and updating channel state information corresponding to the execution result information based on the first external request information; in the case that external return results of the first external request information are obtained, updating corresponding channel state information, and updating the target channel task data based on the external return results; so that in the case that the updated channel state information meets a channel scheduling condition, the corresponding channel number is determined as the target channel number, so that the latest target channel task data is executed subsequently.
3. The method of claim 2, wherein, The channel state information comprises external request state, and the updating of the channel state information corresponding to the execution result information based on the first external request information comprises: updating the corresponding external request state to a sent state based on the first external request information; and / or the updating of the corresponding channel state information in the case that the external return results of the first external request information are obtained comprises: updating the corresponding external request state to a received state in the case that the external return results of the first external request information are obtained. The execution result information comprises an execution position mark, and the method further comprises the following steps:
4. The method of claim 1, wherein, updating the target channel task data according to the execution result information; in the case that channel state information corresponding to the target channel task data meets a channel scheduling condition, determining a corresponding channel number as the target channel number, so that a corresponding engine unit executes data not executed in the latest target channel task data according to the execution position mark. The channel state information comprises at least one of a channel main state, a channel substate and a channel scheduling state; 5. The method of claim 1, wherein, after the transmission of the engine number and the target channel task data to each engine unit in the engine module, the method further comprises the following steps: updating a corresponding channel substate to an occupied state; and / or the obtaining of the execution result information returned by the engine module and the updating of the channel state information corresponding to the execution result information comprise the following steps: obtaining the execution result information returned by the engine module, updating a corresponding channel substate to an unoccupied state and updating a corresponding channel scheduling state to an unended scheduling state in the case that the execution result information comprises a channel scheduling unended mark; and / or, acquire the execution result information returned by the engine module, and in the case that the execution result information includes a channel scheduling end flag, update the corresponding channel sub-state to an unoccupied state and update the corresponding channel scheduling state to an end scheduling state; and / or, acquire the execution result information returned by the engine module, and in the case that the execution result information includes a channel scheduling end flag, update the corresponding channel sub-state to an unoccupied state and update the corresponding channel scheduling state to an end scheduling state; and after returning the latest execution result information to the outside, update the corresponding channel main state to an unoccupied state.
6. The method of claim 1, wherein, The channel state information includes a channel main state, a channel sub-state and an external request state; The target channel number is determined according to the channel state information of the channel number, including: In the case that the channel main state is an occupied state, the channel sub-state is an unoccupied state, and the external request state is a returned state or a no request state, the corresponding channel number is determined as a standby channel number; The target channel number is determined according to all the standby channel numbers and channel arbitration rules.
7. The method of claim 1, wherein, Further comprising: acquire an initial processing request from the outside, determine the channel number of the initial processing request, and update the corresponding channel state information; determine second external request information according to the initial processing request and the channel number, and send the second external request information to the outside to acquire and store initial channel task data.
8. The method of claim 7, wherein, The channel state information includes a channel main state; the channel number of the initial processing request is determined, and the corresponding channel main state is updated to an occupied state. The channel number of the initial processing request is determined, and the corresponding channel main state is updated to an occupied state.
9. The method of claim 1, wherein, The engine number of the target engine unit is determined based on the target channel task data, and the engine number and the target channel task data are transmitted to each engine unit in the engine module, so that the target engine unit executes the target channel task data, including: acquire a delay duration, the delay duration being determined based on hardware parameters of the target engine unit; wherein the hardware parameters include at least one of clock frequency, interface specification, combinational logic depth and cache configuration; The delay duration, the engine number and the target channel task data are transmitted to each engine unit in the engine module, so that the target engine unit executes the target channel task data.
10. A multi-pass management apparatus characterized by comprising: The channel scheduling module, the data cache module, the channel state updating module and the engine module are included, and the engine module includes a plurality of engine units; The channel scheduling module is configured to determine a target channel number according to channel state information of a channel number, and acquire target channel task data from all initial channel task data in the data cache module according to the target channel number; wherein each initial channel task data corresponds to a channel number. The channel scheduling module is further configured to determine an engine number of a target engine unit based on the target channel task data, and transmit the engine number and the target channel task data to each engine unit in the engine module. The engine module is configured to acquire the engine number and the target channel task data, and execute the target channel task data according to the engine number and return execution result information. The channel state updating module is configured to acquire the execution result information and update channel state information corresponding to the execution result information.
11. The apparatus of claim 10, wherein, Further comprising: A channel state maintaining module is configured to acquire first external request information and channel state forwarded by the channel state updating module, and update corresponding channel state information based on the first external request information and the channel state; The channel state updating module is configured to forward the execution result information to the data caching module, so that the data caching module updates the target channel task data according to the execution result information, and is further configured to, in a case where execution result information including first external request information is received, forward the first external request information and the acquired channel state; An external request management module is configured to send the acquired first external request information to outside, and update corresponding channel state information; An external receiving management module is configured to acquire an external return result of the first external request information, update corresponding channel state information, and forward the external return result to the data caching module, so that the data caching module updates target channel task data based on the external return result; The channel scheduling module is further configured to, in a case where the updated channel state information meets a channel scheduling condition, determine that a corresponding channel number is the target channel number, so that the engine module executes the latest target channel task data subsequently.