Transaction processing method, device, equipment and product based on hybrid simulation platform

By sharding transaction-level requests and responses in the hybrid simulation platform, the problem of low resource utilization is solved and more efficient and reliable transaction processing is achieved.

CN120256168AActive Publication Date: 2025-07-04SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510704321.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-07-04
Estimated Expiration
2045-05-29

AI Technical Summary

Technical Problem

The hybrid simulation platform has a low resource utilization rate in transaction-level processing, resulting in increased processing process delay and resource consumption, especially when the bandwidth configuration is different.

Method used

The master device receives the shard identification and content of the transaction-level request, sends the transaction-level start request message, and sends the shard content after the slave device feedback ends the request response, realizing shard processing and forwarding, and improving resource utilization.

Benefits of technology

It improves the resource utilization rate of the hybrid simulation platform, shortens the processing process delay, and improves the efficiency and reliability of transaction processing through sharding processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256168A_ABST
    Figure CN120256168A_ABST
Patent Text Reader

Abstract

The invention discloses a transaction processing method and device based on a hybrid simulation platform, equipment and a product, and relates to the technical field of computers, and the method comprises the steps: receiving a transaction-level request initiated by a superior module through main equipment, and obtaining a request fragment identifier of the transaction-level request and corresponding request fragment content; sending a corresponding transaction-level start request message to the slave device based on the request fragment identifier; obtaining a response of the transaction ending request fed back by the slave device based on the transaction-level starting request message; and based on the response of the transaction ending request, sending request fragment content corresponding to the request fragment identifier to the slave equipment, so that the slave equipment forwards the received request fragment content to the corresponding lower-level module, and ending the transaction-level request initiated by the upper-level module, the technical problem of the resource utilization rate of the hybrid simulation platform during multi-module transaction processing is solved, and the technical effect of improving the transaction processing accuracy and efficiency is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a transaction processing method, apparatus, device, and product based on a hybrid simulation platform. Background Art

[0002] With the rapid development of information technology, hybrid simulation platforms play an increasingly important role in the design and testing of transmission systems. In related technologies, in transaction-level (Transaction Level Modeling, TLM) processing, since it is necessary to wait until a request or response is completely received before forwarding it to the next level, the resource utilization rate of the hybrid simulation platform is relatively low. For example, in a multi-module processing scenario, when a transaction processing initiator sends a multi-cycle write transaction-level request to a transaction receiver, the transaction receiver must wait until all write transaction data is completely received before performing subsequent processing, which undoubtedly prolongs the latency of the entire processing flow. If the bandwidth configurations of the transaction processing initiator and the transaction receiver are different during this process, more waiting time and resource consumption may occur. Summary of the Invention

[0003] This application provides a transaction processing method, apparatus, device, and product based on a hybrid simulation platform to at least solve the problem of relatively low resource utilization rate of the hybrid simulation platform in related technologies.

[0004] This application provides a transaction processing method based on a hybrid simulation platform, which is applied to a transaction-level processing module. The transaction-level processing module includes a master device and a slave device, and includes: Receiving, by the master device, a transaction-level request initiated by a superior module, and obtaining a request shard identifier and corresponding request shard content of the transaction-level request; Sending a corresponding transaction-level start request message to the slave device based on the request shard identifier; Obtaining an answer to the transaction end request fed back by the slave device based on the transaction-level start request message; Sending, based on the answer to the transaction end request, the request shard content corresponding to the request shard identifier to the slave device, so that the slave device forwards the received request shard content to a corresponding inferior module and ends the transaction-level request initiated by the superior module.

[0005] In an optional implementation manner, sending a transaction-level start request message to the slave device based on the request shard identifier includes: If the request shard identifier indicates that the request shard content to be sent for the transaction-level request is multiple pieces, and the currently sent request shard content is not the last piece, determining that the current request stage of the master device is the shard start request stage; Send a corresponding shard start request message to the slave device based on the current request stage of the master device. The transaction-level start request message includes the shard start request message.

[0006] In an alternative embodiment, sending a transaction-level start request message to the slave device based on the request shard identifier further includes: If the request shard identifier indicates that the request shard content required for the transaction-level request is one piece, or the request shard content required to be sent is multiple pieces but the currently being sent request shard content is the last piece, then determine that the current request stage of the master device is the transaction start request stage; Send a transaction start request to the slave device based on the current request stage of the master device. The transaction-level start request message includes the transaction start request message.

[0007] In an alternative embodiment, obtaining the response to the transaction end request feedback by the slave device based on the transaction-level start request message includes: If the slave device cannot immediately receive the request shard content corresponding to the request shard identifier, then determine that the current request stage of the slave device is the shard response request stage, and generate a shard response request message for the transaction-level start request message based on the current request stage of the slave device. The response to the transaction end request includes the shard response request message; If the slave device can immediately receive the request shard content corresponding to the request shard identifier, then determine that the current request stage of the slave device is the shard end request stage, and generate a shard end request message for the transaction-level start request message based on the current request stage of the slave device. The response to the transaction end request includes the shard end request message.

[0008] In an alternative embodiment, obtaining the response to the transaction end request feedback by the slave device based on the transaction-level start request message includes: If the slave device cannot immediately receive the request shard content corresponding to the request shard identifier, then determine that the current request stage of the slave device is the transaction response request stage, and generate a transaction response request message for the transaction-level start request message based on the current request stage of the slave device. The response to the transaction end request includes the transaction response request message; If the slave device can immediately receive the request shard content corresponding to the request shard identifier, then determine that the current request stage of the slave device is the transaction end stage, and generate a transaction end request message for the transaction-level start request message based on the current request stage of the slave device. The response to the transaction end request includes the transaction end request message.

[0009] In an alternative embodiment, based on the response to the transaction end request, the request shard content corresponding to the request shard identifier is sent to the slave device, so that the slave device forwards the received request shard content to the corresponding lower-level module and ends the transaction-level request initiated by the upper-level module, including: If the response to the transaction end request is a shard response request message, after receiving the shard end request message fed back by the slave device for the transaction-level start request message, the request shard content corresponding to the request shard identifier is sent to the slave device, so that the slave device forwards the received request shard content to the corresponding lower-level module, and after receiving the transaction end request message fed back by the slave device for the transaction-level start request message, the transaction-level request initiated by the upper-level module is ended.

[0010] In an alternative embodiment, the above method further includes: Receiving, by the slave device, a transaction-level response initiated by a lower-level module for a transaction-level request, and obtaining a response shard identifier and corresponding response shard content of the transaction-level response; Sending a corresponding transaction-level start response message to the master device based on the response shard identifier; Obtaining the response to the transaction end response fed back by the master device based on the transaction-level start response message; Based on the response to the transaction end response, sending the response shard content corresponding to the response shard identifier to the master device, so that the master device forwards the received response shard content to the corresponding upper-level module and ends the transaction-level response initiated by the lower-level module.

[0011] In an alternative embodiment, sending a corresponding transaction-level start response message to the master device based on the response shard identifier includes: If the response shard identifier indicates that the response shard content required for the transaction-level response is multiple pieces and the currently being sent response shard content is not the last piece, it is determined that the current response stage of the slave device is the shard start response stage; Sending a corresponding shard start response message to the master device based on the current response stage of the slave device, and the transaction-level start response message includes the shard start response message.

[0012] In an alternative embodiment, sending a corresponding transaction-level start response message to the master device based on the response shard identifier further includes: If the response shard identifier indicates that the response shard content required for the transaction-level response is one piece, or the required response shard content is multiple pieces but the currently being sent response shard content is the last piece, it is determined that the current response stage of the slave device is the transaction start response stage; Sending a corresponding transaction-level start response message to the master device based on the current response phase of the slave device, where the transaction-level start response message includes the transaction-level start response message.

[0013] In an alternative implementation, obtaining the reply of the transaction end response feedback by the master device based on the transaction-level start response message includes: If the master device cannot immediately receive the response fragment content corresponding to the response fragment identifier, determine that the current response phase of the master device is the fragment reply response phase, and generate a fragment reply response message for the transaction-level start response message based on the current request phase of the master device. The reply of the transaction end response includes the fragment reply response message; If the slave device can immediately receive the response fragment content corresponding to the response fragment identifier, determine that the current response phase of the master device is the fragment end response phase, and generate a fragment end response message for the transaction-level start response message based on the current response phase of the master device. The reply of the transaction end response includes the fragment end response message.

