CN-122019423-A - Multi-channel driving method, device, medium and equipment based on credit handshake
Abstract
The invention discloses a multi-channel driving method, device, medium and equipment based on credit handshake, which comprises the steps of creating a processing process for processing a corresponding channel queue request for each channel respectively, running all the processing processes in parallel, configuring any processing process to monitor the available credit amount of the corresponding channel and the current request to be processed in the corresponding channel queue, applying exclusive use permission of a shared interface after determining that the available credit amount meets the credit requirement of the current request to be processed, wherein the exclusive use permission has uniqueness and allows a plurality of processing processes to perform preemption competition when not occupied, driving the current request to the shared interface under the condition of obtaining the exclusive use permission, releasing the exclusive use permission after driving is completed, and entering a processing stage of the next request to be processed in the corresponding channel queue. The invention can realize decoupling among channels and maximally utilize bandwidth resources of the interface.
Inventors
- Request for anonymity
Assignees
- 上海壁仞科技股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260129
Claims (10)
- 1. A multi-channel driving method based on credit handshake, comprising: creating a processing process for each channel respectively, wherein all the processing processes run in parallel, and each processing process is used for processing the request in the corresponding channel queue; Any processing procedure is configured to: monitoring the available credit amount of the corresponding channel and the current pending request in the corresponding channel queue; Applying exclusive use permission of the shared interface after determining that the available credit amount meets the credit requirement of the current pending request, wherein the exclusive use permission has uniqueness and allows a plurality of processing processes to perform preemption competition through application when not occupied; And under the condition that the exclusive use permission is obtained, driving the current request to be processed to a shared interface, releasing the exclusive use permission after the current request to be processed is driven, and entering a processing stage of the next request to be processed in the corresponding channel queue.
- 2. The credit handshake-based multichannel driving method of claim 1, wherein after applying for exclusive use rights of a shared interface, the any processing procedure is further configured to: and waiting for the release of the exclusive use right under the condition that the exclusive use right of the current round is not obtained so as to re-participate in a new round of preemption competition of the exclusive use right.
- 3. The credit handshake-based multichannel driving method according to claim 1, wherein the exclusive use right is implemented by a semaphore.
- 4. The credit handshake-based multichannel driving method of claim 1, wherein after monitoring the available credit of the corresponding channel and the current pending requests in the corresponding channel queue, the any processing process is further configured to: When the current request to be processed is a non-batch continuous request or a first batch continuous request, judging whether the available credit is greater than or equal to the credit requirement of the current request to be processed, wherein the credit requirement corresponding to the first batch continuous request is the total credit requirement of the batch continuous request; If yes, determining that the available credit meets the credit requirement of the current pending request; And when the current request to be processed is a non-initial request of a batch of continuous requests, directly determining that the available credit meets the credit requirement of the current request to be processed.
- 5. The credit handshake-based multichannel driving method of claim 1, wherein each channel queue is a first-in-first-out queue.
- 6. The credit handshake-based multichannel driving method according to claim 1, wherein the request in each channel queue is obtained by a preset distribution process performing the steps of: And receiving a verification excitation request, and distributing the verification excitation request to a channel queue corresponding to the channel information according to the channel information corresponding to the verification excitation request.
- 7. The method for driving multiple channels based on credit handshake according to claim 6, wherein the distributing the verification stimulus request to the channel queue corresponding to the channel information according to the channel information corresponding to the verification stimulus request comprises: When the received verification excitation request is a non-batch continuous request, directly distributing the non-batch continuous request to a corresponding channel queue according to channel information carried by the non-batch continuous request; when the received verification excitation request is a first request of a batch of continuous requests, recording channel information carried by the first request, and distributing the first request to a corresponding channel queue; When the received verification excitation request is a non-initial request of a batch continuous request, distributing the non-initial request to a channel queue where the initial request of the same batch continuous request is located according to recorded channel information, wherein the recorded channel information is managed by taking the batch continuous request as granularity.
- 8. A multi-channel driver based on credit handshaking, comprising: the system comprises a processing process creation module, a processing process management module and a processing module, wherein the processing process creation module is used for creating a processing process for each channel respectively, all the processing processes run in parallel, and each processing process is used for processing a request in a corresponding channel queue; the processing procedure configuration module is used for configuring any processing procedure as follows: The channel monitoring unit is used for monitoring the available credit quantity of the corresponding channel and the current pending request in the corresponding channel queue; The permission application unit is used for applying exclusive use permission of the shared interface after determining that the available credit amount meets the credit requirement of the current pending request; the exclusive use authority has uniqueness, and allows a plurality of processing processes to perform preemptive competition through application when the exclusive use authority is unoccupied; and the request driving unit is used for driving the current request to be processed to the shared interface under the condition of obtaining the exclusive use permission, releasing the exclusive use permission after the current request to be processed is driven, and entering a processing stage of the next request to be processed in the corresponding channel queue.
- 9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored computer program, wherein the computer program, when run, controls a device in which the computer readable storage medium is located to perform the multi-channel driving method based on credit handshake according to any of claims 1 to 7.
- 10. An electronic device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the credit handshake-based multichannel driving method according to any of claims 1 to 7 when executing the computer program.
Description
Multi-channel driving method, device, medium and equipment based on credit handshake Technical Field The present invention relates to the field of chip verification technologies, and in particular, to a method and apparatus for driving multiple channels based on credit handshake, a computer readable storage medium, and an electronic device. Background In the field of chip design verification, when a plurality of channels share a set of socket driving requests, the prior art serializes all channels, i.e. the channels queue for interface usage rights according to a preset sequence. When the channel occupying the interface at present cannot drive the request due to insufficient credit, the channel still continuously occupies the interface, and even if the exclusive credit pool of other channels has enough credit, other channels can not drive the request due to the occupied interface, and can only wait for the previous channel to release the interface. Obviously, the prior art causes a strong coupling relation between channels, so that bandwidth resources of an interface are seriously wasted. Disclosure of Invention An object of the embodiments of the present invention is to provide a method, an apparatus, a computer readable storage medium, and an electronic device for driving multiple channels based on credit handshake, where decoupling between channels can be implemented by configuring independent and parallel processing processes for each channel and combining a contention preemption and an instant release mechanism of exclusive use rights, and bandwidth resources of an interface are utilized to the maximum, so that overall processing efficiency of multiple channel requests is improved. An embodiment of a first aspect of the present invention provides a method for driving multiple channels based on credit handshake, including: creating a processing process for each channel respectively, wherein all the processing processes run in parallel, and each processing process is used for processing the request in the corresponding channel queue; Any processing procedure is configured to: monitoring the available credit amount of the corresponding channel and the current pending request in the corresponding channel queue; Applying exclusive use permission of the shared interface after determining that the available credit amount meets the credit requirement of the current pending request, wherein the exclusive use permission has uniqueness and allows a plurality of processing processes to perform preemption competition through application when not occupied; And under the condition that the exclusive use permission is obtained, driving the current request to be processed to a shared interface, releasing the exclusive use permission after the current request to be processed is driven, and entering a processing stage of the next request to be processed in the corresponding channel queue. Optionally, after the applying for the exclusive use right of the shared interface, the any processing process is further configured to: and waiting for the release of the exclusive use right under the condition that the exclusive use right of the current round is not obtained so as to re-participate in a new round of preemption competition of the exclusive use right. Optionally, the exclusive use right is implemented by a semaphore. Optionally, after the monitoring the available credit of the corresponding channel and the current pending request in the corresponding channel queue, the any processing process is further configured to: When the current request to be processed is a non-batch continuous request or a first batch continuous request, judging whether the available credit is greater than or equal to the credit requirement of the current request to be processed, wherein the credit requirement corresponding to the first batch continuous request is the total credit requirement of the batch continuous request; If yes, determining that the available credit meets the credit requirement of the current pending request; And when the current request to be processed is a non-initial request of a batch of continuous requests, directly determining that the available credit meets the credit requirement of the current request to be processed. Optionally, each channel queue is a first-in-first-out queue. Optionally, the requests in each channel queue are obtained by a preset distribution process executing the following steps: And receiving a verification excitation request, and distributing the verification excitation request to a channel queue corresponding to the channel information according to the channel information corresponding to the verification excitation request. Optionally, the distributing the verification excitation request to the channel queue corresponding to the channel information according to the channel information corresponding to the verification excitation request includes: When the received verification excitation reques