Master equipment access method and device for AXI bus, terminal equipment and storage medium

By using the ID register and ID flag register in the AXI bus, we control multiple master devices to select slave devices among multiple groups of candidate slave devices, solving the problem of low access efficiency of multiple master devices in the AXI bus, and achieving simultaneous access.

CN120407486APending Publication Date: 2025-08-01SHANGHAI ANLOGIC INFOTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510410460.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the AXI bus, when multiple master devices access simultaneously, the limited ID bit width leads to low access efficiency, and the master device needs to wait for the previous master device to access the slave device before accessing, which reduces access efficiency.

Method used

By obtaining the request ID number of the master device to be accessed, the ID register and the ID flag register are used to determine whether there is an accessed master device, and the accessed master device to be accessed selects a suitable slave device among multiple groups of candidate slave devices for access, including the first slave device and the second slave device, the problem of ID conflict is solved.

Benefits of technology

It realizes that multiple master devices access slave devices at the same time, improves the access efficiency of the AXI bus, and solves the problem of only one master device currently allowing access to slave devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407486A_ABST
    Figure CN120407486A_ABST
Patent Text Reader

Abstract

The invention discloses a master device access method and device for an AXI bus, terminal equipment and a storage medium. The method comprises the steps of obtaining a request ID number sent to the AXI bus by a master device to be accessed; according to the request ID number and a register ID number in an ID register, judging whether an accessed master device exists or not; if not, controlling the to-be-accessed master device to access a first slave device based on the request ID number; wherein the first slave device is a slave device corresponding to the request ID number in a plurality of first candidate slave devices; if yes, controlling the to-be-accessed master device to access a second slave device or a third slave device based on the state of the ID flag register; according to the invention, the access efficiency of the plurality of main devices through the AXI bus is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of AXI bus, and particularly to a master device access method, device, terminal device and storage medium for AXI bus. Background Art

[0002] With the increasing demand for big data processing, more and more IPs with different functions are integrated in the NoC chip, and they will simultaneously access multiple master devices and slave devices of the AXI bus. This process uses IDs to identify the master devices and slave devices. When the demand for multiple master devices to simultaneously access the AXI bus increases, the ID demand also increases. In the case of limited ID bit width, for the same ID, the master devices will queue up for access. After the first master device finishes accessing the slave device corresponding to the current ID, the next master device can access the slave device corresponding to the current ID. This greatly reduces the access efficiency. Therefore, there is a problem of low access efficiency when multiple master devices simultaneously access the AXI bus.

[0003] Therefore, there is an urgent need for a master device access strategy for AXI bus to solve the problem of low access efficiency when multiple master devices access through the AXI bus. Summary of the Invention

[0004] Embodiments of the present invention provide a master device access method, device, terminal device and storage medium for AXI bus to solve the problem of low access efficiency when multiple master devices access through the AXI bus.

[0005] To solve the above problems, an embodiment of the present invention provides a master device access method for AXI bus, including:

[0006] Obtain the request ID number sent by the master device to be accessed to the AXI bus;

[0007] Judge whether there is an already accessed master device according to the request ID number and the stored ID number in the ID register;

[0008] If not, based on the request ID number, control the master device to be accessed to access the first slave device; wherein, the first slave device is: among several first candidate slave devices, the slave device corresponding to the request ID number;

[0009] If it exists, based on the status of the ID flag register, control the to-be-accessed master device to access the second slave device or the third slave device; wherein, the second slave device is: among a number of first candidate slave devices, the slave device corresponding to the request ID number; the third slave device is: among a number of second candidate slave devices, the slave device corresponding to the request ID number; wherein, the number of slave devices of the first candidate slave devices is the same as that of the second candidate slave devices.

[0010] As an improvement of the above solution, the judging whether there is an accessed master device according to the request ID number and the stored ID number in the ID register includes:

[0011] Perform character matching between the request ID number and each stored ID number in the ID register to obtain the matching degree corresponding to the request ID number and each stored ID number;

[0012] Judge whether there is an accessed master device according to each of the matching degrees;

[0013] If there is each stored ID number with a matching degree greater than or equal to the matching threshold, the accessed master device exists; wherein, the accessed master device accesses the slave device according to the ID number identical to the request ID number;

[0014] Otherwise, the accessed master device does not exist.

