A slave device supporting AXI exclusive access

By introducing the read-write command cache FIFO module, AWLOCK/ARLOCK judgment module and AWREADY/ARREADY control module into the slave device, the interference problem during exclusive access is solved, the correctness and stability of AXI exclusive access are achieved, and the design is simplified complexity.

CN117312203BActive Publication Date: 2024-08-23QILU ZHONGKE NEW KINETIC ENERGY INNOVATION RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311405776.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2024-08-23
Estimated Expiration
2043-10-26

AI Technical Summary

Technical Problem

After the existing exclusive access slave device receives the exclusive access command from the host, it is easily interfered by the address commands of other hosts, resulting in data disorder and inconsistency, and the reliability and stability of the slave cannot be guaranteed.

Method used

A slave device that supports AXI exclusive access is designed. Through the read and write command cache FIFO module, AWLOCK/ARLOCK judgment module, AWREADY/ARREADY control module and command waiting module, it ensures that other hosts are avoided during the host's access to a specific slave. Interference, do not receive new address commands until the exclusive access is completed to avoid data conflicts.

Benefits of technology

It improves the reliability and stability of the slave machine, simplifies the overall structure and design complexity, and ensures the correctness of exclusive access and the priority of the corresponding host machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117312203B
    Figure CN117312203B
Patent Text Reader

Abstract

A slave device supporting AXI exclusive access, the device comprising: a read / write command cache FIFO module, used for caching multiple AXI protocol address commands; an AWLOCK / ARLOCK judgment module, used for analyzing whether the address command is exclusive access; an AWREADY / ARREADY control module, used for pulling down the AWREADY / ARREADY signal after receiving the exclusive access command and no longer receiving new address commands to avoid interference from other commands, until the exclusive access transmission is completed and then pulling up the AWREADY / ARREADY signal to receive new address commands; a command waiting module, used for waiting for other transmissions to be completed when multiple transmissions are not completed before the slave receives the exclusive access command, and not participating in the out-of-order return process of other address commands; a data processing module, used for processing corresponding read / write data according to the received address command and feeding back corresponding responses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field:

[0001] The present invention relates to a slave device supporting AXI exclusive access. Background technology:

[0002] The AXI bus protocol was proposed by ARM and is the most important component of the AMBA protocol. It is a high-performance, high-bandwidth, low-power bus interface that is widely used in system-level integrated circuits. In multi-core processors and system-on-chips, the host device and the slave device are connected through the bus, and multiple host devices can communicate with the same slave device.

[0003] In some specific application environments, the host needs to have exclusive access to a specific slave, that is, during the period when the host accesses the slave, it is necessary to ensure that it is not accessed by other hosts to avoid the host or slave data being rewritten and data conflicts. After receiving the host's exclusive access command, the existing exclusive access slave device cannot fundamentally guarantee that the slave will avoid receiving the address command of the new host after receiving the exclusive access command due to the small number of channel categories and channels of the slave device and the complex overall structure. The slave is easily disturbed by the address commands sent by other hosts, resulting in data disorder, thereby causing errors and data inconsistencies in the slave. The reliability and stability of the device cannot be guaranteed, and the priority and accuracy of the exclusive access to the corresponding host cannot be ensured. Summary of the invention:

[0004] The embodiment of the present invention provides a slave device supporting AXI exclusive access, which has a reasonable structural design and establishes a data transmission network between a host and a slave based on the mutual cooperation of multiple functional data channels in the AXI protocol. It can ensure that the slave is not accessed by other hosts during the host's access to a specific slave, and can not receive a new address command until the exclusive access is completed, thereby reducing interference from other hosts, avoiding data rewriting and data conflicts, and ensuring the correctness of the exclusive access after the slave receives the exclusive access command, thereby improving the reliability and stability of the device, simplifying the overall structure of the device, reducing the overall design complexity and development difficulty, and solving the problems existing in the prior art.

[0005] The technical solution adopted by the present invention to solve the above technical problems is:

[0006] A slave device supporting AXI exclusive access, the device comprising:

[0007] A read-write command cache FIFO module, wherein the read-write command cache FIFO module is used to cache multiple AXI protocol address commands;

[0008] An AWLOCK / ARLOCK judgment module, wherein the AWLOCK / ARLOCK judgment module is used to analyze whether the address command is an exclusive access;

[0009] An AWREADY / ARREADY control module, wherein the AWREADY / ARREADY control module is used to pull down the AWREADY / ARREADY signal after receiving an exclusive access command and no longer receive a new address command to avoid interference from other commands, until the exclusive access transmission is completed and then pull up the AWREADY / ARREADY signal to receive a new address command;

[0010] A command waiting module, wherein the command waiting module is used to wait for other transmissions to be completed when there are multiple transmissions not completed before the slave receives the exclusive access command, and does not participate in the out-of-order return process of other address commands;