[0014] In an alternative implementation, obtaining the reply of the transaction end response feedback by the master device based on the transaction-level start response message further includes: If the master device cannot immediately receive the response fragment identifier and the corresponding response fragment content, determine that the current response phase of the master device is the transaction reply response phase, and generate a transaction reply response message for the transaction-level start response message based on the current request phase of the master device. The reply of the transaction end response includes the transaction reply response message; If the master device can immediately receive the response fragment identifier and the corresponding response fragment content, determine that the current request phase of the master device is the transaction end response phase, and generate a transaction end response message for the transaction-level start response message based on the current request phase of the master device. The reply of the transaction end response includes the transaction end response message.

[0015] In an alternative implementation, based on the reply of the transaction end response, sending the response fragment content corresponding to the response fragment identifier to the master device, so that the master device forwards the received response fragment content to the corresponding upper-level module and ends the transaction-level response initiated by the lower-level module, includes: If the reply of the transaction end request is a fragment reply response message, after receiving the fragment end response message feedback by the master device for the transaction-level start response message, send the response fragment content corresponding to the response fragment identifier to the master device, so that the master device forwards the received response fragment content to the corresponding upper-level module, and after receiving the transaction end reply message feedback by the master device for the transaction-level start response message, end the transaction-level response initiated by the lower-level module.

[0016] The present application also provides a transaction processing apparatus based on a hybrid simulation platform, including: A transaction request receiving module, configured to receive, through a master device, a transaction-level request initiated by a superior module, and obtain a request shard identifier and corresponding request shard content of the transaction-level request; A request message sending module, configured to send a corresponding transaction-level start request message to a slave device based on the request shard identifier; An end request response module, configured to obtain a response to a transaction end request fed back by the slave device based on the transaction-level start request message; A transaction request processing module, configured to send, based on the response to the transaction end request, the request shard content corresponding to the request shard identifier to the slave device, so that the slave device forwards the received request shard content to a corresponding subordinate module and ends the transaction-level request initiated by the superior module.

[0017] The present application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any of the above-mentioned transaction processing methods based on a hybrid simulation platform when executing the computer program.

[0018] The present application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above-mentioned transaction processing methods based on a hybrid simulation platform are implemented.

[0019] The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned transaction processing methods based on a hybrid simulation platform are implemented.

[0020] Through the present application, since the master device can obtain the shard identifier and content in the request after receiving the transaction-level request initiated by the superior module, and send a start request message to the slave device accordingly. After the slave device feeds back the response to the transaction end request, the master device then sends the request shard content corresponding to the request shard identifier. In this way, the slave device can immediately forward the received request shard content to the subordinate module without waiting for all write transaction data to be completely received before processing, improving the resource utilization rate of the hybrid simulation platform and shortening the delay of the processing flow. In addition, since the communication between the subordinate module and the superior module is carried out through transaction-level requests and transaction-level responses, and the processing content is reasonably sharded, the efficiency and reliability of transaction processing are further improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] To more clearly illustrate the embodiments of the present application, the accompanying drawings required for use in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0022] Figure 1 It is an application scenario diagram of the transaction processing method based on a hybrid simulation platform provided by an embodiment of the present application; Figure 2 It is a schematic flowchart of the transaction processing method based on a hybrid simulation platform provided by an embodiment of the present application; Figure 3 It is an example diagram of the transaction processing method based on a hybrid simulation platform provided by an embodiment of the present application; Figure 4 It is another example diagram of the transaction processing method based on a hybrid simulation platform provided by an embodiment of the present application; Figure 5 It is a schematic flowchart of another transaction processing method based on a hybrid simulation platform provided by an embodiment of the present application; Figure 6 It is an example diagram of the transaction processing method based on a hybrid simulation platform provided by an embodiment of the present application; Figure 7 It is another example diagram of the transaction processing method based on a hybrid simulation platform provided by an embodiment of the present application; Figure 8 It is a structural block diagram of the transaction processing device based on a hybrid simulation platform provided by an embodiment of the present application; Figure 9 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0023] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.

[0024] It should be noted that in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0025] In order to enable those skilled in the art of this technology to better understand the solution of this application, the following further detailed description of this application will be made in conjunction with the accompanying drawings and specific embodiments.

[0026] Please refer to Figure 1 , Figure 1 which is a schematic diagram of an application environment provided by an embodiment of the present invention. The schematic diagram includes a superior module and an inferior module that communicates with the superior module through a transaction-level module.

[0027] As an example, when the upper-level module A in the related art, such as a module adopting the register transfer level (RTL) model, the transaction-level module B, such as a module adopting the transaction level modeling (TLM, including the master device B1 of the transaction level model and the slave device B2 of the transaction level model), and the lower-level module C, such as a module adopting the register transfer level (RTL) model, perform transaction processing. If the upper-level module A, as the transaction initiator, initiates a multi-cycle write transaction to the lower-level module C, the transaction receiver. For example, the interface bit width of the upper-level module A is 32 bit; the RTL model corresponding to the upper-level module A performs a write request operation of 16 bytes, which takes 4 cycles to send; at this time, if according to the 4 general stages of the transaction level model (TLM, Transaction Level Modeling) corresponding to the transaction-level module B, the transaction-level module B cannot issue a request to start BEGIN_REQ before the 4th cycle; because the transaction-level module B must prepare the complete data bytes before it can start to initiate a request to start BEGIN_REQ; when the transaction-level module B sends the request to the lower-level module C, the lower-level module C can receive the complete 16-byte request at the 8th cycle; therefore, it takes 8 cycles to transfer the write request from the upper-level module A to the lower-level module C, due to the limitation of the TLM processing method in the middle. The lower-level module C will accept the request (i.e., send the response end END_REQ) after the last word of its own transmitted request, which will occur at the 8th cycle, or if the lower-level module C is performing downstream flow control and other operations, it will return even later. Before that, the upper-level module A will be unable to continue sending the next read / write request, ultimately resulting in a halving of the peak available bandwidth. If the bandwidth configurations at both ends of the transaction-level module B are different (bit width or frequency), more waste will be caused.

[0028] Based on this, according to an embodiment of the present invention, an embodiment of a transaction processing method based on a hybrid simulation platform is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0029] The present disclosure provides a transaction processing method based on a hybrid simulation platform, which can fragment and transmit the transaction-level requests initiated by the upper-level module to the lower-level module, or fragment and transmit the transaction-level responses feedback by the lower-level module for the transaction-level requests initiated by the upper-level module to the upper-level module, enabling efficient and accurate transaction-level processing between different simulation models, and improving the utilization rate of transaction processing resources of the hybrid simulation platform. The transaction processing method based on the hybrid simulation platform can be applied to Figure 1 the transaction-level processing module in the transaction processing system based on the hybrid simulation platform, where the transaction-level processing module includes a master device and a slave device, or can be applied to an electronic device running the transaction processing system based on the hybrid simulation platform. The electronic device can include, but is not limited to, a tablet computer, a laptop computer, a desktop computer, a server, a controller, etc. Referring to Figure 2 , which is a schematic flowchart of the transaction processing method based on the hybrid simulation platform provided by some embodiments of the present disclosure. Figure 2 In

[0030]

[0031]

[0032]

[0033] Step 210, receive the transaction-level request initiated by the upper-level module through the master device, and obtain the request fragment identifier and the corresponding request fragment content of the transaction-level request.Among them, the model corresponding to the upper-level module can be a register transfer level model RTL or a transaction level model TLM, which is not limited here. Receiving the transaction-level request initiated by the upper-level module through the master device and obtaining the request fragment identifier and the corresponding request fragment content of the transaction-level request can provide a basis for subsequent fragment transmission and processing.In some optional implementation manners, when receiving the transaction-level request initiated by the upper-level module through the master device and obtaining the request fragment identifier and the corresponding request fragment content of the transaction-level request, the transaction-level request from the upper-level module can be received through a preset transmission interface / communication interface, where the transaction-level request embeds the request fragment identifier and the corresponding request fragment content. After the master device receives the message, it can obtain the request fragment identifier and the corresponding request fragment content by parsing the message content, providing a basis for subsequent processing.Further, in order to effectively manage and process the request fragment content, the master device can also store the obtained request fragment content in a preset storage area, and mark the request fragment content according to the request fragment identifier during storage. In this way, when the master device needs to send the request fragment content to the slave device, it can quickly locate and read the corresponding request fragment content according to the request fragment identifier, improving the processing efficiency.In addition, to ensure the accuracy and reliability of transaction processing, when the master device receives a transaction-level request message, it can also verify the message. For example, it can calculate the checksum of the message and compare it with a preset checksum to determine whether an error has occurred during the transmission of the message. If the message verification fails, the master device can discard the message and send an error message to the upper-level module, prompting the upper-level module to resend the transaction-level request message.

