A method, apparatus, system and electronic device for simulating out-of-order transmission

By assigning priority information and response delay time periods to slave devices, the response time of response data is determined, which solves the problem of unrealistic out-of-order transmission in existing technologies and improves the accuracy of module-level transmission efficiency verification.

CN117155802BActive Publication Date: 2026-05-26SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
Filing Date
2023-08-30
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In existing technologies, the BFM in the slave cannot accurately reflect the processing speed of different slaves when simulating out-of-order transmission, which affects the verification of module-level transmission efficiency.

Method used

By assigning priority information to each slave device, determining its corresponding response delay time period, and determining the response time of the response data based on the response delay time period, the response data is sent through the Advanced Scalable Interface Bus according to the response time.

Benefits of technology

This achieves a more realistic simulation of the speed at which the slave device responds after data processing, which is beneficial for verifying the transmission efficiency at the module level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117155802B_ABST
    Figure CN117155802B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, system, and electronic device for simulating out-of-order transmission, relating to the field of communication technology. It addresses the problem of inaccurate simulation of slave processing speed in existing out-of-order transmission simulations. The method includes: determining the corresponding response delay time period for the current slave based on priority allocation information; determining the response time corresponding to the response data of each pending command in the current slave based on the response delay time period; and sending response data to the master via an Advanced Scalable Interface (ASI) bus according to the response time. This invention can allocate a time range for responding to each slave according to its priority, thereby differentiating the response times for different pending commands within each slave based on the allocated time range. This more realistically simulates the speed at which the slave responds to data after data processing, facilitating module-level transmission efficiency verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and in particular to a method, apparatus, system and electronic device for simulating out-of-order transmission. Background Technology

[0002] The AXI (Advanced eXtensible Interface) bus is a next-generation high-performance system interconnect architecture based on the AMBA (Advanced Microcontroller Bus Architecture) bus, widely used in System-on-Chip (SoC) systems. The AXI bus achieves high-performance data transmission due to its support for 5-channel parallel transmission, outstanding transmission, and out-of-order transmission. Out-of-order transmission means that during data transmission, faster transactions (commands) can complete ahead of time without waiting for slower transactions to finish. To improve transmission efficiency verification, module-level verification typically uses the BFM (Bus Functional Model) to simulate the timing of lower-level modules, providing a calling interface to higher levels so they don't need to concern themselves with the underlying implementation details. Therefore, the BFM needs to simulate the out-of-order behavior of the slave device to verify the master device's support for out-of-order transmission.

[0003] In existing technologies, the BFM (Browser Flow Meter) in the slave caches multiple transactions internally, rearranges the IDs (encodings) of the cached transactions, and then transmits them to the master in the rearranged order. However, the purpose of out-of-order transmission is to allow the faster slave to respond first, regardless of the master's sending order, thereby improving transmission performance. The current technology, which caches multiple transactions and then responds in the new order, cannot realistically simulate the processing speed of different slaves, hindering module-level transmission efficiency verification. Therefore, how to more realistically simulate the speed at which a slave responds after data processing, thus facilitating module-level transmission efficiency verification, is a pressing issue that needs to be addressed. Summary of the Invention

[0004] The purpose of this invention is to provide a method, apparatus, system, and electronic device for simulating out-of-order transmission, so as to more realistically simulate the speed at which the slave device replies with response data after data processing, which is beneficial for module-level transmission efficiency verification.

[0005] To solve the above-mentioned technical problems, the present invention provides an out-of-order transmission simulation method, comprising:

[0006] The current slave device determines its corresponding response delay time period based on the priority allocation information; wherein, the current slave device is any slave device connected to the master through the Advanced Scalable Interface bus, and the priority allocation information includes priority information, and each slave device has a different response delay time period;

[0007] Based on the response delay time period, determine the response time corresponding to the response data of each pending command in the current slave device; wherein, the time points of each response time are different;

[0008] The response data is sent to the host via the Advanced Scalable Interface bus according to the stated response time.

[0009] In some embodiments, the current slave device determines the corresponding response delay time period based on priority allocation information, including:

[0010] The current slave device determines the target allocation time period corresponding to the current slave device according to the priority allocation information; wherein, the target allocation time period is any allocation time period, the allocation time period is a preset number of time periods divided by the average of the preset delay time period, and the preset number is greater than or equal to the number of slave devices;

[0011] The target allocation time period is determined as the response delay time period.

[0012] In some embodiments, determining the target allocation time period as the response delay time period includes:

[0013] Based on the target allocation time period, configure the weight corresponding to each allocation time period; wherein, the weight corresponding to the target allocation time period is 1, and the weight corresponding to the allocation time period other than the target allocation time period is 0;

[0014] According to the time order of each allocated time period, a dynamic array is configured using the weight corresponding to each allocated time period, so as to represent the response delay time period corresponding to the current slave device.

[0015] In some embodiments, determining the response time corresponding to the response data of each pending command in the current slave device based on the response delay time period includes:

[0016] Based on the response delay time period and the command identifier of each of the pending commands, the response time corresponding to each of the response data in the current slave device is determined; wherein, the command identifier is a write address code or a read address code.

[0017] In some embodiments, determining the response time corresponding to each response data in the current slave device based on the response delay time period and the command identifier of each of the pending commands includes:

[0018] After obtaining the current command to be responded to, it is determined whether the command identifier queue stores the command identifier of the current command to be responded to; wherein, the command identifier queue is used to store the command identifiers of all the commands to be responded to in the current slave device;

[0019] If the command identifier of the currently pending command is not stored, the command identifier of the currently pending command is stored in the command identifier queue, and the time parameter is configured to a preset time value.