[0015] As an improvement of the above solution, the controlling the to-be-accessed master device to access the second slave device or the third slave device based on the status of the ID flag register includes:

[0016] Judge the status of the ID flag register;

[0017] If the status is 1, control the to-be-accessed master device to access the third slave device; wherein, the accessed master device accesses the second slave device according to the ID number identical to the request ID number;

[0018] If the status is 0, control the to-be-accessed master device to access the second slave device; wherein, the accessed master device accesses the third slave device according to the ID number identical to the request ID number.

[0019] As an improvement of the above solution, before controlling the to-be-accessed master device to access the second slave device or the third slave device based on the status of the ID flag register, it further includes: deleting the stored ID number in the ID register that matches the request ID number.

[0020] As an improvement of the above solution, after controlling the to-be-accessed master device to access the third slave device, it further includes: setting the ID register to 0.

[0021] As an improvement to the above solution, after controlling the master device to be accessed to access the second slave device, it further includes: setting the ID register to 1.

[0022] As an improvement to the above solution, after controlling the master device to be accessed to access the first slave device, it further includes: updating the request ID number as a registered ID number in the ID register.

[0023] Correspondingly, an embodiment of the present invention further provides a master device access device for an AXI bus, including: a data acquisition module, a data judgment module, a first control module, and a second control module;

[0024] The data acquisition module is used to acquire the request ID number sent by the master device to be accessed to the AXI bus;

[0025] The data judgment module is used to judge whether there is an accessed master device according to the request ID number and the registered ID number in the ID register;

[0026] The first control module is used to, if not, control the master device to be accessed to access the first slave device based on the request ID number; wherein, the first slave device is: among several first candidate slave devices, the slave device corresponding to the request ID number;

[0027] The second control module is used to, if so, control the master device to be accessed to access the second slave device or the third slave device based on the status of the ID flag register; wherein, the second slave device is: among several first candidate slave devices, the slave device corresponding to the request ID number; the third slave device is: among several second candidate slave devices, the slave device corresponding to the request ID number; wherein, the number of slave devices of the first candidate slave devices is the same as that of the second candidate slave devices.

[0028] Correspondingly, an embodiment of the present invention further provides a computer terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a master device access method for an AXI bus as described in the present invention.

[0029] Correspondingly, an embodiment of the present invention further provides a computer-readable storage medium, the computer-readable storage medium includes a stored computer program, wherein, when the computer program runs, it controls the device where the computer-readable storage medium is located to execute a master device access method for an AXI bus as described in the present invention.

[0030] As can be seen from the above, the present invention has the following beneficial effects:

[0031] The present invention provides a master device access method for an AXI bus. By obtaining the request ID number sent by the master device to be accessed to the AXI bus, it is determined whether the request ID number matches the registered ID number in the ID register, and then it can be determined whether there is a master device that has already accessed the slave device for accessing the same slave device as the request ID number: if not, the master device to be accessed can be controlled to access the first slave device corresponding to the request ID number among several first candidate slave devices; if so, it is also necessary to control the master device to be accessed to access the second slave device corresponding to the request ID number among several first candidate slave devices according to the status of the ID flag register, or control the master device to be accessed to access the third slave device corresponding to the request ID number among several second candidate slave devices. In the case where there is a master device that has already accessed the slave device, the present invention adds an ID register, an ID flag register, and multiple groups of candidate slave devices to add the master device to be accessed with the same request ID number to the access of the slave device, realizing that two master devices can access the slave device simultaneously, solving the problem that currently only one master device is allowed to access the slave device, and improving the access efficiency of multiple master devices accessing through the AXI bus. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 is a schematic flowchart of a master device access method for an AXI bus provided by an embodiment of the present invention;

[0033] Figure 2 is a schematic structural diagram of a master device access device for an AXI bus provided by an embodiment of the present invention;

[0034] Figure 3 is a schematic structural diagram of a terminal device provided by an embodiment of the present invention;

[0035] Figure 4 is a diagram of the relationship between the front and rear modules of the AXI bus provided by an embodiment of the present invention;

[0036] Figure 5 is a schematic flowchart of a master device access method for an AXI bus provided by another embodiment of the present invention;