[0034] Step 220: Send the corresponding transaction-level start request message to the slave device based on the request fragmentation identifier.

[0035] As described above, by sending the corresponding transaction-level start request message to the slave device based on the request fragmentation identifier, it marks the official start of transaction-level processing and notifies the slave device to prepare to receive the subsequent request fragmentation content, so as to ensure that the slave device can timely understand the transaction processing intention of the master device and prepare for subsequent data processing.

[0036] In some alternative embodiments, when sending the transaction-level start request message to the slave device based on the request fragmentation identifier, if the request fragmentation identifier indicates that the request fragmentation content required for the transaction-level request is multiple pieces and the currently sent request fragmentation content is not the last piece, it is determined that the current request stage of the master device is the fragmentation start request stage; and a corresponding fragmentation start request message is sent to the slave device based on the current request stage of the master device, and the transaction-level start request message includes the fragmentation start request message.

[0037] Specifically, in the fragmentation start request stage, specific identification information can be embedded in the fragmentation start request message to clearly indicate that the currently sent request fragmentation content is part of a multi-fragment transaction-level processing and is not the final fragment of this transaction-level processing, which helps the slave device accurately identify and prepare to receive the subsequent fragmentation content, and at the same time understand the status of the entire transaction processing process. In addition, the function of attaching verification information can also be added to the fragmentation start request message to ensure the integrity and correctness of the fragmentation start request message received by the slave device. If the slave device successfully verifies and confirms that the received fragmentation start request message is correct, it will enter the waiting-to-receive state and prepare to receive the subsequent fragmentation content, thus ensuring the smoothness and efficiency of the entire transaction-level processing process.

[0038] In some other alternative embodiments, when sending the transaction-level start request message to the slave device based on the request fragmentation identifier, if the request fragmentation identifier indicates that the request fragmentation content required for the transaction-level request is one piece, or the required request fragmentation content is multiple pieces but the currently sent request fragmentation content is the last piece, it is determined that the current request stage of the master device is the transaction start request stage; and a transaction start request is sent to the slave device based on the current request stage of the master device, and the transaction-level start request message includes the transaction start request message.

[0039] Specifically, in this transaction start request message, in addition to including the necessary request shard identification information, it may also include the summary information of the entire transaction-level request, such as transaction type, data length, etc., which helps the slave device quickly understand the core content of the current transaction processing request and make corresponding data reception or processing preparations in advance. At the same time, the transaction start request message also includes verification information to ensure the integrity and correctness of the message, further enhancing the reliability and stability of transaction processing.

[0040] In some alternative embodiments, when the master device sends a transaction-level start request message to the slave device, it can also transmit the request shard identification as part of the message. In this way, after receiving the message, the slave device can obtain the request shard identification by parsing the message content, thereby understanding the specific request shards involved in the current transmission, which helps the slave device accurately identify and process the received processing data.

[0041] In addition, to ensure the smooth progress of the transmission, before sending the transaction-level start request message, the master device can first send a transmission establishment request message to the slave device to establish a transmission connection with the slave device. After the slave device successfully responds to the transmission establishment request message, the master device then sends the transaction-level start request message, which can ensure that the transmission connection between the master device and the slave device is stable and reliable, further improving the accuracy and reliability of transaction processing. At the same time, when sending the transaction-level start request message, the master device can also set the priority of the message to ensure that high-priority processing requests can be processed first in case of resource constraints, thereby improving the processing efficiency. After receiving the transaction-level start request message, the slave device can prepare to receive and process the subsequent request shard content according to the request shard identification in the message.

[0042] Step 230, obtain the response of the transaction end request feedback by the slave device based on the transaction start request message.

[0043] As described above, by obtaining the response of the transaction end request feedback by the slave device based on the transaction start request message, it can be confirmed that the slave device has successfully received the transaction start request message and is ready to enter the stage of receiving the request shard content. This response signal is an important feedback in the transaction processing process, ensuring the synchronization of the processing status between the master device and the slave device and providing a basis for subsequent data processing.

[0044] In some alternative embodiments, when obtaining the response to the transaction end request fed back by the slave device based on the transaction-level start request message, if the slave device cannot immediately receive the request fragment content corresponding to the request fragment identifier, it is determined that the current request stage of the slave device is the fragment response request stage, and a fragment response request message for the transaction-level start request message is generated based on the current request stage of the slave device. The response to the transaction end request includes the fragment response request message. If the slave device can immediately receive the request fragment content corresponding to the request fragment identifier, it is determined that the current request stage of the slave device is the fragment end request stage, and a fragment end request message for the transaction-level start request message is generated based on the current request stage of the slave device. The response to the transaction end request includes the fragment end request message.

[0045] Specifically, in the fragment response request stage, the fragment response request message may include the current status information of the slave device, such as the busy status, the expected reception time, etc., so that the master device can understand the actual situation of the slave device and adjust the strategy of sending the request fragments accordingly. For example, if the slave device is in a busy state, the master device can choose to pause sending the request fragment content and continue sending after the slave device is ready, thus avoiding the loss or out-of-order of the transaction processing data. In addition, the fragment response request message also includes verification information to ensure the integrity and correctness of the message, further enhancing the reliability and stability of the transaction processing.

[0046] In the fragment end request stage, the fragment end request message indicates the successful sending and receiving of a request fragment content in the current transaction-level processing. At this time, the slave device is ready to receive the next request fragment content (if any), or the entire transaction-level request has been completely sent and received. After receiving the fragment end request message, the master device can decide whether to continue sending the next request fragment content or end the entire transaction-level processing process according to the current status of the transaction-level processing.

[0047] In some other alternative embodiments, when obtaining the response to the transaction end request fed back by the slave device based on the transaction-level start request message, if the slave device cannot immediately receive the request fragment content corresponding to the request fragment identifier, it is determined that the current request stage of the slave device is the transaction response request stage, and a transaction response request message for the transaction-level start request message is generated based on the current request stage of the slave device. The response to the transaction end request includes the transaction response request message. If the slave device can immediately receive the request fragment content corresponding to the request fragment identifier, it is determined that the current request stage of the slave device is the transaction end stage, and a transaction end request message for the transaction-level start request message is generated based on the current request stage of the slave device. The response to the transaction end request includes the transaction end request message.

[0048] Specifically, in the transaction response request stage, the transaction response request message can include the slave device's confirmation information for the current transaction-level request, as well as the time when the slave device expects to be able to start receiving the request fragment content, etc., so that the master device can understand the response situation of the slave device and adjust the subsequent processing strategy accordingly. For example, if the slave device expects it will take some time to receive the request fragment content, the master device can choose to wait until the slave device is ready before continuing to send the request fragment content, or take other measures to optimize the processing efficiency. In addition, the transaction response request message also contains verification information to ensure the integrity and correctness of the message.

[0049] In the transaction end stage, the transaction end request message marks the successful completion of the entire transaction-level request. At this time, the slave device has successfully received and processed all the request fragment content, and the master device has also received the confirmation information from the slave device. The transaction end request message can include summary information about the entire transaction-level processing process, such as the processing status, data integrity verification result, etc. After receiving the transaction end request message, the master device can confirm the smooth completion of the entire processing process and perform subsequent processing or operations as needed, such as updating the processing status, releasing relevant resources, or triggering other related tasks.

[0050] Furthermore, to ensure the continuity and stability of the processing, after receiving the response to the transaction end request from the slave device, the master device can continue to monitor the processing status and send subsequent transaction-level requests as needed. At the same time, the master device can also dynamically adjust the processing parameters or strategies according to the actual situation during the processing, such as adjusting the data sending rate, retransmission strategy, or the use of error correction codes, to adapt to different network environments and processing requirements, optimize the processing efficiency and resource utilization, and further ensure the continuity and stability of the processing.

[0051] Step 240: Based on the response to the transaction end request, send the request fragment content corresponding to the request fragment identifier to the slave device, so that the slave device forwards the received request fragment content to the corresponding lower-level module and ends the transaction-level request initiated by the upper-level module.