[0011] The data processing module is used to process the corresponding read and write data according to the received address command and feed back the corresponding response.

[0012] The AXI protocol includes a write command channel, a write data channel, a write response channel, a read command channel, and a read data channel; the write command channel is provided with a write address signal and a write control signal sent by the host to the slave, and the write data channel is provided with data to be written by the host to the slave;

[0013] The write response channel is used to feed back the write transfer status to the host, and the read command channel is provided with a read address signal and a read control signal sent by the host to the slave;

[0014] The slave device is equipped with decoding logic for the AWLOCK / ARLOCK signal to determine whether it is 1. When the host transmits the instruction that the AWLOCK / ARLOCK signal is 1, it is exclusive access, ensuring that it is only accessed by the corresponding host device.

[0015] The exclusive access mechanism can prevent other hosts from interfering with the current access, thereby avoiding errors and data inconsistencies under read-modify competition conditions; the exclusive access mechanism is used to give priority to write commands when the slave receives exclusive write access and non-exclusive read access commands at the same time, ensuring that data is written first and then read, thereby avoiding inaccuracy in data reading of traditional devices.

[0016] The access process of the device is:

[0017] S1, the first host sends a write address signal and write data related to exclusive access to the first slave, and the bus controller receives the write address signal and write data sent by the first host, and returns a write response to the first host before performing a write operation on the first slave;

[0018] S2, the second host sends a read command to the first slave, which is received by the bus controller and then sent to the first slave;

[0019] S3, the bus controller transmits the exclusive write command sent by the first master and the non-exclusive read command sent by the second master to the first slave at the same time;

[0020] S4, after slave No. 1 completes processing the exclusive write command sent by master No. 1, it processes the non-exclusive read command sent by master No. 2, and finally returns the read response and read data to master No. 2.

[0021] When the commands sent by the No. 1 host and the No. 2 host are both exclusive access commands and arrive at the No. 1 slave at the same time, write priority, read priority, or read-write rotation priority can be selected according to user configuration.

[0022] The present invention adopts the above structure, caches multiple AXI protocol address commands through a read-write command cache FIFO module; analyzes whether the address command is exclusive access through an AWLOCK / ARLOCK judgment module; pulls down the AWREADY / ARREADY signal after receiving the exclusive access command and no longer receives new address commands to avoid interference from other commands; when there are multiple transmissions that are not completed before the slave receives the exclusive access command, the command waiting module waits for other transmissions to be completed and does not participate in the disorderly return process of other address commands; and processes the corresponding read-write data according to the received address command through a data processing module and feeds back the corresponding response, which has the advantages of being simple, practical, stable, reliable, accurate and efficient. Description of the drawings:

[0023] Figure 1 It is a structural schematic diagram of the present invention.

[0024] Figure 2 It is a working schematic diagram of the present invention.

[0025] Figure 3 It is a structural diagram of exclusive access of the present invention.

[0026] Figure 4 It is a flowchart of exclusive access of the present invention. Specific implementation method:

[0027] In order to clearly illustrate the technical features of the present solution, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings.

[0028] like Figure 1-4 As shown in , a slave device supporting AXI exclusive access, the device comprising:

[0029] A read-write command cache FIFO module, wherein the read-write command cache FIFO module is used to cache multiple AXI protocol address commands;

[0030] An AWLOCK / ARLOCK judgment module, wherein the AWLOCK / ARLOCK judgment module is used to analyze whether the address command is an exclusive access;

[0031] An AWREADY / ARREADY control module, wherein the AWREADY / ARREADY control module is used to pull down the AWREADY / ARREADY signal after receiving an exclusive access command and no longer receive a new address command to avoid interference from other commands, until the exclusive access transmission is completed and then pull up the AWREADY / ARREADY signal to receive a new address command;

[0032] A command waiting module, wherein the command waiting module is used to wait for other transmissions to be completed when there are multiple transmissions not completed before the slave receives the exclusive access command, and does not participate in the out-of-order return process of other address commands;

[0033] The data processing module is used to process the corresponding read and write data according to the received address command and feed back the corresponding response.

[0034] The AXI protocol includes a write command channel, a write data channel, a write response channel, a read command channel, and a read data channel; the write command channel is provided with a write address signal and a write control signal sent by the host to the slave, and the write data channel is provided with data to be written by the host to the slave;

[0035] The write response channel is used to feed back the write transfer status to the host, and the read command channel is provided with a read address signal and a read control signal sent by the host to the slave;

[0036] Both the write command channel and the read command channel include an AWLOCK / ARLOCK signal, and the AWLOCK / ARLOCK signal is used to determine whether the real-time instruction is an exclusive write / read instruction.

[0037] When the AWLOCK / ARLOCK signal of the host transfer instruction is 1, it means that the transfer instruction is exclusive access.