[0020] If the command identifier of the currently pending command is stored, it is determined whether the target response data has been sent; wherein, the target response data is the response data of the most recently received pending command in the command identifier queue whose command identifier is the same as the command identifier of the currently pending command.

[0021] If the target response data has been sent, the command identifier of the current command to be responded to is stored in the command identifier queue, and the time parameter is configured to a preset time value.

[0022] If the target response data is not sent, the command identifier of the current pending command is stored in the command identifier queue, and the time parameter is configured as the sum of the preset time value and the remaining time for the response of the target response data;

[0023] Based on the random time of the current pending command and the time parameter, the response time corresponding to the response data of the current pending command is determined; wherein, the random time of the current pending command is the random time point corresponding to the current pending command within the response delay time period.

[0024] In some embodiments, determining the response time corresponding to the response data of the current command to be responded to based on the random time of the current command to be responded to and the time parameter includes:

[0025] The sum of the random time of the current pending command and the time parameter is determined as the temporary response time corresponding to the current pending command;

[0026] Determine whether the sum of the temporary response time and the reception time of the current pending command is the same as the remaining response time corresponding to the response data of other pending commands;

[0027] If the remaining response time is not the same as the response time of other pending commands, then the temporary response time of the current pending command will be determined as the response time of the current pending command's response data.

[0028] If the remaining response time is the same as that of the response data of other pending commands, then the sum of the temporary response time and the conflict delay time of the current pending command will be determined as the response time of the response data of the current pending command.

[0029] In some embodiments, sending the response data to the host via the Advanced Scalable Interface bus according to the response time includes:

[0030] According to the response time, the response data is sent to the arbitration device via the Advanced Scalable Interface Bus, so that the arbitration device arbitrates response data with the same sending time according to the priority allocation information of each slave device, and forwards the response data sent by the slave device to the host device in sequence via the Advanced Scalable Interface Bus.

[0031] The present invention also provides an out-of-order transmission simulation device, applied to the current slave device, comprising:

[0032] The time period determination unit is used to determine the response delay time period corresponding to the current slave device based on the priority allocation information; wherein, the current slave device is any slave device connected to the master device through the Advanced Scalable Interface Bus, the priority allocation information includes priority information, and the response delay time period corresponding to each slave device is different;

[0033] The response time determination unit is used to determine the response time corresponding to the response data of each pending command in the current slave device based on the response delay time period; wherein, the time points of each response time are different;

[0034] A response sending unit is configured to send the response data to the host via the Advanced Scalable Interface bus according to the response time.

[0035] The present invention also provides an electronic device, comprising:

[0036] Memory, used to store computer programs;

[0037] A processor is configured to implement the steps of the out-of-order transport simulation method as described above when executing the computer program.

[0038] Furthermore, the present invention also provides an out-of-order transmission simulation system, comprising: a master and a slave; wherein each of the slaves is an electronic device as described above, and each of the slaves is connected to the master via an Advanced Scalable Interface bus.

[0039] The present invention provides an out-of-order transmission simulation method, comprising: determining the corresponding response delay time period of the current slave device according to priority allocation information; wherein, the current slave device is any slave device connected to the master device via an Advanced Scalable Interface Bus (ASPA), the priority allocation information includes priority information, and each slave device has a different corresponding response delay time period; determining the response time corresponding to the response data of each pending command in the current slave device according to the response delay time period; wherein, the time points of each response time are different; and sending response data to the master device via the ASPA according to the response time.

[0040] As can be seen, this invention determines the response delay time period corresponding to the current slave device based on priority allocation information, enabling the allocation of a response data time range for each slave device according to its priority. By determining the response time corresponding to the response data of each pending command in the current slave device based on the response delay time period, the response time for the response data of different pending commands within each slave device can be determined according to the allocated time range, making the response time different for different pending commands within each slave device. This more realistically simulates the speed at which the slave device responds to response data after data processing, which is beneficial for module-level transmission efficiency verification. Furthermore, this invention also provides an out-of-order transmission simulation device, system, and electronic device, which also have the above-mentioned beneficial effects. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0042] Figure 1 A flowchart of an out-of-order transmission simulation method provided in an embodiment of the present invention;

[0043] Figure 2 This is a schematic diagram of an out-of-order transmission simulation system provided in an embodiment of the present invention;

[0044] Figure 3 A flowchart of another out-of-order transmission simulation method provided in an embodiment of the present invention;

[0045] Figure 4 This is a schematic diagram of the arbitration process of another out-of-order transmission simulation method provided in an embodiment of the present invention;

[0046] Figure 5 This is a structural block diagram of an out-of-order transmission simulation device provided in an embodiment of the present invention;

[0047] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention;

[0048] Figure 7 This is a schematic diagram of the specific structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0050] Please refer to Figure 1 , Figure 1 A flowchart illustrating an out-of-order transmission simulation method provided in an embodiment of the present invention. The method may include:

[0051] Step 101: The current slave determines the corresponding response delay time period based on the priority allocation information; wherein, the current slave is any slave connected to the master through the Advanced Scalable Interface Bus, the priority allocation information includes priority information, and each slave has a different corresponding response delay time period.

[0052] It is understood that the current slave in this embodiment can be any one of all slaves connected to the master via the AXI (Advanced Extensible Interface) bus; this embodiment does not limit the specific number of slaves connected to the master via the AXI bus, such as the number of slaves being greater than or equal to 2, for example, the number of slaves could be 5. The priority allocation information in this embodiment can be related to the priority assigned to each slave connected to the master via the AXI bus; for example, the master can assign priority allocation information corresponding to each slave.