[0052] As described above, by sending the request fragment content corresponding to the request fragment identifier to the slave device based on the response to the transaction end request, the slave device forwards the received request fragment content to the corresponding lower-level module and ends the transaction-level request initiated by the upper-level module, thereby ensuring the correct execution of the transaction-level request and the accurate processing of data.

[0053] In some alternative embodiments, based on the response to the transaction end request, the request fragment content corresponding to the request fragment identifier is sent to the slave device, so that the slave device forwards the received request fragment content to the corresponding lower-level module and ends the transaction-level request initiated by the upper-level module. When the response to the transaction end request is a fragment response request message, after receiving the fragment end request message fed back by the slave device for the transaction-level start request message, the request fragment content corresponding to the request fragment identifier is sent to the slave device, so that the slave device forwards the received request fragment content to the corresponding lower-level module to ensure that the slave device is ready to receive the request fragment content, thereby avoiding data loss or processing errors. By ending the transaction-level request initiated by the upper-level module after receiving the transaction end request message fed back by the slave device for the transaction-level start request message. If the response to the transaction end request is a transaction response request message, after receiving the transaction end request message fed back by the slave device for the transaction-level start request message, the request fragment content corresponding to the request fragment identifier is sent to the slave device again. At this time, after receiving the request fragment content, the slave device will forward it to the corresponding lower-level module and, after processing, send a transaction processing completion confirmation message to the upper-level module, indicating the complete completion of the transaction-level request initiated by the upper-level module. After receiving this confirmation message, the master device can release the relevant resources and prepare to process the next transaction-level request, thereby ensuring the continuity and efficiency of the entire transaction processing process.

[0054] In some other alternative embodiments, when sending the request fragment content corresponding to the request fragment identifier to the slave device based on the response to the transaction end request, if the response to the transaction end request is a transaction response request message, the master device can arrange the sending plan of the request fragment content according to the expected reception time fed back by the slave device. For example, the master device can choose to send the request fragment content in advance before the time point when the slave device is expected to be able to start receiving to ensure that the slave device can receive the data immediately after it is ready. Or, the master device can also choose to send the request fragment content at the expected reception time point fed back by the slave device to avoid resource waste caused by premature sending or transaction processing delay caused by late sending.

[0055] In addition, to ensure the correctness and integrity of the request fragment content, before sending the request fragment content, the master device can also calculate the checksum of the request fragment content and perform transaction processing with the checksum as a part of the request fragment content. After receiving the request fragment content, the slave device can also calculate the checksum and compare it with the received checksum to determine whether an error has occurred in the request fragment content during the transaction processing. If the checksum verification fails, the slave device can send an error message to the master device, requesting the master device to resend the request fragment content, thereby ensuring the accuracy and reliability of the data.

[0056] After the master device successfully sends all the requested sharded content and receives the confirmation information from the slave device for each piece of requested sharded content, the entire transaction-level request is declared complete. At this time, the master device can update the transaction processing status, release relevant resources, and prepare to receive the next transaction-level request. Meanwhile, the slave device can also forward the received requested sharded content to the corresponding lower-level module for subsequent data processing or operations, thus ensuring the normal operation and efficient work of the entire transaction processing system.

[0057] Figure 3 An example of the transaction processing method based on the hybrid simulation platform according to the present invention is shown, including step a1: The master device initiates a transaction-level request. If the current transaction-level request needs to be divided into multiple requested sharded contents, that is, it requires multiple operations to send and the current non-last piece of data is being sent, that is, the last requested sharded content, then it is determined that the current request stage of the master device is the shard start request stage SEGMENT_BEGIN_REQ, and it proceeds to step a2; If the current transaction-level request can be sent with a single operation, or if it requires multiple operations to send and the current last piece of data is being sent, then it is determined that the current request stage of the master device is the transaction start request stage BEGIN_REQ; it proceeds to step a4; Step a2: If the slave device receives a request that is not the last operation and the slave device can immediately receive data, then it is determined that the current request stage of the slave device is the shard end request stage SEGMENT_END_REQ and it responds to the master device. The slave device can continue to request transaction processing data from the next lower-level module (for example, it can be an RTL model or a TLM model), and returns to step a1; otherwise, if the slave device cannot immediately receive data, it proceeds to step a3; Step a3: If the slave device receives a request that is not the last one and the slave device cannot immediately receive data, then it is determined that the current request stage of the slave device is the shard acknowledgment request stage SEGMENT_ACK_REQ and it responds to the master device. At this time, both the master device and the master device will be blocked until the slave device can receive data. Then it is determined that the current request stage of the slave device is the shard end request stage SEGMENT_END_REQ and it responds to the master device; it proceeds to step a1; Step a4: If the slave device receives a request for the last operation and the slave device can immediately receive data, then it is determined that the current request stage of the slave device is the transaction acknowledgment request stage END_REQ and it responds to the master device. The slave device can continue to request transaction processing data from the next lower-level module (for example, it can be an RTL model or a TLM model), and the request stage execution ends; otherwise, if the slave device cannot immediately receive data, it proceeds to step a5; Step a5: If the last request is received from the device and the device cannot receive data immediately, determine that the current request stage of the device is the transaction end stage ACK_REQ and reply to the master device; at this time, both the master device and the device are blocked until the device can receive data, then determine that the current request stage of the device is the transaction reply request stage END_REQ and reply to the master device; the request stage execution ends.

[0058] Figure 4 Another example of the transaction processing method based on the hybrid simulation platform of the present invention is shown. At time t0, the master device initiates the first data of a request to the device (a total of 4 data need to be sent for this request). When sending, the current request stage of the master device is the sharding start request stage, and the phase is sharding start request ①. After the device receives the first data and there is no backpressure situation on the current device and it can receive immediately, the current request stage of the device is the sharding end request stage, and the phase is sharding end request ③, and it immediately sends a reply to the master device; then it starts to receive request data 0, and after receiving it, it can forward it to the next-level module (which can be a TLM model or an RTL model). At time t1, the master device initiates the second data of a request to the device. When sending, the current request stage of the master device is the sharding start request stage, and the phase is sharding start request ①. After the device receives the second data, in this example, it is assumed that the device cannot receive immediately (it may be that the device is processing other processes; or the internal request cache is full; or the device bandwidth configuration is small, etc.), and there will be a backpressure situation. The current request stage of the device is the sharding reply request stage, and the phase is sharding reply request ②, and it immediately sends a reply to the master device; at this time, both the master device and the device are blocked. At time t2, at this time, the device is awakened from the blocked state and can receive data (it may be that the device has processed other processes, or there is a vacancy in the internal request cache, etc.); the current request stage of the device is the sharding end request stage, and the phase is sharding end request ③, and it immediately sends a reply to the master device; then it starts to receive request data 1; after receiving it, it can forward it to the next-level module (which can be a TLM model or an RTL model). At time t3, the master device initiates the third data of a request to the device. When sending, the master device sets the current request stage to the sharding start request stage, and the phase is sharding start request ①. After the device receives the third data and there is no backpressure situation on the current device and it can receive immediately, the device sets the current request stage to the sharding end request stage, and the phase is sharding end request ③, and it immediately sends a reply to the master device; then it starts to receive request data 3; after receiving it, it can forward it to the next-level module (which can be a TLM model or an RTL model). At time t4, the master device initiates the fourth data of a request to the slave device (which is also the last data of the current request). When sending, the master device sets the current request stage to the transaction start request stage, and the phase is the transaction start request ④. After receiving the fourth data, in this example, it is assumed that the slave device cannot receive it immediately, and there will be a backpressure situation (it may be that the slave device is processing other processes; or the internal request cache is full, etc.). The slave device sets the current request stage to the transaction response request stage, and the phase is the transaction response request ⑤, and immediately sends a response to the master device; at this time, both the master device and the slave device are blocked; At time t5, at this time the slave device is awakened from the blocked state and can receive data (it may be that the slave device has finished processing other processes, or there is free space in the internal request cache, etc.); the current request stage of the slave device is the transaction end request stage, and the phase is the transaction end request ⑥, and immediately sends a response to the master device; then it starts to receive the request data 3; At time t6, the slave device finishes receiving the request data 3; after receiving it, it can forward it to the next-level module (which can be a TLM model or an RTL model); the processing of the entire request stage ends.