[0037] Figure 6 is the connection relationship between the access master device, the first preset slave device, the second preset slave device, the ID register, the ID flag register, and the AXI bus provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0038] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0039] Embodiment 1

[0040] See Figure 1 , Figure 1 is a schematic flowchart of a master device access method for the AXI bus provided by an embodiment of the present invention. As Figure 1 shown, this embodiment includes steps 101 to 104, and each step is as follows:

[0041] Step 101: Obtain the request ID number sent by the master device to be accessed to the AXI bus.

[0042] In this embodiment, the relationship diagram of the front and rear modules of the AXI bus in the NoC is as Figure 4 shown:

[0043] Figure 4 The number of N and the number of M are both larger than the ID number, and there is a situation where the ID number is not enough or conflicts. The FIXD mode in burst transmission can solve the problem of all data being in one AxADDR scenario, and the INCR mode in burst transmission can solve the scenario problem where the address of the first data is AxADDR and the address of the next data is incremented by the "burst width" based on the previous data. However, both of these scenarios are relatively regular scenarios. When multiple Masters access random addresses of random slaves simultaneously, the ID number is tight.

[0044] Step 102: Determine whether there is an already accessed master device according to the request ID number and the stored ID number in the ID register.

[0045] In this embodiment, the determining whether there is an already accessed master device according to the request ID number and the stored ID number in the ID register includes:

[0046] Perform character matching between the request ID number and each stored ID number in the ID register to obtain the matching degree corresponding to the request ID number and each stored ID number;

[0047] Judge whether there is an already accessed master device according to each matching degree;

[0048] If there is each stored ID number with a matching degree greater than or equal to the matching threshold, the already accessed master device exists; wherein, the already accessed master device accesses the slave device according to the ID number identical to the request ID number.

[0049] Otherwise, the accessed master device does not exist.

[0050] Step 103: If not, based on the request ID number, control the master device to be accessed to access the first slave device; wherein, the first slave device is: among several first candidate slave devices, the slave device corresponding to the request ID number.

[0051] Step 104: If it exists, based on the status of the ID flag register, control the master device to be accessed to access the second slave device or the third slave device; wherein, the second slave device is: among several first candidate slave devices, the slave device corresponding to the request ID number; the third slave device is: among several second candidate slave devices, the slave device corresponding to the request ID number; wherein, the number of slave devices of the first candidate slave devices is the same as that of the second candidate slave devices.

[0052] In this embodiment, the controlling the master device to be accessed to access the second slave device or the third slave device based on the status of the ID flag register includes:

[0053] Judge the status of the ID flag register;

[0054] If the status is 1, control the master device to be accessed to access the third slave device; wherein, the accessed master device accesses the first slave device according to the ID number same as the request ID number.

[0055] If the status is 0, control the master device to be accessed to access the second slave device; wherein, the accessed master device accesses the second slave device according to the ID number same as the request ID number.

[0056] In this embodiment, before controlling the master device to be accessed to access the second slave device or the third slave device based on the status of the ID flag register, it further includes: deleting the register ID number in the ID register that matches the request ID number.

[0057] In this embodiment, after controlling the master device to be accessed to access the third slave device, it further includes: setting the ID register to 0.

[0058] In this embodiment, after controlling the master device to be accessed to access the second slave device, it further includes: setting the ID register to 1.

[0059] In this embodiment, after controlling the master device to be accessed to access the second slave device, it further includes: setting the ID register to 1.

[0060] In a specific embodiment, refer to Figure 6 , Figure 6The connection relationships among the master device to be accessed, the first preset slave device, the second preset slave device, the ID register, the ID flag register, and the AXI bus.

[0061] In a specific embodiment, each ID register corresponds to a 1-bit ID flag register. When the 1-bit ID flag register is 0, it indicates the first 16 slaves, and when it is 1, it indicates the last 16 slaves. The number of bits of the ID flag register can be flexibly adjusted.

[0062] An example is given in the solution, and the relevant data is as follows: Refer to Figure 5 , the ID bit width of the AXI bus is only 4 bits. The ID numbers range from 0 to 15, a total of 16. The ID number range requested by each Master is from 0 to 15, and there are 16 Masters in total. The slaves are divided into the first 16 (i.e., the first candidate slave devices described in the present invention) and the last 16 (i.e., the second candidate slave devices described in the present invention), a total of 32.