[0053] Correspondingly, the specific content of the priority allocation information in this embodiment can be set by the designer according to the practical scenario and user needs. For example, the priority allocation information may include priority information, that is, the priority information corresponding to each slave device. For example, the priority allocation information of the current slave device may include the priority information of the current slave device; correspondingly, the priority information corresponding to each slave device can be different. The priority allocation information may also include slave device identification information, that is, the identification information corresponding to each slave device. For example, the priority allocation information of the current slave device may include the priority information and slave device identification information of the current slave device, or it may include the priority information and slave device identification information corresponding to each slave device. For example, the host can assign an ID number (slave device identification information) and a priority (i.e., priority information) to each slave device. As long as each slave device can determine its corresponding response delay time period according to its own priority allocation information, this embodiment does not impose any restrictions on this.

[0054] In this embodiment, the response delay time period can be the time range for delaying the response to the pending command (transaction), such as 10-20ns. The response delay time period corresponding to the current slave device in this embodiment can be any pre-set allocated time period. That is, the current slave device can determine one of the allocated time periods as the response delay time period based on the priority information. In this embodiment, the higher the priority of the slave device, the earlier its response delay time period. For example, if the priority of slave device 1 is higher than that of slave device 2, then the response delay time period corresponding to slave device 1 can be 10-20ns, and the response delay time period corresponding to slave device 2 can be 20-30ns. That is, the response delay time period corresponding to slave device 1 is earlier than the response delay time period corresponding to slave device 2.

[0055] Correspondingly, the specific method for determining the response delay time period corresponding to the current slave device based on priority allocation information in this step can be set by the designer according to the practical scenario and user needs. For example, the current slave device can determine the target allocation time period corresponding to the current slave device based on priority allocation information; and the target allocation time period can be determined as the response delay time period. Here, the target allocation time period is any allocation time period, and the allocation time period is a preset number of time periods divided by the average of the preset delay time period, and the preset number is greater than or equal to the number of slave devices. As long as the current slave device can determine the response delay time period corresponding to the current slave device based on priority allocation information, so that the response delay time periods corresponding to each slave device are different and do not overlap, this embodiment does not impose any restrictions on this.

[0056] It should be noted that in this embodiment, each slave device can use BFM (Bus Function Model) to simulate the response data of its own command to be responded to. That is, in this embodiment, the current slave device can use BFM to complete the steps of the method provided in this embodiment. For example, in this step, the processor of the current slave device can use BFM to determine the response delay time period corresponding to the current slave device according to the priority allocation information.

[0057] Step 102: Based on the response delay period, determine the response time corresponding to the response data of each pending command in the current slave device; the time points of each response time are different.

[0058] It is understood that, in this embodiment, each command awaiting a response in the current slave device can be a transaction that requires the slave device to send a corresponding response data to the master. In this step, the current slave device can determine the response time corresponding to the response data of each command awaiting a response based on the determined response delay time period. That is, the time that the response data of each command awaiting a response needs to wait. In other words, after the current slave device receives a certain transaction (i.e., a command awaiting a response), it can wait for the response time corresponding to that transaction. After the response time arrives, the response (i.e., the response data) of the transaction is sent to the master through the AXI bus.

[0059] Correspondingly, the specific method by which the current slave device determines the response time corresponding to each response command in the current slave device based on the response delay period can be set by the designer according to the practical scenario and user needs. For example, the current slave device can use the response delay period to assign different random time points corresponding to each response command within the response delay period; and use the random time points corresponding to each response command as the response time corresponding to the response data of each response command. In order to ensure that the response commands with the same command identifier (write address code awid or read address code arid) can be responded to in the order of reception, in this step, the current slave device can determine the response time corresponding to each response data in the current slave device based on the response delay period and the command identifier of each response command; wherein, the command identifier is a write address code or a read address code. This embodiment does not impose any restrictions on this.

[0060] Accordingly, the specific method by which the current slave determines the response time corresponding to each response data in the current slave based on the response delay period and the command identifier of each pending command can be set by the designer. For example, after obtaining the current pending command, the current slave can check whether there is a pending command with the same command identifier as the current pending command that has not sent corresponding response data; if so, it can configure the response time corresponding to the current pending command to be greater than the remaining response time of the pending command, such as randomly selecting a time point within the response delay period that is greater than the remaining response time of the pending command; if not, it can configure the response time corresponding to the current pending command normally according to the response delay period.

[0061] For example, in this step, after acquiring the currently pending command, the slave device can determine whether the command identifier queue stores the command identifier of the currently pending command. The command identifier queue stores the command identifiers of all pending commands in the current slave device. If the command identifier of the currently pending command is not stored, it is added to the command identifier queue, and the time parameter is configured to a preset time value. If the command identifier of the currently pending command is stored, it determines whether the target response data has been sent. The target response data is the most recent command in the command identifier queue whose command identifier matches the command identifier of the currently pending command. The system retrieves the response data of the most recently received pending command. If the target response data has been sent, the command identifier of the current pending command is stored in the command identifier queue, and the time parameter is configured to a preset time value. If the target response data has not been sent, the command identifier of the current pending command is stored in the command identifier queue, and the time parameter is configured to the sum of the preset time value and the remaining time for the response of the target response data. Based on the random time and time parameter of the current pending command, the system determines the response time corresponding to the response data of the current pending command. The random time of the current pending command is the random time point corresponding to the current pending command within the response delay period.

[0062] Correspondingly, the specific method for determining the response time corresponding to the response data of the current pending command based on its random time and time parameter can be set by the designer. For example, the current slave device can directly determine the response time corresponding to the response data of the current pending command as the sum of its random time and time parameter. To avoid the current slave device simultaneously responding to response data of two pending commands, the current slave device can determine whether the sum of the temporary response time and the reception time of the current pending command is the same as the remaining response time corresponding to the response data of other pending commands. If it is not the same as the remaining response time corresponding to the response data of other pending commands, then the temporary response time corresponding to the current pending command is determined as the response time corresponding to the response data of the current pending command. If it is the same as the remaining response time corresponding to the response data of other pending commands, then the sum of the temporary response time corresponding to the current pending command and the conflict delay time is determined as the response time corresponding to the response data of the current pending command.