[0059] In summary, the transaction processing method based on the hybrid simulation platform provided by the present invention can efficiently support the transaction-level processing between the master device and the slave device, ensuring the accuracy and efficiency of data processing. By introducing the request shard identifier and the start request message of the transaction-level processing, the transaction-level request is processed in the form of a word stream or a byte stream, ensuring the bandwidth utilization rate of platform communication. When the bandwidth configurations at both ends of the transaction-level processing module are different (including the cases of different bus bit widths or different clocks), the backpressure situation of the path is answered through the phase stage transmitted in the TLM interface, so as to support the communication behaviors where the master device sends requests quickly while the slave device receives requests slowly, or the slave device sends responses quickly while the master device receives responses slowly. In addition, according to the actual situation of the slave device and the transaction processing status, through mechanisms such as the sharded response request message and the transaction response request message, the efficient cooperation between the master device and the slave device is realized, ensuring the continuity and stability of the transaction processing.

[0060] Figure 5 Shows a flowchart of another embodiment of the transaction processing method based on the hybrid simulation platform of the present invention. As Figure 5 shown, the method includes the following steps: Step 510, receiving, by the slave device, a transaction-level response initiated by a lower-level module for a transaction-level request, and obtaining a response shard identifier of the transaction-level response and the corresponding response shard content.

[0061] Among them, the model corresponding to the lower-level module can be a register transfer level model RTL or a transaction level model TLM, which is not limited here. The content of the response shard received from the device can be the processing result or related data of the transaction-level request initiated by the upper-level module. After receiving the response from the lower-level module, the device will parse the response shard identifier and the corresponding request shard content to provide a basis for subsequent shard transmission and processing.

[0062] In some alternative embodiments, when receiving a transaction-level response from a lower-level module for a transaction-level request and obtaining the response shard identifier and the corresponding response shard content of the transaction-level response, the response shard content from the lower-level module can be received through a preset communication interface. The preset communication interface can be a serial communication interface, such as UART, SPI, or I2C, etc., or a parallel communication interface, or data processing can be performed through a network communication interface. Among them, the transaction-level response embeds the response shard identifier and the corresponding request shard content. After receiving the message, the device can obtain the response shard identifier and the corresponding response shard content by parsing the message content, providing a basis for subsequent processing.

[0063] Furthermore, after receiving the response shard content from the lower-level module, the device can also perform checksum verification on the response shard content to ensure the accuracy and integrity of the data. The verification process can include calculating the checksum of the response shard content and comparing it with the checksum received by the device. If the verification fails, the device can send an error message to the corresponding upper-level module, requesting to resend the response shard content, thereby ensuring the reliable transmission and processing of the data.

[0064] Step 520: Send a corresponding transaction-level start response message to the master device based on the response shard identifier.

[0065] As above, by sending a corresponding transaction-level start response message to the master device based on the response shard identifier, the master device can timely learn that the device has received the response from the lower-level module and is ready to perform subsequent data processing or operations.

[0066] In some alternative embodiments, when sending a corresponding transaction-level start response message to the master device based on the response shard identifier, if the response shard identifier indicates that the response shard content to be sent for the transaction-level response is multiple shards and the currently sent response shard content is not the last shard, it is determined that the current response stage of the device is the shard start response stage; a corresponding shard start response message is sent to the master device based on the current response stage of the device, and the transaction-level start response message includes the shard start response message.

[0067] Specifically, when the slave device is in the shard start response phase, the message can be specially marked as shard start to distinguish it from other types of response messages. Such a mark can help the master device identify that the currently received response message is part of a shard and not the final shard. In addition, the shard start response message can also contain some information about subsequent shards, such as the total number of expected shards, the sequence number of the current shard, etc., so that the master device can better manage and reassemble these shards, enabling more efficient transaction-level processing between the master device and the slave device. Especially when dealing with a large amount of data or complex tasks, it can ensure data integrity and the accuracy of transaction processing.

[0068] In some alternative embodiments, when sending the corresponding transaction start response message to the master device based on the response shard identifier, if the response shard identifier indicates that the content of the response shard required for the transaction-level response is one piece, or the content of the response shards required to be sent is multiple pieces but the content of the currently sent response shard is the last piece, then it is determined that the current response phase of the slave device is the transaction start response phase; send the corresponding transaction start response message to the master device based on the current response phase of the slave device, and the transaction start response message includes the transaction start response message.

[0069] Specifically, when the slave device is in the transaction start response phase, the message can be specially marked as transaction start to distinguish it from the shard start response message or other types of response messages. Such a mark is crucial for the master device because it can immediately identify that the currently received response message is the start or end part of the entire transaction, especially when the transaction only contains one response shard or the current shard is the last shard. In addition, the transaction start response message can also contain some key information about the entire transaction, such as the identifier of the transaction, the type of the transaction, the data integrity check code, etc. These information are crucial for the master device because they can help the master device verify the accuracy of the data, reassemble the data (if the transaction contains multiple shards), and perform corresponding subsequent operations according to the type of the transaction, enabling more efficient and accurate transaction-level processing between the master device and the slave device, ensuring data integrity and the accuracy of transaction processing, especially when dealing with a large amount of data or performing complex tasks.

[0070] In some alternative embodiments, when the slave device sends the transaction start response message to the master device, it can further include the priority information of the message. The priority information can be set according to the urgency of the transaction, the importance of the data, or other relevant factors. By including the priority information, the slave device can notify the master device of the priority of the current transaction, so that the master device can reasonably allocate resources and time when processing multiple transactions, and give priority to processing high-priority transactions, thereby further improving the transaction processing efficiency and the overall performance of the system.

[0071] Step 530, obtain the response of the transaction end response feedback by the master device based on the transaction-level start response message.

[0072] As above, by obtaining the response of the transaction end response feedback by the master device based on the transaction-level start response message, it can be confirmed that the master device has successfully received the transaction-level start response message sent by the slave device and has completed the corresponding transaction-level transmission / communication processing.

[0073] In some alternative embodiments, when obtaining the response of the transaction end response feedback by the master device based on the transaction-level start response message, if the master device cannot immediately receive the response shard content corresponding to the response shard identifier, it is determined that the current response stage of the master device is the shard response stage, and a shard response message for the transaction-level start response message is generated based on the current request stage of the master device. The response of the transaction end response includes the shard response message; if the slave device can immediately receive the response shard content corresponding to the response shard identifier, it is determined that the current response stage of the master device is the shard end response stage, and a shard end response message for the transaction-level start response message is generated based on the current response stage of the master device. The response of the transaction end response includes the shard end response message.

[0074] Specifically, in the shard response stage, the shard information of the response shard content that the master device fails to immediately receive can be recorded and stored in the internal memory. When the master device is ready to receive the shard content, the corresponding response shard content is resent to the master device according to the stored shard information. In addition, to ensure the integrity and accuracy of the data, the calculation and attachment of the check code are performed before sending each response shard content. After receiving the response shard content, the master device will verify the check code, and only when the verification passes, will it confirm the reception of the shard content.

[0075] In the shard end response stage, the master device can send a confirmation signal to the slave device, indicating that all response shard contents have been successfully received and processed. At this time, the slave device marks the transaction-level processing as the completed state and clears all temporary data and status information related to the transaction-level processing from the internal memory to prepare for the next transaction-level processing.

[0076] In some other alternative embodiments, when obtaining the reply of the transaction end response feedback by the master device based on the transaction-level start response message, if the master device cannot immediately receive the response fragment identifier and the corresponding response fragment content, it is determined that the current response stage of the master device is the transaction reply response stage, and a transaction reply response message for the transaction-level start response message is generated based on the current request stage of the master device. The reply of the transaction end response includes the transaction reply response message; if the master device can immediately receive the response fragment identifier and the corresponding response fragment content, it is determined that the current request stage of the master device is the transaction end response stage, and a transaction end response message for the transaction-level start response message is generated based on the current request stage of the master device. The reply of the transaction end response includes the transaction end response message.

[0077] Specifically, in the transaction reply response stage, the slave device records the relevant information of the response fragments that the master device fails to immediately receive and waits for the master device to be ready to receive data. Once the master device is ready, the slave device retransmits those unreceived response fragments to ensure the complete transmission of data. During this process, the slave device can perform data transmission with the master device through a preset transmission interface, which can be a serial transmission interface such as UART, SPI or I2C, etc., or a parallel transmission interface or a network transmission interface. To ensure the accuracy of the data, a check code is attached to each response fragment before sending, and the master device verifies the check code after receiving the response fragment.