[0038] When the AWLOCK / ARLOCK signal of the instruction received by the slave is 1, it means that this instruction is an exclusive write / read instruction. At this time, the exclusive access mechanism is enabled to support the exclusive access expected by the host and ensure that it is accessed only by the corresponding host device.

[0039] The exclusive access mechanism can prevent other hosts from interfering with the current access, thereby avoiding errors and data inconsistencies under read-modify competition conditions. The exclusive access mechanism is used to give priority to write commands when the slave receives exclusive write access and non-exclusive read access commands at the same time, ensuring that data is written first and then read, thereby avoiding inaccuracies in data reading from traditional devices.

[0040] The access process of the device is:

[0041] S1, the first host sends a write address signal and write data related to exclusive access to the first slave, and the bus controller receives the write address signal and write data sent by the first host, and returns a write response to the first host before performing a write operation on the first slave;

[0042] S2, the second host sends a read command to the first slave, which is received by the bus controller and then sent to the first slave;

[0043] S3, the bus controller transmits the exclusive write command sent by the first master and the non-exclusive read command sent by the second master to the first slave at the same time;

[0044] S4, after slave No. 1 completes processing the exclusive write command sent by master No. 1, it processes the non-exclusive read command sent by master No. 2, and finally returns the read response and read data to master No. 2.

[0045] When the commands sent by the No. 1 host and the No. 2 host are both exclusive access commands and arrive at the No. 1 slave at the same time, write priority, read priority, or read-write rotation priority can be selected according to user configuration.

[0046] The working principle of a slave device supporting AXI exclusive access in an embodiment of the present invention is as follows: based on the mutual cooperation of multiple functional data channels within the AXI protocol, a data transmission network is established between the host and the slave, which can ensure that the slave is not accessed by other hosts during the host's access to a specific slave, and can not receive new address commands until the exclusive access is completed, thereby reducing interference from other hosts, avoiding data rewriting and data conflicts, and ensuring the correctness of exclusive access after the slave receives the exclusive access command, thereby improving the reliability and stability of the device, simplifying the overall structure of the device, reducing the overall design complexity and development difficulty, and supporting AXI exclusive access to ensure the priority of the exclusive access corresponding to the host.

[0047] AXI is a bus protocol, an on-chip bus for high performance, high bandwidth, and low latency. Its address / control and data phases are separated, supporting unaligned data transmission. In burst transmission, only the first address is required. Separate read and write data channels are provided, and Outstanding transmission access and out-of-order access are supported, making it easier to perform timing convergence and meeting the requirements of ultra-high performance and complex on-chip system design.

[0048] In the overall scheme, the device includes: a read-write command cache FIFO module, which is used to cache multiple AXI protocol address commands; an AWLOCK / ARLOCK judgment module, which is used to analyze whether the address command is an exclusive access; an AWREADY / ARREADY control module, which is used to pull down the AWREADY / ARREADY signal after receiving the exclusive access command and no longer receive new address commands to avoid interference from other commands, until the exclusive access transmission is completed and then pull up the AWREADY / ARREADY signal to receive new address commands; a command waiting module, which is used to wait for other transmissions to be completed when there are multiple transmissions that are not completed before the slave receives the exclusive access command, and does not participate in the disorderly return process of other address commands; a data processing module, which is used to process the corresponding read and write data according to the received address command and feedback the corresponding response.

[0049] For the AXI protocol, it includes a write command channel, a write data channel, a write response channel, a read command channel and a read data channel; the write command channel is provided with a write address signal and a write control signal sent by the host to the slave, and the write data channel is provided with data to be written by the host to the slave; the write response channel is used to feedback the write transfer status to the host, and the read command channel is provided with a read address signal and a read control signal sent by the host to the slave; the write command channel and the read command channel both contain AWLOCK / ARLOCK signals, and the AWLOCK / ARLOCK signals are used to determine whether the real-time instruction is an exclusive write / read instruction.

[0050] In actual use, the specific value of the AWLOCK / ARLOCK signal can be determined to determine whether the real-time instruction or real-time command is an exclusive access, so that corresponding actions are performed on the host side and the slave side respectively, thereby completing the entire processing flow of exclusive access; specifically, when the AWLOCK / ARLOCK signal of the host transmission instruction is 1, it means that the transmission instruction is an exclusive access; when the AWLOCK / ARLOCK signal of the instruction received by the slave is 1, it means that this instruction is an exclusive write / read instruction, which is guaranteed to be accessed only by the corresponding host device. The exclusive access mechanism prevents other host devices from interfering with the current access, thereby avoiding errors and data inconsistencies under competition conditions such as read-rewrite, which helps to improve the reliability and stability of the system.