[0063] It should be noted that in this embodiment, the current slave device can receive commands sent by the master (i.e., commands to be responded to) and generate response data for each command. Correspondingly, the master can send commands to each slave device. For example, the master can use an outstanding transmission method to send commands (transactions) to each slave device via the AXI protocol. Here, outstanding transmission refers to the master's ability to initiate multiple read and write transactions without receiving a response, that is, it can send the next transmission without waiting for the previous transmission to complete.

[0064] Step 103: Send response data to the host via the Advanced Extensible Interface Bus according to the response time.

[0065] Understandably, in this step, the current slave device can send the response data of each pending command to the master device via the AXI bus according to the corresponding response time of each pending command. That is, the current slave device can wait for the response time corresponding to a certain pending command to be reached (such as the current time being the sum of the reception time and response time of the pending command) before sending the response data of that pending command to the master device via the AXI bus.

[0066] Furthermore, to avoid situations where different slave devices simultaneously send multiple pending commands to the host, in this step, the current slave device can send response data to the arbitration device via the Advanced Scalable Interface (AXI) bus according to the response time. This allows the arbitration device to arbitrate response data with the same sending time based on the priority allocation information of each slave device, and then forward the response data sent by the slave devices to the host sequentially via the AXI bus. In other words, in this embodiment, the host can connect to each slave device through the arbitration device; that is, an arbitration device (such as a switch) can be set on the AXI bus connecting the host and each slave device, enabling the switch to receive response data sent by each slave device to the host and forward it to the host. Correspondingly, in this embodiment, the arbitration device can forward the response data to the host sequentially via the AXI bus according to the sending time and priority allocation information of the response data sent by each slave device, arbitrating response data with the same sending time, and prioritizing the response data sent by the slave device with the higher priority among the response data with the same sending time.

[0067] In this embodiment, the present invention determines the response delay time period corresponding to the current slave device based on priority allocation information. This allows for the allocation of a time range for response data to each slave device according to its priority. By determining the response time corresponding to the response data of each pending command in the current slave device based on the response delay time period, the response time for the response data of different pending commands in each slave device can be determined according to the allocated time range. This makes the response time of different pending commands in each slave device different, more realistically simulating the speed at which the slave device responds to response data after data processing, which is beneficial for module-level transmission efficiency verification.

[0068] Based on the above embodiments, this invention also provides another out-of-order transmission simulation method to more realistically simulate the speed at which different slave devices reply with response data after data processing. Accordingly, please refer to... Figure 3 , Figure 3 A flowchart illustrating another out-of-order transmission simulation method provided in an embodiment of the present invention. The method may include:

[0069] Step 201: The current slave device determines the target allocation time period corresponding to the current slave device based on the priority allocation information.

[0070] The target allocation time period is any allocation time period, and the allocation time period is a preset number of time periods divided by the average of the preset delay time period. The preset number is greater than or equal to the number of slave devices.

[0071] It is understood that the priority allocation information in this implementation may include priority information and slave identification information. For example, the priority allocation information may include the priority information and slave identification information corresponding to each slave. Figure 2As shown, the host can use its calling module to call the bfm (Slv 1-n) of each slave (Slv), and assign each slave's bfm an ID number (i.e. slave identification information) and a priority (i.e. priority information).

[0072] Correspondingly, in this embodiment, the allocated time period can be multiple time ranges evenly divided from a pre-set fixed time block (i.e., a preset delay time period). The number of allocated time periods (i.e., the preset number) can be greater than or equal to the number of slave devices. For example, when the preset number is equal to the number of slave devices, if the number of slave devices is 5, the time period 10-60ns (i.e., the preset delay time period) can be evenly divided into five allocated time periods: 10-20ns, 20-30ns, 30-40ns, 40-50ns, and 50-60ns. In this step, the current slave device can determine an allocated time period (i.e., the target allocated time period) based on the priority allocation information. For example, if the current slave device has the highest priority, the target allocated time period corresponding to the current slave device can be 10-20ns.

[0073] Step 202: Determine the target allocation time period as the response delay time period corresponding to the current slave device.

[0074] In this step, the current slave device can use the target allocation time period corresponding to the current slave device as the response delay time period corresponding to the current slave device, so as to use the response delay time period to configure the random time of the delayed response of each command to be responded to, and to constrain the random time.

[0075] Correspondingly, the specific method by which the current slave determines the target allocation time period as the corresponding response delay time period in this step can be set by the designer. For example, the current slave can configure the weights corresponding to each allocation time period according to the target allocation time period; and configure a dynamic array according to the time order of each allocation time period, using the weights corresponding to each allocation time period, to represent the response delay time period corresponding to the current slave. The weight corresponding to the target allocation time period can be 1, and the weights corresponding to allocation time periods other than the target allocation time period can all be 0. Figure 2 As shown, the current slave device can use the priority weighting module within its BFM to configure a weight for each allocated time period. The weight of each time period is placed in a dynamic array. If the current slave device has the highest priority, it means that the current slave device processes commands the fastest. The target allocated time period corresponding to the current slave device can be 10-20ns from the five allocated time periods mentioned above. The weights of the five allocated time periods in the dynamic array of the current slave device can be 1, 0, 0, 0, 0.

[0076] Step 203: After obtaining the current command to be responded to, determine whether the command identifier queue stores the command identifier of the current command to be responded to; if not, proceed to step 204; if yes, proceed to step 205.