[0078] In the transaction end response stage, the master device sends an acknowledgment signal to the slave device, indicating that all response fragments have been successfully received and processed. At this time, the slave device marks the transaction-level processing as the completed state and clears the temporary data and status information related to the transaction-level processing to prepare for the next processing. Such a mechanism ensures the continuity and stability of the transmission between the master device and the slave device and improves the transaction processing efficiency. In addition, by introducing the request fragment identifier and the start request message of the transaction-level processing, it can flexibly adapt to the transaction processing requirements of different scales and complexities. At the same time, through the setting of the check information, the transmission establishment request message and the message priority, the reliability and stability of the transaction processing are further improved.

[0079] Step 540: Based on the reply of the transaction end response, send the response fragment content corresponding to the response fragment identifier to the master device, so that the master device forwards the received response fragment content to the corresponding upper-level module and ends the transaction-level response initiated by the lower-level module.

[0080] As described above, by means of the response based on the transaction end response, the response shard content corresponding to the response shard identifier is sent to the master device, so that the master device forwards the received response shard content to the corresponding upper-level module and ends the transaction-level response initiated by the lower-level module, thereby ensuring the correct execution of the transaction end response and the accurate processing of data.

[0081] In some alternative embodiments, when, based on the response to the transaction end response, the response shard content corresponding to the response shard identifier is sent to the master device, so that the master device forwards the received response shard content to the corresponding upper-level module and ends the transaction-level response initiated by the lower-level module, if the response to the transaction end request is a shard response response message, after receiving the shard end response message fed back by the master device for the transaction-level start response message, the response shard content corresponding to the response shard identifier is sent to the master device, so that the master device forwards the received response shard content to the corresponding upper-level module, and after receiving the transaction end response message fed back by the master device for the transaction-level start response message, the transaction-level response initiated by the lower-level module is ended. If the response to the transaction end request is a transaction end response message, then the response shard content corresponding to the response shard identifier is directly read from the internal memory and sent to the master device. After sending all the response shard content, the slave device will wait for the transaction end response message sent by the master device. Once this message is received, the slave device will mark this transaction-level processing as the completed state and clear all temporary data and status information related to this transaction-level processing, ensuring the continuity and stability of the transaction-level response. At the same time, the efficiency and accuracy of data processing are also improved. By introducing the request shard identifier and the start request message of the transaction-level processing, the transaction-level request is processed in the form of a word stream or a byte stream, improving the bandwidth utilization rate of platform communication. At the same time, through mechanisms such as the shard response request message and the transaction response request message, the efficient cooperation between the master device and the slave device is realized, ensuring the continuity and stability of transaction processing.

[0082] In addition, to ensure the reliability and stability of transaction processing, the slave device will perform multiple checksums and validations before sending each response shard content to ensure the accuracy and integrity of the data. At the same time, the slave device will also dynamically adjust the sending rate according to the feedback from the master device and the current network conditions to optimize the processing performance.

[0083] Figure 6Another example of the transaction processing method based on the hybrid simulation platform according to the present invention is shown, including step b1: The slave device initiates a transaction-level response. If the current transaction-level response needs to be divided into multiple response shard contents, that is, it needs multiple operations to send and the current non-last data is being sent, that is, the last response shard content, then it is determined that the current response stage of the slave device is the shard start response stage SEGMENT_BEGIN_RESP; go to step b2; If the current response can be sent in one go, or it needs multiple operations to send and the current last data is being sent, then it is determined that the current response stage of the slave device is the transaction start response stage BEGIN_RESP; go to step b4; Step b2: If the master device receives a non-last response and the master device can immediately receive data, then it is determined that the current response stage of the master device is the shard end response stage SEGMENT_END_RESP and the master device responds to the slave device; the master device can continue to transmit response request data to the upper-level module (for example, it can be an RTL model or a TLM model); go back to step b1; Otherwise, if the master device cannot immediately receive data, go to step b3; Step b3: If the master device receives a non-last response and the master device cannot immediately receive data, then it is determined that the current response stage of the master device is the shard acknowledgment response stage SEGMENT_ACK_RESP and the master device responds to the slave device. At this time, both the master device and the slave device will be blocked until the master device can receive data. Then it is determined that the current response stage of the master device is the shard end response stage SEGMENT_END_RESP and the master device responds to the slave device; go to step b4; Step b4: If the master device receives the last response and the master device can immediately receive data, then it is determined that the current request stage of the master device is the transaction end response stage END_RESP and the master device responds to the slave device. The master device can continue to transmit response request data to the upper-level module (for example, it can be an RTL model or a TLM model); the response stage execution ends; Otherwise, if the master device cannot immediately receive data, go to step b5; Step b5: If the master device receives the last request and the master device cannot immediately receive data, then it is determined that the current response stage of the master device is the transaction acknowledgment response stage ACK_RESP and the master device responds to the slave device; at this time, both the slave device and the master device will be blocked until the master device can receive data. The current request stage of the master device is the transaction end response stage END_RESP and the master device responds to the slave device; the response stage execution ends.