[0051] The slave device in the present application can be widely used in SOC design. Generally speaking, SOC is a system-on-chip, which is an integrated circuit with a dedicated purpose, which contains a complete system and all the contents of embedded software; at the same time, it is a technology used to realize the entire process from determining the system function to software / hardware division and completing the design.

[0052] Correspondingly, the exclusive access process of the present invention is as follows: host No. 1 sends a write address signal and write data related to exclusive access to slave No. 1, the bus controller receives the write address signal and write data sent by host No. 1, and returns a write response to host No. 1 before performing a write operation on slave No. 1; host No. 2 sends a read command to slave No. 1, which is received by the bus controller and then sent to slave No. 1; the bus controller simultaneously transmits the exclusive write command sent by host No. 1 and the non-exclusive read command sent by host No. 2 to slave No. 1; after slave No. 1 completes processing the exclusive write command sent by host No. 1, it processes the non-exclusive read command sent by host No. 2, and finally returns the read response and read data to host No. 2.

[0053] When the commands sent by the No. 1 host and the No. 2 host are both exclusive access commands and arrive at the No. 1 slave at the same time, write priority, read priority, or read-write rotation priority can be selected according to user configuration.

[0054] Furthermore, the overall structure of the present application is simple, requiring only a bus controller to be set between the host and the slave, combined with the AXI protocol and functional channels, which can reduce design complexity and development difficulty.

[0055] To summarize, a slave device supporting AXI exclusive access in an embodiment of the present invention establishes a data transmission network between a host and a slave based on the mutual cooperation of multiple functional data channels within the AXI protocol, and can ensure that the slave is not accessed by other hosts during the host's access to a specific slave, and can only receive new address commands after the exclusive access is completed, thereby reducing interference from other hosts, avoiding data rewriting and data conflicts, and ensuring the correctness of the exclusive access after the slave receives the exclusive access command, thereby improving the reliability and stability of the device, simplifying the overall structure of the device, reducing the overall design complexity and development difficulty, and supporting AXI exclusive access to ensure the priority of the exclusive access corresponding to the host.

[0056] The above specific implementation manner cannot be used as a limitation on the protection scope of the present invention. For those skilled in the art, any substitution, improvement or change made to the implementation manner of the present invention falls within the protection scope of the present invention.

[0057] The matters not described in detail in the present invention are all known technologies to those skilled in the art.

Claims

1. A slave device supporting AXI exclusive access, It is characterized in that The device comprises: A read-write command cache FIFO module, wherein the read-write command cache FIFO module is used to cache multiple AXI protocol address commands; An AWLOCK or ARLOCK judgment module, wherein the AWLOCK or ARLOCK judgment module is used to analyze whether the address command is an exclusive access; An AWREADY or ARREADY control module, wherein the AWREADY or ARREADY control module is used to pull down the AWREADY or ARREADY signal after receiving an exclusive access command and no longer receive a new address command to avoid interference from other commands, until the corresponding exclusive access command is transmitted and then pull up the AWREADY or ARREADY signal to receive a new address command; A command waiting module, wherein the command waiting module is used to wait for other transmissions to be completed when there are multiple transmissions not completed before the slave receives the exclusive access command, and does not participate in the out-of-order return process of other address commands; A data processing module, the data processing module is used to process the corresponding read and write data according to the received address command and feed back the corresponding response; The access process of the device is: S1, the first host sends a write address signal and write data related to exclusive access to the first slave, and the bus controller receives the write address signal and write data sent by the first host, and returns a write response to the first host before performing a write operation on the first slave; S2, the second host sends a read command to the first slave, which is received by the bus controller and then sent to the first slave; S3, the bus controller transmits the exclusive write command sent by the first master and the non-exclusive read command sent by the second master to the first slave at the same time; S4, after slave No. 1 completes processing the exclusive write command sent by master No. 1, it processes the non-exclusive read command sent by master No. 2, and finally returns the read response and read data to master No.

2.

2. A slave device supporting AXI exclusive access according to claim 1, Features: The slave device is equipped with decoding logic for the AWLOCK or ARLOCK signal to determine whether it is 1. When the host transmits the instruction AWLOCK or ARLOCK signal to 1, it is exclusive access, ensuring that it is only accessed by the corresponding host device.

3. A slave device supporting AXI exclusive access according to claim 2, Features: Setting up an exclusive access mechanism can prevent other hosts from interfering with the current access, thereby avoiding errors and data inconsistencies under read-modify competition conditions; the exclusive access mechanism is used to give priority to write commands when the slave receives exclusive write access and non-exclusive read access commands at the same time, ensuring that data is written first and then read out, thereby avoiding inaccuracies in data reading from traditional devices.

4. A slave device supporting AXI exclusive access according to claim 1, Features: When the commands sent by the No. 1 host and the No. 2 host are both exclusive access commands and arrive at the No. 1 slave at the same time, write priority, read priority, or read-write rotation priority is selected according to the user configuration.