Transaction processing apparatus, chip, method and related devices
By splitting and processing AXI transaction requests in parallel, the problem of low efficiency in handling complex transaction requests by AXI slave devices is solved, the processing efficiency and reliability of AXI master devices are improved, bandwidth bottlenecks and deadlock risks are overcome, and reusability is enhanced.
Patent Information
- Application Number
- CN202610990497.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-11-24
AI Technical Summary
In existing technologies, AXI slave devices are inefficient at processing complex transaction requests, which leads to low transaction processing efficiency of AXI master devices, as well as issues such as bandwidth bottlenecks, deadlock risks, and poor reusability.
A transaction processing device is provided, which connects to an AXI master device through a first interface, splits a transaction request into multiple sub-transaction requests, executes them in parallel with multiple AXI slave devices through a second interface, generates and sends sub-transaction responses, and finally concatenates them into a response that can be parsed by the master device.
It improves the efficiency of transaction processing, reduces waiting time, ensures the reliability of transaction processing, solves bandwidth bottlenecks and deadlock risks, and enhances reusability.
Smart Images

Figure CN123157332A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, specifically relating to a transaction processing device, chip, method, and related equipment. Background Technology
[0002] As electronic devices continue to demand higher bus bandwidth and concurrency efficiency in high-performance scenarios, the Advanced Microcontroller Bus Architecture (AMBA) and Advanced eXtensible Interface (AXI) protocols have gradually become the mainstream on-chip interconnect protocols for data interaction between AXI master devices and AXI slave devices.
[0003] In the prior art, the AXI master device can send a transaction request to the AXI slave device so that the AXI slave device can execute the transaction requested by the transaction request and send the response obtained from the execution of the transaction to the AXI master device. However, since the transaction requested by the transaction request may be quite complex, the AXI slave device may need a long time to complete the execution of the transaction requested by the transaction request, thus resulting in low efficiency of transaction processing. Summary of the Invention
[0004] The purpose of this application is to provide a transaction processing apparatus, chip, method, and related devices to improve the efficiency of AXI transaction processing.
[0005] In a first aspect, embodiments of this application provide a transaction processing apparatus, comprising: a first interface connected to an Advanced Extensible Interface (AXI) master device, configured to receive from the AXI master device a transaction request for requesting at least two AXI slave devices to execute a first transaction; a first transaction processing unit connected to the first interface, configured to split the transaction request into at least two sub-transaction requests, each sub-transaction request requesting one AXI slave device to execute one sub-transaction; a second interface connected to the first transaction processing unit and the at least two AXI slave devices, configured to receive the at least two sub-transaction requests from the first transaction processing unit, and send corresponding sub-transaction requests to the at least two AXI slave devices respectively, and receive at least one sub-transaction response from the at least two AXI slave devices, each sub-transaction response being a response obtained from executing one sub-transaction; and a second transaction processing unit connected to the second interface and the first interface, configured to receive the at least one sub-transaction response from the second interface, and generate a transaction response based on the at least one sub-transaction response, the transaction response being at least a partial response corresponding to the first transaction; wherein the first interface is further configured to receive the transaction response from the second transaction processing unit and send the transaction response to the AXI master device.
[0006] Secondly, embodiments of this application provide a chip that includes the apparatus as described in the first aspect.
[0007] Thirdly, embodiments of this application provide a transaction processing method, the method comprising: receiving a transaction request from an AXI master device through a first interface of the transaction processing device, the transaction request being used to request at least two AXI slave devices to execute a first transaction; splitting the transaction request into at least two sub-transaction requests through a first transaction processing unit of the transaction processing device, each sub-transaction request being used to request one AXI slave device to execute one sub-transaction; sending corresponding sub-transaction requests to the at least two AXI slave devices through a second interface of the transaction processing device, and receiving at least one sub-transaction response from the at least two AXI slave devices, each sub-transaction response being a response obtained from executing one sub-transaction, the transaction response being at least a partial response corresponding to the first transaction; generating a transaction response based on the at least one sub-transaction response through the second transaction processing unit of the transaction processing device, and sending the transaction response to the AXI master device through the first interface.
[0008] Fourthly, embodiments of this application provide a transaction processing apparatus, comprising: a receiving module, a processing module, and a sending module; the receiving module is configured to receive, through a first interface of the transaction processing apparatus, a transaction request from an AXI master device requesting at least two AXI slave devices to execute a first transaction; the processing module is configured to, through a first transaction processing unit of the transaction processing apparatus, split the transaction request into at least two sub-transaction requests, each sub-transaction request requesting one AXI slave device to execute one sub-transaction; the sending module is configured to, through a second interface of the transaction processing apparatus, send corresponding sub-transaction requests to the at least two AXI slave devices respectively; the receiving module is configured to receive at least one sub-transaction response from the at least two AXI slave devices, each sub-transaction response being a response obtained from executing one sub-transaction, and the transaction response being at least a partial response corresponding to the first transaction; the sending module is configured to, through a second transaction processing unit of the transaction processing apparatus, generate a transaction response based on the at least one sub-transaction response, and send the transaction response to the AXI master device through the first interface.
[0009] Fifthly, embodiments of this application provide an electronic device that includes the means of the first aspect.
[0010] In a sixth aspect, embodiments of this application provide a chip including a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the third aspect.
[0011] In this embodiment, since the first interface of the transaction processing device can be connected to an AXI master device, and the second interface of the transaction processing device can be connected to at least two AXI slave devices, when the first interface receives a transaction request for at least two AXI slave devices to execute a first transaction—that is, when the first transaction requested by the first interface is complex—the transaction processing device can split the transaction request into at least two sub-transaction requests through the first transaction processing unit, and send the at least two sub-transaction requests to at least two AXI slave devices through the second interface. This allows at least two AXI slave devices to execute the sub-transactions in parallel, rather than the first transaction being executed serially by only one AXI slave device. This reduces the waiting time required to complete the first transaction. Furthermore, since the transaction processing unit can generate a transaction response (i.e., at least a partial response corresponding to the first transaction) based on at least one sub-transaction response from at least two AXI slave devices when the second interface receives such a response, and then send this response to the AXI master device via the first interface instead of directly sending at least one sub-transaction response to the AXI master device, it avoids the AXI master device being unable to parse the at least partial response corresponding to the first transaction due to the sending order of at least one sub-transaction response not conforming to the transaction receiving order corresponding to the same transaction identifier. This ensures the reliability of transaction processing. Thus, the efficiency of transaction processing can be improved while ensuring its reliability. Attached Figure Description
[0012] Figure 1 This is one of the circuit structure schematic diagrams of a transaction processing device provided in the embodiments of this application;
[0013] Figure 2 This is a second schematic diagram of the circuit structure of a transaction processing device provided in an embodiment of this application;
[0014] Figure 3 This is a schematic diagram of the address interleaving mapping relationship of a transaction processing device provided in an embodiment of this application;
[0015] Figure 4 This is the third schematic diagram of the circuit structure of a transaction processing device provided in the embodiments of this application;
[0016] Figure 5 This is the fourth schematic diagram of the circuit structure of a transaction processing device provided in the embodiments of this application;
[0017] Figure 6 This is the fifth schematic diagram of the circuit structure of a transaction processing device provided in the embodiments of this application;
[0018] Figure 7This is the sixth schematic diagram of the circuit structure of a transaction processing device provided in the embodiments of this application;
[0019] Figure 8 This is the seventh schematic diagram of the circuit structure of a transaction processing device provided in the embodiments of this application;
[0020] Figure 9 This is a schematic diagram illustrating the improvement of bandwidth in a multi-channel system of a transaction processing apparatus provided in an embodiment of this application;
[0021] Figure 10 This is a schematic diagram of a chip provided in an embodiment of this application;
[0022] Figure 11 This is one of the flowcharts illustrating the transaction processing method provided in the embodiments of this application;
[0023] Figure 12 This is the eighth schematic diagram of the circuit structure of a transaction processing device provided in the embodiments of this application;
[0024] Figure 13 This is a second flowchart illustrating the transaction processing method provided in the embodiments of this application;
[0025] Figure 14 This is a schematic diagram of the structure of the transaction processing device provided in the embodiments of this application;
[0026] Figure 15 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application;
[0027] Figure 16 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0028] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0029] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0030] The terms "at least one," "at least one of," etc., used in the specification and claims of this application refer to any one, any two, or a combination of two or more of the included items. For example, at least one of a, b, and c can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more items, and its meaning is similar to that of "at least one."
[0031] The transaction processing apparatus, chip, method, and related equipment provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.
[0032] As electronic devices continue to demand higher bus bandwidth and concurrency efficiency in high-performance scenarios, the Advanced Microcontroller Bus Architecture (AMBA) and Advanced eXtensible Interface (AXI) protocols have gradually become the mainstream on-chip interconnect protocols for data interaction between AXI master devices and AXI slave devices.
[0033] In the prior art, the AXI master device can send a transaction request to the AXI slave device so that the AXI slave device can execute the transaction requested by the transaction request and send the response obtained from the execution of the transaction to the AXI master device. However, since the transaction requested by the transaction request may be quite complex, the AXI slave device may need a long time to complete the execution of the transaction requested by the transaction request, thus resulting in low efficiency of transaction processing.
[0034] With the increasing demands for bus bandwidth and concurrency efficiency in high-performance applications such as systems-on-chip (SoCs), AI accelerators, and image processing, the AMBA and AXI bus protocols have become the mainstream on-chip interconnect protocols due to their out-of-order transactions and multi-channel independent transmission capabilities. Existing AXI interconnect designs typically employ single-channel or fixed-channel address mapping schemes, interacting with multiple slave devices via a host interface for read / write transactions. They rely heavily on transaction IDs to manage out-of-order and pre-order transactions, which leads to bandwidth bottlenecks, deadlock risks, pre-order defects, and poor reusability.
[0035] To address the aforementioned problems, embodiments of this application provide a transaction processing apparatus. Figure 1 A schematic diagram of the structure of a transaction processing apparatus 1000 provided in an embodiment of this application is shown. Figure 1 As shown, the transaction processing apparatus 1000 provided in this application embodiment may include: a first interface 1010, connected to an Advanced Extensible Interface (AXI) master device, for receiving a transaction request from the AXI master device, the transaction request being used to request at least two AXI slave devices to execute a first transaction; a first transaction processing unit 1020, connected to the first interface 1010, for splitting the transaction request into at least two sub-transaction requests, each sub-transaction request being used to request one AXI slave device to execute one sub-transaction; and a second interface 1040, connected to the first transaction processing unit 1020 and the at least two AXI slave devices. The first transaction processing unit 1030 is configured to receive at least two sub-transaction requests from the first transaction processing unit 1020, send the corresponding sub-transaction requests to the at least two AXI slave devices respectively, and receive at least one sub-transaction response from the at least two AXI slave devices, each sub-transaction response being a response obtained by executing a sub-transaction; the second transaction processing unit 1030 is connected to the second interface 1040 and the first interface 1010, and is configured to receive at least one sub-transaction response from the second interface 1040, and generate a transaction response based on the at least one sub-transaction response, the transaction response being at least a partial response corresponding to the first transaction.
[0036] In some embodiments of this application, the first interface is further configured to receive the target transaction response from the second transaction processing unit and send the target transaction response to the AXI master device.
[0037] In some embodiments of this application, the target transaction response is a transaction response obtained by splicing together at least one of the sub-transaction responses of the first transaction.
[0038] In some embodiments of this application, when the first transaction is a write transaction, the target transaction response is the complete response corresponding to the first transaction.
[0039] In some embodiments of this application, when the first transaction is a read transaction, the target transaction response is a partial or full response corresponding to the first transaction.
[0040] In some embodiments of this application, the aforementioned AXI master device may be any of the following: a central processing unit (CPU), a direct memory access (DMA) controller, a general processing unit (GPU), a natural processing unit (NPU), a digital signal processing (DSP), a peripheral component interconnect express (PCIe) controller, etc.
[0041] In some embodiments of this application, the aforementioned AXI slave device may be any of the following: a Double Data Rate SDRAM (DDR) controller, a Static Random-Access Memory (SRAM), a Flash memory interface, a General Purpose Input / Output (GPIO), a Universal Asynchronous Receiver / Transmitter (UART), a Serial Peripheral Interface (SPI), an Inter-Integrated Circuit (I2C), a timer, an Ethernet MAC, a PCIe endpoint, a display controller, and a dedicated accelerator or data processing unit, etc.
[0042] In some examples, the first interface 1010 described above can be connected to the AXI master device via wired or wireless connection.
[0043] In some embodiments of this application, the transaction request may include at least one of the following: a read transaction request and a write transaction request.
[0044] In some embodiments of this application, the above-mentioned read transaction indicates that the AXI master device needs to read data from the AXI slave device.
[0045] In some embodiments of this application, the above-mentioned write transaction indicates that the AXI master device needs to write data to the AXI slave device.
[0046] In some embodiments of this application, the first transaction may include at least one of the following: a read transaction and a write transaction. Specifically, if the transaction request includes a read transaction, the first transaction may include reading data from the AXI slave device; if the transaction request includes a write transaction, the first transaction may include writing data from the AXI master device to the AXI slave device.
[0047] In some embodiments of this application, when the AXI master device needs to configure and control peripherals, perform direct memory access (DMA) transfers, and process high-speed data streams, the AXI master device can send a transaction request to the cache device, so that the first interface 1010 can receive the transaction request.
[0048] In some embodiments of this application, the first transaction processing unit 1020 described above may be connected to the first interface 1010. This connection may include a wired connection or a wireless connection.
[0049] In some embodiments of this application, the sub-transaction may include at least one of the following: a read transaction and a write transaction. Wherein, if the first transaction includes a read transaction, the sub-transaction includes the address of the portion of data to be read; if the first transaction includes a write transaction, the sub-transaction includes the portion of data to be written and the address of that portion of data.
[0050] In some embodiments of this application, the first transaction processing unit 1020 can split a transaction request into at least two sub-transaction requests based on the address of the first transaction.
[0051] In some examples, combined Figure 1 ,like Figure 2 As shown, in some embodiments of this application, the first transaction processing unit 1020 includes: a transaction analysis unit 1021 connected to the first interface 1010, used to determine transaction splitting information according to the transaction request, wherein the transaction splitting information is used to indicate the splitting method of the transaction request; and a transaction splitting unit 1022 connected to the transaction analysis unit 1021, used to split the transaction request into at least two sub-transaction requests according to the transaction splitting information.
[0052] In some examples, the transaction analysis unit 1021 can be connected to the first interface 1010 and receive transaction requests from the first interface 1010 to parse and obtain the address, length and transaction identifier corresponding to the transaction request, so as to mark and split the transaction.
[0053] Optionally, the address corresponding to the above transaction request can be the header address of the transaction.
[0054] For example, taking the above transaction request as a read transaction, the above header address is the header address corresponding to the data to be read.
[0055] Optionally, the length corresponding to the above transaction request can be the length of the data corresponding to the transaction.
[0056] For example, taking the above transaction request as a write transaction, the length of the data corresponding to the transaction is the address length of the data to be written.
[0057] Optionally, the transaction number corresponding to the above transaction request can be used to preserve the order of the transaction requests so that transaction requests with the same transaction number can be output in the order of input.
[0058] In some examples, the transaction splitting information mentioned above may include the address and length of each sub-transaction request.
[0059] In some examples, the transaction analysis unit 1021 can obtain interleaving configuration parameters from the transaction processing device 1000, and obtain transaction splitting information based on the transaction address, length and interleaving configuration parameters. The transaction splitting information can be used to instruct the transaction request of the first transaction to be split to obtain at least one sub-transaction request of the first transaction.
[0060] In some examples, the interleaving configuration parameters described above may include an interleaving granularity, which indicates the size of the split for the first transaction described above.
[0061] In some examples, the header address of the first sub-transaction request obtained by splitting the first transaction according to the above transaction splitting information is the header address of the first transaction, while the header addresses of other sub-transaction requests obtained by splitting are integer multiples of the above interleaving granularity.
[0062] For example, if the address of the first transaction is 1, the length of the first transaction is 9, and the interleaving granularity is 4, then the transaction analysis unit 1021 can instruct the first transaction to be split into three sub-transaction requests, corresponding to addresses 1, 2, 3; 4, 5, 6, 7 and 8, 9 respectively. The first sub-transaction request corresponds to addresses 1, 2, 3, and the header address of the first sub-transaction request is the same as the header address of the first transaction, which is 1. The second sub-transaction request corresponds to addresses 4, 5, 6, 7, and the header address of the second sub-transaction request is an integer multiple of the interleaving granularity, which is 4. The third sub-transaction request corresponds to addresses 8, 9, and the header address of the third sub-transaction request is an integer multiple of the interleaving granularity, which is 8.
[0063] In some examples, the transaction analysis unit 1021 can send the address, length and interleaving configuration parameters of the transaction to the transaction splitting unit 1022 to instruct the transaction splitting unit 1022 to split the first transaction.
[0064] In some examples, the transaction splitting unit 1022 can determine the address and length of each sub-transaction request based on the transaction splitting information, and split the first transaction based on the address and length of the sub-transaction request to obtain at least one sub-transaction request.
[0065] In some examples, the transaction splitting unit 1022 can split the first transaction by address interleaving.
[0066] For example, such as Figure 3 The diagram illustrates the address interleaving mapping. The starting address of the address interleaving space is 0, and the ending address is 2N-1, meaning the address interleaving space is 2N in size. Dividing the address interleaving space into 2N blocks, the size of each block represents the interleaving granularity. The number of slaves for address interleaving is set (currently 2 in the diagram). After address interleaving, the entire address interleaving space is distributed alternately to two AXI slave devices. The addresses corresponding to the first AXI slave device are 0, 2, ..., N-2, N, N+2, ..., 2N-2; the addresses corresponding to the second AXI slave device are 1, 3, ..., N-1, N+1, N+3, ..., 2N-1.
[0067] In some examples, the sub-transaction request may also include a sub-transaction identifier, which may be the same as the transaction identifier of the first transaction.
[0068] In some examples, after splitting into at least one sub-transaction request, the first transaction processing unit 1020 may also add a device identifier of the AXI slave device corresponding to the sub-transaction request to each sub-transaction request. This device identifier may include, but is not limited to, device number, device name, etc.
[0069] Thus, since the first transaction processing unit may include a transaction analysis unit and a transaction splitting unit, the transaction analysis unit can accurately determine the transaction splitting information based on the transaction request, thereby determining the splitting method of the transaction request. The transaction splitting unit can then accurately split the transaction request into at least two sub-business requests based on the splitting method. Therefore, in subsequent steps, the corresponding sub-business requests can be accurately sent to each AXI slave device, so that each AXI slave device can accurately execute the corresponding sub-transaction, thereby improving the reliability of transaction processing.
[0070] In some examples, combined Figure 2 ,like Figure 4 As shown, the transaction processing device 1000 further includes: a configuration control unit 1050 connected to the transaction analysis unit 1021, used to store the interleaving configuration parameters; the transaction analysis unit 1021 is used to receive the interleaving configuration parameters from the configuration control unit, and determine the transaction splitting information according to the transaction request and the interleaving configuration parameters.
[0071] Optionally, the configuration control unit described above can be used to manage the address interleaving configuration register, which may include interleaving configuration parameters, so that the interleaving configuration parameters in the address interleaving configuration register can be configured by the configuration control unit.
[0072] Optionally, the above-mentioned configuration control unit can also be used to manage the response return mode configuration register, which may store a first indication for indicating at least one of the following: whether out-of-order return is allowed when returning the target transaction response to the AXI master device, and whether interleaved return is allowed when returning the target transaction response to the AXI master device.
[0073] Wherein, if the first indication is used to indicate that out-of-order return is allowed when the response corresponding to the first transaction is returned to the AXI master device, then the target transaction response may not be returned in the order of the sub-transactions in the transaction request issued by the AXI master device; otherwise, the target transaction response must be returned in the order of the sub-transactions in the transaction request issued by the AXI master device.
[0074] Wherein, if the first indication is used to indicate that interleaved return is allowed when the response corresponding to the first transaction is returned to the AXI master device, then the response corresponding to other transaction identifiers can be returned when the return of the response corresponding to one transaction identifier is paused; otherwise, the response corresponding to other transaction identifiers cannot be returned when the return of the response corresponding to one transaction identifier is paused.
[0075] Thus, it can be seen that the transaction processing device can store the interleaving configuration parameters for transaction splitting through the configuration control unit, and can read the interleaving configuration parameters from the configuration control unit before splitting the transaction, thereby making the splitting of the transaction more accurate and obtaining more reasonable sub-transaction requests.
[0076] In this way, the interleaving configuration parameters can be managed by configuring the control unit and real-time updates can be supported, which improves the security of data interaction between AXI master devices and AXI slave devices.
[0077] It should be noted that existing technologies suffer from architectural reusability deficiencies: lack of parameterized definitions leads to poor adaptability; existing AXI bus reordering buffer solutions employ fixed architectures with no flexible definition methods for channel count and outstanding capabilities; existing AXI multi-channel memory access solutions rely on register configuration or hard-coding for slave channel count and interleaving rules, rather than compile-time parameterization, resulting in low code and architecture reusability and an inability to quickly adapt to the bandwidth and concurrency requirements of different System-on-Chip (SoC) devices; existing technologies also exhibit configuration flexibility deficiencies: insufficient interleaving and response mode configuration capabilities; and existing AXI multi-channel memory access solutions use fixed address interleaving rules, lacking register configuration for interleaving granularity and spatial range design. This solution provides parameterized channels and outstanding capabilities. The number of channels and the number of outstanding capabilities on the host side are defined through compile-time parameterization, improving code and architectural reusability while precisely controlling the main linked list depth and logical resource consumption. Furthermore, it provides configurable address interleaving rules, allowing dynamic configuration of address interleaving granularity, interleaving space size, and starting address via registers to adapt to the address mapping requirements of different slave devices within the SoC.
[0078] In some examples, combined Figure 2 ,like Figure 5 As shown, the transaction processing device 1000 further includes a transaction linked list storage unit 1060, which is connected to the transaction analysis unit 1021 and is used to receive the transaction splitting information from the transaction analysis unit 1021 and store the transaction splitting information.
[0079] Optionally, the transaction linked list storage unit 1060 mentioned above includes at least two register groups.
[0080] The number of register groups determines the number of transaction requests that the transaction processing device can transmit simultaneously, and the number of register groups is equal to the number of transaction requests that the cache device can process simultaneously.
[0081] Optionally, the transaction linked list storage unit 1060 can store the mapping relationship between the transaction request and the sub-transaction requests after the transaction request is split, as well as the collection status of the response transaction for the first transaction.
[0082] The mapping relationship described above can be used to indicate the correspondence between a transaction request and a sub-transaction request of that transaction.
[0083] The collection status of the aforementioned response transaction is used to indicate the completion progress of all sub-transaction requests corresponding to the aforementioned first transaction.
[0084] In some embodiments of this application, the second interface 1040 described above may be connected to the transaction splitting unit 1022 described above to receive sub-transaction requests from the transaction splitting unit 1022.
[0085] In some embodiments of this application, the second interface 1040 described above can also be connected to an AXI slave device to send the sub-transaction request to the AXI slave device and receive the sub-transaction response from the AXI slave device, wherein the sub-transaction response data corresponds one-to-one with the sub-transaction request.
[0086] Thus, since the transaction processing device can also be equipped with a transaction linked list storage unit, the transaction splitting information determined by the transaction analysis unit can be stored in the transaction linked list storage unit, that is, the splitting method of the split transaction request can be determined. In subsequent steps, the transaction response can be accurately generated based on the transaction splitting information. Therefore, it can be avoided that the AXI master device cannot parse at least part of the response corresponding to the first transaction because the sending order of at least one sub-transaction response does not conform to the receiving order of the transaction corresponding to the same transaction identifier, thereby ensuring the reliability of transaction processing.
[0087] In some examples, combined Figure 1 ,like Figure 6 As shown, the second transaction processing unit 1030 includes a transaction response splicing unit 1031, which is connected to the second interface 1040 and the first interface 1010, for splicing the at least one sub-transaction response into the target transaction response and sending the target transaction response to the first interface 1010.
[0088] Optionally, the transaction response splicing unit 1031 can be connected to the transaction linked list storage unit 1060 to obtain the mapping relationship between the transaction request and the sub-transaction requests after the transaction request is split.
[0089] Optionally, the transaction response splicing unit 1031 can splice at least one sub-transaction response into a transaction response according to the above mapping relationship, and the transaction response corresponds to a transaction request.
[0090] In some examples, if the above transaction request is a write request, then the transaction request can correspond to a transaction response.
[0091] In some examples, if the above transaction request is a read request, then the transaction request may correspond to at least one transaction response, and each transaction response corresponds to a part of the transaction request.
[0092] In some embodiments of this application, the transaction response splicing unit 1031 can be connected to the first interface 1010 to send the transaction response to the first interface 1010. The connection may include a wired connection or a wireless connection.
[0093] In this way, the received sub-transaction requests can be spliced together by the transaction splicing unit and sent back to the AXI master device.
[0094] In some examples, combined Figure 6 ,like Figure 7 As shown, the transaction processing device 1000 further includes a transaction linked list storage unit 1060, which is connected to the transaction response splicing unit 1031. The transaction linked list storage unit 1060 is used to store transaction splitting information, which is used to indicate the splitting method of the transaction request.
[0095] In some embodiments of this application, the transaction response splicing unit 1031 is further configured to receive the transaction splitting information from the transaction linked list storage unit 1060, and splice the at least one sub-transaction response into the transaction response according to the transaction splitting information.
[0096] In some embodiments of this application, the transaction response splicing unit 1031 is connected to the transaction linked list storage unit 1060 to read the mapping relationship between the transaction request of the transaction and the sub-transaction requests after the transaction request is split, and to splice the obtained sub-transaction responses into the target transaction response according to the mapping relationship. The connection may include a wired connection or a wireless connection.
[0097] Combination Figure 6 ,like Figure 8 As shown, in some embodiments of this application, the second transaction processing unit 1030 further includes a transaction response sorting unit 1032, which is connected to the transaction response splicing unit 1031.
[0098] In some embodiments of this application, the transaction response splicing unit 1031 is further configured to send an arbitration request to the transaction response sorting unit 1032, the arbitration request being used to request authorization for the channel of the first transaction.
[0099] Optionally, the transaction response sorting unit 1032 can authorize the channel with the highest priority based on the priority of all channels.
[0100] In some examples, after the transaction response sorting unit 1032 authorizes the channel, it issues an authorization instruction to the channel, and the transaction response splicing unit 1031 can send the transaction response corresponding to the channel to the first interface 1010.
[0101] In some examples, the transaction response sorting unit 1032 is used to send an authorization instruction to the transaction response splicing unit 1031 according to the arbitration request and the channel priority of the first transaction. The authorization instruction is used to indicate whether to authorize the channel of the first transaction. The at least one transaction is a transaction being processed by the transaction processing device, and the at least one transaction includes the first transaction.
[0102] In some embodiments of this application, the transaction response splicing unit 1031 is specifically used to splice at least one sub-transaction response into a target transaction response, and send the target transaction response to the first interface 1010 when the authorization instruction is used to authorize the channel of the first transaction.
[0103] In some embodiments of this application, the first interface 1010 may be connected to the second transaction processing unit 1030 to receive a target transaction response from the second transaction processing unit 1030, wherein the connection may include a wired connection or a wireless connection.
[0104] In this embodiment of the application, the target transaction response is at least a partial response corresponding to the first transaction.
[0105] In some embodiments of this application, if the first transaction is a write transaction, the transaction response can be a write response of the first transaction, wherein the write response can be a write success or a write failure.
[0106] In some embodiments of this application, if the first transaction is a read transaction, the transaction response may be a portion of the read data of the first transaction.
[0107] Thus, the transaction request arbitration can be performed through the transaction response sorting unit 1032 to arbitrate and send transactions according to priority.
[0108] It should be noted that existing AXI multi-channel memory access solutions do not take into account the constraints of AXI protocol deadlock avoidance rules and do not design a sequence number (ID) extension scheme. The master cannot send transactions with the same ID to different slaves, which limits the efficiency of concurrent access by multiple slaves and is prone to deadlock due to circular dependencies, thus failing to meet the concurrency requirements of high-performance scenarios.
[0109] This application provides a transaction processing apparatus, comprising: a first interface connected to an AXI master device, configured to receive from the AXI master device a transaction request for requesting at least two AXI slave devices to execute a first transaction; a first transaction processing unit connected to the first interface, configured to split the transaction request into at least two sub-transaction requests, each sub-transaction request requesting one AXI slave device to execute one sub-transaction; a second interface connected to the first transaction processing unit and the at least two AXI slave devices, configured to receive the at least two sub-transaction requests from the first transaction processing unit, send corresponding sub-transaction requests to the at least two AXI slave devices respectively, and receive at least one sub-transaction response from the at least two AXI slave devices, each sub-transaction response being a response obtained from executing one sub-transaction; and a second transaction processing unit connected to the second interface and the first interface, configured to receive the at least one sub-transaction response from the second interface, and generate a transaction response based on the at least one sub-transaction response, the transaction response being at least a partial response corresponding to the first transaction. Since the first interface of the transaction processing device can be connected to the AXI master device, and the second interface of the transaction processing device can be connected to at least two AXI slave devices, when the first interface receives a transaction request requesting at least two AXI slave devices to execute a first transaction—that is, when the first transaction requested by the first interface is relatively complex—the transaction processing device can split the transaction request into at least two sub-transaction requests through the first transaction processing unit, and send the at least two sub-transaction requests to the at least two AXI slave devices through the second interface. This allows the at least two AXI slave devices to execute the sub-transactions in parallel, instead of the first transaction being executed serially by only one AXI slave device. Therefore, it can reduce... The system reduces the waiting time required to complete the first transaction. Furthermore, since the transaction processing device can generate a transaction response (i.e., at least a partial response corresponding to the first transaction) based on at least one sub-transaction response from at least two AXI slave devices when the second interface receives such a response, and then send this transaction response to the AXI master device via the first interface instead of directly sending at least one sub-transaction response to the AXI master device, it avoids the AXI master device being unable to parse the at least partial response corresponding to the first transaction due to the sending order of at least one sub-transaction response not conforming to the transaction receiving order corresponding to the same transaction identifier. This ensures the reliability of transaction processing. Thus, the efficiency of transaction processing can be improved while ensuring its reliability.
[0110] Understandably, the transaction processing device addresses the bandwidth bottlenecks, deadlock risks, order preservation defects, and poor reusability issues of existing AXI interconnect designs by implementing a high-bandwidth, high-concurrency, configurable, and strictly order-preserving AXI multi-channel reordering buffer solution. This solution meets the bandwidth and concurrency requirements of high-performance SoCs, AI acceleration, image processing, and other scenarios. Furthermore, the multi-channel address interleaving design enables parallel access to multiple slave devices through multiple channels, breaking through the single-channel bandwidth limitation and improving bus bandwidth and resource utilization.
[0111] Figure 9 The diagram illustrates the signal characteristics of transaction processing. In the diagram, clk is the clock signal, aw is the Address Write channel, which is used to send the start address and length of the write operation, w is the Write Data channel, which is used to send the actual data written, and b is the WriteResponse channel, which is used to send a signal indicating that the processing is complete to the AXI master device after the AXI slave device has finished processing the data.
[0112] like Figure 9 As shown, Figure 9 A schematic diagram of data interaction between AXI master and AXI slave devices using a single channel in the related technology is also shown.
[0113] The diagram of the single-channel system illustrates the process of handling four write transactions in a single-channel system. The AXI master device first sends addresses a0 and a1 on the aw channel. The data corresponding to a0 are d00, d01, d02, and d03, and the data corresponding to a1 are d10, d11, d12, and d13. These two sets of data are then sequentially transmitted to the AXI slave device via the w channel. After the data corresponding to a0 is transmitted, the slave device delays by a fixed 4 cycles and sends back a response to b0 via the b channel. The w channel immediately performs the data transmission for a1 after completing the data transmission for a0, while the data transmission for b0... After the response is sent back, the single-channel system can send the address a2 of the next set of data to the AXI slave device through the aw channel, and then send the data d20, d21, d22, and d23 corresponding to a2. During the transmission, the transaction response b1 corresponding to a1 is sent back through the b channel. At this time, the system can send the address corresponding to a3 to the AXI slave device through the aw channel, and send the data corresponding to a3 to the AXI slave device through the w channel after the w channel is idle. After the data is completely sent, wait for 4 cycles with a fixed delay to receive the response signal sent back by the AXI slave device to the AXI master device.
[0114] like Figure 9 As shown, Figure 9The diagram also illustrates the data interaction between the AXI master and AXI slave devices. The dual-channel system portion of the diagram shows the process of a single-channel system handling four write transactions. aw_0 represents the transaction processing flow corresponding to the first AXI slave device, aw_1 represents the transaction processing flow corresponding to the second slave AXI device, w_0 represents the data transmission channel corresponding to the first AXI slave device, w_1 represents the data transmission channel corresponding to the second AXI slave device, b_0 represents the response return channel corresponding to the first AXI slave device, and b_1 represents the response return channel corresponding to the second AXI slave device. After task splitting, a0, a1, a2, and a3 are all split. The data is divided into two parts, each corresponding to only half of the data. In a dual-channel system, the first channel needs to process tasks a00, a10, a20, and a30, which correspond to data d00, d01; d10, d11; d20, d21; d30, d31, respectively. The second channel needs to process tasks a01, a11, a21, and a31, which correspond to data d02, d03; d12, d13; d22, d23; d32, d33, respectively. By processing through dual channels, the amount of general data transmission is reduced. As can be seen from the figure, a single-channel system requires 24 clock cycles, while a dual-channel system only requires 18 clock cycles, thus improving the efficiency of transaction processing.
[0115] It's understandable that if the AXI master sends four write transactions with a burst length of 4 to the slave, assuming the slave's outstanding capability is 2 and the write transaction latency is fixed at 4 cycles, a single-channel system would need 24 cycles to process these transactions. A dual-channel system would split these four write transactions into eight write transactions with a burst length of 2, processing them on two separate channels. Under the same conditions, the dual-channel system would only need 18 cycles to process these transactions. Furthermore, the slave's outstanding capability, transaction burst length, and slave latency would all be significantly greater than the values mentioned above. Multi-channel systems offer a more significant improvement in bandwidth and utilization compared to single-channel systems. For example, a single-channel system has a bandwidth of B, while a dual-channel system can achieve a theoretical bandwidth close to 2*B.
[0116] It is understood that the embodiments of this application can not only be used as a system-level bus interconnection unit, but also as a lightweight interaction interface between modules inside the chip, supporting multiple combinations of single master devices, multiple master devices and multiple slave devices, and have strong scenario adaptability and architecture reusability.
[0117] Figure 10 A schematic diagram of the chip structure provided in an embodiment of this application is shown. Figure 10As shown, the chip 2000 provided in this application embodiment may include the transaction processing device 2001 in the above embodiment.
[0118] In some embodiments of this application, the chip 2000 described above can be any of the following: SoC, FPGA, NPU, AI acceleration chip, and automotive electronics and autonomous driving chip, etc.
[0119] This application provides a chip that includes the transaction processing device described in the above embodiments. Since the first interface of the transaction processing device can be connected to an AXI master device, and the second interface can be connected to at least two AXI slave devices, when the first interface receives a transaction request requesting at least two AXI slave devices to execute a first transaction—that is, when the first transaction requested by the first interface is complex—the transaction processing device can split the transaction request into at least two sub-transaction requests through the first transaction processing unit, and send the at least two sub-transaction requests to at least two AXI slave devices through the second interface. This allows at least two AXI slave devices to execute the sub-transactions in parallel, instead of only one AXI slave device executing the first transaction serially. This reduces the waiting time required to complete the first transaction. Furthermore, since the transaction processing unit can generate a transaction response (i.e., at least a partial response corresponding to the first transaction) based on at least one sub-transaction response from at least two AXI slave devices when the second interface receives such a response, and then send this response to the AXI master device via the first interface instead of directly sending the at least one sub-transaction response to the AXI master device, it avoids the AXI master device being unable to parse the at least partial response corresponding to the first transaction due to the sending order of at least one sub-transaction response not conforming to the transaction receiving order corresponding to the same transaction identifier. This ensures the reliability of transaction processing. Thus, the efficiency of transaction processing can be improved while ensuring its reliability.
[0120] The transaction processing method provided in this application can be executed by a transaction processing device. This application uses the method of a transaction processing device executing transaction processing as an example to illustrate the transaction processing device provided in this application.
[0121] The transaction processing method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0122] like Figure 11 The diagram illustrates a flowchart of a transaction processing method provided in an embodiment of this application. This control method is applied to the transaction processing apparatus described in the above embodiment. Figure 11As shown, the transaction processing method provided in this application embodiment may include the following steps 201 to 204.
[0123] Step 201: The transaction processing device receives a transaction request from the AXI master device through its first interface.
[0124] This transaction request is used to request at least two AXI slave devices to execute the first transaction.
[0125] In some embodiments of this application, the first transaction described above may include at least one of the following: a read transaction and a write transaction.
[0126] In some embodiments of this application, the above-mentioned read transaction indicates that the AXI master device needs to retrieve data from the AXI slave device.
[0127] In some embodiments of this application, the above-mentioned write transaction indicates that the AXI master device needs to write data to the AXI slave device.
[0128] In some embodiments of this application, when the AXI master device needs to configure and control peripherals, perform memory access DMA transfers, and process high-speed data streams, the AXI master device can send a transaction request to the cache device, so that the first interface can receive the transaction request.
[0129] Step 202: The transaction processing device splits the transaction request into at least two sub-transaction requests through the first transaction processing unit of the transaction processing device.
[0130] In this embodiment of the application, each of the above-mentioned at least two sub-transaction requests is used to request an AXI slave device to execute a sub-transaction.
[0131] In some embodiments of this application, the process of splitting the transaction request into at least two sub-transaction requests in step 202 can be implemented through steps 202a and 202b.
[0132] Step 202a: The transaction processing device determines the transaction splitting information based on the transaction request through the transaction analysis unit of the first transaction processing unit.
[0133] In some embodiments of this application, the transaction splitting information is used to indicate the splitting method for splitting the transaction request.
[0134] In some embodiments of this application, the transaction processing device can parse the transaction request according to the transaction analysis unit to obtain the address and length of the transaction, and then split the transaction according to the address and length to obtain transaction splitting information for splitting the transaction.
[0135] For example, if the address of the first transaction is 1 and the length of the first transaction is 9, the transaction analysis unit can obtain transaction splitting information: 1, 2, 3, 4; 5, 6, 7, 8 and 9. This transaction splitting information indicates that the first transaction is split into three sub-transaction requests. The addresses corresponding to the first sub-transaction request are 1, 2, 3, 4; the addresses corresponding to the second sub-transaction request are 5, 6, 7, 8; and the address corresponding to the third sub-transaction request is 9.
[0136] Step 202b: The transaction processing device splits the transaction request into at least two sub-transaction requests according to the transaction splitting information through the transaction splitting unit of the first transaction processing unit.
[0137] In some embodiments of this application, the transaction splitting unit in the transaction processing device can split the first transaction by address interleaving to obtain transaction splitting information.
[0138] In some embodiments of this application, the transaction splitting unit described above can split transactions according to transaction splitting information and obtain splitting results.
[0139] Thus, by parsing the transaction request through the transaction analysis unit and splitting the transaction through the transaction splitting unit, the combination of the two units allows for the analysis of the transaction address and length, resulting in a more accurate splitting result.
[0140] In some embodiments of this application, step 202a described above can be implemented by step 202c.
[0141] Step 202c: The transaction processing device determines the transaction splitting information based on the transaction request and the interleaving configuration parameters through the transaction analysis unit.
[0142] In some embodiments of this application, the transaction analysis unit in the transaction processing device can obtain interleaving configuration parameters based on the transaction linked list storage unit, and the interleaving configuration parameters may include interleaving granularity.
[0143] In some embodiments of this application, the transaction analysis unit in the transaction processing apparatus can read the interleaving granularity of the transaction split from the transaction linked list storage unit of the transaction processing apparatus.
[0144] In some embodiments of this application, the above-described interleaving granularity indicates the target size for splitting transaction requests.
[0145] In some embodiments of this application, the transaction analysis unit in the transaction processing apparatus can obtain the transaction splitting information based on the address of the first transaction request, the length of the first transaction request, and the interleaving granularity.
[0146] For example, if the address of the first transaction is 1, the length of the first transaction is 9, and the interleaving granularity is 4, then the transaction analysis unit can obtain the address information corresponding to the three sub-transaction requests after splitting, which are denoted as transaction splitting information: 1, 2, 3; 4, 5, 6, 7 and 8, 9.
[0147] In this way, by combining relevant information about the transaction, the transaction was decomposed, and a more accurate decomposition result was obtained.
[0148] Step 203: The transaction processing device sends corresponding sub-transaction requests to at least two AXI slave devices through the second interface, and receives at least one sub-transaction response from at least two AXI slave devices.
[0149] In this embodiment of the application, each of the at least one sub-transaction response is a response obtained by executing a sub-transaction, and the transaction response is at least a partial response corresponding to the first transaction.
[0150] Step 204: The transaction processing device generates a target transaction response based on at least one sub-transaction response through its second transaction processing unit, and sends the target transaction response to the aforementioned AXI master device through the first interface.
[0151] In some embodiments of this application, the target transaction response is at least a partial response corresponding to the first transaction.
[0152] In some embodiments of this application, the step 204 above, which generates a transaction response based on at least one sub-transaction response, can be specifically implemented through the following step 204a.
[0153] Step 204a: The transaction processing device, through the transaction response splicing unit of the second transaction processing unit, splices at least one sub-transaction response into a target transaction response according to the transaction splitting information, and sends the target transaction response to the first interface.
[0154] In some embodiments of this application, the second transaction processing unit can obtain the correspondence between the sub-transaction responses and the transaction based on the mapping relationship in the transaction splitting information, and concatenate the sub-transaction responses according to the correspondence to obtain the transaction response.
[0155] In some embodiments of this application, the above-mentioned transaction splitting information is used to indicate the splitting method of the transaction request.
[0156] In some examples, for instance, if the address of the original transaction request is a:0,1,2,3,4,5,6,7,8,9, and it is split into three sub-transaction requests: a1:0,1,2,3; a2:4,5,6,7; a3:8,9, then the mapping relationship between the original transaction request and the sub-transaction requests is: a=a1,a2,a3; and the corresponding sub-transaction responses for the three sub-transaction requests are b1,b2,b3, then the above food splicing unit can obtain the transaction response as b=b1,b2,b3 according to the mapping relationship.
[0157] Thus, since the transaction processing device can use the transaction response splicing unit to splice at least one sub-transaction response into the transaction response according to the transaction splitting information, that is, according to the splitting method of the split transaction request, it can ensure that the order in which the sub-transaction responses are sent back to the master device is correct. This can avoid the situation where the AXI master device cannot parse at least part of the response corresponding to the first transaction because the sending order of at least one sub-transaction response does not conform to the transaction receiving order corresponding to the same transaction identifier. This can ensure the reliability of transaction processing.
[0158] In some embodiments of this application, after step 202b above, the transaction processing method provided in this application further includes the following step 301.
[0159] Step 301: The transaction processing device adds the device identifier of the AXI slave device corresponding to each sub-transaction request to each sub-transaction request.
[0160] Optionally, the transaction processing unit may assign a static, globally unique number to each AXI slave device.
[0161] In the embodiments of this application, the transaction processing device can analyze the sub-transaction requests through the first transaction processing unit to obtain the AXI slave device number corresponding to each sub-transaction request.
[0162] Optionally, the transaction processing device may extend the transaction identifier of the aforementioned sub-transaction request by a high-order bit, and the extension bit number is guaranteed to be able to store the AXI slave device number.
[0163] In some embodiments of this application, the transaction processing device may extend the transaction number of the sub-transaction request by the high-order bits to embed the AXI slave device number corresponding to the sub-transaction request into the transaction number.
[0164] Thus, by embedding the device identifier of the AXI slave device in the sub-transaction request, the sub-transaction requests can be processed in a certain order when requesting AXI slave device resources, which can avoid deadlock when accessing AXI slave devices in a cross manner.
[0165] In some embodiments of this application, before sending the transaction response to the first interface in step 204a, the transaction processing method provided in this application further includes steps 401 and 402, and step 204a can be specifically implemented by step 204a1.
[0166] Step 401: The transaction processing device sends an arbitration request to the transaction response sorting unit of the second transaction processing unit through the transaction response splicing unit.
[0167] In the embodiments of this application, the arbitration request is used to request authorization for the channel of the first transaction.
[0168] In embodiments of this application, the second transaction processing unit in the transaction processing apparatus can send at least one transaction response to the AXI host through the first interface.
[0169] Optionally, before sending a transaction response to the AXI host through the first interface, the transaction processing device may send an arbitration request to the second transaction processing unit to determine the sending order of the at least one transaction response.
[0170] Step 402: The transaction processing device receives an authorization instruction from the transaction response sorting unit through the transaction response splicing unit.
[0171] In the embodiments of this application, the above-mentioned authorization instruction is used to indicate whether to authorize the channel of the first transaction.
[0172] In the embodiments of this application, after receiving the arbitration request, the second transaction processing unit can request arbitration based on the channel priority of at least one transaction response processed by the transaction processing device, generate an authorization instruction for the transaction response, and send the authorization instruction to the transaction response splicing unit.
[0173] Step 204a1: When the authorization instruction is used to authorize the channel for the first transaction, the transaction processing device sends the target transaction response to the first interface through the transaction response splicing unit.
[0174] In some embodiments of this application, the transaction processing device may determine the transaction response that can be sent based on the above-described authorization instructions, and send the transaction response to the AXI host through the above-described first interface.
[0175] Thus, by using an improved arbitration mechanism to request arbitration for multi-transaction responses, the efficiency of data interaction is improved while ensuring that the AXI master device return mode is met.
[0176] It should be noted that existing technologies have shortcomings in maintaining order: traditional polling arbitrators scramble relative priorities, violating AXI's order-keeping requirements; existing multi-channel polling arbitrator solutions use traditional round-robin strategies, which, after authorizing a channel, set its priority to the bottom and directly adjust the relative priorities of other unauthorized channels (e.g., after authorizing b on channel 4 abcd, it becomes cdab), causing disordered response order for transactions with the same ID, failing to meet AXI's strict order-keeping requirements for transactions with the same ID, and easily leading to data errors; existing AXI bus reordering buffer solutions do not support flexible configuration of response return modes, lack out-of-order / order switching for read / write responses, and lack designs for interleaved / non-interleaved read data returns, making them unsuitable for customized needs in different business scenarios.
[0177] To address the aforementioned issues, the transaction processing device can support out-of-order / ordered returns of write responses / read data, as well as interleaved / non-interleaved returns of read data, through configurable response return modes, flexibly adapting to the order preservation and latency requirements of different business scenarios. This solution adopts an improved polling arbitrator, which, after authorizing a channel, only sets the priority of that channel to the bottom, keeping the relative priority of other unauthorized channels unchanged, thus achieving strict order preservation and avoiding disordered response order of transactions with the same ID.
[0178] In some embodiments of this application, the authorization instruction is used to instruct the channel of the first transaction to be authorized when the transaction processing apparatus meets a first condition.
[0179] In some embodiments of this application, the transaction processing apparatus can determine the return mode of the AXI master device, which can indicate whether the AXI master device allows out-of-order returns and whether it allows interleaved returns.
[0180] In some embodiments of this application, the above-mentioned disallowing out-of-order returns means that the AXI master device does not allow the return order of the above transaction responses to be inconsistent with the order in which AXI sent the transaction requests.
[0181] In some embodiments of this application, the above-mentioned allowance of out-of-order returns means that the AXI master device allows the return order of the above transaction responses to be inconsistent with the order in which AXI sent the transaction requests.
[0182] In some embodiments of this application, the above-mentioned allow interleaving return means that the AXI master device allows the return of transaction responses of other transactions while returning read data of one transaction to the AXI master device.
[0183] In some embodiments of this application, the above-mentioned disallowed interleaving return means that the AXI master device is not allowed to return transaction responses of other transactions while returning read data of one transaction to the AXI master device.
[0184] In some embodiments of this application, the first condition includes at least one of the following: the channel priority of the first transaction is the highest priority among the channel priorities of at least one transaction; the channel of the first transaction is the channel with the highest priority among at least one first channel; the transaction response corresponding to the first transaction has been sent to the AXI master device through the channel of the first transaction; the transaction response corresponding to the transaction has not been sent to the AXI master device through at least one second channel; wherein, the at least one transaction is a transaction being processed by the transaction processing device, and the at least one transaction includes the first transaction; the at least one first channel is a channel with the same transaction identifier among the channels of at least one transaction; the at least one second channel is a channel other than the at least one first channel among the channels of at least one transaction.
[0185] In some examples, where the AXI master device does not allow out-of-order returns, if the first transaction is a write transaction and the channel priority of the first transaction is the highest priority among the channel priorities of at least one transaction, the transaction processing device can send an authorization instruction to the transaction response splicing unit through the transaction response sorting unit.
[0186] For example, if the AXI master device does not allow out-of-order returns, and the transaction processing device obtains at least one target transaction response, and the channel priority of the target transaction response corresponding to the first write transaction in the at least one target transaction response is the highest priority, the transaction processing device can send an authorization instruction for the channel corresponding to the first write transaction to the transaction response splicing unit through the transaction response sorting unit, so as to send the target transaction response corresponding to the first write transaction back to the AXI master device.
[0187] In some examples, where the AXI master device allows out-of-order returns, if the first transaction is a write transaction and the channel of the first transaction is the highest priority channel among at least one first channel, and the at least one first channel is a channel with the same transaction identifier among the channels of at least one transaction, then the transaction processing device can send an authorization instruction to the transaction response splicing unit through the transaction response sorting unit.
[0188] For example, if the AXI master device allows out-of-order returns, and the transaction processing device obtains at least one target transaction response, and among the at least one target transaction response, the second write transaction has the highest channel priority among all transactions with the same transaction identifier, the transaction processing device can send an authorization instruction for the channel corresponding to the first write transaction to the transaction response splicing unit through the transaction response sorting unit, so as to send the target transaction response corresponding to the first write transaction back to the AXI master device.
[0189] In some examples, where the AXI master device does not allow out-of-order returns and does not allow interleaved returns, if the first transaction is a read transaction; the channel priority of the first transaction is the highest priority among the channel priorities of at least one transaction; and the transaction response corresponding to the first transaction has been sent to the AXI master device through the channel of the first transaction or no partial transaction response has been returned through any channel, then the transaction processing device can send an authorization instruction to the transaction response splicing unit through the transaction response sorting unit.
[0190] For example, if the AXI master device does not allow out-of-order returns and does not allow interleaved returns, and if the transaction processing device obtains at least one target transaction response, and the channel priority of the target transaction response corresponding to the first read transaction in the at least one target transaction response is the highest priority, and has returned part of the transaction response to the AXI master device through the channel corresponding to the first read transaction or has not returned any transaction response through any channels, then the transaction processing device can send an authorization instruction for the channel corresponding to the first read transaction to the transaction response splicing unit through the transaction response sorting unit, so as to send the target transaction response corresponding to the first read transaction back to the AXI master device.
[0191] In some examples, where the AXI master device allows out-of-order returns and does not allow interleaved returns, if the first transaction is a read transaction; the channel of the first transaction is the highest priority channel among at least one first channel; the transaction identifiers corresponding to the at least one first channel are the same; the response corresponding to the first transaction has been sent to the AXI master device through the channel of the first transaction, and the response corresponding to the transaction has not been sent to the AXI master device through at least one second channel; and the transaction identifiers corresponding to the channel of the first transaction are different from the transaction identifiers corresponding to the at least one second channel, then the transaction processing device can send an authorization instruction to the transaction response splicing unit through the transaction response sorting unit.
[0192] For example, if the AXI master device allows out-of-order returns and does not allow interleaved returns, and if the transaction processing device obtains at least one target transaction response, and among the at least one target transaction response, the second read transaction has the highest channel priority among all transactions with the same transaction identifier, and has returned part of the transaction response to the AXI master device through the channel corresponding to the first read transaction, but has not returned the transaction response to the AXI master device through the channel corresponding to the transaction with a different transaction identifier from the second read transaction, then the transaction processing device can send an authorization instruction for the channel corresponding to the second read transaction to the transaction response splicing unit through the transaction response sorting unit, so as to send the target transaction response corresponding to the second read transaction back to the AXI master device.
[0193] In some examples, where the AXI master device allows out-of-order returns and interleaved returns, if the first transaction is a read transaction; the channel of the first transaction is the highest priority channel among at least one first channel; the transaction identifiers corresponding to the at least one first channel are the same; and the response corresponding to the first transaction has been sent to the AXI master device through the channel of the first transaction, then the transaction processing device can send an authorization instruction to the transaction response splicing unit through the transaction response sorting unit.
[0194] For example, if the AXI master device allows out-of-order returns and interleaved returns, and if the transaction processing device obtains at least one target transaction response, and among the at least one target transaction response, the third read transaction has the highest channel priority among all transactions with the same transaction identifier, and has already returned part of the transaction response to the AXI master device through the channel corresponding to the first read transaction, then the transaction processing device can send an authorization instruction for the channel corresponding to the second read transaction to the transaction response splicing unit through the transaction response sorting unit, so as to send the target transaction response corresponding to the second read transaction back to the AXI master device.
[0195] Thus, by using the improved polling arbiter, i.e. the transaction response sorting unit, the order in which transactions are sent to the AXI master device can be obtained based on information such as transaction priority, thereby achieving transaction order preservation and preventing system anomalies caused by disordered transaction order.
[0196] In some embodiments of this application, after step 203 above, the transaction processing method provided in this application further includes the following step 501.
[0197] Step 501: When the authorization instruction is used to authorize the channel of the first transaction, the transaction processing device sets the channel priority of the first transaction to the lowest priority through the transaction response sorting unit, and keeps the relative priority of at least one second transaction other than the first transaction unchanged.
[0198] In some embodiments of this application, when the authorization instruction is used to instruct the channel of the transaction response corresponding to the first transaction to be authorized, the transaction processing device can set the priority of the transaction response channel corresponding to the first transaction to the lowest priority through the transaction response sorting unit.
[0199] For example, in a transaction processing device, there are three transactions: A, B, and C, with priority order: A>B>C. When transaction B receives an authorization instruction, and the authorization instruction is used to indicate authorization, the transaction response sorting unit can set the priority of transaction B to the lowest priority. In this case, the priority order is A>C>B.
[0200] In the transaction processing method provided in this application embodiment, the transaction processing device receives a transaction request from the AXI master device through a first interface, which requests at least two AXI slave devices to execute a first transaction. The transaction request is split into at least two sub-transaction requests through a first transaction processing unit. The corresponding sub-transaction requests are sent to the at least two AXI slave devices through a second interface, and at least one sub-transaction response is received from the at least two AXI slave devices. The transaction response is generated based on the at least one sub-transaction response through a second transaction processing unit, and the transaction response is sent to the AXI master device through the first interface.
[0201] Since the first interface of the transaction processing device can be connected to the AXI master device, and the second interface of the transaction processing device can be connected to at least two AXI slave devices, when the first interface receives a transaction request requesting at least two AXI slave devices to execute a first transaction—that is, when the first transaction requested by the first interface is relatively complex—the transaction processing device can split the transaction request into at least two sub-transaction requests through the first transaction processing unit, and send the at least two sub-transaction requests to the at least two AXI slave devices through the second interface. This allows the at least two AXI slave devices to execute the sub-transactions in parallel, instead of the first transaction being executed serially by only one AXI slave device. Therefore, it can reduce... The system reduces the waiting time required to complete the first transaction. Furthermore, since the transaction processing device can generate a transaction response (i.e., at least a partial response corresponding to the first transaction) based on at least one sub-transaction response from at least two AXI slave devices when the second interface receives such a response, and then send this transaction response to the AXI master device via the first interface instead of directly sending at least one sub-transaction response to the AXI master device, it avoids the AXI master device being unable to parse the at least partial response corresponding to the first transaction due to the sending order of at least one sub-transaction response not conforming to the transaction receiving order corresponding to the same transaction identifier. This ensures the reliability of transaction processing. Thus, the efficiency of transaction processing can be improved while ensuring its reliability.
[0202] Figure 12 A schematic diagram of the transaction processing apparatus provided in an embodiment of this application is shown. Figure 12 As shown in the embodiments of this application, the AXI multi-channel reordering transaction processing device may include: an AXI host interface unit, a read / write transaction command analysis unit, a read / write transaction command splitting unit, a read / write transaction main linked list, a read / write transaction response splicing unit, a read / write transaction response sorting unit, an AXI slave interface unit, and a configuration control unit.
[0203] In some embodiments of this application, the above-mentioned configuration control unit is used to manage the address interleaving configuration register (interleaving granularity, space size / starting address) and the response return mode configuration register (out-of-order / sequential, read data interleaving enable).
[0204] In some embodiments of this application, the above-mentioned read / write transaction host interface is used to receive read / write transaction requests from the AXI host and return the concatenated response / data to the AXI host.
[0205] In some embodiments of this application, the above-mentioned read / write transaction slave interface is used to send split read / write transaction requests to the AXI slave and receive responses / data returned by the slave.
[0206] In some embodiments of this application, the aforementioned read / write transaction main linked list is used to store core information such as the mapping relationship between the original command and the split sub-commands, and the response collection status. It is the core data structure for transaction management. The main linked list is implemented by a series of register groups, and the number of register groups (the depth of the main linked list) determines the outstanding capabilities of the IP, which can be configured by parameters.
[0207] In some embodiments of this application, the read / write transaction command analysis unit is used to analyze commands from the host based on address interleaving related register configuration information and channel priority from the read / write transaction response sorting unit, and store the relevant information into the register group corresponding to the main linked list (stored into the "free" register group with the highest relative priority at present). This information will instruct the read / write transaction command splitting unit on how to generate the split commands and instruct the read / write transaction response splicing unit on how to splice the responses of the split commands into the responses of the corresponding original commands.
[0208] In some embodiments of this application, the aforementioned read / write transaction command splitting unit is used to split the original command according to predetermined address interleaving rules based on relevant information in the main linked list, and to remap the command addresses. The "predetermined address interleaving rules" include the address interleaving space size, the start / end addresses of the address interleaving space, the number of address interleaving slaves, and the address interleaving granularity (all configurable via parameters or registers). The specific mapping relationship before and after address interleaving is as follows: Figure 3 As shown.
[0209] In some embodiments of this application, the write transaction response splicing unit is configured to splice write responses returned from different slave devices based on relevant information in the main linked list, and generate a write response corresponding to the original write command after receiving responses to all split write commands. After generating the write response to the original write command, an arbitration request is initiated to the write transaction response sorting unit based on whether out-of-order return of write responses is allowed.
[0210] In some embodiments of this application, the specific rules for initiating arbitration requests under different configurations are as follows: when the AXI master device does not allow out-of-order delivery, the condition for generating an arbitration request is that the current channel has the highest priority; when the AXI master device allows out-of-order delivery, the condition for generating an arbitration request is that the current channel has the highest relative priority among channels with the same ID.
[0211] In some embodiments of this application, the read transaction response splicing unit is used to splice read data returned from different slaves according to relevant information in the main linked list, and to initiate an arbitration request to the read transaction response sorting unit after receiving all or part of the read data, based on the current configuration information of whether out-of-order return of read data is allowed and whether read data interleaving is allowed.
[0212] In some embodiments of this application, the specific rules for initiating arbitration requests under different configurations are as follows: When the AXI master device does not allow out-of-order or interleaving, the conditions for generating an arbitration request are: the current channel has the highest priority, the current channel has returned some read data, or none of the channels have returned read data; When the AXI master device allows out-of-order and does not allow interleaving, the conditions for generating an arbitration request are: the current channel has the highest relative priority among channels with the same ID, the current channel has returned all read data, and channels with different IDs are not in a state where only a portion of the read data has been returned; When the AXI master device allows out-of-order and interleaving, the conditions for generating an arbitration request are: the current channel has the highest relative priority among channels with the same ID, and the current channel has returned some read data.
[0213] In some embodiments of this application, the read / write transaction response sorting unit, i.e. the improved polling arbitrator, is used to authorize the arbitration request based on whether the current channel has initiated an arbitration request, the priority of different current channels, and whether there is back pressure on the current read / write transaction host interface. The authorized write response / read data will be returned to the host through the host interface, and the priority of different channels will be adjusted accordingly based on the authorization status.
[0214] In some embodiments of this application, after the write response is authorized, the priority of the corresponding channel will be reduced to the lowest level, while the relative priorities of other channels will not change.
[0215] In some embodiments of this application, after the last read data of a read command is authorized, the priority of the corresponding channel will be reduced to the lowest level, while the relative priorities of other channels will not change.
[0216] like Figure 13 The diagram illustrates a flowchart of a transaction processing method provided in an embodiment of this application. This control method is applied to the transaction processing apparatus described in the above embodiment. Figure 13As shown, the transaction processing method provided in this application embodiment may include the following steps S1 to S4.
[0217] Step S1: The transaction processing device performs the transaction reception and analysis process.
[0218] In some embodiments of this application, the transaction processing device can receive read / write transaction requests sent by the AXI host through the host interface.
[0219] In some embodiments of this application, the transaction processing device can read the address interleaving rules of the configuration control unit and the channel priority of the response sorting unit through the command analysis unit, and parse information such as transaction address, length, and ID.
[0220] In some embodiments of this application, the transaction processing device can store information such as the original command splitting rules, response splicing logic, and channel allocation into the corresponding depth register of the main linked list.
[0221] Step S2: The transaction processing device performs command splitting and sending procedures.
[0222] In some embodiments of this application, the transaction processing device can use a command splitting unit to split the original command into multiple sub-commands according to the address interleaving granularity based on the main linked list information.
[0223] In some embodiments of this application, the transaction processing device can expand the high-order bits of each sub-command (embedding the slave number) to avoid the risk of deadlock when the same ID transaction is sent to multiple slaves.
[0224] In some embodiments of this application, the transaction processing device can complete the sub-command address remapping (mapping to the actual address space of the target slave) and send it to the corresponding AXI slave through the slave interface.
[0225] It should be noted that the existing technology has concurrency and deadlock defects: there is no ID extension mechanism, and transactions with the same ID cannot be performed concurrently on multiple slave machines.
[0226] In this scheme, when sending a transaction to a slave device through the ID high-bit extension mechanism, the slave device number is embedded in the ID high-bit, enabling concurrent sending of transactions with the same ID to multiple slave devices and avoiding the deadlock rule of the AXI protocol.
[0227] Step S3: The transaction processing device performs the response collection and assembly process.
[0228] In some embodiments of this application, the transaction processing device can receive the response / data of each AXI slave returning a sub-command through the slave interface and send it to the response splicing unit.
[0229] In some embodiments of the present application, the transaction processing device can associate sub-commands with original commands via the command concatenation unit based on main linked list information, and collect responses / data of all or part of the sub-commands.
[0230] In some embodiments of the present application, the transaction processing device can initiate an arbitration request to the sorting unit according to the response return mode configuration. For write responses, the request needs to be initiated after all sub-command responses are collected; for read data, requests can be initiated according to preset rules based on the combination of "out-of-order / in-order + interleaving enable" (for example, when interleaving is allowed, the request can be initiated after collecting partial data, which can improve bus utilization).
[0231] Step S4: The transaction processing device performs a response sorting and return process.
[0232] In some embodiments of the present application, the transaction processing device can receive arbitration requests from each channel through an improved polling arbiter (sorting unit), and authorize response return according to the current priority.
[0233] In some embodiments of the present application, after the current channel is authorized, the transaction processing device only sets the priority of the current channel to the lowest, while keeping the relative priorities of other unauthorized channels unchanged, so as to ensure that responses of transactions with the same ID are strictly ordered.
[0234] In some embodiments of the present application, the authorized responses / data are returned to the AXI master through the host interface, and the status of the corresponding transaction in the main linked list is updated at the same time.
[0235] In some embodiments of the present application, compared with the traditional polling arbiter, the improved polling arbiter (i.e., the aforementioned transaction sorting unit) can avoid order disorder of transactions with the same ID.
[0236] Illustratively, assuming that the outstanding capability of the IP is configured as 4, the depth of the main linked list is 4, and the arbiter has 4 request channels, denoted as channel A, B, C, D. For the traditional polling arbiter, the priorities of the 4 request channels are represented by a 4-bit one-hot code: 1 indicates that the current channel has the highest priority, and the priority decreases sequentially to the left. For example, the initial state "0001" indicates that channel A has the highest priority, followed by channels B, C, D in sequence (D<C<B<A). For the improved polling arbiter, the priorities of the 4 request channels are represented by 4 groups of 2-bit binary codes: 0 indicates that the current channel has the highest priority, and the priority decreases sequentially as the number increases. For example, in the initial state, the channel priorities of A, B, C, D are "{0,1,2,3}", which indicates that channel A has the highest priority, followed by channels B, C, D in sequence (D<C<B<A).
[0237] Consider that channels A, B, C, and D are processing transactions with IDs 00, 01, 10, and 00 respectively. The arbitrator is in its initial state, and the host allows out-of-order returns (the AXI protocol requires that only transactions with different IDs can be returned out of order, while transactions with the same ID must be returned in order). Suppose that the slave first returns a response with ID 10, which is the transaction from channel C, to the IP. At this time, both the traditional and improved polling arbitrators will only receive the arbitration request from channel C. Therefore, the request from channel C is authorized, and the IP then returns a response with ID 10 to the host.
[0238] The difference lies in the priority order. Traditional polling arbiters, after authorization, change the priority to "1000," lowering channel C's priority to the lowest possible level. However, the "decreasing from left to right" constraint must still be maintained, adjusting the relative priority of channels to: D>A>B>C. This means channel D has the highest priority, with channels A, B, and C decreasing in that order. Clearly, the original relative priority of channels A, B, and D has been disrupted, changing from A>B>D to D>A>B. Since channels A and D have the same transaction ID, this disruption risks returning a D-channel transaction response to the host first. The improved polling arbiter, after authorization, changes the transaction priorities of channels A, B, C, and D to "{0,1,3,2}," meaning the priority order is A>B>D>C. This lowers channel C's priority to the lowest possible level, while the relative priorities of the other channels remain unchanged at A>B>D, thus mitigating the risks inherent in traditional polling arbiters.
[0239] In some embodiments of this application, the improved polling arbitrator is used in situations where, after a response with a different ID is returned out of order (the lower priority channel is authorized first), the relative priority of other channels must remain unchanged; otherwise, it may cause the response corresponding to the command with the same ID to be out of order.
[0240] Existing technologies have shortcomings in resource control: Outstanding capabilities lack precise resource matching design.
[0241] Existing solutions do not correlate host-side outstanding capabilities with the depth of the main linked list of the reorder buffer, the number of FIFOs, and the number of arbitrator channels, which can easily lead to excessive or insufficient resource consumption, and hardware resource utilization and transmission efficiency cannot be balanced.
[0242] Thus, the embodiments provided in this application can improve bandwidth and utilization through multi-channel address interleaving, enabling parallel access to multiple slave devices through multiple channels and breaking through the single-channel bandwidth bottleneck. Simultaneously, address interleaving avoids slave access conflicts, improving bus resource utilization; ID high-bit extension avoids deadlock and improves concurrency efficiency. By embedding the slave number into the high-bit ID, transactions with the same ID can be sent concurrently to different slave devices, fully complying with the AXI protocol deadlock avoidance rules (avoiding circular dependencies), while significantly improving the efficiency of concurrent access to multiple slave devices and reducing transaction waiting latency; and an improved polling arbiter ensures strict order preservation. Traditional polling arbiters, after granting authorization, scramble the relative priorities of unauthorized channels, leading to disordered response order for transactions with the same ID. The improved arbiter only adjusts the priority of the currently authorized channel, keeping the relative priorities of other channels unchanged, strictly adhering to... The AXI protocol ensures the order of transactions with the same ID; it achieves high reusability and configurability. The number of channels and outstanding capabilities can be defined through parameters, which can quickly adapt to the bandwidth and concurrency requirements of different scenarios, improving code and architecture reusability. Address interleaving rules and response return modes can be dynamically configured through registers, flexibly adapting to different slave address mappings and business scenarios without modifying hardware code. Some embodiments provided in this application are applicable to a wide range of scenarios. The overall architecture has the characteristics of high bandwidth, high concurrency, low latency, and strict order preservation, and can be widely used in high-performance SoCs, AI accelerators, image processing, data centers, and other scenarios with extremely high bus performance requirements.
[0243] It should be noted that each of the above method embodiments, or various possible implementations of each method embodiment, can be executed individually or in combination of any two or more. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any restrictions on this.
[0244] Figure 14 This is a schematic diagram of the structure of a transaction processing apparatus 1400 provided in an embodiment of this application. Figure 14As shown, the transaction processing device 1400 includes: a receiving module 1401, a processing module 1402, and a sending module 1403; the receiving module 1401 is used to receive a transaction request from an AXI master device through a first interface of the transaction processing device, the transaction request being used to request at least two AXI slave devices to execute a first transaction; the processing module 1402 is used to split the transaction request received by the receiving module into at least two sub-transaction requests through a first transaction processing unit of the transaction processing device, each sub-transaction request being used to request one AXI slave device to execute one sub-transaction; the sending module 1403... 3. The receiving module 1401 is used to send corresponding sub-transaction requests to the at least two AXI slave devices respectively through the second interface of the transaction processing device; the receiving module 1401 is used to receive at least one sub-transaction response from the at least two AXI slave devices, each sub-transaction response being a response obtained by executing a sub-transaction; the sending module 1403 is used to generate a target transaction response based on the at least one sub-transaction response through the second transaction processing unit of the transaction processing device, and send the transaction response to the AXI master device through the first interface, the transaction response being at least a partial response corresponding to the first transaction.
[0245] In the embodiments proposed in this application, since the first interface of the transaction processing device can be connected to the AXI master device and the second interface of the transaction processing device can be connected to at least two AXI slave devices, when the first interface receives a transaction request for at least two AXI slave devices to execute a first transaction, i.e., when the first transaction requested by the first interface is relatively complex, the transaction processing device can split the transaction request into at least two sub-transaction requests through the first transaction processing unit, and send the at least two sub-transaction requests to the at least two AXI slave devices through the second interface. This allows the at least two AXI slave devices to execute the sub-transactions in parallel, instead of the first transaction being executed serially by only one AXI slave device. This reduces the waiting time required to complete the first transaction. Furthermore, since the transaction processing unit can generate a transaction response (i.e., at least a partial response corresponding to the first transaction) based on at least one sub-transaction response from at least two AXI slave devices when the second interface receives such a response, and then send this response to the AXI master device via the first interface instead of directly sending the at least one sub-transaction response to the AXI master device, it avoids the AXI master device being unable to parse the at least partial response corresponding to the first transaction due to the sending order of at least one sub-transaction response not conforming to the transaction receiving order corresponding to the same transaction identifier. This ensures the reliability of transaction processing. Thus, the efficiency of transaction processing can be improved while ensuring its reliability.
[0246] In some embodiments, the processing module 1402 is specifically used to determine transaction splitting information based on the transaction request through the transaction analysis unit of the first transaction processing unit, wherein the transaction splitting information is used to indicate the splitting method of splitting the transaction request; and to split the transaction request into at least two sub-transaction requests based on the transaction splitting information through the transaction splitting unit of the first transaction processing unit.
[0247] In some other embodiments, the processing module 1402 is specifically used to determine the transaction splitting information based on the transaction request and the interleaving configuration parameters.
[0248] In some other embodiments, the processing module 1402 is further configured to add the device identifier of the AXI slave device corresponding to each sub-transaction request to each sub-transaction request after splitting the transaction request into at least two sub-transaction requests according to the transaction splitting information.
[0249] In some other embodiments, the processing module 1402 of the above-mentioned device is specifically used to concatenate the at least one sub-transaction response into the target transaction response according to the transaction splitting information through the transaction response splicing unit of the second transaction processing unit; the sending module 1403 is also used to send the target transaction response spliced by the processing module to the first interface, wherein the transaction splitting information is used to indicate the splitting method of splitting the transaction request.
[0250] In some other embodiments, the sending module 1403 of the above-described device is further configured to: before sending the target transaction response to the first interface, send an arbitration request to the transaction response sorting unit of the second transaction processing unit through the transaction response splicing unit, the arbitration request being used to request authorization of the channel of the first transaction; the receiving module 1403 of the above-described device is further configured to: receive an authorization instruction from the transaction response sorting unit through the transaction response splicing unit, the authorization instruction being used to indicate whether to authorize the channel of the first transaction; specifically, the sending module 1403 is configured to send the target transaction response to the first interface through the transaction response splicing unit when the authorization instruction received by the receiving module is used to indicate authorization of the channel of the first transaction.
[0251] In some other embodiments, when a first condition is met, the authorization instruction is used to instruct authorization of the channel for the first transaction; wherein the first condition includes at least one of the following: the channel priority of the first transaction is the highest priority among the channel priorities of at least one transaction; the channel of the first transaction is the highest priority channel among at least one first channel; the transaction response corresponding to the first transaction has been sent to the AXI master device through the channel of the first transaction; the transaction response corresponding to the transaction has not been sent to the AXI master device through at least one second channel, wherein the at least one transaction is a transaction being processed by the transaction processing device, and the at least one transaction includes the first transaction; the at least one first channel is a channel with the same transaction identifier among the channels of the at least one transaction; and the at least one second channel is a channel other than the at least one first channel among the channels of the at least one transaction.
[0252] In some other embodiments, the processing module 1402 of the above-described apparatus is further configured to: when the authorization instruction is used to instruct the channel of the first transaction to be authorized, set the channel priority of the first transaction to the lowest priority through the transaction response sorting unit, and keep the relative priority of at least one second transaction other than the first transaction unchanged.
[0253] The transaction processing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0254] The transaction processing device in this application embodiment can be a device with an operating system. The operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system.
[0255] The transaction processing device provided in this application embodiment can achieve... Figure 11 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0256] Optionally, such as Figure 15 As shown, this application embodiment also provides an electronic device 1500, including a processor 1501 and a memory 1502. The memory 1502 stores a program or instructions that can run on the processor 1501. When the program or instructions are executed by the processor 1501, they implement the various steps of the above-described transaction processing method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0257] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.
[0258] Figure 16 To implement the hardware structure diagram of an electronic device according to an embodiment of this application, the electronic device includes the transaction processing device, AXI master device and AXI slave device as described in the above embodiment.
[0259] The electronic device 1600 includes, but is not limited to, components such as: radio frequency unit 1601, network module 1602, audio output unit 1603, input unit 1604, sensor 1605, display unit 1606, user input unit 1607, interface unit 1608, memory 1609, and processor 1610.
[0260] Those skilled in the art will understand that the electronic device 1600 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1610 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 16 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0261] The processor 1610 is configured to receive, via the first interface of the transaction processing device, a transaction request from an AXI master device requesting at least two AXI slave devices to execute a first transaction; to split the transaction request into at least two sub-transaction requests via the first transaction processing unit of the transaction processing device, each sub-transaction request requesting one AXI slave device to execute one sub-transaction; to send the corresponding sub-transaction requests to the at least two AXI slave devices via the second interface of the transaction processing device, and to receive at least one sub-transaction response from the at least two AXI slave devices, each sub-transaction response being a response obtained from executing one sub-transaction, and the transaction response being at least a partial response corresponding to the first transaction; and to generate a transaction response based on the at least one sub-transaction response via the second transaction processing unit of the transaction processing device, and to send the transaction response to the AXI master device via the first interface.
[0262] In the embodiments proposed in this application, since the first interface in the electronic device can be connected to an AXI master device, and the second interface in the electronic device can be connected to at least two AXI slave devices, when the first interface receives a transaction request for at least two AXI slave devices to execute a first transaction—that is, when the first transaction requested by the first interface is complex—the electronic device can split the transaction request into at least two sub-transaction requests through the first transaction processing unit, and send the at least two sub-transaction requests to at least two AXI slave devices through the second interface. This allows at least two AXI slave devices to execute the sub-transactions in parallel, rather than the first transaction being executed serially by only one AXI slave device. This reduces the waiting time required to complete the first transaction. Furthermore, since the electronic device can generate a transaction response (i.e., at least a partial response corresponding to the first transaction) based on at least one sub-transaction response from at least two AXI slave devices when the second interface receives such a response, and then send this transaction response to the AXI master device via the second transaction processing unit, instead of directly sending at least one sub-transaction response to the AXI master device, it avoids the AXI master device being unable to parse the at least partial response corresponding to the first transaction due to the sending order of at least one sub-transaction response not conforming to the transaction receiving order corresponding to the same transaction identifier. This ensures the reliability of transaction processing. Thus, the efficiency of transaction processing can be improved while ensuring its reliability.
[0263] Optionally, the processor 1610 is further configured to determine transaction splitting information based on the transaction request through the transaction analysis unit of the first transaction processing unit, wherein the transaction splitting information is used to indicate the splitting method of splitting the transaction request; and to split the transaction request into at least two sub-transaction requests based on the transaction splitting information through the transaction splitting unit of the first transaction processing unit.
[0264] Optionally, the processor 1610 is further configured to determine the transaction splitting information based on the transaction request, the interleaving configuration parameters, and the channel priority of the first transaction.
[0265] Optionally, the processor 1610 is further configured to, after splitting the transaction request into at least two sub-transaction requests according to the transaction splitting information, add the device identifier of the AXI slave device corresponding to each sub-transaction request to each sub-transaction request.
[0266] Optionally, the processor 1610 is further configured to, through the transaction response splicing unit of the second transaction processing unit, splice the at least one sub-transaction response into the transaction response according to the transaction splitting information, and send the transaction response to the first interface, wherein the transaction splitting information is used to indicate the splitting method of splitting the transaction request.
[0267] Optionally, the processor 1610 is further configured to send an arbitration request to the transaction response sorting unit of the second transaction processing unit through the transaction response splicing unit, the arbitration request being used to request authorization for the channel of the first transaction; and to receive an authorization instruction from the transaction response sorting unit through the transaction response splicing unit, the authorization instruction being used to indicate whether to authorize the channel of the first transaction.
[0268] Sending the transaction response to the first interface includes: when the authorization indication is used to indicate authorization for the channel of the first transaction, sending the transaction response to the first interface through the transaction response splicing unit.
[0269] Optionally, the processor 1610 is further configured to, when a first condition is met, instruct the authorization instruction to authorize the channel of the first transaction; wherein the first condition includes at least one of the following: the channel priority of the first transaction is the highest priority; the channel of the first transaction is the highest priority channel among at least one first channel, and the transaction identifiers corresponding to the at least one first channel are the same; the response corresponding to the first transaction has been sent to the AXI master device through the channel of the first transaction; the response corresponding to the transaction has not been sent to the AXI master device through at least one second channel, and the transaction identifiers corresponding to the channel of the first transaction are different from the transaction identifiers corresponding to the at least one second channel.
[0270] Optionally, the processor 1610 is further configured to, when the authorization instruction is used to instruct the channel of the first transaction to be authorized, set the channel priority of the first transaction to the lowest priority through the transaction response sorting unit, and keep the relative priority of at least one second transaction other than the first transaction unchanged.
[0271] It should be understood that, in this embodiment, the input unit 1604 may include a graphics processing unit (GPU) 16041 and a microphone 16042. The GPU 16041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1606 may include a display panel 16061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1607 includes at least one of a touch panel 16071 and other input devices 16072. The touch panel 16071 is also called a touch screen. The touch panel 16071 may include a touch detection device and a touch controller. Other input devices 16072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0272] The memory 1609 can be used to store software programs and various data. The memory 1609 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1609 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1609 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0273] Processor 1610 may include one or more processing units; optionally, processor 1610 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 1610.
[0274] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described transaction processing method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0275] The processor mentioned above is the processor in the electronic device described in the above embodiments. The readable storage medium mentioned above includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0276] This application provides a computer program product that is stored in a storage medium and executed by at least one processor to implement the various processes of the transaction processing method embodiments described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0277] This application provides a chip including a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the transaction processing method embodiments described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0278] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0279] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0280] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A transaction processing apparatus, characterized in that, include: The first interface is connected to the Advanced Extensible Interface (AXI) master device and is used to receive a transaction request from the AXI master device, the transaction request being used to request at least two AXI slave devices to execute a first transaction. The first transaction processing unit, connected to the first interface, is used to split the transaction request into at least two sub-transaction requests, each sub-transaction request being used to request an AXI slave device to execute a sub-transaction; The second interface is connected to the first transaction processing unit and the at least two AXI slave devices, and is used to receive the at least two sub-transaction requests from the first transaction processing unit, send the corresponding sub-transaction requests to the at least two AXI slave devices respectively, and receive at least one sub-transaction response from the at least two AXI slave devices, wherein each sub-transaction response is a response obtained by executing a sub-transaction; The second transaction processing unit is connected to the second interface and the first interface, and is used to receive the at least one sub-transaction response from the second interface, and generate a target transaction response based on the at least one sub-transaction response, wherein the target transaction response is at least a part of the response corresponding to the first transaction; The first interface is further configured to receive the target transaction response from the second transaction processing unit and send the target transaction response to the AXI master device.
2. The apparatus according to claim 1, characterized in that, The first transaction processing unit includes: A transaction analysis unit, connected to the first interface, is used to determine transaction splitting information based on the transaction request, wherein the transaction splitting information is used to indicate the splitting method of the transaction request; A transaction splitting unit, connected to the transaction analysis unit, is used to split the transaction request into at least two sub-transaction requests based on the transaction splitting information.
3. The apparatus according to claim 2, characterized in that, The transaction processing apparatus further includes: A configuration control unit, connected to the transaction analysis unit, is used to store interleaving configuration parameters; The transaction analysis unit is configured to receive the interleaving configuration parameters from the configuration control unit and determine the transaction splitting information based on the transaction request and the interleaving configuration parameters.
4. The apparatus according to claim 2, characterized in that, The transaction processing apparatus further includes: A transaction linked list storage unit, connected to the transaction analysis unit, is used to receive the transaction splitting information from the transaction analysis unit and store the transaction splitting information.
5. The apparatus according to claim 1, characterized in that, The second transaction processing unit includes: A transaction response splicing unit, connected to the second interface and the first interface, is used to splice the at least one sub-transaction response into the target transaction response and send the target transaction response to the first interface.
6. The apparatus according to claim 5, characterized in that, The transaction processing apparatus further includes: A transaction linked list storage unit is connected to the transaction response splicing unit. The transaction linked list storage unit is used to store transaction splitting information, and the transaction splitting information is used to indicate the splitting method of the transaction request. The transaction response splicing unit is further configured to receive the transaction splitting information from the transaction linked list storage unit, and splice the at least one sub-transaction response into the target transaction response according to the transaction splitting information.
7. The apparatus according to claim 5, characterized in that, The second transaction processing unit further includes: A transaction response sorting unit is connected to the transaction response splicing unit; The transaction response splicing unit is further configured to send an arbitration request to the transaction response sorting unit, the arbitration request being used to request authorization for the channel of the first transaction; The transaction response sorting unit is used to send an authorization instruction to the transaction response sorting unit according to the arbitration request and the channel priority of at least one transaction. The authorization instruction is used to indicate whether to authorize the channel of the first transaction. The at least one transaction is the transaction being processed by the transaction processing device, and the at least one transaction includes the first transaction. The transaction response splicing unit is specifically used to splice the at least one sub-transaction response into the target transaction response, and send the target transaction response to the first interface when the authorization indication is used to indicate authorization for the channel of the first transaction.
8. A chip, characterized in that, Includes the transaction processing apparatus as described in any one of claims 1 to 7.
9. A transaction processing method, characterized in that, Applied to a transaction processing apparatus including any one of claims 1 to 7, the transaction processing method includes: Through the first interface of the transaction processing device, a transaction request is received from the AXI master device, the transaction request being used to request at least two AXI slave devices to execute a first transaction; The transaction request is split into at least two sub-transaction requests by the first transaction processing unit of the transaction processing device, and each sub-transaction request is used to request an AXI slave device to execute a sub-transaction; Through the second interface of the transaction processing device, corresponding sub-transaction requests are sent to the at least two AXI slave devices respectively, and at least one sub-transaction response is received from the at least two AXI slave devices, each sub-transaction response being the response obtained by executing a sub-transaction; The second transaction processing unit of the transaction processing device generates a target transaction response based on the at least one sub-transaction response, and sends the target transaction response to the AXI master device through the first interface. The target transaction response is at least a partial response corresponding to the first transaction.
10. The method according to claim 9, characterized in that, The step of splitting the transaction request into at least two sub-transaction requests includes: The transaction analysis unit of the first transaction processing unit determines transaction splitting information based on the transaction request, and the transaction splitting information is used to indicate the splitting method of the transaction request. The transaction request is split into at least two sub-transaction requests by the transaction splitting unit of the first transaction processing unit according to the transaction splitting information.
11. The method according to claim 10, characterized in that, The step of determining the transaction splitting information based on the transaction request includes: The transaction splitting information is determined based on the transaction request and the interleaving configuration parameters.
12. The method according to claim 10, characterized in that, After splitting the transaction request into at least two sub-transaction requests based on the transaction splitting information, the method further includes: Add the device identifier of the AXI slave device corresponding to each sub-transaction request to each sub-transaction request.
13. The method according to claim 9, characterized in that, The step of generating the target transaction response based on the at least one sub-transaction response includes: The transaction response splicing unit of the second transaction processing unit splices the at least one sub-transaction response into the target transaction response according to the transaction splitting information, and sends the target transaction response to the first interface. The transaction splitting information is used to indicate the splitting method of the transaction request.
14. The method according to claim 13, characterized in that, Before sending the target transaction response to the first interface, the method further includes: The arbitration request is sent to the transaction response sorting unit of the second transaction processing unit through the transaction response splicing unit. The arbitration request is used to request authorization for the channel of the first transaction. The transaction response splicing unit receives an authorization instruction from the transaction response sorting unit. The authorization instruction is used to indicate whether to authorize the channel of the first transaction. Sending the target transaction response to the first interface includes: When the authorization instruction is used to instruct authorization of the channel for the first transaction, the target transaction response is sent to the first interface through the transaction response splicing unit.
15. The method according to claim 14, characterized in that, The method further includes: If a first condition is met, the authorization instruction is used to instruct authorization of the channel for the first transaction, wherein the first condition includes at least one of the following: The channel priority of the first transaction is the highest priority among the channel priorities of at least one transaction; The channel of the first transaction is the highest priority channel among at least one first channel; The transaction response corresponding to the first transaction has been sent to the AXI master device through the channel of the first transaction; The response corresponding to the transaction was not sent to the AXI master device through at least one second channel; Wherein, the at least one transaction is a transaction being processed by the transaction processing device, and the at least one transaction includes the first transaction; The at least one first channel is a channel with the same transaction identifier among the channels of the at least one transaction; The at least one second channel is a channel other than the at least one first channel among the channels of the at least one transaction.
16. The method according to claim 14, characterized in that, The method further includes: When the authorization instruction is used to instruct the channel of the first transaction to be authorized, the channel priority of the first transaction is set to the lowest priority by the transaction response sorting unit, while keeping the relative priority of at least one second transaction other than the first transaction unchanged.
17. A transaction processing apparatus, characterized in that, The transaction processing device includes: a receiving module, a processing module, and a sending module; The receiving module is used to receive a transaction request from the AXI master device, the transaction request being used to request at least two AXI slave devices to execute a first transaction; The processing module is used to split the transaction request received by the receiving module into at least two sub-transaction requests, each sub-transaction request being used to request an AXI slave device to execute a sub-transaction; The sending module is used to send the sub-transaction requests corresponding to the at least two AXI slave devices, which are processed by the processing module, to the at least two AXI slave devices respectively. The receiving module is further configured to receive at least one sub-transaction response from the at least two AXI slave devices, each sub-transaction response being a response obtained by executing a sub-transaction; The sending module is further configured to generate a target transaction response based on the at least one sub-transaction response received by the receiving module, and send the target transaction response to the AXI master device, wherein the target transaction response is at least a partial response corresponding to the first transaction.
18. An electronic device, characterized in that, Includes the transaction processing apparatus as described in any one of claims 1 to 7.