[0063] Step 1: Obtain the request ID number sent by the Master to the AXI bus;

[0064] Step 2: Store the request ID number in the ID register.

[0065] Step 3: Determine whether the ID number is already in the ID register. If not, request the slave corresponding to the ID among the first 16 slaves based on the AXI bus ID number (i.e., the first slave device described in the present invention), and store the ID number in the ID register. If so, it means that another Master is also accessing the slave with this ID at the same time, but it is not known whether it is the first 16 slaves or the last 16 slaves. Delete the ID from the ID register and proceed to Step 4.

[0066] Step 4: Determine whether the ID flag register is 1 or 0. If it is 0, access the slave corresponding to the ID among the first 16 slaves (i.e., the second slave device described in the present invention), and set the ID register to 1. If it is 1, access the slave corresponding to the ID among the last 16 slaves (i.e., the third slave device described in the present invention), and set the ID register to 0. Here is an example. Suppose the ID is 0, but the ID flag register corresponding to 0ID is 1, then access the 16th slave, that is, there are the 0th and 16th slaves with ID 0.

[0067] Refer to Figure 2 , Figure 2It is a schematic structural diagram of a master device access device for an AXI bus provided by an embodiment of the present invention, including: a data acquisition module 201, a data judgment module 202, a first control module 203, and a second control module 204;

[0068] The data acquisition module is configured to acquire a request ID number sent by a master device to be accessed to the AXI bus;

[0069] The data judgment module is configured to judge whether there is an already accessed master device according to the request ID number and the stored ID number in the ID register;

[0070] The first control module is configured to, if not, control the master device to be accessed to access a first slave device based on the request ID number; wherein, the first slave device is: among several first candidate slave devices, the slave device corresponding to the request ID number;

[0071] The second control module is configured to, if so, control the master device to be accessed to access a second slave device or a third slave device based on the status of the ID flag register; wherein, the second slave device is: among several first candidate slave devices, the slave device corresponding to the request ID number; the third slave device is: among several second candidate slave devices, the slave device corresponding to the request ID number; wherein, the number of slave devices of the first candidate slave devices is the same as that of the second candidate slave devices.

[0072] It can be understood that the above system item embodiments correspond to the method item embodiments of the present invention, and can implement the master device access method for the AXI bus provided by any one of the above method item embodiments of the present invention.

[0073] In this embodiment, by acquiring the request ID number sent by the master device to be accessed to the AXI bus, it is judged whether the request ID number matches the stored ID number in the ID register, and then it can be determined whether there is an already accessed master device to access the slave device with the same request ID number: if not, the master device to be accessed can be controlled to access the first slave device corresponding to the request ID number among several first candidate slave devices; if so, it is also necessary to control the master device to be accessed to access the second slave device corresponding to the request ID number among several first candidate slave devices according to the status of the ID flag register, or control the master device to be accessed to access the third slave device corresponding to the request ID number among several second candidate slave devices. In the case where there is an already accessed master device accessing the slave device, the present invention adds an ID register, an ID flag register, and multiple groups of candidate slave devices, and adds the master device to be accessed with the same request ID number to the access of the slave device, realizing that two master devices can access the slave device simultaneously, solving the problem that only one master device is allowed to access the slave device currently, and improving the access efficiency of multiple master devices accessing through the AXI bus.

[0074] Embodiment 2

[0075] Refer to Figure 3 , Figure 3 which is a schematic structural diagram of a terminal device provided by an embodiment of the present invention.

[0076] A terminal device in this embodiment includes: a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301. When the processor 301 executes the computer program, it implements the steps in the above-mentioned various master device access methods for the AXI bus in the embodiments, such as Figure 1 all the steps of the master device access method for the AXI bus shown. Alternatively, when the processor executes the computer program, it implements the functions of each module in the above-mentioned device embodiments, such as: Figure 2 all the modules of the master device access device for the AXI bus shown.

[0077] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute the master device access method for the AXI bus described in any of the above embodiments.

[0078] Those skilled in the art can understand that the schematic diagram is only an example of the terminal device, and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or combine some components, or different components. For example, the terminal device may further include input / output devices, network access devices, buses, etc.

[0079] The so-called processor 301 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor 301 is the control center of the terminal device, and connects various parts of the entire terminal device through various interfaces and lines.