[0077] The command identifier queue stores the command identifiers of all pending commands in the current slave device. The command identifier is either a write address code (awid) or a read address code (arid).

[0078] It is understandable that for write transfers on the AXI bus, the data transmitted via the AW channel (write address channel) carries the awid, while for read transfers on the AXI bus, the data transmitted via the AR channel (read address channel) carries the aridd. In this embodiment, after the slave device receives a command (i.e., a command to be responded to) sent by the master, it can extract the awid or aridd of the command as a command identifier. By storing the command identifiers of previously received commands in the command identifier queue, each time a new command (i.e., the current command to be responded to) is received, its command identifier can be compared with the command identifiers stored in the command identifier queue to determine whether a command with the same command identifier has been received previously.

[0079] Correspondingly, the specific method by which the current slave device determines whether the command identifier queue contains the command identifier of the current command to be responded to after acquiring the current command to be responded to in this step can be set by the designer. For example, to facilitate the subsequent search of target response data, in this embodiment, the command identifier queue can store the command identifiers of the commands to be responded to in the order of receiving the commands to be responded to. Accordingly, in this step, the current slave device can perform a reverse comparison between the command identifier of the current command to be responded to and the command identifiers in the command identifier queue to detect whether the command identifier queue contains the command identifier of the current command to be responded to. Thus, the response data of the first command to be responded to that has the same command identifier as the command identifier of the current command to be responded to, obtained from the reverse comparison, is taken as the target response data.

[0080] Step 204: Store the command identifier of the currently pending command in the command identifier queue, and configure the time parameter to a preset time value.

[0081] In this step, if the current slave device does not have the command identifier of the command to be responded to stored in the command identifier queue, it can store the command identifier of the command to be responded to into the command identifier queue and configure the time parameter to a preset time value.

[0082] Correspondingly, this embodiment does not limit the specific value of the preset time value. For example, the preset time value can be 0 or other values, such as 10ns.

[0083] Step 205: Determine whether the target response data has been sent; if yes, proceed to step 206; if no, proceed to step 207.

[0084] The target response data is the response data of the most recently received command to be responded to in the command identifier queue whose command identifier is the same as the command identifier of the current command to be responded to. That is, the response data corresponding to the command to be responded to that was received last time with the same command identifier as the current command to be responded to.

[0085] Understandably, in this step, when the current slave device has the command identifier of the currently pending command stored in the command identifier queue, it can determine whether the target response data has been sent, and whether the most recently received pending command with the same command identifier as the currently pending command has been replied to, thereby avoiding the situation where the reply time of the currently pending command is earlier than the reply time of the previously received pending command with the same command identifier.

[0086] For example, in this step, the current slave device can determine whether the response data of the first command to be responded to that is the same as the command identifier of the current command to be responded to has been sent; if yes, it is determined that the target response data has been sent; if no, it is determined that the target response data has not been sent.

[0087] Step 206: Store the command identifier of the currently pending command in the command identifier queue, and configure the time parameter to a preset time value.

[0088] In this step, after the response data (i.e., target response data) of the most recently received command to be responded to (with the same command identifier as the command identifier of the current command to be responded to) has been sent, the current slave device can store the command identifier of the current command to be responded to in the command identifier queue and configure the time parameter to a preset time value.

[0089] Step 207: Store the command identifier of the current command to be responded to in the command identifier queue, and configure the time parameter to be the sum of the preset time value and the remaining time for the response data of the target response data.

[0090] It should be noted that in this step, the current slave device can store the command identifier of the current command to be responded to into the command identifier queue after the response data (i.e., the target response data) of the most recently received command to be responded to (with the same command identifier as the command identifier of the current command to be responded to) has not been sent. The time parameter is then configured to be the sum of a preset time value and the remaining time for the response to the target response data. The remaining time for the response to the target response data can be the reception time of the command to be responded to corresponding to the target response data + the response time corresponding to the target response data - the current time.

[0091] like Figure 2As shown, the current slave device can use the ID checking module (command identifier checking module) in its BFM to complete the above steps 203 to 206. That is, the ID checking module can be used to check whether the ID of the transactio received by the same slave device has appeared before, ensuring that the same ID will not be out of order. For example, the ID checking module can be used to extract the AWID or ARID from the received transaction (i.e., the command to be responded to) stored in the command identifier queue. Each time a new transaction (i.e., the current command to be responded to) is received, a for loop is used to compare the transaction's ID with other IDs in the command identifier queue in reverse order. If no matching ID is found, the time parameter t is set to 0 (i.e., the preset time value) and passed to the timing allocation module. If a matching ID is found, it is determined whether the event has already received a response (RESP). If a response has been received, the time parameter t is set to 0 and passed to the timing allocation module. If an event with the same ID has not yet received a response, the remaining response time for the previous transaction with the same ID is calculated. This remaining response time is equal to the reception time of the previous transaction + the response time allocated by the timing allocation module - the current time. This remaining response time is assigned to the time parameter t and passed to the timing allocation module.

[0092] Step 208: Determine the sum of the random time of the current pending command and the time parameter as the temporary response time corresponding to the current pending command.

[0093] The random time of the currently pending command is the random time point corresponding to the currently pending command within the response delay period; that is, the current slave can randomly select a time point (i.e., a random time point) within the response delay period as the random time of the currently pending command, so as to use the response delay period to randomly constrain the response time of each pending command in the current slave.

[0094] Step 209: Determine whether the sum of the temporary response time and the reception time of the current pending command is the same as the remaining response time corresponding to the response data of other pending commands; if not, proceed to step 210; if yes, proceed to step 211.

[0095] Understandably, in this step, the current slave device determines whether the sum of the temporary reply time and the reception time of the current pending command is the same as the remaining reply time (i.e., reception time + reply time - current time) of the previously received pending commands (i.e., other pending commands). This determines whether the temporary reply time of the current pending command will cause the response data of the current pending command and other pending commands to be sent simultaneously, resulting in a time conflict.