[0084] Figure 7Another example of the transaction processing method based on the hybrid simulation platform of the present invention is shown. At time t0`, the slave device initiates the first data of a response to the master device (a total of 4 data need to be sent for this response). When sending, the current response phase of the slave device is the sharding start response phase, and the phase is sharding start response ⑦. After the master device receives the first data and there is no backpressure situation for the current master device, it can immediately receive. Then the master device sets the current response phase to the sharding end response phase, and the phase is sharding end response ⑨, and immediately sends an acknowledgment to the slave device; then it starts to receive response data 0; after the master device finishes receiving, it can forward it to the upper-level module (which can be a TLM model or an RTL model). At time t1`, the slave device initiates the second data of a response to the master device. When sending, the current response phase of the slave device is the sharding end response phase, and the phase is sharding start response ⑦. After the master device receives the second data, it cannot immediately receive, and there will be a backpressure situation (it may be that the master device is processing other processes; or the internal response cache is full, etc.). The current response phase of the master device is the sharding acknowledgment response phase, and the phase is sharding acknowledgment response ⑧, and immediately sends an acknowledgment to the slave device; at this time, both the master device and the slave device are blocked. At time t2`, at this time the master device is awakened from the blocked state and can receive data (it may be that the master device has finished processing other processes, or there is a vacancy in the internal response cache, etc.); the current response phase of the master device is the sharding end response phase, and the phase is sharding end response ⑨, and immediately sends an acknowledgment to the slave device; then it starts to receive response data 1; after the master device finishes receiving, it can forward it to the upper-level module (which can be a TLM model or an RTL model). At time t3`, the slave device initiates the third data of a response to the master device. When sending, the slave device sets the phase of the current response phase to sharding start response ⑦. After the master device receives the third data and there is no backpressure situation for the current master device, it can immediately receive. Then the master device sets the current response phase to the sharding end response phase, and the phase is sharding end response ⑨, and immediately sends an acknowledgment to the slave device; then it starts to receive response data 3; after the master device finishes receiving, it can forward it to the upper-level module (which can be a TLM model or an RTL model). At time t4`, the slave device initiates the fourth data of a response to the master device (which is also the last data of the current response). When sending, the current response phase of the slave device is the transaction start response phase, and the phase is transaction start response ⑩. After the master device receives the fourth data, it cannot immediately receive, and there will be a backpressure situation (it may be that the master device is processing other processes; or the internal response cache is full, etc.). The master device sets the current response phase to the transaction acknowledgment response phase, and the phase is transaction acknowledgment response ⑪, and immediately sends an acknowledgment to the slave device; at this time, both the master device and the slave device are blocked. At time t5`, the master device is awakened from the blocked state and can receive data (possibly because the master device has finished processing other processes or there is a vacancy in the internal response cache, etc.); the current response phase of the master device is the transaction end response phase, and the phase is the transaction end response ⑫. It immediately sends an acknowledgment to the slave device; then it starts to receive response data 3; At time t6`, the master device has received response data 3; after the master device finishes receiving, it can forward it to the upper-level module (which can be a TLM model or an RTL model); the entire response phase processing is completed.

[0085] In summary, the transaction processing method based on the hybrid simulation platform provided by the present invention can efficiently support the transaction-level processing between the master device and the slave device, ensuring the accuracy and efficiency of data processing. By introducing the response shard identifier and the start response message of the transaction-level processing, the transaction-level request is transmitted and processed in the form of a word stream or a byte stream, ensuring the bandwidth utilization rate of platform communication. When the bandwidth configurations at both ends of the transaction-level processing module are different (including the cases of different bus bit widths or different clocks), the backpressure situation of the path is acknowledged through the phase stage passed in the TLM interface, so as to support communication behaviors where the master device sends requests quickly while the slave device receives requests slowly, or the slave device sends responses quickly while the master device receives responses slowly. Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.

[0086] Figure 8 The structural schematic diagram of an embodiment of a transaction processing device based on a hybrid simulation platform of the present invention is shown. As Figure 8 shown, the device includes: A transaction request receiving module 810, configured to receive a transaction-level request initiated by a superior module through a master device, and obtain a request shard identifier of the transaction-level request and the corresponding request shard content; A request message sending module 820, configured to send a corresponding transaction-level start request message to a slave device based on the request shard identifier; An end request acknowledgment module 830, configured to obtain an acknowledgment of the transaction end request fed back by the slave device based on the transaction-level start request message; A transaction request processing module 840, configured to send the request shard content corresponding to the request shard identifier to the slave device based on the acknowledgment of the transaction end request, so that the slave device forwards the received request shard content to the corresponding lower-level module and ends the transaction-level request initiated by the superior module.

[0087] In an alternative embodiment, the request message sending module 820 includes: The sharding start request determination sub-module is used to determine the current request stage of the master device as the sharding start request stage if the request sharding identifier indicates that the request sharding content required for the transaction-level request is multiple pieces, and the currently transmitted request sharding content is not the last piece; The sharding start request message sending sub-module is used to send the corresponding sharding start request message to the slave device based on the current request stage of the master device. The transaction start request message includes the sharding start request message.

[0088] In an alternative embodiment, the request message sending module 820 further includes: The transaction start request determination sub-module is used to determine the current request stage of the master device as the transaction start request stage if the request sharding identifier indicates that the request sharding content required for the transaction-level request is one piece, or the required request sharding content is multiple pieces but the currently transmitted request sharding content is the last piece; The transaction start request message sending sub-module is used to send the transaction start request to the slave device based on the current request stage of the master device. The transaction start request message includes the transaction start request message.

[0089] In an alternative embodiment, the end request response module 830 includes: The sharding response request determination sub-module is used to determine the current request stage of the slave device as the sharding response request stage if the slave device cannot immediately receive the request sharding content corresponding to the request sharding identifier, and generate a sharding response request message for the transaction start request message based on the current request stage of the slave device. The response to the transaction end request includes the sharding response request message; The sharding end request determination sub-module is used to determine the current request stage of the slave device as the sharding end request stage if the slave device can immediately receive the request sharding content corresponding to the request sharding identifier, and generate a sharding end request message for the transaction start request message based on the current request stage of the slave device. The response to the transaction end request includes the sharding end request message.

[0090] In an alternative embodiment, the end request response module 830 includes: The transaction response request determination sub-module is used to determine the current request stage of the slave device as the transaction response request stage if the slave device cannot immediately receive the request sharding content corresponding to the request sharding identifier, and generate a transaction response request message for the transaction start request message based on the current request stage of the slave device. The response to the transaction end request includes the transaction response request message; The transaction end request determination sub-module is used to determine that the current request stage of the slave device is the transaction end stage if the slave device can immediately receive the request fragment content corresponding to the request fragment identifier, generate a transaction end request message for the transaction-level start request message based on the current request stage of the slave device, and the response to the transaction end request includes the transaction end request message.

[0091] In an optional implementation manner, the transaction request processing module 840 is specifically configured to, if the response to the transaction end request is a fragment response request message, after receiving the fragment end request message fed back by the slave device for the transaction-level start request message, send the request fragment content corresponding to the request fragment identifier to the slave device, so that the slave device forwards the received request fragment content to the corresponding lower-level module, and after receiving the transaction end request message fed back by the slave device for the transaction-level start request message, end the transaction-level request initiated by the upper-level module.

[0092] In an optional implementation manner, the above device further includes: The transaction response receiving module 850 is further configured to receive, through the slave device, the transaction-level response initiated by the lower-level module for the transaction-level request, and obtain the response fragment identifier and the corresponding response fragment content of the transaction-level response; The response message sending module 860 is further configured to send a corresponding transaction-level start response message to the master device based on the response fragment identifier; The end response reply module 870 is further configured to obtain the reply to the transaction end response fed back by the master device based on the transaction-level start response message; The transaction response processing module 880 is further configured to send the response fragment content corresponding to the response fragment identifier to the master device based on the reply to the transaction end response, so that the master device forwards the received response fragment content to the corresponding upper-level module, and ends the transaction-level response initiated by the lower-level module.

[0093] In an optional implementation manner, the response message sending module 860 includes: The fragment start response determination sub-module is used to determine that the current response stage of the slave device is the fragment start response stage if the response fragment identifier indicates that the response fragment content to be sent for the transaction-level response is multiple pieces and the currently sent response fragment content is not the last piece; The fragment start response message sending sub-module is used to send a corresponding fragment start response message to the master device based on the current response stage of the slave device, and the transaction-level start response message includes the fragment start response message.

[0094] In an optional implementation manner, the response message sending module 860 further includes: A transaction start response determination sub-module, configured to determine that the current response stage of the slave device is the transaction start response stage if the response fragment identifier indicates that the response fragment content to be sent for the transaction-level response is one piece, or if the response fragment content to be sent is multiple pieces but the currently being sent response fragment content is the last piece; A transaction-level start response message sending sub-module, configured to send a corresponding transaction-level start response message to the master device based on the current response stage of the slave device, where the transaction-level start response message includes the transaction-level start response message.

[0095] In an optional implementation manner, the end response reply module 870 includes: A fragment reply response determination sub-module, configured to determine that the current response stage of the master device is the fragment reply response stage if the master device cannot immediately receive the response fragment content corresponding to the response fragment identifier, and generate a fragment reply response message for the transaction-level start response message based on the current request stage of the master device. The reply of the transaction end response includes the fragment reply response message; A fragment end response determination sub-module, configured to determine that the current response stage of the master device is the fragment end response stage if the slave device can immediately receive the response fragment content corresponding to the response fragment identifier, and generate a fragment end response message for the transaction-level start response message based on the current response stage of the master device. The reply of the transaction end response includes the fragment end response message.

[0096] In an optional implementation manner, the end response reply module 870 further includes: A transaction reply response determination sub-module, configured to determine that the current response stage of the master device is the transaction reply response stage if the master device cannot immediately receive the response fragment identifier and the corresponding response fragment content, and generate a transaction reply response message for the transaction-level start response message based on the current request stage of the master device. The reply of the transaction end response includes the transaction reply response message; A transaction end response determination sub-module, configured to determine that the current request stage of the master device is the transaction end response stage if the master device can immediately receive the response fragment identifier and the corresponding response fragment content, and generate a transaction end response message for the transaction-level start response message based on the current request stage of the master device. The reply of the transaction end response includes the transaction end response message.

[0097] In an alternative embodiment, the transaction response processing module 880 is specifically configured to, if the reply to the transaction end request is a shard reply response message, after receiving the shard end response message fed back by the master device for the transaction-level start response message, send the response shard content corresponding to the response shard identifier to the master device, so that the master device forwards the received response shard content to the corresponding upper-level module, and after receiving the transaction end reply message fed back by the master device for the transaction-level start response message, end the transaction-level response initiated by the lower-level module.

[0098] For the description of the features in the corresponding embodiments of the transaction processing device based on the hybrid simulation platform, reference can be made to the relevant descriptions in the corresponding embodiments of the transaction processing method based on the hybrid simulation platform, which will not be elaborated here one by one.

[0099] An embodiment of the present application further provides an electronic device, as Figure 9 shown, including a memory 910 and a processor 920. A computer program is stored in the memory 910, and the processor 920 is configured to run the computer program to execute the steps in any of the above embodiments of the transaction processing method based on the hybrid simulation platform.

[0100] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above embodiments of the transaction processing method based on the hybrid simulation platform when running.

[0101] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs and other various media that can store computer programs.

[0102] An embodiment of the present application further provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the transaction processing method based on the hybrid simulation platform.

[0103] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the transaction processing method based on the hybrid simulation platform.

[0104] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered as exceeding the scope of this application.

[0105] The above has introduced in detail a transaction processing method, apparatus, device, and product based on a hybrid simulation platform provided by this application. Specific examples have been used herein to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of this application, several improvements and modifications can still be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A transaction processing method based on a hybrid simulation platform, characterized in that Applied to a transaction-level processing module, the transaction-level processing module includes a master device and a slave device, and includes: Receiving, by the master device, a transaction-level request initiated by a superior module, and obtaining a request shard identifier and corresponding request shard content of the transaction-level request; Sending, based on the request shard identifier, a corresponding transaction-level start request message to the slave device; Obtaining an acknowledgment of the transaction end request fed back by the slave device based on the transaction-level start request message; Based on the acknowledgment of the transaction end request, sending the request shard content corresponding to the request shard identifier to the slave device, so that the slave device forwards the received request shard content to a corresponding subordinate module and ends the transaction-level request initiated by the superior module.

2. The method according to claim 1, wherein The sending, based on the request shard identifier, a transaction-level start request message to the slave device includes: If the request shard identifier indicates that the request shard content required for the transaction-level request is multiple pieces and the currently sent request shard content is not the last piece, determining that the current request stage of the master device is the shard start request stage; Sending, based on the current request stage of the master device, a corresponding shard start request message to the slave device, and the transaction-level start request message includes the shard start request message.

3. The method according to claim 1, wherein The sending, based on the request shard identifier, a transaction-level start request message to the slave device further includes: If the request shard identifier indicates that the request shard content required for the transaction-level request is one piece, or the required request shard content is multiple pieces but the currently sent request shard content is the last piece, determining that the current request stage of the master device is the transaction start request stage; Sending, based on the current request stage of the master device, a transaction start request to the slave device, and the transaction-level start request message includes the transaction start request message.

4. The method according to claim 2, wherein The obtaining an acknowledgment of the transaction end request fed back by the slave device based on the transaction-level start request message includes: If the slave device cannot immediately receive the request shard content corresponding to the request shard identifier, determining that the current request stage of the slave device is the shard acknowledgment request stage, and generating a shard acknowledgment request message for the transaction-level start request message based on the current request stage of the slave device, and the acknowledgment of the transaction end request includes the shard acknowledgment request message; If the slave device can immediately receive the request shard content corresponding to the request shard identifier, determining that the current request stage of the slave device is the shard end request stage, generating a shard end request message for the transaction-level start request message based on the current request stage of the slave device, and the acknowledgment of the transaction end request includes the shard end request message.

5. The method according to claim 3, wherein The obtaining an acknowledgment of the transaction end request fed back by the slave device based on the transaction-level start request message includes: If the slave device cannot immediately receive the request shard content corresponding to the request shard identifier, determine that the current request stage of the slave device is the transaction response request stage, and generate a transaction response request message for the transaction-level start request message based on the current request stage of the slave device. The response to the transaction end request includes the transaction response request message; If the slave device can immediately receive the request shard content corresponding to the request shard identifier, determine that the current request stage of the slave device is the transaction end request stage, and generate a transaction end request message for the transaction-level start request message based on the current request stage of the slave device. The response to the transaction end request includes the transaction end request message.

6. The method according to claim 4, characterized in that, The sending the request shard content corresponding to the request shard identifier to the slave device based on the response to the transaction end request, so that the slave device forwards the received request shard content to the corresponding lower-level module and ends the transaction-level request initiated by the upper-level module includes: If the response to the transaction end request is the shard response request message, after receiving the shard end request message fed back by the slave device for the transaction-level start request message, send the request shard content corresponding to the request shard identifier to the slave device, so that the slave device forwards the received request shard content to the corresponding lower-level module, and after receiving the transaction end request message fed back by the slave device for the transaction-level start request message, end the transaction-level request initiated by the upper-level module.

7. The method according to claim 1, wherein The method further includes: Receiving, by the slave device, a transaction-level response initiated by a lower-level module for the transaction-level request, and obtaining a response shard identifier and corresponding response shard content of the transaction-level response; Sending a corresponding transaction-level start response message to the master device based on the response shard identifier; Obtaining the response to the transaction end response fed back by the master device based on the transaction-level start response message; Sending the response shard content corresponding to the response shard identifier to the master device based on the response to the transaction end response, so that the master device forwards the received response shard content to the corresponding upper-level module and ends the transaction-level response initiated by the lower-level module.

8. The method according to claim 7, wherein The sending the corresponding transaction-level start response message to the master device based on the response shard identifier includes: If the response shard identifier indicates that the response shard content to be sent for the transaction-level response is multiple shards and the currently being sent response shard content is not the last shard, determine that the current response stage of the slave device is the shard start response stage; Sending a corresponding shard start response message to the master device based on the current response stage of the slave device. The transaction-level start response message includes the shard start response message.

9. The method according to claim 7, wherein The sending the corresponding transaction-level start response message to the master device based on the response shard identifier further includes: If the response fragment identifier indicates that the response fragment content to be sent for the transaction-level response is one piece, or if the response fragment content to be sent is multiple pieces but the currently being sent response fragment content is the last piece, determine that the current response phase of the slave device is the transaction start response phase; Based on the current response phase of the slave device, send a corresponding transaction-level start response message to the master device, where the transaction-level start response message includes the transaction-level start response message.

10. The method according to claim 8, wherein The obtaining of the reply of the transaction end response fed back by the master device based on the transaction-level start response message includes: If the master device cannot immediately receive the response fragment content corresponding to the response fragment identifier, determine that the current response phase of the master device is the fragment reply response phase, and generate a fragment reply response message for the transaction-level start response message based on the current request phase of the master device, where the reply of the transaction end response includes the fragment reply response message; If the slave device can immediately receive the response fragment content corresponding to the response fragment identifier, determine that the current response phase of the master device is the fragment end response phase, and generate a fragment end response message for the transaction-level start response message based on the current response phase of the master device, where the reply of the transaction end response includes the fragment end response message.

11. The method according to claim 9, wherein The obtaining of the reply of the transaction end response fed back by the master device based on the transaction-level start response message further includes: If the master device cannot immediately receive the response fragment identifier and the corresponding response fragment content, determine that the current response phase of the master device is the transaction reply response phase, and generate a transaction reply response message for the transaction-level start response message based on the current request phase of the master device, where the reply of the transaction end response includes the transaction reply response message; If the master device can immediately receive the response fragment identifier and the corresponding response fragment content, determine that the current request phase of the master device is the transaction end response phase, and generate a transaction end response message for the transaction-level start response message based on the current request phase of the master device, where the reply of the transaction end response includes the transaction end response message.

12. The method according to claim 10, characterized in that, The sending of the response fragment content corresponding to the response fragment identifier to the master device based on the reply of the transaction end response, so that the master device forwards the received response fragment content to the corresponding upper-level module and ends the transaction-level response initiated by the lower-level module, includes: If the reply to the transaction end request is the fragment reply response message, after receiving the fragment end response message fed back by the master device for the transaction-level start response message, send the response fragment content corresponding to the response fragment identifier to the master device, so that the master device forwards the received response fragment content to the corresponding upper-level module, and after receiving the transaction end reply message fed back by the master device for the transaction-level start response message, end the transaction-level response initiated by the lower-level module.

13. A transaction processing device based on a hybrid simulation platform, characterized in that, Includes: A transaction request receiving module, configured to receive a transaction-level request initiated by a superior module through a master device, and obtain a request shard identifier and corresponding request shard content of the transaction-level request; A request message sending module, configured to send a corresponding transaction-level start request message to a slave device based on the request shard identifier; An end request response module, configured to obtain a response to a transaction end request fed back by the slave device based on the transaction-level start request message; A transaction request processing module, configured to send the request shard content corresponding to the request shard identifier to the slave device based on the response to the transaction end request, so that the slave device forwards the received request shard content to a corresponding subordinate module, and ends the transaction-level request initiated by the superior module.

14. An electronic device, characterized in that, Comprising: A memory, configured to store a computer program; A processor, configured to implement the steps of the transaction processing method based on a hybrid simulation platform according to any one of claims 1 to 12 when executing the computer program.

15. A computer program product, characterized in that, Including computer instructions for causing a computer to execute the steps of the transaction processing method based on a hybrid simulation platform according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Distributed transaction processing method and device, electronic device and storage medium

    CN115858668A

  • Transaction processing method and device, computer equipment, storage medium and program product

    CN116541137A

  • Block chain sharing-based edge cloud service parallel resource allocation method

    CN116599966A

  • Network layer protocol data transmission method and device

    CN116896567A

  • Method and system for processing database transactions in a distributed online transaction processing (OLTP) database

    US11669518B1