An on-chip transaction processing system, method, electronic device and storage medium
By setting up an interconnection module that supports the AXI4 protocol between multiple initiators and receivers, the application problem of the AXI4 protocol between multiple modules is solved, and multi-master and multi-slave communication is realized, ensuring the accuracy and order of transmission.
Patent Information
- Application Number
- CN202510519122.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-04-24
AI Technical Summary
In the prior art, the AXI4 protocol can only realize information transmission between two modules, and is difficult to apply to scenarios where multiple initiators and multiple receivers are.
By setting up an interconnection module between multiple initiators and receivers, supporting the AXI4 protocol, the interconnection module can receive the pending transactions of multiple initiators, and filter out the to-transmitted transactions based on the transmission control information, accurately send them to the corresponding receiving end, and return the response data from the receiving end.
It realizes the effective application of the AXI4 protocol between multiple initiators and multiple receivers, avoids chaotic transaction transmission, meets the communication requirements of multiple masters and multiple slaves, and ensures the transmission sequence and system stability.
Smart Images

Figure CN120045514B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular, to an on-chip transaction processing system, method, electronic device, and storage medium. Background Art
[0002] The Advanced Microcontroller Bus Architecture (AMBA for short) is an open and standard on-chip interconnect bus specification protocol cluster. The fourth-generation Advanced eXtensible Interface 4 (AXI4 for short) is an important part of AMBA, used to achieve high-speed communication between various functional modules on the chip.
[0003] In the related art, the AXI4 protocol is a point-to-point transmission protocol, that is, it can only realize information transmission between two modules. The transmission is initiated by the initiator and responded by the receiver. However, in actual applications, an on-chip system generally includes multiple initiators and multiple receivers. Therefore, how to apply the AXI4 protocol to scenarios with multiple initiators and multiple receivers has become a technical problem to be urgently solved. Summary of the Invention
[0004] The present application provides an on-chip transaction processing system, method, electronic device, and storage medium to at least solve the problem of how to apply the AXI4 protocol to application scenarios with multiple initiators and multiple receivers in the related art.
[0005] The present application provides an on-chip transaction processing system, including: multiple initiators, an interconnect module, and multiple receivers;
[0006] The initiator is used to send a transaction to be processed to the interconnect module;
[0007] The interconnect module is used to receive transactions to be processed sent by multiple initiators, screen transactions to be transmitted from the transactions to be processed sent by multiple initiators according to the transmission control information of the transactions to be processed, and send the transactions to be transmitted to the corresponding receivers;
[0008] The receiver is used to receive the transaction to be transmitted sent by the interconnect module and return read response data or write response data to the source initiator of the transaction to be transmitted.
[0009] The present application also provides an on-chip transaction processing method, which is applied to any of the above on-chip transaction processing systems. The method includes:
[0010] Sending the transaction to be processed of the initiator to the interconnect module;
[0011] After controlling the interconnection module to receive the to-be-processed transactions sent by multiple initiators, according to the transmission control information of the to-be-processed transactions, screen the to-be-transmitted transactions among the to-be-processed transactions sent by multiple initiators, and send the to-be-transmitted transactions to the corresponding receivers;
[0012] Based on the receiver receiving the to-be-transmitted transaction sent by the interconnection module, and returning read response data or write response data to the source initiator of the to-be-transmitted transaction.
[0013] This application also provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above on-chip transaction processing methods when executing the computer program.
[0014] This application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above on-chip transaction processing methods are implemented.
[0015] This application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of any of the above on-chip transaction processing methods are implemented.
[0016] Through this application, since an interconnection module is provided between multiple initiators and multiple receivers, the interconnection module supports the AXI4 protocol, the interconnection module can receive the to-be-processed transactions sent by multiple initiators, and screen out the to-be-transmitted transactions according to the transmission control information of the transactions, and then accurately send them to the corresponding receivers, and the receivers accurately return the read response data or write response data to the source initiator of the to-be-transmitted transaction, so that the AXI4 protocol is applied to the application scenarios of multiple initiators and multiple receivers, and chaotic transmission of transactions is avoided. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0018] Figure 1 It is a schematic diagram of the interaction process of the on-chip transaction processing system provided by the embodiment of the present application;
[0019] Figure 2 It is a schematic diagram of the structure of the on-chip transaction processing system provided by the embodiment of the present application;
[0020] Figure 3 It is a schematic diagram of the data structure of the transaction entry provided by the embodiment of the present application;
[0021] Figure 4 Schematic diagram of a preset circular queue provided by an embodiment of the present application;
[0022] Figure 5 Schematic diagram of another preset circular queue provided by an embodiment of the present application;
[0023] Figure 6 Schematic diagram of the read transaction response process provided by an embodiment of the present application;
[0024] Figure 7 Schematic diagram of the write transaction response process provided by an embodiment of the present application;
[0025] Figure 8 Schematic diagram of the on-chip transaction processing method provided by an embodiment of the present application;
[0026] Figure 9 Schematic diagram of the electronic device provided by an embodiment of the present application. Detailed implementation manners
[0027] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0028] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0029] AXI4 is the full name of the fourth-generation Advanced eXtensible Interface, which is an important part of AMBA4 and is used to achieve high-speed communication between various on-chip modules. The AXI4 protocol is a point-to-point transmission protocol, that is, it can only achieve information transmission between two modules. The transmission is initiated by the master device (initiator) and responded by the slave device (receiver). To implement the AXI4 protocol transmission between multiple master devices and multiple slave devices, the embodiment of the present application proposes to use the AXI Interconnect module to implement the routing of AXI transmission transactions (Transactions) between devices.
[0030] The AXI4 protocol only describes the interface specifications for point-to-point connections. The topology structure, routing mechanism, arbitration logic, etc. within the AXI interconnect module need to be designed according to actual requirements. The AXI interconnect module should be transparent to the devices connected to it, which requires the AXI interconnect module to implement many features of AXI4, such as Outstanding, Out of order, read interleave, etc., on the basis of correctly routing transmission transactions. This requires designing corresponding read and write operation mechanisms to meet the normal AXI4 communication requirements between multiple master and multiple slave devices.
[0031] To enable those skilled in the art of the present technology to better understand the solution of this application, the following further details this application in conjunction with the accompanying drawings and specific embodiments.
[0032] The embodiment of this application provides a on-chip transaction processing system for applying the AXI4 protocol to application scenarios with multiple initiators and multiple receivers.
[0033] As Figure 1 shown, it is a schematic diagram of the interaction process of the on-chip transaction processing system provided by the embodiment of this application. The system includes: multiple initiators, an interconnect module, and multiple receivers;
[0034] Among them, the initiator is used to send transactions to be processed to the interconnect module; the interconnect module is used to receive the transactions to be processed sent by multiple initiators, screen the transactions to be transmitted from the transactions to be processed sent by multiple initiators according to the transmission control information of the transactions to be processed, and send the transactions to be transmitted to the corresponding receivers; the receiver is used to receive the transactions to be transmitted sent by the interconnect module, and return read response data or write response data to the source initiator of the transaction to be transmitted.
[0035] It should be noted that the transaction to be processed is the read and write request initiated by the initiator. According to the AXI4 protocol, the interconnect module supporting the AXI4 protocol provided by the embodiment of this application needs to support the following functions:
[0036] 1) Support the Outstanding function of the read and write address interfaces; that is, it allows the initiator to initiate new read and write address requests when the current transaction has not been completed. The initiator can continuously issue multiple address requests without waiting for responses one by one.
[0037] 2) Support the Out of Order function of the read and write return interfaces; that is, the order of the return data of the read and write operations can be different from the request order. In the high-parallel environment of the AXI4 bus, multiple read or write requests may be carried out simultaneously. Due to different processing speeds of each request, it is allowed that the return order is inconsistent with the request order, avoiding resource waste caused by waiting for data to return in a specific order.
[0038] 3) Support read interleave function (read interleave); the initiator can interleave multiple read requests without waiting for the previous read request to complete. This function reduces the total delay of read operations and improves the efficiency of system data reading by processing multiple read operations in parallel.
[0039] 4) The read and write order of the same address remains unchanged; that is, no matter how other transactions are executed concurrently in the system, the read and write operations on the same address must be performed in the order in which they are initiated.
[0040] 5) For any master device, multiple transmission transactions with the same ID and the same read / write direction are returned sequentially; that is, for multiple pending transactions with the same transaction identifier (transaction ID) and read / write direction (the same write request or the same read request) issued by the same initiator, the order of the returned results is consistent with the initiation order.
[0041] 6) The ID codes of each master device are independent of each other, and there is no need to consider the same ID problem between master devices; that is, the transaction identification (transaction ID) code of each initiator is independent, and even if different initiators use the same transaction ID, the system can correctly distinguish and process their transactions.
[0042] 7) The slave responds to timeout, automatically ends the corresponding transmission transaction, and reports an error to the source master device; that is, if the receiving end does not respond to the initiator's request within the specified time, the system will automatically terminate the transmission transaction and send an error report to the initiator of the request to handle the abnormal situation in time.
[0043] Based on the above embodiments, Figure 2 A schematic diagram of the structure of an on-chip transaction processing system provided in an embodiment of the present application, as an implementable manner, in one embodiment, the interconnection module includes:
[0044] An arbitration module, used for sending the pending transactions to the transmission control module in order according to the priority of each initiator and the attribute information of the pending transactions;
[0045] The transmission control module is used to parse any pending transaction, obtain the transmission control information of the pending transaction, write the transmission control information into a preset circular queue as a transaction entry, and filter the pending transaction by traversing the preset circular queue.
[0046] The transmission control information of the transaction to be processed includes at least a source initiator identifier, a destination receiver identifier, an address to be accessed, a transaction identifier, a read / write identifier, and a transmission status identifier.
[0047] Specifically, since multiple initiators will generate a large number of transactions to be processed simultaneously, the urgency, importance, etc. of these transactions vary. The arbitration module comprehensively evaluates and sorts all the transactions to be processed based on the pre-set priorities of each initiator and the attribute information carried by the transaction to be transmitted (such as QoS signal, region signal, urgent signal, etc.). The arbitration module can determine the order of transaction processing and send the transactions to be processed to the transmission control module in this order, ensuring that important and urgent transactions can be processed first, improving the utilization efficiency of system resources and the overall performance of transaction processing.
[0048] Specifically, after receiving the transactions to be processed from the arbitration module, the transmission control module parses each transaction. Through parsing, the key information of the transaction, that is, the transmission control information, is extracted. These information include the source initiator identifier (the number of the initiator that sends the transaction to be processed), the destination receiver identifier (the destination receiver number), the address to be accessed, the transaction identifier, the read / write identifier, and the transmission status identifier. The transmission control module organizes these transmission control information into transaction entries and writes them into a preset circular queue. The circular queue, as an efficient data storage structure, facilitates the unified management and scheduling of transactions. The transmission control module traverses the preset circular queue and filters out the transactions suitable for transmission at the current moment from numerous transaction entries according to certain filtering rules, thereby realizing the control of transaction transmission and ensuring the orderly transmission of transactions to be processed in a complex on-chip environment.
[0049] It should be noted that the transmission control module can determine the destination receiver corresponding to the transaction to be processed according to the address range represented by the address to be accessed, so as to avoid using sideband signals and extended IDs to determine the target receiver, reducing the requirement for the number of system interfaces and improving the adaptability to each receiver at the same time.
[0050] Among them, such as Figure 3As shown in the figure, it is a schematic diagram of the data structure of a transaction entry provided by an embodiment of the present application. The transaction entry sequentially records the source initiator identifier, the destination receiver identifier, the address to be accessed, the transaction identifier, the read / write identifier, the transmission status identifier, the response counter, the response timer, the processing counter, the position of the previous transmission transaction, the position of the previous response transaction, and the transmission transaction parameters. Among them, the response counter records the number of times this transaction currently needs to respond, and the initial value is the same as the burst length. The burst length is the number of consecutive data units transmitted in a single transaction (Transaction). When transmitting the data of this transaction, when a valid signal (used to indicate the validity of the response data) appears at the corresponding data interface once, this value is decremented by 1; when it is decremented to 0, it means that the transmission of this transaction is completed. The response timer is used to record the response countdown of this transaction. When the transaction is in the transmission process, when it is started and when a valid signal appears at the corresponding data interface, this member is initialized to the allowed response time value; when this member becomes 0, a timeout is triggered, the transmission of this transaction ends, and the transmission status identifier becomes the idle state. The processing counter is used to record the processing countdown of this transaction. When the transaction is stored in the circular queue, the countdown starts. If this transaction is still not processed (i.e., has not exited the "waiting for transmission to start" state) before the countdown ends, a timeout is triggered, the transmission of this transaction ends, and the transmission status identifier becomes "timeout". The transmission transaction parameters include the transmission control parameters of the AXI address interface, such as size, burst length, burst type, QoS, region, protect, etc.
[0051] Specifically, in one embodiment, the transmission control module is specifically configured to:
[0052] When obtaining the transmission control information of any pending transaction, according to the source initiator identifier represented by the transmission control information, locate the tail of the corresponding transmission transaction waiting sequence in the preset circular queue;
[0053] Start from the tail of the transmission transaction waiting sequence and search clockwise for the queue maintenance pointer for a node with a transmission status identifier of idle, and use this node as the target insertion node;
[0054] Insert the transmission control information as a transaction entry into the target insertion node, and modify the transmission status identifier of the target insertion node to waiting for transmission to start.
[0055] It should be noted that the preset circular queue is set in the transmission control module. The preset circular queue faces multiple initiators. The preset circular queue is used to cache the transaction entries of all pending transactions initiated by the initiators. The preset circular queue includes the head and tail of the transmission transaction waiting sequences corresponding to each initiator.
[0056] Specifically, after obtaining the transmission control information of the transaction to be processed, the transmission control module first locates the tail of the transmission transaction waiting sequence corresponding to it in the preset circular queue according to the source initiator identifier therein. Each source initiator has its corresponding transaction waiting sequence in the circular queue, and the tail of the transmission transaction waiting sequence marks the position of the latest deposited transaction of the initiator. Starting from the tail of the transmission transaction waiting sequence, search clockwise towards the queue maintenance pointer (P T ). During the search, find the first node with a free transmission status identifier. The free status indicates that the node is not currently in use and can be used to store new transaction entries. After finding the node, determine it as the target insertion node, and the transmission control module inserts the transmission control information of the transaction to be processed as a transaction entry into this node. At the same time, in order to indicate that the transaction has entered the queue and is waiting for transmission, the transmission status identifier of the target insertion node is modified from free to waiting for transmission start. This enables the system to clearly track the processing progress of the transaction and facilitates subsequent scheduling and management of the transaction.
[0057] Exemplarily, as Figure 4 shown, it is a schematic structural diagram of a preset circular queue provided by an embodiment of the present application. P Hn (n = 1, 2,..., N) represents the heads of the transmission transaction waiting sequences of initiators 1 to initiator N, and P Ln (n = 1, 2,..., N) represents the tails of the transmission transaction waiting sequences of initiators 1 to initiator N. N represents the number of initiators in the system. Taking the transmission control information of the transaction to be processed as an example, where its source initiator is initiator 1, first locate the tail of the transmission transaction waiting sequence P L1 in the preset circular queue, and then start from the tail of the transmission transaction waiting sequence P L1 and search clockwise towards the queue maintenance pointer P T to find the first node with a free transmission status identifier. That is, if the transmission status identifiers of P1 and P2 in the preset circular queue are both free, then P1 is used as the target insertion node.
[0058] Among them, when the preset circular queue is initialized, P Hn (n = 1, 2,..., N) and the queue maintenance pointer P T are both recorded as non-normal values (such as 0).
[0059] Correspondingly, in one embodiment, the transmission control module is further configured to:
[0060] Select any head of the transmission transaction waiting sequence in the preset circular queue as the destination node;
[0061] Select a node with a transmission status identifier that meets the preset maintenance condition in the preset circular queue as the node to be maintained;
[0062] Select the node to be maintained that is closest to the destination node in the counterclockwise direction as the target maintenance node, and move the queue maintenance pointer to the target maintenance node, so that the queue maintenance pointer moves to the boundary position between the nodes waiting for response transactions and idle nodes in the preset circular queue.
[0063] Among them, the target maintenance node is the earliest node waiting for response transactions.
[0064] Specifically, the transmission control module selects any transmission transaction waiting sequence header (such as P H1 ) in the preset circular queue as the destination node. Screen the nodes to be maintained in the preset circular queue to determine the nodes whose transmission status identifiers meet the preset maintenance conditions as the nodes to be maintained. The preset maintenance conditions can be set in advance according to the requirements and logic of transaction processing. For example, when the transmission status of a node is "waiting for response", "initiator timeout waiting for response", or "receiver timeout waiting for response", etc., it is determined that the node meets the preset maintenance conditions. These states indicate that the transaction corresponding to the node is about to complete processing or end. After determining the nodes to be maintained, among these nodes to be maintained, find the node that is closest to the destination node in the counterclockwise direction and use it as the target maintenance node. Since the target maintenance node is the earliest node waiting for response transactions, moving the queue maintenance pointer to this node position can make the queue maintenance pointer accurately located at the boundary position between the nodes waiting for response transactions and idle nodes in the preset circular queue, which helps the system to make more reasonable use of the storage space of the circular queue. When a new transaction arrives, the corresponding idle node can be quickly found for insertion, avoiding the time overhead of searching for idle nodes in the entire queue on a large scale.
[0065] Specifically, in an embodiment, for the determination of the position of the previous transmission transaction in the transaction entry, the transmission control module is further configured to:
[0066] After inserting the transmission control information as a transaction entry into the target insertion node, start from the target insertion node and search counterclockwise in the direction of the queue maintenance pointer to find the first transmission previous node with the same destination receiver identifier;
[0067] Take the position of the transmission previous node as the position of the previous transmission transaction and write it into the transaction entry of the target insertion node;
[0068] In the case where no transmission previous node is found, record the position of the previous transmission transaction in the transaction entry of the target insertion node as an abnormal value.
[0069] Specifically, starting from the current storage position, search counterclockwise to P TThe position ends. Search for the first node whose "destination receiver identifier" of the stored entry is the same as this entry and whose access addresses overlap. Use this node as the pre - transmission node, and use the position of the pre - transmission node as the pre - transmission transaction position, write it into the transaction entry of the target insertion node, and exit the search; if not found, the pre - transmission transaction position of this entry is recorded as an abnormal value (such as 0).
[0070] Among them, only after the pre - transmission transaction is completed can this transaction start transmission to meet the function of the AXI4 protocol that the read - write order for the same address remains unchanged.
[0071] Specifically, in one embodiment, for the determination of the pre - order response transaction position in the transaction entry, the transmission control module is further configured to:
[0072] After inserting the transmission control information as a transaction entry into the target insertion node, start searching counter - clockwise from the target insertion node towards the queue maintenance pointer to find the first pre - order response node whose "source initiator identifier", "transaction identifier", and "read - write identifier" are all the same;
[0073] Use the position of the pre - order response node as the pre - order response transaction position and write it into the transaction entry of the target insertion node;
[0074] In the case where no response pre - order node is found, record the pre - order response transaction position of the transaction entry of the target insertion node as an abnormal value.
[0075] Specifically, starting from the current storage position, search counter - clockwise until the PT position ends. Search for the first node whose "source initiator identifier", "transaction identifier", and "read - write identifier" of the stored transaction entry are the same as this transaction entry, and use this node as the pre - order response node. Use the position of the pre - order response node as the pre - order response transaction position, write it into the transaction entry of the target insertion node, and exit the search; if not found, record the "pre - order response transaction position" of this entry as an abnormal value (such as 0).
[0076] Among them, only after the pre - order response transaction is completed can this transaction make a response to meet the function of the AXI4 protocol that for any master device, multiple transmission transactions with the same ID and the same read - write direction are returned in order.
[0077] Specifically, in one embodiment, the transmission control module is further configured to:
[0078] When inserting the transmission control information as a transaction entry into the target insertion node, preset the processing timer to load the timing limit value and start counting down;
[0079] When the countdown of the preset processing timer ends, if the transmission status flag of the target insertion node is still waiting for the start of transmission, a timeout is triggered, and the transmission status flag of the target insertion node is modified to the receiving end waiting for a timeout response.
[0080] Specifically, when the transmission control module inserts the transmission control information as a transaction entry into the target insertion node, the preset processing timer is started synchronously and a specific timing limit is loaded for it. This timing limit can be preset according to system performance requirements and the expected time of transaction processing, and is used to represent the longest allowed waiting time of the transaction in the waiting-for-transmission-start state. After the preset processing timer starts counting down, the system continuously monitors its timing status. When the timer countdown ends, the system checks the transmission status flag of the target insertion node. If the transmission status flag of this node is still waiting for the start of transmission at this time, it means that the transaction fails to enter the transmission stage within the specified time, that is, a timeout occurs. In response to this situation, the system triggers the timeout handling mechanism, modifies the transmission status flag of the target insertion node to the receiving end waiting for a timeout response, to record the timeout situation of the transaction, and also provides a basis for the subsequent system to process this transaction.
[0081] Based on the above embodiments, as an implementable manner, in one embodiment, for a write transaction request, the transmission control module is specifically used for:
[0082] Generate an entry sending thread for each initiator;
[0083] For any initiator, based on the entry sending thread, starting from the head of the transmission transaction waiting sequence corresponding to this initiator, search clockwise for the queue maintenance pointer to find the first node whose source initiator identifier is the initiator number, the transmission status flag is waiting for the start of transmission, and the read / write flag is write, and use this node as the write node to be sent (the node corresponding to the transaction to be transmitted);
[0084] When it is determined that the write transaction interface status of the destination receiver corresponding to the write node to be sent meets the preset write transaction receiving condition, and the previous transmission transaction position of the transaction entry of the write node to be sent is an abnormal value, write the initiator number of the write node to be sent into the write data initiator queue and the write response initiator queue of the destination receiver, so that the destination receiver can respond to the write transactions of each initiator in order;
[0085] After writing the initiator number of any write node to be sent into the write data initiator queue and the write response initiator queue of the corresponding destination receiver, modify the transmission status flag of the write node to be sent from waiting for the start of transmission to in transmission.
[0086] It should be noted that the interconnection module sets three queues for each receiving end in the system, which respectively store the Master device numbers (source initiator identifiers) when read and write transfer transactions arrive, denoted as the write data Master queue (write data initiator queue), the write response Master queue (write response initiator queue), and the read response Master queue (read response initiator queue).
[0087] Specifically, in one embodiment, the transmission control module is further configured to, when determining that the write transaction interface state of the destination receiving end corresponding to the write node to be sent meets the preset write transaction receiving condition, but the previous transmission transaction position of the transaction entry of the write node to be sent is the previous transmission transaction position, after determining that the transmission status identifier of the previous transmission node at the previous transmission transaction position is in transmission, write the initiator number of the write node to be sent into the write data initiator queue and the write response initiator queue of the destination receiving end.
[0088] It should be noted that the transmission status identifier includes "idle", "waiting for transmission to start", "in transmission", "waiting for response", "initiator response timeout", "receiver response timeout", "initiator timeout waiting for response", and "receiver timeout waiting for response". Among them, the "idle" state represents that this transaction has been transmitted; the "waiting for transmission to start" state represents that this transaction is queuing up waiting to start transmission; the "in transmission" state represents that the Master device is sending data to the Slave device through the data interface; the "waiting for response" state represents that the Master device is waiting for the Slave device to complete the response process through the response or data interface; the "initiator response timeout" state represents that the Master device has a response timeout; the "receiver response timeout" state represents that the Slave device has a response timeout; the "initiator timeout waiting for response" state represents that the Master device waits for the Slave device to respond or the data interface to complete the response process after the timeout; the "receiver timeout waiting for response" state represents that the Slave device waits for a forced response after the timeout.
[0089] Specifically, in one embodiment, for a read transaction request, the transmission control module is further configured to:
[0090] For any initiator, based on the entry sending thread, start from the head of the transmission transaction waiting sequence corresponding to the initiator and search clockwise for the first node with the source initiator identifier being the initiator number, the transmission status identifier being waiting for transmission to start, and the read / write identifier being read, and use this node as the read node to be sent (the node corresponding to the transaction to be transmitted, that is, the transaction to be transmitted includes the write transaction to be sent and the read transaction to be sent);
[0091] When it is determined that the read transaction interface status of the destination receiver corresponding to the to-be-sent read node meets the preset read transaction reception condition and the previous transmission transaction position of the transaction entry of the to-be-sent read node is a non-normal value, write the initiator number of the to-be-sent read node into the read response initiator queue of the destination receiver, so that the destination receiver responds to the read transactions of each initiator in sequence;
[0092] After reading the initiator number of any to-be-sent read node into the read response initiator queue of the corresponding destination receiver, modify the transmission status flag of the to-be-sent read node from waiting for transmission start to waiting for response.
[0093] Specifically, generate an entry sending thread for each Master device, and the transmission control module loops through the following process:
[0094] Step 1, if P Hn (n = 1, 2, …, N) is not equal to P T It indicates that there are transactions to be processed, then go to Step 2; otherwise, there are no new pending transactions currently, and the thread will enter the waiting state until a new transaction is added to the queue;
[0095] Step 2, search clockwise from P Hn to P T For a write transaction request, find the first entry whose "source initiator identifier" is n, "transmission status flag" is "waiting for transmission start", and "read / write identifier" is "write". If the write address interface of the receiver corresponding to the "destination receiver identifier" of this entry is in the ready state (the write transaction interface status of the destination receiver meets the preset write transaction reception condition) and the "previous transmission transaction position" is a non-normal value (such as 0, indicating that there is no previous transmission transaction or the previous transmission transaction has been completed), then this entry is selected. At the same time, for a read transaction request, find the first entry that meets the following conditions: the "source initiator identifier" of this entry is n, the "transmission status flag" is "waiting for transmission start", the "read / write identifier" is "read", the read address interface of the Slave device corresponding to the "destination receiver identifier" is in the ready state, and the "previous transmission transaction position" is a non-normal value, then this entry is selected. If no entry is selected, the corresponding read or write operation process is not performed.
[0096] Step 3, if among the entries searched by multiple Master devices in Step 2, the "read / write identifiers" are the same and the "destination receiver identifiers" are the same, that is, the previous transmission transaction position of the transaction entry of the to-be-sent write node is the previous transmission transaction position (normal value), then select the one that is counterclockwise and at a distance from P TSend the most recent entries, that is, preferentially send the previous transmission nodes written to the circular queue first, and do not send the rest. The remaining entries are different from the "read / write identifier" or "destination receiver identifier" of any other entry, and these entries are sent in parallel with the above entries. For a write transaction, insert the "source initiator identifier" into the tail of the write data initiator queue and the write response initiator queue of the receiver; for a read transaction, insert the "source initiator identifier" into the tail of the read response initiator queue of the receiver to ensure that the write data / responses of the same receiver are processed in the order of the initiator's requests, meeting the functional requirements of the AXI4 protocol (the read / write order for the same address remains unchanged).
[0097] Step 4, the entries sent in Step 3 are still in the preset circular queue. If its "read / write identifier" is "write", then the "transmission status identifier" is changed from "waiting for transmission start" to "transmission in progress"; if its "read / write identifier" is "read", then the "transmission status identifier" is changed from "waiting for transmission start" to "waiting for response".
[0098] Step 5, load the timing limit into the response timer and start counting down to monitor the response time of the transaction and confirm whether the receiver can give a response within the specified time.
[0099] Step 6, update P Hn . From P Hn to P T Search clockwise to find the first entry with "source initiator identifier" as n and "transmission status identifier" as "waiting for transmission start", and update P Hn to the position of this entry in the circular queue. If not found, set P Hn to P T to indicate that there is no pending transaction with "source initiator identifier" as n in the current circular queue.
[0100] Among them, in this process, if the entry in the circular queue with "transmission status identifier" as "waiting for transmission start", its "processing timer" is always counting down, and if the countdown ends, the "transmission status identifier" is changed to "receiver timeout waiting for response". Through the above steps, the transmission control module can effectively manage and schedule the read / write transactions between the initiator and the receiver, handle transaction conflicts, ensure that transactions are processed in order and efficiently, and at the same time monitor the response time of transactions to improve the reliability and performance of the system.
[0101] It should be noted that, based on the characteristics of the circular queue, the embodiments of the present application comprehensively determine the actual sending order of each transmission control information entry according to the position order of the transmission control information entries in the circular queue, the previous transmission transaction status, the Master device interface status, and the Slave device interface status, so as to realize parallel transmission of each device. At the same time, the "previous transmission transaction position" identifier is used to control the entries with sending order requirements to be sent in the expected order to ensure the sending order. In addition, the sending waiting process is timed to avoid blocking caused by device non-response. Meanwhile, each Slave device records the Master information of the transmission transaction in sequence for analyzing the source Master device during subsequent response processing.
[0102] On the basis of the above embodiments, as an implementable manner, in one embodiment, the initiating end is used for:
[0103] Starting from the queue maintenance pointer, find the first node in the clockwise direction of the transmission transaction waiting sequence header corresponding to the initiating end, where the source initiating end identifier is the initiating end number, the transmission status identifier is in transmission, and the read / write identifier is write, and use this node as the write node for the data to be transmitted;
[0104] When it is determined that both the destination receiving end corresponding to the write node for the data to be transmitted and the write data interface status of the initiating end meet the preset write data reception conditions, transmit the write data to the destination receiving end once;
[0105] When it is determined that the destination receiving end corresponding to the write node for the data to be transmitted meets the preset write data reception conditions, but the write data interface status of the initiating end does not meet the preset write data reception conditions, or when both the destination receiving end and the write data interface status of the initiating end do not meet the preset write data reception conditions, end the transmission of the write data and modify the transmission status identifier of the write node for the data to be transmitted to initiating end response timeout;
[0106] When it is determined that the write data interface status of the initiating end corresponding to the write node for the data to be transmitted meets the preset write data reception conditions, but the destination receiving end does not meet the preset write data reception conditions, forcefully transmit the write data to the destination receiving end once, and modify the transmission status identifier of the write node for the data to be transmitted to receiving end response timeout.
[0107] When the write node for the data to be transmitted meets the preset status modification conditions, if the transmission status identifier of the write node for the data to be transmitted is in transmission, modify it to waiting for response;
[0108] If the transmission status identifier of the write node for the data to be transmitted is initiating end response timeout, modify it to initiating end timeout waiting for response;
[0109] If the transmission status identifier of the write node for the data to be transmitted is receiving end response timeout, modify it to receiving end timeout waiting for response;
[0110] Among them, when the transmission status flag of any node in the preset circular queue is waiting for response, the initiator times out waiting for response, or the receiver times out waiting for response, it is determined that the node meets the preset maintenance condition. For forced transmission of write data to the destination receiver once, under the AXI4 protocol, there are strict order requirements for transaction processing. Forced transmission can ensure that in abnormal situations, the transaction can still proceed in the direction of completion, avoiding long-term stagnation of the transaction and affecting subsequent transaction processing.
[0111] Specifically, each initiator interface generates a thread and loops through the following process:
[0112] Step 1: Search clockwise from P T to P Hn (n = 1, 2,..., N) (excluding P Hn ), and find the first transaction entry with the "source initiator ID" being n, the "read / write flag" being "write", and the "transmission status flag" being "in transmission" or "receiver response timeout", and use this node as the write node for the data to be transmitted.
[0113] If the "transmission status flag" of this entry is "in transmission", the write data interface of the current Master device is ready (the write data interface status of the initiator meets the preset write data reception conditions), the write data interface of the destination receiver is ready (the write data interface status of the destination receiver meets the preset write data reception conditions), and the write data Master queue head is n, then perform a write data transmission. At the same time, the value in the "response counter" is decremented by 1, the "response timer" loads the timing limit value, and the countdown restarts, and enter Step 2.
[0114] If the "transmission status flag" of this entry is "in transmission", the write data initiator queue head of the Slave device corresponding to the "destination receiver ID" is n, but due to the write data interface of the Master device not being ready or both the write data interfaces of the Master and Slave devices not being ready, a timeout occurs, then forcefully end the data transmission, and change the "transmission status flag" to "initiator response timeout", and enter Step 3.
[0115] If the "transmission status flag" of this entry is "in transmission", the write data interface of the current Master device is ready, the write data Master queue head of the Slave device corresponding to the "destination receiver ID" is n, but due to the write data interface of the Slave device not being ready, a timeout occurs, then change the "transmission status flag" to "Slave timeout", forcefully perform a write data transmission. At the same time, the value in the "response counter" is decremented by 1, the "response timer" loads the timing limit value, and the countdown restarts, and enter Step 2.
[0116] If the "transmission status flag" of this entry is "receiver response timeout", if the write data interface of the Master device is ready, a write data transmission is forced, and at the same time, the value in the "response counter" is decremented by 1, the "response timer" is loaded with the timing limit value, and the countdown is restarted, and step 2 is entered; if the timeout is caused by the write data interface of the Master device not being ready, the data transmission is forced to end, and the "transmission status flag" is changed to "initiator response timeout", and step 3 is entered.
[0117] Step 2, repeat step 1 until the write data end signal arrives or the value in the "response counter" is decremented to 0, that is, the write data transmission is completed, and step 3 is entered.
[0118] Step 3, if the "transmission status flag" of the current data transmission entry is "in transmission", it is changed to "waiting for response"; if the "transmission status flag" of the current data transmission entry is "initiator timeout response", it is changed to "initiator timeout waiting for response"; if the "transmission status flag" of the current data transmission entry is "receiver timeout response", it is changed to "initiator timeout waiting for response". At the same time, the value in the "response counter" is changed to 1; the head of the write data initiator queue of the initiator corresponding to the "destination receiver identifier" is dequeued (deleted), indicating that the record of this write transaction of this initiator in this queue has been processed.
[0119] Among them, through the above steps, the initiator flexibly determines the write data transmission method according to the interface status of itself and the destination receiver during the write transaction data transmission process, processes and records different timeout situations, and updates the status flag of the transaction node and the relevant queue when the transmission is completed or the termination condition is reached, ensuring that the write transaction can proceed orderly and reliably.
[0120] It should be noted that in the embodiment of the present application, considering that the write data and the write address are in the same order in AXI4 and there is no write interleaving, the position of the entry being processed is determined by the write transmission transaction Master order recorded by the Slave device and the Master information of each write entry in the circular queue, and the data of the Master write data interface is received one by one, and the communication with this Master write data interface is disconnected only after receiving all the write data of this transaction or the Master times out, and the processing of the next write transmission transaction is started. If the Slave times out and responds, it can still support the Master to transmit the remaining write data; if the Master times out and responds, the write data process is forced to end. If a timeout occurs, the timeout information is recorded for subsequent processing of the write response information.
[0121] Based on the above embodiment, as an implementable manner, in an embodiment, the receiver is used for:
[0122] When any read response data is obtained at the read data interface, search clockwise from the queue maintenance pointer to find the first node whose destination receiver identifier is the receiver number and whose transaction identifier matches the return identifier of the read response data, and use this node as the read node to be returned;
[0123] Determine whether the source initiator identifier of the read node to be returned is the first node to be matched in the read response initiator queue of the receiver;
[0124] If the source initiator identifier of the read node to be returned is not the first node to be matched in the read response initiator queue of the receiver, modify the node to be matched to a non-matched node, define the read node to be returned as the node not to be searched in the next round, and return to execute the step of searching clockwise from the queue maintenance pointer to find the first node whose destination receiver identifier is the receiver number and whose transaction identifier matches the return identifier of the read response data, and use this node as the read node to be returned, so as to re-screen the read node to be returned;
[0125] If the source initiator identifier of the read node to be returned is the first node to be matched in the read response initiator queue of the receiver, transmit the read response data to the source initiator corresponding to the read node to be returned.
[0126] Specifically, generate a thread for each receiver interface. Taking the mth receiver as an example, loop to execute the following process:
[0127] Step 1: After detecting that data is incoming at the read data interface, obtain the transmission transaction ID (transaction identifier) from the read data interface, and then determine which initiator to send the data to according to the Slave number (destination receiver identifier), transmission transaction ID, read response initiator queue, and transmission control information entry in the circular queue. According to the above content, transmission transactions with the same read / write direction, the same Master device, and the same Slave device are sent sequentially in the clockwise direction along the circular queue. Then, according to the read response initiator queue, the order of the read transmission control information entries sent to this receiver can be deduced. Based on this, search according to the following steps:
[0128] In the preset circular queue, from P TStart searching clockwise for the first entry with "transmission status flag" being "waiting for response", "destination receiver ID" being m, not marked with "not search", and "source initiator ID" being the first Master number in the read response initiator queue that is not marked with "mismatch" (the first node to be matched). If the "transaction ID" of this entry is the same as the ID received by this interface, then the Master device corresponding to the "source initiator ID" of this entry is the destination device for this read response; if not, mark this entry as "not search" (define the read node to be returned as a node not to be searched in the next round), mark the head of the read response initiator queue as "mismatch" (modify the node to be matched to a mismatched node), and then repeat this search step until the correct destination Master device is found.
[0129] Step 2: Wait for the read data interface of the corresponding destination Master device (the source initiator corresponding to the read node to be returned) to receive. After completion, wait for data to be passed into the next read data interface.
[0130] Among them, through the above steps, after receiving the read data, the receiving end can accurately return the read data to the corresponding initiator by performing precise search and matching operations in the circular queue and combining the sequence information of the read response initiator queue, ensuring the accuracy and orderliness of the read data transmission and avoiding problems of data chaos and incorrect transmission.
[0131] Exemplarily, as Figure 5 shown, it is a schematic structural diagram of another preset circular queue provided by an embodiment of the present application. For the entries with "transmission status flag" being "waiting for response" or "receiving end timeout waiting for response" stored in P9~P14, the content in the adjacent box represents partial content of the entry. M1 represents that the "Master number (source initiator ID)" is 1, S1 represents that the "Slave number (destination receiver ID)" is 1, ID1 represents that the "transaction ID" is ID1, and R represents that the "read / write flag" is read. Then M2-S1-ID2-R represents a read transaction sent by initiator 1 to receiver 1 with ID being ID2. At this time, the read response initiator queue of receiver 1 is M1-M1-M1-M2-M2-M1, and it can be known that the sending order of the read transactions is P9-P10-P12-P11-P14-P13. If there is data at the read data interface of receiver 1 and the ID is ID2, it can be known from the above search method that it is a transaction responding to P12; if there is data at the read data interface of receiver 1 and the ID is ID1, it can be known from the above search method that it is a transaction responding to node P9.
[0132] Specifically, in one embodiment, the transmission control module is used for:
[0133] When the transmission status flag of any node in the preset circular queue is modified to waiting for response, use this node as the read response node;
[0134] When it is determined that the transmission status flag of the response pre-node corresponding to the pre-response transaction position of the read response node is idle, start waiting for the read data interface of the destination receiving end corresponding to the read response node to obtain the read response data;
[0135] If within the preset waiting period, the read data interface of the destination receiving end obtains the read response data, then determine whether the read data interface of the source initiating end corresponding to the read response node meets the preset read data reception condition;
[0136] When it is determined that the read data interface of the source initiating end corresponding to the read response node meets the preset read data reception condition, the source initiating end receives the read response data returned by the destination receiving end based on the read data interface.
[0137] Correspondingly, in an embodiment, the transmission control module is further configured to, when the to-be-processed read transaction corresponding to the read response node completes the target number of responses, determine that the to-be-processed read transaction of the read response node has been completed, and modify the transmission status flag of the read response node to idle; if within the preset waiting period, the read data interface of the destination receiving end does not obtain the read response data, then forcibly end the to-be-processed read transaction corresponding to the read response node, and modify the transmission status flag of the read response node to idle.
[0138] Specifically, as Figure 6 shown, it is a schematic diagram of the read transaction response process provided by the embodiment of the present application, and the specific process is as follows:
[0139] Step 1, wait for the entry "transmission status flag" to be changed to "waiting for response";
[0140] Step 2, if the "transmission status flag" of the entry corresponding to the entry "pre-response transaction position" (denoted as entry A) is not "idle", that is, the pre-response transaction is not completed, then wait, and the "response timer" pauses the countdown until the "transmission status flag" of entry A becomes "idle", that is, the pre-response transaction is completed, and jump to the next step;
[0141] Step 3, start waiting for the read data interface of the destination receiving end to obtain the read response data, and at the same time the "response timer" starts timing. If there is data (read response data) at the read data interface of the destination receiving end before the "response timer" times out (within the preset waiting period), then enter Step 4; otherwise, enter Step 8.
[0142] Step 4, if the "transmission status flag" is "initiator timeout waiting for response", then force the initiator to immediately receive the data and enter Step 6; otherwise, the "response timer" loads the limit value and restarts timing, and enter Step 5;
[0143] Step 5: Wait for the read interface (read channel) of the initiating end to be ready to receive data (the read data interface of the source initiating end corresponding to the read response node meets the preset read data reception condition). If it is ready before the "response timer" times out, proceed to Step 6 to enable the read data interface of the source initiating end to receive data; otherwise, set the "transmission status flag" to "initiating end timeout waiting for response" and force the initiating end to immediately receive data, then proceed to Step 6.
[0144] Step 6: The read interface of the initiating end receives data, completing this transmission, and decrement the entry "response counter" by 1.
[0145] Step 7: If the entry "response counter" is decremented to 0, the transmission transaction of this entry is completed, and the "transmission status flag" is changed to "idle"; otherwise, jump back to Step 3 to receive the next read data.
[0146] Step 8: Forcefully end the transmission transaction of this entry, and send a read error response to the corresponding initiating end, and change the "transmission status flag" to "idle".
[0147] Among them, through the above steps, the transmission control module can, during the read transaction response process, reasonably handle situations such as receiving read data and timeouts according to factors such as the status of the initiating end and the receiving end, and the response time, ensuring that the read transaction can be correctly completed according to the rule requirements, and maintaining the orderliness and stability of transaction processing in the system.
[0148] It should be noted that after there is data in the read data interface of the receiving end, the position of the entry being processed is determined according to the read ID information on the interface, the recorded order of the read transmission transaction initiating ends (read response initiating end queue), and the initiating end information of each read entry in the circular queue. The read data thread in the circular queue passes the data on the read data interface of the receiving end to the initiating end device according to the obtained destination initiating end device number, and updates the content in the corresponding transmission control information entry. During this process, only after the entry corresponding to the "previous response transaction position" in the entry is completed, is this entry allowed to transmit data to handle the situation of the same initiating end, different receiving ends, and the same transaction ID. After a read entry is completed, the data at the corresponding position is removed from the read response initiating end queue. The design of this mechanism supports read Interleave and Out of Order, while ensuring that the read messages of the same initiating end device and the same ID are returned in order, and the read operations of different Master devices or different IDs do not affect each other. During this process, if there is a timeout response from the initiating end or the receiving end, the corresponding entry will be forcefully ended or forced to be transmitted, and an error will be reported simultaneously to ensure that the overall communication process is not blocked if any device suddenly does not respond.
[0149] Specifically, in one embodiment, the transmission control module is used for:
[0150] When the transmission status flag of any node in the preset circular queue is modified to waiting for response, the originator times out waiting for response, or the recipient times out waiting for response, use this node as the write response node;
[0151] When it is determined that the transmission status flag of the response pre-node corresponding to the pre-response transaction position of the write response node is idle, start waiting for the write response interface of the destination recipient corresponding to the write response node to obtain the write response data;
[0152] If within the preset waiting period, the write response interface of the destination recipient obtains the write response data, determine whether the write response interface of the source originator corresponding to the write response node meets the preset write response reception condition;
[0153] When it is determined that the write response interface of the source originator corresponding to the write response node meets the preset write response reception condition, the source originator receives the write response data returned by the destination recipient based on the write response interface.
[0154] Correspondingly, in one embodiment, the transmission control module is further configured to:
[0155] When the pending write transaction corresponding to the write response node obtains the target number of write response data, determine that the pending write transaction of the write response node is completed, and modify the transmission status flag of the write response node to idle;
[0156] If within the preset waiting period, the write response interface of the destination recipient does not obtain the write response data, forcibly end the pending write transaction corresponding to the write response node, and modify the transmission status flag of the write response node to idle.
[0157] Specifically, as Figure 7 shown, it is a schematic diagram of the write transaction response process provided by the embodiment of the present application, and the specific process is as follows:
[0158] Step 1, wait for the entry "transmission status flag" to be changed to "waiting for response" or "originator times out waiting for response" or "recipient times out waiting for response";
[0159] Step 2, if the "transmission status flag" of the entry corresponding to the entry "pre-response transaction position" (denoted as entry A) is not "idle", then wait, and the "response timer" pauses the countdown until the "transmission status flag" of entry A becomes "idle", and jump to the next step;
[0160] Step 3: If the entry "transmission status flag" is "waiting for response" or "initiator timeout waiting for response", start waiting for the write response data, and at the same time start the "response timer" to count time. If there is data at the receiver write response interface before the "response timer" times out, go to Step 4; otherwise, go to Step 7. If the entry "transmission status flag" is "receiver timeout waiting for response", go to Step 7.
[0161] Step 4: If the entry "transmission status flag" is "initiator timeout waiting for response", go to Step 7; otherwise, load the limit value into the "response timer" and restart the timer, and go to Step 5.
[0162] Step 5: Wait for the initiator write response interface (write response channel) to be ready to receive data (the write response interface of the source initiator corresponding to the write response node meets the preset write response reception condition). If it is ready before the "response timer" times out, go to Step 6 to enable the initiator write response interface to receive data; otherwise, go to Step 7.
[0163] Step 6: The initiator write response interface receives data, the entry "response counter" is set to 0, the transmission transaction of this entry is completed, and the "transmission status flag" is changed to "idle".
[0164] Step 7: Force to end the transmission transaction of this entry, and send a write response error to the corresponding source initiator, and change the "transmission status flag" to "idle".
[0165] Among them, through the above steps, the transmission control module can reasonably handle the reception, timeout, etc. of the write response data according to factors such as the status of the initiator and the receiver and the response time during the write transaction response process, ensure that the read transaction can be correctly completed according to the rule requirements, and maintain the orderliness and stability of the transaction processing in the system.
[0166] It should be noted that after the receiving end writes the response interface with data, the position of the entry being processed is determined according to the write response ID information on the interface, the recorded read transmission transaction initiating end order (write response initiating end queue), and the initiating end information of each write entry in the circular queue. The write response thread in the circular queue transmits the data on the receiving end write response interface to the initiating end device according to the obtained destination initiating end device number, and updates the content in the corresponding transmission control information entry. During this process, only after the entry corresponding to the "previous response transaction position" in the entry is completed, this entry is allowed to transmit data to handle the situation of the same initiating end, different receiving ends, and the same transaction ID. After a write entry is completed, the data at the corresponding position is removed from the write response initiating end queue. The design of this mechanism supports Out of Order, ensures that the write response messages with the same initiating end and the same ID are returned in order, and the write response operations of different initiating ends or different IDs do not affect each other. During this process, if a timeout response occurs at the initiating end or the receiving end, the corresponding entry will be forcibly ended or forcibly transmitted to ensure that the overall communication process is not blocked after any device suddenly stops responding.
[0167] The on-chip transaction processing system provided by the embodiments of the present application includes: multiple initiating ends, an interconnection module, and multiple receiving ends; the initiating ends are used to send transactions to be processed to the interconnection module; the interconnection module is used to receive the transactions to be processed sent by multiple initiating ends, screen the transactions to be transmitted according to the transmission control information of the transactions to be processed, and send the transactions to be transmitted to the corresponding receiving ends; the receiving ends are used to receive the transactions to be transmitted sent by the interconnection module and return read response data or write response data to the source initiating end of the transaction to be transmitted. In the system provided by the above solution, since an interconnection module is provided between multiple initiating ends and multiple receiving ends, the interconnection module supports the AXI4 protocol, the interconnection module can receive the transactions to be processed sent by multiple initiating ends, screen the transactions to be transmitted according to the transmission control information of the transactions, and then accurately send them to the corresponding receiving ends. The receiving ends accurately return the read response data or write response data to the source initiating end of the transaction to be transmitted, so that the AXI4 protocol is applied to the application scenarios of multiple initiating ends and multiple receiving ends, and chaotic transmission of transactions is avoided. Moreover, a multi-master multi-slave AXI interconnection mechanism is implemented to meet the protocol requirements of AXI4 and ensure the correct transmission order; a timeout mechanism and an error reporting mechanism are designed for the Master device interface and the Slave device interface to handle communication anomalies of devices during transmission; a transmission transaction source device identification scheme is designed to determine the destination Master device of the Slave device response data according to the storage order of each entry in the circular queue, the read / write Master device queue of the Slave device, and the AXI4 protocol, without increasing the ID width or sideband signals, realizing transparent transmission.
[0168] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0169] An embodiment of the present application further provides a on-chip transaction processing method, which is applied to the on-chip transaction processing system provided in the above embodiment.
[0170] As Figure 8 shown, it is a schematic flowchart of the on-chip transaction processing method provided by an embodiment of the present application. The on-chip transaction processing method includes:
[0171] Step 801, sending the to-be-processed transaction of the initiating end to the interconnection module;
[0172] Step 802, controlling the interconnection module to screen the to-be-transmitted transactions from the to-be-processed transactions sent by multiple initiating ends according to the transmission control information of the to-be-processed transactions after receiving the to-be-processed transactions sent by multiple initiating ends, and sending the to-be-transmitted transactions to the corresponding receiving ends;
[0173] Step 803, based on the receiving end receiving the to-be-transmitted transaction sent by the interconnection module, and returning read response data or write response data to the source initiating end of the to-be-transmitted transaction.
[0174] For the description of the features in the corresponding embodiment of the on-chip transaction processing method, reference can be made to the relevant description of the corresponding embodiment of the on-chip transaction processing system, which will not be elaborated here one by one.
[0175] An embodiment of the present application further provides an electronic device. As Figure 9 shown, it is a schematic structural diagram of the electronic device provided by an embodiment of the present application, including a processor 10 and a memory 20. The memory 20 stores a computer program, and the processor 10 is configured to run the computer program to execute the steps in any one of the above embodiments of the on-chip transaction processing method.
[0176] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any one of the above embodiments of the on-chip transaction processing method when running.
[0177] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks or optical discs and other various media that can store computer programs.
[0178] Embodiments of the present application also provide a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the on-chip transaction processing method are implemented.
[0179] Embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the on-chip transaction processing method are implemented.
[0180] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0181] The above has introduced in detail an on-chip transaction processing system, method, electronic device, and storage medium provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. An on-chip transaction processing system, characterized in that, Including: Multiple initiating ends, an interconnection module, and multiple receiving ends; The initiating end is used to send a transaction to be processed to the interconnection module; The interconnection module is used to receive transactions to be processed sent by multiple initiating ends, screen transactions to be transmitted from the transactions to be processed according to the transmission control information of the transactions to be processed, and send the transactions to be transmitted to the corresponding receiving ends; The receiving end is used to receive the transaction to be transmitted sent by the interconnection module and return read response data or write response data to the source initiating end of the transaction to be transmitted; The interconnection module includes: An arbitration module, configured to send the transaction to be processed to the transmission control module in sequence according to the priorities of the initiating ends and the attribute information of the transaction to be processed; A transmission control module, configured to parse any transaction to be processed to obtain the transmission control information of the transaction to be processed, write the transmission control information as a transaction entry into a preset circular queue, and screen the transaction to be transmitted by traversing the preset circular queue; Wherein, the transmission control information of the transaction to be processed at least includes a source initiating end identifier, a destination receiving end identifier, an address to be accessed, a transaction identifier, a read / write identifier, and a transmission status identifier; The transmission control module is specifically configured to: When obtaining the transmission control information of any transaction to be processed, locate the tail of the corresponding transmission transaction waiting sequence in the preset circular queue according to the source initiating end identifier represented by the transmission control information; Search clockwise from the tail of the transmission transaction waiting sequence for a node with a transmission status identifier of idle, and use this node as the target insertion node; Insert the transmission control information as a transaction entry into the target insertion node, and modify the transmission status identifier of the target insertion node to waiting for transmission start; The transmission control module is further configured to: Select any head of a transmission transaction waiting sequence in the preset circular queue as the destination node; Select a node with a transmission status identifier that meets a preset maintenance condition in the preset circular queue as the node to be maintained; Use the node to be maintained closest to the destination node in the counterclockwise direction as the target maintenance node, and move the queue maintenance pointer to the target maintenance node, so that the queue maintenance pointer moves to the boundary position between the transaction nodes to be responded and the idle nodes in the preset circular queue; Wherein, the target maintenance node is the earliest transaction node to be responded.
2. The on-chip transaction processing system according to claim 1, wherein The transmission control module is further configured to: After inserting the transmission control information as a transaction entry into the target insertion node, search counterclockwise from the target insertion node for the first transmission preorder node with the same destination receiving end identifier; Write the position of the transmission preorder node as the preorder transmission transaction position into the transaction entry of the target insertion node; In the case where the transmission preorder node is not found, record the preorder transmission transaction position of the transaction entry of the target insertion node as a non-normal value.
3. The on-chip transaction processing system according to claim 1, characterized in that, The transmission control module is further configured to: After inserting the transmission control information as a transaction entry into the target insertion node, starting from the target insertion node, search counterclockwise along the queue maintenance pointer to find the previous response node whose source originator identifier, transaction identifier, and read / write identifier are all the same; Use the position of the previous response node as the previous response transaction position and write it into the transaction entry of the target insertion node; In the case where the previous response node is not found, record the previous response transaction position of the transaction entry of the target insertion node as an abnormal value.
4. The on-chip transaction processing system according to claim 1, wherein The transmission control module is further configured to: When inserting the transmission control information as a transaction entry into the target insertion node, preset a processing timer to load a timing limit and start counting down; When the countdown of the preset processing timer ends, if the transmission status identifier of the target insertion node is still waiting for transmission to start, trigger a timeout and modify the transmission status identifier of the target insertion node to the receiving end waiting for a timeout response.
5. The on-chip transaction processing system according to claim 2, wherein The transmission control module is specifically configured to: Generate an entry sending thread for each originator; For any one of the originators, based on the entry sending thread, starting from the head of the transmission transaction waiting sequence corresponding to the originator, search clockwise along the queue maintenance pointer to find the first node whose source originator identifier is the originator number, transmission status identifier is waiting for transmission to start, and read / write identifier is write, and use this node as the node to be sent for writing; When it is determined that the write transaction interface status of the destination receiver corresponding to the node to be sent for writing meets the preset write transaction receiving condition, and the previous transmission transaction position of the transaction entry of the node to be sent for writing is an abnormal value, write the originator number of the node to be sent for writing into the write data originator queue and write response originator queue of the destination receiver, so that the destination receiver responds to the write transactions of each originator in sequence; After writing the originator number of any one of the nodes to be sent for writing into the write data originator queue and write response originator queue of the corresponding destination receiver, modify the transmission status identifier of the node to be sent for writing from waiting for transmission to start to in transmission.
6. The on-chip transaction processing system according to claim 5, characterized in that, The transmission control module is further configured to: When it is determined that the write transaction interface status of the destination receiver corresponding to the node to be sent for writing meets the preset write transaction receiving condition, but the previous transmission transaction position of the transaction entry of the node to be sent for writing is the previous transmission transaction position, after determining that the transmission status identifier of the previous transmission node of the previous transmission transaction position is in transmission, write the originator number of the node to be sent for writing into the write data originator queue and write response originator queue of the destination receiver.
7. The on-chip transaction processing system according to claim 5, characterized in that The transmission control module is further configured to: For any one of the originators, based on the entry sending thread, starting from the head of the transmission transaction waiting sequence corresponding to the originator, search clockwise along the queue maintenance pointer to find the first node whose source originator identifier is the originator number, transmission status identifier is waiting for transmission to start, and read / write identifier is read, and use this node as the node to be sent for reading; When it is determined that the read transaction interface status of the destination receiver corresponding to the to-be-sent read node meets the preset read transaction reception condition, and the previous transmission transaction position of the transaction entry of the to-be-sent read node is a non-normal value, write the originator number of the to-be-sent read node into the read response originator queue of the destination receiver, so that the destination receiver responds to the read transactions of each originator in order; After reading the originator number of any to-be-sent read node into the read response originator queue of the corresponding destination receiver, modify the transmission status flag of this to-be-sent read node from waiting for transmission start to waiting for response.
8. The on-chip transaction processing system according to claim 5, characterized in that The originator is used for: Starting from the queue maintenance pointer, find the first node in the clockwise direction of the transmission transaction waiting sequence head corresponding to the originator, where the source originator identifier is the originator number, the transmission status flag is in transmission, and the read / write flag is write, and use this node as the to-be-transmitted data write node; When it is determined that the write data interface status of the destination receiver and the originator corresponding to the to-be-transmitted data write node both meet the preset write data reception condition, transmit the write data to the destination receiver once; When it is determined that the write data interface status of the destination receiver corresponding to the to-be-transmitted data write node meets the preset write data reception condition, but the write data interface status of the originator does not meet the preset write data reception condition, or when the write data interface status of both the destination receiver and the originator does not meet the preset write data reception condition, end the transmission of the write data and modify the transmission status flag of the to-be-transmitted data write node to originator response timeout; When it is determined that the write data interface status of the originator corresponding to the to-be-transmitted data write node meets the preset write data reception condition, but the destination receiver does not meet the preset write data reception condition, forcefully transmit the write data to the destination receiver once, and modify the transmission status flag of the to-be-transmitted data write node to receiver response timeout; When the to-be-transmitted data write node meets the preset status modification condition, if the transmission status flag of the to-be-transmitted data write node is in transmission, modify it to waiting for response; If the transmission status flag of the to-be-transmitted data write node is originator response timeout, modify it to originator timeout waiting for response; If the transmission status flag of the to-be-transmitted data write node is receiver response timeout, modify it to receiver timeout waiting for response; Among them, when the transmission status flag of any node in the preset circular queue is waiting for response, originator timeout waiting for response, or receiver timeout waiting for response, it is determined that this node meets the preset maintenance condition.
9. The on-chip transaction processing system according to claim 7, wherein The receiver is used for: When obtaining any read response data at the read data interface, starting from the queue maintenance pointer, find the first node in the clockwise direction where the destination receiver identifier is the receiver number and the transaction identifier matches the return identifier of the read response data, and use this node as the to-be-returned read node; Judge whether the source originator identifier of the to-be-returned read node is the first to-be-matched node in the read response originator queue of the receiver; In the case where the source initiating end identifier of the node to be returned for reading is not the first node to be matched in the read response initiating end queue of the receiving end, modify the node to be matched to a non-matching node, define the node to be returned for reading as the node not to be searched in the next round, and return to execute the step of searching clockwise from the queue maintenance pointer to find the first node whose destination receiving end identifier is the receiving end number and the transaction identifier matches the return identifier of the read response data, and use this node as the node to be returned for reading, so as to re-screen the node to be returned for reading; In the case where the source initiating end identifier of the node to be returned for reading is the first node to be matched in the read response initiating end queue of the receiving end, transmit the read response data to the source initiating end corresponding to the node to be returned for reading.
10. The on-chip transaction processing system according to claim 9, wherein The transmission control module is used for: When the transmission status identifier of any node in the preset circular queue is modified to waiting for response, use this node as the read response node; When it is determined that the transmission status identifier of the response pre-node corresponding to the pre-response transaction position of the read response node is idle, start waiting for the read data interface of the destination receiving end corresponding to the read response node to obtain the read response data; If within the preset waiting period, the read data interface of the destination receiving end obtains the read response data, then determine whether the read data interface of the source initiating end corresponding to the read response node meets the preset read data reception condition; When it is determined that the read data interface of the source initiating end corresponding to the read response node meets the preset read data reception condition, the source initiating end receives the read response data returned by the destination receiving end based on the read data interface.
11. The on-chip transaction processing system according to claim 10, wherein The transmission control module is also used for: When the to-be-processed read transaction corresponding to the read response node completes the target number of responses, determine that the to-be-processed read transaction of the read response node has been completed, and modify the transmission status identifier of the read response node to idle; If within the preset waiting period, the read data interface of the destination receiving end does not obtain the read response data, forcefully end the to-be-processed read transaction corresponding to the read response node, and modify the transmission status identifier of the read response node to idle.
12. The on-chip transaction processing system according to claim 8, characterized in that, The transmission control module is used for: When the transmission status identifier of any node in the preset circular queue is modified to waiting for response, initiating end timeout waiting for response or receiving end timeout waiting for response, use this node as the write response node; When it is determined that the transmission status identifier of the response pre-node corresponding to the pre-response transaction position of the write response node is idle, start waiting for the write response interface of the destination receiving end corresponding to the write response node to obtain the write response data; If within the preset waiting period, the write response interface of the destination receiving end obtains the write response data, then determine whether the write response interface of the source initiating end corresponding to the write response node meets the preset write response reception condition; When it is determined that the write response interface of the source initiating end corresponding to the write response node meets the preset write response reception condition, the source initiating end receives the write response data returned by the destination receiving end based on the write response interface.
13. The on-chip transaction processing system according to claim 12, characterized in that, The transmission control module is also used for: When the write transaction to be processed corresponding to the write response node obtains the target number of write response data, it is determined that the write transaction to be processed of the write response node is completed, and the transmission status flag of the write response node is modified to idle; If the write response interface of the destination receiving end does not obtain the write response data within the preset waiting period, the write transaction to be processed corresponding to the write response node is forcibly ended, and the transmission status flag of the write response node is modified to idle.
14. A method for on-chip transaction processing, characterized in that, Applied to the on-chip transaction processing system according to any one of claims 1 to 13, the method includes: Sending the transaction to be processed of the initiator to the interconnect module; Controlling the interconnect module to filter the transactions to be transmitted from the transactions to be processed sent by multiple initiators according to the transmission control information of the transactions to be processed after receiving the transactions to be processed sent by multiple initiators, and sending the transactions to be transmitted to the corresponding receiving ends; Based on the receiving end receiving the transaction to be transmitted sent by the interconnect module, and returning read response data or write response data to the source initiator of the transaction to be transmitted.
15. An electronic device, characterized in that, Including: A memory for storing a computer program; A processor for implementing the steps of the on-chip transaction processing method according to claim 14 when executing the computer program.
16. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of the on-chip transaction processing method according to claim 14 when executed by a processor.
17. A computer program product, comprising a computer program, characterized in that, The computer program implements the steps of the on-chip transaction processing method according to claim 14 when executed by a processor.
Citation Information
Patent Citations
Log management method of distributed persistent memory transaction system
CN111400268A
Crossbar switch module, multi-core interconnection chip, transaction processing method and product
CN117951070A