[0080] The memory 302 can be used to store the computer programs and / or modules. By running or executing the computer programs and / or modules stored in the memory, and invoking the data stored in the memory 302, the processor 301 realizes various functions of the terminal device. The memory 302 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0081] Among them, if the modules / units integrated in the terminal device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above method embodiments of the present invention, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be realized. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0082] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided by the present invention, the connection relationships between the modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement without creative efforts.

[0083] The above is the preferred implementation mode of the present invention. It should be pointed out that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and refinements can still be made, and these improvements and refinements are also regarded as the protection scope of the present invention.

Claims

1. A master device access method for an AXI bus, characterized in that, Including: Obtain the request ID number sent by the master device to be accessed to the AXI bus; Based on the request ID number and the stored ID numbers in the ID register, determine whether there is an already accessed master device; If not, based on the request ID number, control the master device to be accessed to access the first slave device; wherein, the first slave device is: among several first candidate slave devices, the slave device corresponding to the request ID number; If so, based on the status of the ID flag register, control the master device to be accessed to access the second slave device or the third slave device; wherein, the second slave device is: among several first candidate slave devices, the slave device corresponding to the request ID number; the third slave device is: among several second candidate slave devices, the slave device corresponding to the request ID number; wherein, the number of slave devices of the first candidate slave devices is the same as that of the second candidate slave devices.

2. The master device access method for the AXI bus according to claim 1, characterized in that, The determining whether there is an already accessed master device according to the request ID number and the stored ID numbers in the ID register includes: Perform character matching between the request ID number and each stored ID number in the ID register to obtain the matching degree corresponding to the request ID number and each stored ID number; Based on each matching degree, determine whether there is an already accessed master device; If there is each stored ID number with a matching degree greater than or equal to the matching threshold, there is an already accessed master device; wherein, the already accessed master device accesses the slave device according to the ID number identical to the request ID number; Otherwise, there is no already accessed master device.

3. The master device access method for the AXI bus according to claim 2, characterized in that, The controlling the master device to be accessed to access the second slave device or the third slave device based on the status of the ID flag register includes: Judge the status of the ID flag register; If the status is 1, control the master device to be accessed to access the third slave device; wherein, the already accessed master device accesses the second slave device according to the ID number identical to the request ID number; If the status is 0, control the master device to be accessed to access the second slave device; wherein, the already accessed master device accesses the third slave device according to the ID number identical to the request ID number.

4. The master device access method for the AXI bus according to claim 3, characterized in that, Before controlling the master device to be accessed to access the second slave device or the third slave device based on the status of the ID flag register, it further includes: deleting the stored ID number in the ID register that matches the request ID number.

5. The master device access method for the AXI bus according to claim 4, wherein After controlling the master device to be accessed to access the third slave device, it further includes: setting the ID register to 0.

6. The master device access method for the AXI bus according to claim 5, wherein After controlling the master device to be accessed to access the second slave device, it further includes: setting the ID register to 1.

7. The master device access method for the AXI bus according to claim 6, wherein After controlling the master device to be accessed to access the first slave device, it further includes: updating the request ID number as a stored ID number in the ID register.

8. A master device access device for an AXI bus, characterized in that Including: A data acquisition module, a data judgment module, a first control module, and a second control module; The data acquisition module is used to acquire the request ID number sent by the master device to be accessed to the AXI bus; The data judgment module is used to determine whether there is an already accessed master device according to the request ID number and the stored ID numbers in the ID register; The first control module is configured to, if not present, control the master device to be accessed to access the first slave device based on the request ID number; wherein, the first slave device is: among a plurality of first candidate slave devices, the slave device corresponding to the request ID number. The second control module is configured to, if present, control the master device to be accessed to access the second slave device or the third slave device based on the status of the ID flag register; wherein, the second slave device is: among a plurality of first candidate slave devices, the slave device corresponding to the request ID number; the third slave device is: among a plurality of second candidate slave devices, the slave device corresponding to the request ID number; wherein the number of slave devices of the first candidate slave devices is the same as that of the second candidate slave devices.

9. A computer terminal device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a master device access method for the AXI bus as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein when the computer program runs, it controls the device where the computer-readable storage medium is located to execute a master device access method for the AXI bus as described in any one of claims 1 to 7.