[0096] Correspondingly, the remaining response time for the response data of other pending commands in this step can be calculated as the reception time of each other pending command + the response time of that other pending command - the current time.

[0097] Step 210: Determine the temporary response time corresponding to the current pending command as the response time corresponding to the response data of the current pending command.

[0098] In this step, the slave device can directly determine the temporary response time corresponding to the current command to be responded to as the response time corresponding to the response data of the current command to be responded to, provided that the temporary response time will not cause a time conflict.

[0099] Step 211: The sum of the temporary response time corresponding to the current pending command and the conflict delay time is determined as the response time corresponding to the response data of the current pending command.

[0100] It is understandable that in this step, if the temporary response time corresponding to the current pending command causes a time conflict, the current slave device can determine the response time corresponding to the response data of the current pending command as the sum of the temporary response time and the conflict delay time, so as to avoid the time conflict.

[0101] In this embodiment, the conflict delay time can be a pre-set fixed time value (such as 1ns) or a randomly generated non-zero random number.

[0102] Furthermore, in this step, the current slave device can also use the sum of the temporary response time corresponding to the current pending command and the conflict delay time to update the temporary response time corresponding to the previous pending command, and execute step 209; that is, the current slave device can determine the response time corresponding to the response data of the current pending command through step 210, provided that the sum of the temporary response time corresponding to the current pending command and the conflict delay time does not cause a time conflict.

[0103] like Figure 2As shown, the current slave device can complete steps 207 to 211 above using the actual allocation module within its BFM. That is, the timing allocation module can be used to determine the response time of the random response (RF) based on the results of the ID check module and the weights determined by the priority weighting module. For example, the timing allocation module can randomly constrain the response time of the RFS for each transaction in the current slave device based on the weights calculated by the priority weighting module. The randomly selected time plus the time parameter t transmitted by the ID check module is the temporary response time of the RFS for that transaction. The sum of the RFS reception time and the temporary response time is calculated and compared with the response timing of previous transactions. If there is a time conflict, meaning two transactions in the same slave will respond to the RFS simultaneously, the final response time of the RFS for that transaction can be the temporary response time plus a random number (i.e., conflict delay time). If there is no time conflict, the final response time of the RFS for that transaction can be the temporary response time.

[0104] Step 212: According to the response time corresponding to each pending command, send the response data to the arbitration device through the Advanced Scalable Interface Bus, so that the arbitration device allocates information according to the priority of each slave device, arbitrates the response data with the same sending time, and forwards the response data sent by the slave device to the master device in sequence through the Advanced Scalable Interface Bus.

[0105] It is understood that in this embodiment, the host can be connected to each slave device via an arbitration device (such as a switch) using an AXI bus. In this step, the current slave device can send the response data of each pending command to the arbitration device via the AXI bus according to the corresponding response time of each pending command, so that the arbitration device can forward the response data sent by each slave device to the host in sequence, avoiding the situation where different slave devices send multiple pending commands to the host at the same time.

[0106] like Figure 2 As shown, in this step, the current slave device can use the response data response module (response data response module) in its BFM to delay the response time of each transaction until it reaches its corresponding response time, and then send the response to the master device through the arbitration device.

[0107] Accordingly, in this embodiment, the arbitration device can forward the response data to the master sequentially via the AXI bus according to the transmission time and priority allocation information of the response data sent by each slave device, so as to arbitrate response data with the same transmission time, and prioritize the response data sent by the slave device with higher priority among the response data with the same transmission time; for example, the arbitration device can sort the response data according to the transmission time of the response data sent by each slave device; and sort the response data with the same transmission time according to the priority allocation information, and forward the response data to the master according to the sorting result, so that the response data with the earlier transmission time is forwarded first, and the response data with higher priority among the response data with the same transmission time is forwarded first. Figure 2 and Figure 4 As shown, the arbitration device can use its arbitration module to allocate an independent channel to each slave and detect the transmission status of resp in each slave's transaction (such as transmission time). If different slaves have transactions that send resp simultaneously, arbitration is performed according to the priority allocation information passed in by the master's calling module. The resp with higher priority is sent first, and the resp with lower priority is sent later.

[0108] In this embodiment, the present invention sends response data to the arbitration device via the Advanced Scalable Interface Bus according to the response time corresponding to each pending command. The arbitration device arbitrates the response data from different slave devices simultaneously according to the slave device priority, thereby avoiding the situation where different slave devices send multiple pending commands to the master device at the same time.

[0109] Corresponding to the above method embodiments, this invention also provides an out-of-order transmission simulation device. The out-of-order transmission simulation device described below and the out-of-order transmission simulation method described above can be referred to in correspondence.

[0110] Please refer to Figure 5 , Figure 5 This is a structural block diagram of an out-of-order transmission simulation device provided in an embodiment of the present invention. The device is applied to the current slave device and may include:

[0111] The time period determination unit 10 is used to determine the response delay time period corresponding to the current slave device based on the priority allocation information; wherein, the current slave device is any slave device connected to the master device through the Advanced Scalable Interface Bus, the priority allocation information includes priority information, and each slave device has a different response delay time period;

[0112] The response time determination unit 20 is used to determine the response time corresponding to the response data of each pending command in the current slave device according to the response delay time period; wherein, the time points of each response time are different;

[0113] The response sending unit 30 is used to send response data to the host via the Advanced Scalable Interface Bus according to the response time.

[0114] In some embodiments, the time period determination unit 10 may include:

[0115] The priority weighting module is used to determine the target allocation time period corresponding to the current slave based on the priority allocation information; and to determine the target allocation time period as the response delay time period; wherein, the target allocation time period is any allocation time period, and the allocation time period is a preset number of time periods divided by the average of the preset delay time period, and the preset number is greater than or equal to the number of slaves.

[0116] In some embodiments, the priority weighting module can be specifically used to configure the weights corresponding to each allocation time period according to the target allocation time period; and to configure a dynamic array according to the time order of each allocation time period and the weights corresponding to each allocation time period, so as to use the dynamic array to represent the response delay time period corresponding to the current slave; wherein, the weight corresponding to the target allocation time period is 1, and the weights corresponding to allocation time periods other than the target allocation time period are all 0.

[0117] In some embodiments, the response time determination unit 20 is specifically used to determine the response time corresponding to each response data in the current slave device based on the response delay time period and the command identifier of each command to be responded to; wherein, the command identifier is a write address code or a read address code.

[0118] In some embodiments, the response time determination unit 20 may include:

[0119] The command identifier checking module is used to determine whether the command identifier queue contains the command identifier of the current pending command after acquiring the current pending command. If the command identifier of the current pending command is not stored, it is stored in the command identifier queue, and the time parameter is configured to a preset time value. If the command identifier of the current pending command is stored, it is determined whether the target response data has been sent. If the target response data has been sent, the command identifier of the current pending command is stored in the command identifier queue, and the time parameter is configured to a preset time value. If the target response data has not been sent, the command identifier of the current pending command is stored in the command identifier queue, and the time parameter is configured to the sum of the preset time value and the remaining time for the response of the target response data. The command identifier queue stores the command identifiers of all pending commands in the current slave device, and the target response data is the response data of the most recently received pending command whose command identifier is the same as that of the current pending command in the command identifier queue.

[0120] The timing allocation module is used to determine the response time corresponding to the response data of the current pending command based on the random time and time parameter of the current pending command; wherein, the random time of the current pending command is the random time point corresponding to the current pending command within the response delay period.

[0121] In some embodiments, the timing allocation module may be specifically used to determine the sum of the random time of the current pending command and the time parameter as the temporary response time corresponding to the current pending command; determine whether the sum of the temporary response time and the reception time of the current pending command is the same as the remaining response time corresponding to the response data of other pending commands; if it is not the same as the remaining response time corresponding to the response data of other pending commands, then the temporary response time corresponding to the current pending command is determined as the response time corresponding to the response data of the current pending command; if it is the same as the remaining response time corresponding to the response data of other pending commands, then the sum of the temporary response time corresponding to the current pending command and the conflict delay time is determined as the response time corresponding to the response data of the current pending command.

[0122] In some embodiments, the response sending unit 30 may include:

[0123] The response data reply module is used to send response data to the arbitration device via the Advanced Scalable Interface Bus according to the reply time. This allows the arbitration device to allocate information according to the priority of each slave device, arbitrate response data sent at the same time, and forward the response data sent by the slave devices to the master device in sequence via the Advanced Scalable Interface Bus.

[0124] In this embodiment, the present invention uses the time period determination unit 10 to determine the response delay time period corresponding to the current slave device based on priority allocation information, which can allocate a time range for response data to each slave device according to the priority of different slave devices; and uses the response time determination unit 20 to determine the response time corresponding to the response data of each pending command in the current slave device according to the response delay time period, which can determine the response time of the response data of different pending commands in each slave device according to the allocated time range, so that the response time of different pending commands in each slave device is different, which more realistically simulates the speed of the slave device to respond to the response data after the data processing is completed, which is beneficial to the module-level transmission efficiency verification.

[0125] Corresponding to the above method embodiments, this invention also provides an electronic device. The electronic device described below and the out-of-order transmission simulation method described above can be referred to and correspond to each other.

[0126] Please refer to Figure 6 , Figure 6 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. The electronic device may include:

[0127] Memory D1 is used to store computer programs;

[0128] Processor D2 is used to implement the steps of the out-of-order transport simulation method provided in the above-described method embodiments when executing a computer program.

[0129] Accordingly, please refer to Figure 7 , Figure 7 This is a schematic diagram of a specific structure of an electronic device provided in an embodiment of the present invention. The electronic device 310 can vary considerably due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 322 (e.g., one or more processors) and a memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 342 or data 344. The memory 332 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more units (not shown in the diagram), each unit may include a series of instruction operations on the host. Furthermore, the central processing unit 322 may be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the electronic device 310.

[0130] Electronic device 310 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341. Examples include Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0131] Electronic device 310 can be a slave device that is specifically connected to the host via an AXI bus.

[0132] The steps in the out-of-order transmission simulation method described above can be implemented by the structure of the electronic device.

[0133] Corresponding to the above method embodiments, this invention also provides an out-of-order transmission simulation system. The out-of-order transmission simulation system described below and the out-of-order transmission simulation method described above can be referred to in correspondence.

[0134] An out-of-order transmission simulation system includes: a master and a slave;

[0135] Each slave device is an electronic device provided in the above embodiments, and each slave device is connected to the master device via an Advanced Scalable Interface (AXI) bus.

[0136] In some embodiments, the host can be connected to each slave via an arbitration device using an AXI bus;

[0137] Arbitration equipment can be used to allocate information according to the transmission time and priority of response data sent by each slave device, and forward the response data to the master device sequentially through the AXI bus to arbitrate response data with the same transmission time, and prioritize the forwarding of response data sent by the slave device with higher priority among response data with the same transmission time.

[0138] In some embodiments, the host can be used to send commands (transactions) to each slave device via the AXI protocol using an outstanding transmission method, and receive response data for each command from each slave device.

[0139] Corresponding to the above method embodiments, this invention also provides a computer-readable storage medium. The computer-readable storage medium described below corresponds to and can be referred to in relation to the out-of-order transmission simulation method described above.

[0140] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the out-of-order transport simulation method provided in the above-described method embodiments.

[0141] The computer-readable storage medium can be any storage medium capable of storing program code, such as a USB flash drive, external hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0142] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatuses, systems, electronic devices, and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant details can be found in the method section.

[0143] The present invention has provided a detailed description of an out-of-order transmission simulation method, apparatus, system, and electronic device. Specific examples have been used to illustrate the principles and implementation methods of the invention. The descriptions of these embodiments are merely illustrative of the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to the invention without departing from its principles, and these improvements and modifications also fall within the scope of protection of the claims.

Claims

1. A method for simulating out-of-order transmission, characterized in that, include: The current slave device determines its corresponding response delay time period based on the priority allocation information; wherein, the current slave device is any slave device connected to the master through the Advanced Scalable Interface bus, and the priority allocation information includes priority information, and each slave device has a different response delay time period; Based on the response delay time period, determine the response time corresponding to the response data of each pending command in the current slave device; wherein, the time points of each response time are different; The response data is sent to the host via the Advanced Scalable Interface bus according to the stated response time.

2. The out-of-order transmission simulation method according to claim 1, characterized in that, The current slave device determines its corresponding response delay time period based on priority allocation information, including: The current slave device determines the target allocation time period corresponding to the current slave device according to the priority allocation information; wherein, the target allocation time period is any allocation time period, the allocation time period is a preset number of time periods divided by the average of the preset delay time period, and the preset number is greater than or equal to the number of slave devices; The target allocation time period is determined as the response delay time period.

3. The out-of-order transmission simulation method according to claim 2, characterized in that, The step of determining the target allocation time period as the response delay time period includes: According to the target allocation time period, configure the weight corresponding to each allocation time period; wherein, the weight corresponding to the target allocation time period is 1, and the weight corresponding to the allocation time period other than the target allocation time period is 0; According to the time order of each allocated time period, a dynamic array is configured using the weight corresponding to each allocated time period, so as to represent the response delay time period corresponding to the current slave device.

4. The out-of-order transmission simulation method according to claim 1, characterized in that, The step of determining the response time corresponding to each pending command in the current slave device based on the response delay time period includes: Based on the response delay time period and the command identifier of each of the pending commands, the response time corresponding to each of the response data in the current slave device is determined; wherein, the command identifier is a write address code or a read address code.

5. The out-of-order transmission simulation method according to claim 4, characterized in that, The step of determining the response time corresponding to each response data in the current slave device based on the response delay time period and the command identifier of each pending command includes: After obtaining the current command to be responded to, it is determined whether the command identifier queue stores the command identifier of the current command to be responded to; wherein, the command identifier queue is used to store the command identifiers of all the commands to be responded to in the current slave device; If the command identifier of the currently pending command is not stored, the command identifier of the currently pending command is stored in the command identifier queue, and the time parameter is configured to a preset time value. If the command identifier of the currently pending command is stored, it is determined whether the target response data has been sent; wherein, the target response data is the response data of the most recently received pending command in the command identifier queue whose command identifier is the same as the command identifier of the currently pending command. If the target response data has been sent, the command identifier of the current command to be responded to is stored in the command identifier queue, and the time parameter is configured to a preset time value. If the target response data is not sent, the command identifier of the current pending command is stored in the command identifier queue, and the time parameter is configured as the sum of the preset time value and the remaining time for the response of the target response data; Based on the random time of the current pending command and the time parameter, the response time corresponding to the response data of the current pending command is determined; wherein, the random time of the current pending command is the random time point corresponding to the current pending command within the response delay time period.

6. The out-of-order transmission simulation method according to claim 5, characterized in that, The step of determining the response time corresponding to the response data of the current command to be responded to based on the random time of the current command to be responded to and the time parameter includes: The sum of the random time of the current pending command and the time parameter is determined as the temporary response time corresponding to the current pending command; Determine whether the sum of the temporary response time and the reception time of the current pending command is the same as the remaining response time corresponding to the response data of other pending commands; If the remaining response time is not the same as the response time of other pending commands, then the temporary response time of the current pending command will be determined as the response time of the current pending command's response data. If the remaining response time is the same as that of the response data of other pending commands, then the sum of the temporary response time and the conflict delay time of the current pending command will be determined as the response time of the response data of the current pending command.

7. The out-of-order transmission simulation method according to any one of claims 1 to 6, characterized in that, The step of sending the response data to the host via the Advanced Scalable Interface bus according to the response time includes: According to the response time, the response data is sent to the arbitration device via the Advanced Scalable Interface Bus, so that the arbitration device arbitrates response data with the same sending time according to the priority allocation information of each slave device, and forwards the response data sent by the slave device to the host device in sequence via the Advanced Scalable Interface Bus.

8. A device for simulating out-of-order transmission, characterized in that, Applied to the current slave device, including: The time period determination unit is used to determine the response delay time period corresponding to the current slave device based on the priority allocation information; wherein, the current slave device is any slave device connected to the master device through the Advanced Scalable Interface Bus, the priority allocation information includes priority information, and the response delay time period corresponding to each slave device is different; The response time determination unit is used to determine the response time corresponding to the response data of each pending command in the current slave device based on the response delay time period; wherein, the time points of each response time are different; A response sending unit is configured to send the response data to the host via the Advanced Scalable Interface bus according to the response time.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the out-of-order transport simulation method as described in any one of claims 1 to 7 when executing the computer program.

10. An out-of-order transmission simulation system, characterized in that, include: A master and a slave; wherein each of the slave devices is an electronic device as described in claim 9, and each of the slave devices is connected to the master device via an Advanced Scalable Interface bus.