Reading method and device based on AXI bus interconnection matrix
Through the introduction of decoding and arbitration modules in the AXI bus interconnection matrix, independent arbitration and data transmission between the main device and from the device interface, the problem of limited transmission performance of the existing technology in the existing technology, improved the chip performance and read operations. efficiency.
Patent Information
- Application Number
- CN202310928646.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2025-01-28
AI Technical Summary
When designing the AXI bus interconnection matrix, the prior art cannot fully utilize the independence between the address channel and the data channel, resulting in limited bus transmission performance and unable to realize the AXI advance transmission function.
Through the introduction of decoding modules and arbitration modules in the AXI bus interconnection matrix, in response to the main device's read operation request to the device, control the read -address channel of the main device interface, the read data channel and the device interface for independent arbitration and connecting, to obtain the slave CCP The address information of the device and realize data transmission.
It effectively improves the efficiency of reading operation transmission, improves chip performance, makes full use of the independence between the AXI bus channel, relieves the limit of bus transmission performance, and realizes AXI's advanced transmission function.
Smart Images

Figure CN119377164A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital chip design, and in particular to a reading method and device based on an AXI bus interconnection matrix. Background Art
[0002] In the related technologies, as the scale of integrated circuit chips increases day by day, the functions and complexity of chips are improved, and the requirements for the processing speed performance of SOC (System on Chip) chips are getting higher and higher. As the central bridge connecting various modules, the internal bus of the chip has an important impact on the performance of the SOC system, especially in systems with multiple master devices and multiple slave devices. AXI (Advanced eXtensible Interface) is an on-chip bus for high performance, high bandwidth, and low latency in the AMBA (Advanced Microcontroller Bus Architecture) bus system proposed by ARM.
[0003] AXI is essentially a master-slave point-to-point interface protocol. The AXI protocol does not specify the specific implementation method of the bus interconnection matrix module. In the process of SOC chip design and implementation, designers need to design the bus interconnection matrix according to their needs or purchase ARM's interconnection matrix IP. In related technologies, either an independent arbitration method for read and write address channels is used, but the independence between address channels and data channels cannot be fully utilized, which will limit the bus transmission performance and fail to realize the advance transmission function of AXI; or a multi-level cascade method is used, but the interface conversion will consume clock cycles and increase transmission delay, which cannot meet the design requirements of high-performance SOC.
[0004] With respect to the above-mentioned problems existing in the related technologies, no efficient and accurate solutions have been found yet. Summary of the invention
[0005] The present invention provides a reading method and device based on an AXI bus interconnection matrix to solve the technical problems in related technologies.
[0006] According to one embodiment of the present invention, a reading method based on an AXI bus interconnection matrix is provided, comprising: responding to a read operation request initiated by a master device to a slave device, controlling a master device interface read address channel to initiate a connection request to a slave device interface read address channel, wherein the system on chip SOC comprises a plurality of master devices and a plurality of slave devices, the master device is connected to the AXI bus via a master device interface, and the slave device is connected to the AXI bus via a slave device interface; decoding the slave device interface to which the master device interface applies for access; if the decoding is successful, arbitrating the read address channel of the slave device interface; if the read address channel arbitration passes, controlling the master device interface read data channel to initiate a connection request to the slave device interface read data channel, arbitrating the slave device interface read data channel, and acquiring the address information of the slave device; if the read data channel arbitration passes, connecting the master device interface read data channel with the slave device interface read data channel, and controlling the slave device to initiate read data transmission to the master device according to the address information.
[0007] According to another embodiment of the present invention, a reading device based on an AXI bus interconnection matrix is provided, comprising: a control module, for responding to a read operation request initiated by a master device to a slave device, and controlling a master device interface read address channel to initiate a connection request to a slave device interface read address channel, wherein the system on chip SOC comprises a plurality of master devices and a plurality of slave devices, the master device is connected to the AXI bus via a master device interface, and the slave device is connected to the AXI bus via a slave device interface; a decoding module, for decoding a slave device interface to which the master device interface applies for access; an arbitration module, for arbitrating the read address channel of the slave device interface if the decoding is successful; a processing module, for controlling a master device interface read data channel to initiate a connection request to a slave device interface read data channel if the read address channel arbitration passes, arbitrating the read data channel of the slave device interface, and acquiring the address information of the slave device; a read operation module, for connecting the read data channel of the master device interface with the read data channel of the slave device interface if the read data channel arbitration passes, and controlling the slave device to initiate read data transmission to the master device according to the address information.
[0008] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.
[0009] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the program stored in the memory.
[0010] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps in the above method.
[0011] Beneficial effects of the present invention:
[0012] 1. The AXI bus interconnection matrix system of the present invention provides a register configuration method for interface configuration and channel configuration of the AXI bus interconnection matrix. Compared with the hardened circuit configuration method of the prior art, it can realize flexible soft configuration of the modifiable access restrictions between master and slave devices of the AXI bus interconnection matrix, achieve the purpose of modifiable access, and effectively expand the application scenario scope of chip information security and functional safety.
[0013] 2. The AXI bus interconnection matrix system of the present invention provides a register configuration method for configuring the arbitration mechanism of the AXI bus interconnection matrix. The arbitration mechanism can be flexibly and softly configured to change the arbitration mechanism according to the register configuration. Compared with the hardened circuit configuration method of the prior art, it is more flexible and provides the possibility of changing the arbitration method after chip tape-out.
[0014] 3. The AXI bus interconnection matrix system of the present invention provides a channel-level task cache method. Compared with the entire burst transmission transaction cache or transmission data cache in the prior art, it occupies less storage resources of the interconnection matrix, is more efficient, and is accurate to each channel, giving full play to the advantages of independence between AXI bus channels.
[0015] 4. The address and data transmission of the read operation are independently arbitrated and transmitted, and channel-level task caching can be performed, which effectively improves the transmission efficiency of the read operation and thus effectively improves the chip performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0017] Figure 1 is a hardware structure block diagram of a vehicle according to an embodiment of the present invention;
[0018] Figure 2 is a flow chart of a reading method based on an AXI bus interconnection matrix according to an embodiment of the present invention;
[0019] Figure 3 is a schematic diagram of an AXI bus interconnection matrix system according to an embodiment of the present invention;
[0020] Figure 4 is a schematic diagram of a configuration module in an embodiment of the present invention;
[0021] Figure 5is a schematic diagram of the structure of an arbitration module in an embodiment of the present invention;
[0022] Figure 6 is an arbitration flow chart of the arbitration module in an embodiment of the present invention;
[0023] Figure 7 1 is a schematic diagram of a read operation transmission flow of an AXI bus interconnection matrix in an embodiment of the present invention;
[0024] Figure 8 It is a structural block diagram of a reading device based on an AXI bus interconnection matrix according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] Example 1
[0028] The method embodiment provided in the first embodiment of the present application can be executed in an onboard chip, a vehicle or a similar processing device. Taking running on a vehicle as an example, Figure 1 FIG. 1 is a hardware structure diagram of a vehicle according to an embodiment of the present invention. Figure 1 As shown, the vehicle may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above vehicle may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the above vehicle. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0029] The memory 104 can be used to store vehicle programs, for example, software programs and modules of application software, such as a vehicle program corresponding to a reading method based on an AXI bus interconnection matrix in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the vehicle program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the vehicle via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0030] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the vehicle. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0031] In this embodiment, a reading method based on an AXI bus interconnection matrix is provided. Figure 2 is a flow chart of a reading method based on an AXI bus interconnection matrix according to an embodiment of the present invention, such as Figure 2 As shown, the process includes the following steps:
[0032] Step S202, in response to a read operation request initiated by the master device to the slave device, controlling the master device interface read address channel to initiate a connection request to the slave device interface read address channel, wherein the system on chip SOC includes multiple master devices and multiple slave devices, the master device is connected to the AXI bus through the master device interface, and the slave device is connected to the AXI bus through the slave device interface;
[0033] The master device of this embodiment includes a central processing unit CPU (Central Processing Unit), a direct memory access DMA (Direct Memory Access) device, and the slave device includes a static random access memory SRAM (Static Random-Access Memory) controller, a flash memory controller, and an advanced high-performance peripheral bus AXI-to-AHB (Advanced eXtensible Interface to Advanced High Performance Bus) bridge.
[0034] Step S204, decoding the slave device interface that the master device interface applies to access;
[0035] Step S206, if the decoding is successful, arbitrate the read address channel of the slave device interface;
[0036] Step S208, if the read address channel arbitration is passed, the read data channel of the master device interface is controlled to initiate a connection request to the read data channel of the slave device interface, arbitrate the read data channel of the slave device interface, and obtain the address information of the slave device;
[0037] Step S210 , if the read data channel arbitration is passed, the read data channel of the master device interface is connected to the read data channel of the slave device interface, and the slave device is controlled to initiate read data transmission to the master device according to the address information.
[0038] Through the above steps, in response to the read operation request initiated by the master device to the slave device, the read address channel of the master device interface is controlled to initiate a connection request to the read address channel of the slave device interface, and the slave device interface to which the master device interface applies for access is decoded. If the decoding is successful, the read address channel of the slave device interface is arbitrated. If the read address channel arbitration is passed, the read data channel of the master device interface is controlled to initiate a connection request to the read data channel of the slave device interface, and the read data channel of the slave device interface is arbitrated, and the address information of the slave device is obtained. If the read data channel arbitration is passed, the read data channel of the master device interface is connected with the read data channel of the slave device interface, and the slave device is controlled to initiate read data transmission to the master device according to the address information, thereby solving the technical problem of low chip read efficiency in related technologies, effectively expanding the scope of applicable scenarios of the AXI bus interconnection matrix, improving the read operation transmission efficiency, and thus improving chip performance, making full use of the independence between the address channel and the data channel, and removing the limitation of bus transmission performance.
[0039] Figure 3 is a schematic diagram of an AXI bus interconnection matrix system according to an embodiment of the present invention. Figure 3 As shown, the process includes: m master device interfaces 30, n slave device interfaces 31, a configuration module 32, a decoding module 33, an arbitration module 34, and a cache module 35, wherein m and n are both positive integers greater than 0.
[0040] A master device interface 30, used to connect to a master device of a system on chip SOC, and the master device initiates a read / write operation to a slave device through the master device interface using a bus interconnection matrix system;
[0041] A slave device interface 31, used to connect to a slave device of the SOC, the slave device responding to a read / write operation using a bus interconnection matrix system through the slave device interface;
[0042] The master device interface is connected to an external master device, the slave device interface is connected to an external slave device, the master device initiates a read / write operation to the slave device using a bus interconnection matrix through the master device interface, and the slave device responds to the read / write operation using the bus interconnection matrix through the slave device interface.
[0043] Each master / slave interface has five independent channels, namely, write address channel (AW), write data channel (W), write reply channel (B), read address channel (AR), and read data channel (R); a channel of the master interface can only be connected to the same channel of the slave.
[0044] Due to AXI protocol restrictions, the number of master devices and slave devices, m and n, can be configured to be less than or equal to 16.
[0045] A configuration module 32, used to configure the connectivity relationship between the master device interface and the slave device interface, and to configure the arbitration strategy of the arbitration module using a register group;
[0046] A decoding module 33, used to decode the address information sent by the master device and determine the slave device interface corresponding to the access request;
[0047] When the master device initiates an access request (read / write operation) to the slave device, it carries the address information of the slave device to which access is requested.
[0048] The decoding module is connected to the read address channel and write address channel of the master-slave device interface, and includes two parts: read address decoding and write address decoding. During decoding, according to the slave device storage address table, the decoding module decodes the address information sent by the master device and obtains the slave device corresponding to the address information, that is, the slave device requested to access by the master device. The slave device storage address table is used to record the address space range of all slave devices. The address table is adjusted according to the interface configuration and channel configuration results to implement read and write access restrictions between master and slave devices. The decoding module sends the decoding result to the arbitrator of the slave device for arbitration.
[0049] The arbitration module 34, each channel of each slave device interface corresponds to an independent arbitrator, which is used to perform arbitration gating according to the arbitration strategy when receiving the application gating signals of multiple master device channels;
[0050] The cache module 35 is used to cache data for channel-level transmission tasks of the address channel and data channel of the master device during the access operation.
[0051] In one implementation of the present embodiment, decoding the slave device interface to which the master device interface applies for access includes: controlling the master device interface read address channel to send the address information of the slave device interface to which access is applied to a read address decoder; using the read address decoder to decode the address information to obtain a decoding result; determining whether the decoding result matches the address range table of the read address decoder; if the decoding result does not match the address range table of the read address decoder, determining that the decoding is an error; if the decoding result matches the address range table of the read address decoder, determining that the decoding is successful.
[0052] In an arbitration example, arbitrating the read address channel of the slave device interface includes: controlling the master device interface to send an arbitration selection signal to the read address channel arbitrator of the slave device interface, the read address channel arbitrator responds to the arbitration selection signal, arbitrates the read address channel according to the configured arbitration mechanism, and returns the address channel arbitration result to the master device interface.
[0053] In an arbitration example, arbitrating a read data channel of a slave device interface includes: controlling the master device interface to send an arbitration selection signal to the read data channel arbitrator of the slave device interface, the read data channel arbitrator responds to the arbitration selection signal, arbitrates the read data channel according to the configured arbitration mechanism, and returns the data channel arbitration result to the master device interface.
[0054] In one implementation scenario, after obtaining the address information of the slave device, it also includes: determining whether there are other read address channels applying for arbitration requests; if there are other read address channels applying for arbitration requests and the current read address channel application has passed the arbitration and the read address transmission is completed, reading the read address channel connection request control information related to the master device interface and the second other slave device interface from the cache module, controlling the master device interface to initiate a read address channel connection request to the second other slave device interface, and arbitrating the read address channel of the second other slave device interface; if there are no other read address channels applying for arbitration requests and the current read address channel application has passed the arbitration and the read address transmission is completed, ending the read address transmission process.
[0055] In one implementation scenario, after arbitrating the read data channel of the slave device interface, it also includes: if the read data channel arbitration fails, determining whether there are other read data channels applying for a strobe arbitration request: if there are other read data channels applying for a strobe arbitration request, and the current read data channel application strobe arbitration request fails, then reading the read data channel connection request control information related to the master device interface and the third other slave device interface from the cache module, and caching the read data channel connection request control information related to the master device interface and the current slave device interface to the cache module, the master device interface initiates a read data channel connection request to the third other slave device interface, and arbitrates the read data channel of the third other slave device interface; if there are no other read data channels applying for a strobe arbitration request and the current read data channel application strobe arbitration request fails, controlling the master device interface to continue to initiate a read data channel arbitration strobe request to the current slave device interface, and arbitrates the read data channel of the current slave device interface.
[0056] Optionally, after controlling the slave device to initiate a read data transmission to the master device according to the address information, it also includes: judging whether there are other read data channels applying for a strobe arbitration request: if there are other read data channels applying for a strobe arbitration request and the current read data channel application for a strobe arbitration has passed and the read data transmission has been completed, then reading the read data channel connection request control information related to the master device interface and the third other slave device interface from the cache module, controlling the master device interface to initiate a read data channel connection request to the third other slave device interface, and arbitrating the read data channel of the third other slave device interface; if there are no other read data channels applying for a strobe arbitration request and the current read data channel application for a strobe arbitration has passed and the read data transmission has been completed, the read data transmission process is ended.
[0057] In one implementation of this embodiment, each master device interface is configured with the following independent channels: a write address channel, a write data channel, a write reply channel, a read address channel, and a read data channel; each slave device interface is configured with the following independent channels: a write address channel, a write data channel, a write reply channel, a read address channel, and a read data channel; wherein the channel restrictions of the master device interface are interconnected with the same type of channels of the slave device interface.
[0058] For example, the write address channel of the master device interface can only be interconnected with the write address channel of the slave device interface, and cannot be interconnected with the write data channel, write reply channel, read address channel, and read data channel of the slave device interface.
[0059] In this embodiment, the configuration module includes: an interface configuration submodule, which is used to freely configure the connectivity between each master device interface and the slave device interface, and freely configure the restricted access between each master device interface and the slave device interface; a channel configuration submodule, which is used to freely configure the connectivity between each type of channel of each master device interface and the slave device interface, and freely configure the restricted access between each type of channel of each master device interface and the slave device interface; an arbitration configuration submodule, which is used to configure the arbitration mechanism of the arbitrator of each slave device interface, and configure the arbitration priority for different signals.
[0060] In the system of this embodiment, the configuration module includes three parts: interface configuration, channel configuration, and arbitration mechanism configuration. Interface configuration: used to freely configure the connectivity between all master device interfaces and slave device interfaces, restrict certain master device interfaces from accessing certain slave device interfaces, and cooperate with the decoding module to realize the free change from the fully connected matrix to the sparsely connected matrix, so as to achieve the effect of physical isolation between certain master and slave devices. Channel configuration: used to freely configure the connectivity between a certain type of channels of all master device interfaces and slave device interfaces, restrict the connectivity between certain master device interface channels and slave device interface channels, and cooperate with the decoding module to realize the read-only or write-only operation function between certain master and slave devices, so as to achieve the security access needs between certain master and slave devices. Arbitration configuration: used to configure the arbitration mechanism of the arbitrator of all slave devices, and configure the arbitration priority mechanism according to the different situations of each slave device. The arbitrators of each channel of the slave device are independent, which can realize that the master device channel priorities corresponding to the read and write channels of the same slave device are different, so as to achieve the purpose of precise control.
[0061] In one example, the interface configuration submodule is configured with an interface register group, which includes n registers, each register corresponds to a slave device, each register has m bits, each bit number corresponds to a master device, and the configurable value of each bit number includes: a first flag bit and a second flag bit, wherein the first flag bit is used to represent free access with the corresponding master device, and the second flag bit is used to represent access restrictions with the corresponding master device.
[0062] The interface configuration submodule determines which slave devices the master device can access, and cooperates with the decoding module to achieve physical isolation between the master device and some slave devices; the interface configuration is achieved by configuring the interface register group IREG, which contains n registers ireg1, ireg2…iregn, corresponding to slave device 1, slave device 2…slave device n respectively; each ireg register has m bits {i1, i2,…im}, corresponding to master device 1, master device 2…master device m respectively; the accessibility between the master device and the slave device is set by configuring the value of the register.
[0063] For example, the first bit i1 of the interface register ireg1 is configured to be 1 and the second bit i2 is configured to be 0, which means that the master device 1 can access the slave device 1, but the master device 2 cannot access the slave device 1, and the configuration of other interface registers is similar.
[0064] In an example, the channel configuration submodule is configured with a channel register group, which includes n registers, each register corresponding to a slave device; each register has 5 channel registers, corresponding to a read address channel, a read data channel, a write address channel, a write data channel, and a write reply channel, respectively, each channel register has m bits, each bit number corresponds to a master device, and the configurable value of each bit number includes: a third flag bit and a fourth flag bit, wherein the third flag bit is used to represent free access with the corresponding master device, and the fourth flag bit is used to represent access restrictions with the corresponding master device.
[0065] The channel configuration submodule determines whether the read and write channels of the master device and the slave devices can be interconnected based on the interface configuration, so as to realize the master device's read-only access, write-only access or both read and write access to certain slave devices. The read channel includes the read address channel AR and the read data channel R, and the write channel includes the write address channel AW, the write data channel W and the write reply channel B. The channel configuration is realized by configuring the channel register group CREG. The channel register group CREG contains n register groups creg1, creg2...cregn, corresponding to slave device 1, slave device 2...slave device n respectively. Each creg register group has 5 channel registers ar, r, aw, w, b, corresponding to the read address channel, read data channel, write address channel, write data channel and write reply channel respectively. Each channel register has m bits {c1, c2,...cm}, corresponding to master device 1, master device 2...master device m respectively. The readability and writability between the master device and the slave device are set by configuring the value of the channel register.
[0066] For example, to set the master device 1 to be only readable but not writable to the slave device 1 and the master device 2 to be only writable but not readable to the slave device 1, the following configuration is made: configure the first bit c1 of the channel register ceg1.ar to be 1 and the second bit c2 to be 0, the first bit c1 of the channel register ceg1.r to be 1 and the second bit c2 to be 0, the first bit c1 of the channel register ceg1.aw to be 0 and the second bit c2 to be 1, the first bit c1 of the channel register ceg1.w to be 0 and the second bit c2 to be 1, the first bit c1 of the channel register ceg1.b to be 0 and the second bit c2 to be 1, and the channel register configurations for other read and write restriction scenarios between the master and slave devices can be deduced accordingly.
[0067] Figure 4 It is a schematic diagram of a configuration module in an embodiment of the present invention, including an interface configuration register group IREG (ireg1-iregn), a channel configuration register group CREG (creg1-cregn), an arbitration configuration register group AREG (areg1-aregn), and an arbitration priority configuration register PREG (preg1-pregn).
[0068] In an example, the arbitration configuration submodule is configured with an arbitration register group, which includes n register groups, each register group corresponds to a slave device; each register group has 5 channel arbitration registers, corresponding to a read address channel, a read data channel, a write address channel, a write data channel, and a write reply channel; each channel arbitration register has k bits, and each bit number corresponds to an arbitration mechanism.
[0069] In one example, k=4, and the four arbitration mechanisms are: fixed priority, round-robin priority, combined priority, and adaptive priority, where the adaptive priority is used to indicate that the priority order of the corresponding master device is adjusted in real time according to the frequency of the master device applying for arbitration within a fixed time period.
[0070] In the above example, the arbitration mechanism of the arbitrator includes four modes, namely, fixed priority, cyclic priority, combined priority, and adaptive priority. The fixed priority is that all master devices are sorted in a fixed order, and the master device in the front order has a high priority and is given priority when applying for arbitration; the cyclic priority is that all master devices are in a cyclic order, and the master device that applies for selection and passes arbitration in the current round has the lowest priority in the next round of arbitration, and the priority order of the master devices in the initial state is arranged according to the initial set master device order; the group priority is that all master devices are divided into multiple priority groups, each group is sorted in a fixed order, and arbitration is performed between groups in a fixed priority manner. The master devices in each group have the same priority, and arbitration is performed within the group in a cyclic priority manner; the adaptive priority is to adjust the priority order of the master devices in real time according to the frequency of master devices applying for arbitration within a fixed time period, and the master device with a high frequency has a high priority. The priority order is adjusted once after each time period, and the priority order of the master devices in the initial state is arranged according to the initial set master device order.
[0071] In an example, the arbitration configuration submodule is configured with a channel priority register group, each register group corresponds to a slave device; each register group has 5 channel priority registers, corresponding to a read address channel, a read data channel, a write address channel, a write data channel, and a write reply channel, respectively; each channel priority register has m bits for storing a sequence of length m, each element of the sequence corresponds to a master device, and the order of the m elements in the sequence corresponds to the arbitration priority order of the m master devices.
[0072] The arbitration configuration submodule configures the arbitration mechanism of the arbitrators of all slave devices, and configures the arbitration priority mechanism according to the different situations of each slave device corresponding to the master device. The configuration is divided into two parts. The first part is to configure the arbitration mechanism of each arbitrator, that is, to select one of the four arbitration mechanisms such as fixed priority, round-robin priority, combined priority, and adaptive priority; the second part is to configure the priority order of each arbitrator corresponding to the master device, that is, to determine the priority of all master devices that have the authority to access the slave device. The arbitrators of each channel of the slave device are independent, which can realize different master device channel priorities corresponding to the read and write channels of the same slave device, so as to achieve the purpose of precise control. The configuration of the channel arbitrator arbitration mechanism is achieved by configuring the arbitration register group AREG. The arbitration register group AREG contains n register groups areg1, areg2...aregn, corresponding to slave device 1, slave device 2...slave device n respectively; each areg register group has 5 channel arbitration registers ar, r, aw, w, b, corresponding to the read address channel, read data channel, write address channel, write data channel, write reply channel respectively; each channel arbitration register has 4 bits {a1, a2,...a4}, corresponding to four arbitration mechanisms such as fixed priority, round-robin priority, combined priority, and adaptive priority respectively; the arbitration mechanism of the channel arbitrator is set by configuring the value of the channel arbitration register. For example, if the arbitration mechanism of the read address channel arbitrator of slave device 1 is set to round-robin priority, the third bit a3 of the areg1.ar register is configured to be 1, and the remaining bits are all 0. The arbitration mechanism configuration of other slave device channel arbitrators can be deduced in the same way. The master device priority order corresponding to the channel arbiter is realized by configuring the channel priority register group PREG. The channel priority register group PREG contains n register groups preg1, preg2...pregn, corresponding to slave device 1, slave device 2...slave device n respectively; each preg register group has 5 channel priority registers ar, r, aw, w, b, corresponding to the read address channel, read data channel, write address channel, write data channel, write reply channel respectively; each channel priority register has m bits, and p1, p2,...pm correspond to master device 1, master device 2...master device m respectively; by configuring p1, p2 , …pm in the priority register to set the arbitration priority order of master device access. For example, preg1.ar={p2,p1,…pm} means that the arbitration priority order of master device access corresponding to the write address channel of slave device 1 is p2,p1,…pm, that is, master device 2 has the highest priority, master device 1 has the second highest priority, …master device m has the lowest priority; the configuration of the arbitration priority order of master device access of other slave device channels can be deduced in the same way. The arbitration priority order is used to configure the order of master devices with fixed priority, as well as the initial order of master devices with cyclic priority, combined priority and adaptive priority mechanism.
[0073] The arbitration module is equipped with an independent arbitrator for each channel of each slave device interface, which can realize independent arbitration of each channel connection request. The arbitrator of a slave device channel only allows one master device channel of the same type to communicate with the slave device channel at a certain time. Each arbitrator determines the master device channel with the right to participate in arbitration based on the configuration module interface configuration and channel configuration results. Each arbitrator determines the arbitration priority order of the master device channel with the right to participate in arbitration based on the results of the configuration module arbitration configuration. When the arbitrator of the slave device channel receives the application selection signal from the master device channel, it performs arbitration selection according to the priority order.
[0074] The arbitrator performs arbitration based on the arbitration mechanism pre-configured by the configuration module, including four modes: fixed priority, round-robin priority, combined priority, and adaptive priority.
[0075] In one implementation of this embodiment, the arbitration module configures the following channel arbiters for each slave device interface: a write address channel arbiter, a read address channel arbiter, a write data channel arbiter, a read data channel arbiter, and a write reply channel arbiter.
[0076] Figure 5 FIG. 1 is a schematic diagram of the structure of the arbitration module in an embodiment of the present invention. Figure 5 As shown, as an embodiment of the present invention, an arbitration module structure of an AXI bus interconnection matrix is provided, in which the arbitration module is equipped with an independent arbitrator for each channel of each slave device interface, that is, each slave device has a write address channel AW arbitrator, a read address channel AR arbitrator, a write data channel W arbitrator, a read data channel R arbitrator, and a write reply channel B arbitrator, which can realize independent arbitration of each channel connection request.
[0077] Figure 6 This is an arbitration flow chart of the arbitration module in an embodiment of the present invention, which provides an arbitration method flow of an AXI bus interconnection matrix. The arbitrator of a slave device channel only allows one master device channel to communicate with the slave device channel at a certain time. The arbitration process steps of the channel arbitrator are as follows:
[0078] S61, when multiple master devices simultaneously initiate use requests to a slave device channel, the slave device channel arbitrator starts arbitration;
[0079] S62, the channel arbitrator determines the master device channel with the right to participate in arbitration according to the configuration module interface configuration and the channel configuration result;
[0080] S63, the channel arbitrator determines the arbitration mechanism and the arbitration priority order of the master device channels having the right to participate in the arbitration according to the result of the arbitration configuration of the configuration module;
[0081] S64: The channel arbitrator performs arbitration according to the arbitration mechanism and arbitration priority order, determines the master device with priority, and the arbitration ends.
[0082] In one implementation of the present embodiment, after arbitrating the read address channel of the slave device interface, it also includes: if the read address channel arbitration fails, determining whether there are other read address channels applying for a strobe arbitration request; if there are other read address channels applying for a strobe arbitration request and the current read address channel application for a strobe arbitration request fails, reading the read address channel connection request control information related to the master device interface and the first other slave device interface from the cache module, and caching the read address channel connection request control information related to the master device interface and the current slave device interface to the cache module, controlling the master device interface to initiate a read address channel connection request to the first other slave device interface, and arbitrating the read address channel of the first other slave device interface; if there are no other read address channels applying for a strobe arbitration request and the current read address channel application for a strobe arbitration request fails, controlling the master device interface to continue to initiate a read address channel arbitration strobe request to the current slave device interface.
[0083] The cache module of this embodiment is used for channel-level transmission task cache of the read / write address channel and the read / write data channel of the master device during the read / write operation.
[0084] In the system of this embodiment, the cache information of the transmission task includes the following fields: cache information category, master device interface number, slave device interface number, cache task code, wherein the cache information category is used to indicate the channel type, and the cache task code is used to indicate the task identifier of the transmission task initiated by the master device to the slave device.
[0085] The transmission task cache information includes the cache information category (read address, write address, read data, write data), the master device interface number (which master device initiated the read and write operation), the slave device interface number (the slave device object of the read and write operation), and the cache task code (used to distinguish multiple task caches initiated by a master device to the same slave device).
[0086] Optionally, the channel-level transmission tasks include: a read address channel transmission task, a read data channel transmission task, a write address channel transmission task, and a write data channel transmission task.
[0087] When the master device performs advance transmission, out-of-order transmission, or the arbitration application fails during the read and write operations, the transmission task cache for the read and write operations is required. During the read operation, there is a read address channel transmission task cache and a read data channel transmission task cache; during the write operation, there is a write address channel transmission task cache and a write data channel transmission task cache; since the write reply channel is for the reply of the entire burst transmission transaction, the channel occupancy time is short and there is no need for transmission task cache. The transmission task cache information includes the cache information category (read address, write address, read data, write data), the master device interface number (which master device initiated the read and write operation), the slave device interface number (the slave device object of the read and write operation), and the cache task code (used to distinguish multiple task caches initiated by a master device to the same slave device).
[0088] The cache module of this embodiment only caches the transmission task, rather than the data required to be transmitted by the transmission task, so the amount of cached information is relatively small, and the cache module occupies little storage resources.
[0089] Compared with the entire burst transfer transaction cache or transfer data cache of the prior art, the channel-level task cache method proposed in this embodiment occupies less storage resources of the interconnection matrix, is more efficient, and is accurate to each channel, giving full play to the advantages of independence between AXI bus channels.
[0090] Optionally, obtaining the address information of the slave device includes: connecting the read address channel of the master device interface with the read address channel of the slave device interface; initiating a read address information transmission from the master device to the slave device based on the read address channel; after the transmission is completed, closing the connection relationship between the read address channel of the master device interface and the read address channel of the slave device interface.
[0091] Figure 7 The following is a schematic diagram of the AXI bus interconnection matrix read operation transmission flow in an embodiment of the present invention, and provides a read operation working method flow of the AXI bus interconnection matrix. The working method steps of the master device initiating the read operation are as follows:
[0092] S01) Master device M j The master device interface MI of the bus interconnection matrix j And from the device interface SI k To slave device S k Initiate a read operation request (j, k are positive integers, j≤m, k≤n, m, n are the number of master devices and slave devices respectively, the same below), and execute step S02.
[0093] S02) Main device interface MI j Read address channel AR_MI j To the slave device interface SI k Read address channel AR_SI kInitiate a connection request and set the read address channel connection request flag AR j [k-1] = 1 (AR j Register represents the master device interface MI j The read address channel applies for arbitration request status, AR j The bit width is the same as the number of slave device interfaces. If the k-1th position is 1, it means that the master device interface MI j Need to apply for connection arbitration request to the kth slave device interface read address channel), the master device interface MI j Read address channel AR_MI j Send the address range information to the read address decoder DECR_R_MI j Decode and execute step S03.
[0094] S03) The read address decoder starts decoding and determines the decoding result of the decoder. If the address range table of the decoder cannot match, the decoder sends a signal to the master device interface MI. j Returns decoding error signal, master device interface MI j To the master device M j Returns a transmission error signal and sets the flag AR j [k-1] = 0, the transmission is completed, and the process returns to step S01 to perform the next transmission cycle; if the read address decoder successfully decodes the master device interface MI j The slave device interface SI that is requested to be accessed k , then execute step S04.
[0095] S04) Main device interface MI j To the slave device interface SI k Read address channel arbiter arb_AR_SI k Send an arbitration selection signal, the arbitrator arbitrates according to the configured arbitration mechanism and sends a signal to the master device interface MI j Return arbitration result RE_arb_AR_SI k If RE_arb_AR_SI k =1 means passing arbitration, then the read data channel connection request flag R is set j [k-1] = 1(R j Register represents the master device interface MI j The read data channel applies for arbitration request status, R j The bit width is the same as the number of slave device interfaces. If the k-1th position is 1, it means that the master device interface MI j It is necessary to apply for a connection arbitration request to the kth slave device interface read data channel, and set the read address channel connection request flag AR j[k-1] = 0, and execute step S05 and step S06 simultaneously; if RE_arb_AR_SI k =0, that is, the arbitration is not passed, and step S07 is executed.
[0096] S05) Main device interface MI j Read data channel R_MI j To the slave device interface SI k Read data channel R_SI k Initiate a connection request, the main device interface MI j To the slave device interface SI k Read data channel arbiter arb_R_SI k Send arbitration selection signal from device interface SI k Read data channel arbiter arb_R_SI k Arbitrate according to the configured arbitration mechanism and send the MI to the master interface j Return arbitration result RE_arb_R_SI k If RE_arb_R_SI k =1, that is, arbitration is passed, then step S08 is executed; if RE_arb_R_SI k =0 and fails arbitration, then execute step S09.
[0097] S06) According to the read address channel arbitration signal RE_arb_AR_SI k =1, the system will host the device interface MI j The read address channel AR_MI j Interface with slave device SI k The read address channel AR_SI k Connect, the master device M j Through the main device interface MI j And from the device interface SI k To slave device S k Initiate the transmission of read address information; after the transmission is completed, the system closes the main device interface MI j The read address channel AR_MI j Interface with slave device SI k The read address channel AR_SI k The connectivity relationship between them sets the read address channel arbitration status RE_arb_AR_SI k =0, the read address transmission process ends and step S07 is executed.
[0098] S07) Determine the read address channel arbitration request status register flag AR j [k-1] and AR jThe value of [y-1] (y is any positive integer except k, and x≤n):
[0099] ① If AR j [k-1] = 1 and AR j [x-1]=1, then the master device interface MI j There is a slave device interface SI k And other slave device interface read address channel connection requirements, but at this time the slave device interface SI k The read address channel of the master device is temporarily unavailable, so the master device interface MI is read from the cache module. j Interface with slave device SI y The relevant read address channel connection request control information and the master device interface MI j Interface with slave device SI k The related read address channel connection request control information is cached to the cache module, the main device interface MI j Start to send data to slave device interface SI y A read address channel connection request is initiated, the parameter k in step S04 (and subsequent steps related to step S04, such as steps S05 and S06, etc.) is replaced with y, and then step S04 is executed.
[0100] ② If AR j [k-1] = 1 and AR j [x-1]=0, then the master device interface MI j Only from device interface SI k The read address channel connection requirements, the master device interface MI j Continue to the slave device interface SI k Initiate a read address channel arbitration strobe request, that is, do not change the parameters and execute step S04.
[0101] ③If AR j [k-1] = 0 and AR j [y-1]=1, then the master device interface MI j Except for the slave device interface SI k Other slave device interface read address channel connection requirements, read the master device interface MI from the cache module j Interface with slave device SI y Related read address channel connectivity request control information, master device interface MI j Start to send data to slave device interface SI y A read address channel connection request is initiated, that is, the parameter k in step S04 (and subsequent steps related to step S04, such as steps S05 and S06, etc.) is replaced with y, and then step S04 is executed.
[0102] ④ If AR j [k-1] = 0 and AR j [y-1] = 0, master device interface MI j If there is no connection requirement with all slave device interface read address channels, the transmission is completed, and the process returns to step S01 to execute the next transmission cycle.
[0103] S08) According to the read data channel arbitration signal RE_arb_R_SI k =1, the system will host the device interface MI j Read data channel R_MI j Interface with slave device SI k Read data channel R_SI k According to the read address information received in step S06, from device S k Through the slave device interface SI k And the main device interface MI j To the master device M j Initiate read data transmission; after the transmission is completed, the system closes the master device interface MI j Read data channel R_MI j Interface with slave device SI k Read data channel R_SI k The connection relationship between them sets the arbitration signal RE_arb_R_SI k =0, set flag bit R j [k-1]=0, the read data transmission process ends; execute step S09.
[0104] S09) Determine the flag bit R of the status register for the arbitration request status of the read data channel j [k-1] and R j The value of [x-1] (x is any positive integer except k, and x≤n):
[0105] ①If R j [k-1] = 1 and R j [x-1]=1, then the master device interface MI j There is a slave device interface SI k And other slave device interface read data channel connection requirements, but at this time the slave device interface SI k The read data channel of the master device is temporarily unavailable. Priority is given to connecting to other slave device interfaces and reading the master device interface MI from the cache module. j Interface with slave device SI x The relevant read data channel connection request control information and the master device interface MI j Interface with slave device SI k The related read data channel connection request control information is cached to the cache module, the main device interface MIj Start to send data to slave device interface SI x A read data channel connection request is initiated, the parameter k in step S05 (and subsequent steps related to step S05, such as step S08, etc.) is replaced with x, and then step S05 is executed.
[0106] ②If R j [k-1] = 1 and R j [x-1]=0, then the master device interface MI j Only from device interface SI k
[0107] Read data channel connection requirements, master device interface MI j Continue to the slave device interface SI k Initiate a read data channel arbitration strobe request, that is, do not change the parameters and execute step S05.
[0108] ③If R j [k-1] = 0 and R j [x-1]=1, then the master device interface MI j Except for the slave device interface SI k Other slave device interface read data channel connection requirements, read the master device interface MI from the cache module j Interface with slave device SI x Related read data channel connectivity request control information, master device interface MI j Start to send data to slave device interface SI x Initiate a read data channel connection request, that is, step S05
[0109] The parameter k in (and subsequent steps related to step S05, such as step S08, etc.) is replaced by x, and then step S05 is executed.
[0110] ④If R j [k-1] = 0 and R j [x-1] = 0, master device interface MI j If there is no connection requirement with all slave device interface read data channels, the transmission is completed, and the process returns to step S01 to execute the next transmission cycle.
[0111] This embodiment provides a register configuration method for the interface configuration and channel configuration of the AXI bus interconnect matrix. Compared with the hardened circuit configuration method of the prior art, it can realize flexible soft configuration of the modifiable access restrictions between the master and slave devices of the AXI bus interconnect matrix, achieve the purpose of modifiable access, and effectively expand the scope of application scenarios of chip information security and functional safety. This embodiment provides a register configuration method for the arbitration mechanism configuration of the AXI bus interconnect matrix. The flexible soft configuration of the arbitration mechanism can change the arbitration mechanism according to the register configuration. Compared with the hardened circuit configuration method of the prior art, it provides the possibility of changing the arbitration method after chip tape-out. It effectively expands the scope of applicable scenarios of the AXI bus interconnect matrix, provides read operation transmission efficiency, and thus improves chip performance, fully utilizes the independence between the address channel and the data channel, removes the limitation of bus transmission performance, and can realize the flexibility requirements such as AXI advance transmission.
[0112] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0113] Example 2
[0114] In this embodiment, a reading device based on an AXI bus interconnection matrix is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0115] Figure 8 is a structural block diagram of a reading device based on an AXI bus interconnection matrix according to an embodiment of the present invention, such as Figure 8 As shown, the device comprises:
[0116] A first control module 80 is used to respond to a read operation request initiated by the master device to the slave device, and control the master device interface read address channel to initiate a connection request to the slave device interface read address channel, wherein the system on chip SOC includes multiple master devices and multiple slave devices, the master device is connected to the AXI bus through the master device interface, and the slave device is connected to the AXI bus through the slave device interface;
[0117] A decoding module 82, used for decoding the slave device interface that the master device interface applies to access;
[0118] An arbitration module 84, configured to arbitrate the read address channel of the slave device interface if the decoding is successful;
[0119] The processing module 86 is used to control the read data channel of the master device interface to initiate a connection request to the read data channel of the slave device interface if the read address channel arbitration is passed, arbitrate the read data channel of the slave device interface, and obtain the address information of the slave device;
[0120] The read operation module 88 is used to connect the read data channel of the master device interface with the read data channel of the slave device interface if the read data channel arbitration is passed, and control the slave device to initiate read data transmission to the master device according to the address information.
[0121] Optionally, the decoding module includes: a sending unit, used to control the read address channel of the master device interface to send the address information of the slave device interface requesting access to the read address decoder; a decoding unit, used to use the read address decoder to decode the address information to obtain a decoding result; a judgment unit, used to judge whether the decoding result matches the address range table of the read address decoder; a determination unit, used to determine that a decoding error occurs if the decoding result does not match the address range table of the read address decoder; and if the decoding result matches the address range table of the read address decoder, determine that the decoding is successful.
[0122] Optionally, the arbitration module includes: an arbitration unit, used to control the master device interface to send an arbitration request selection signal to the read address channel arbitrator of the slave device interface, the read address channel arbitrator responds to the arbitration request selection signal, arbitrates the read address channel according to the configured arbitration mechanism, and returns the address channel arbitration result to the master device interface.
[0123] Optionally, the processing module includes: an arbitration unit, used to control the master device interface to send an arbitration request selection signal to the read data channel arbitrator of the slave device interface, the read data channel arbitrator responds to the arbitration request selection signal, arbitrates the read data channel according to the configured arbitration mechanism, and returns the data channel arbitration result to the master device interface.
[0124] Optionally, the device includes: a first judgment module, used to judge whether there are other read address channels applying for arbitration requests after the arbitration module arbitrates the read address channel of the slave device interface, if the read address channel arbitration fails; a second control module, used to read the read address channel connection request control information related to the master device interface and the first other slave device interface from the cache module if there are other read address channels applying for arbitration requests and the current read address channel application for arbitration requests fails, and cache the read address channel connection request control information related to the master device interface and the current slave device interface to the cache module, control the master device interface to initiate a read address channel connection request to the first other slave device interface, and arbitrate the read address channel of the first other slave device interface; if there are no other read address channels applying for arbitration requests and the current read address channel application for arbitration requests fails, control the master device interface to continue to initiate a read address channel arbitration request to the current slave device interface.
[0125] Optionally, the processing module includes: a connecting unit, used to connect the read address channel of the master device interface with the read address channel of the slave device interface; a transmission unit, used to initiate the transmission of read address information from the master device to the slave device based on the read address channel; and a closing unit, used to close the connection relationship between the read address channel of the master device interface and the read address channel of the slave device interface after the transmission is completed.
[0126] Optionally, the device also includes: a second judgment module, used to judge whether there are other read address channels applying for arbitration requests after the processing module obtains the address information of the slave device; a third control module, used to read the read address channel connection request control information related to the master device interface and the second other slave device interface from the cache module if there are other read address channels applying for arbitration requests and the current read address channel application has passed the arbitration and completed the read address transmission, control the master device interface to initiate a read address channel connection request to the second other slave device interface, and arbitrate the read address channel of the second other slave device interface; if there are no other read address channels applying for arbitration requests and the current read address channel application has passed the arbitration and completed the read address transmission, end the read address transmission process.
[0127] Optionally, the device also includes: a third judgment module, which is used to judge whether there are other read data channels applying for arbitration requests after the processing module arbitrates the read data channel of the slave device interface, if the read data channel arbitration fails; a fourth control module, which is used to read the read data channel connection request control information related to the master device interface and the third other slave device interface from the cache module if there are other read data channels applying for arbitration requests and the current read data channel application for arbitration requests fails, and cache the read data channel connection request control information related to the master device interface and the current slave device interface to the cache module, the master device interface initiates a read data channel connection request to the third other slave device interface, and arbitrates the read data channel of the third other slave device interface; if there are no other read data channels applying for arbitration requests and the current read data channel application for arbitration requests fails, control the master device interface to continue to initiate a read data channel arbitration request to the current slave device interface, and arbitrate the read data channel of the current slave device interface.
[0128] Optionally, the device also includes: a fourth judgment module, used to judge whether there are other read data channels applying for arbitration requests after the read operation module controls the slave device to initiate read data transmission to the master device according to the address information: a fifth control module, used to read the read data channel connection request control information related to the master device interface and the third other slave device interface from the cache module if there are other read data channels applying for arbitration requests and the current read data channel application has passed the arbitration and completed the read data transmission, control the master device interface to initiate a read data channel connection request to the third other slave device interface, and arbitrate the read data channel of the third other slave device interface; if there are no other read data channels applying for arbitration requests and the current read data channel application has passed the arbitration and completed the read data transmission, end the read data transmission process.
[0129] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0130] Example 3
[0131] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0132] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0133] S1, responding to a read operation request initiated by a master device to a slave device, controlling a master device interface read address channel to initiate a connection request to a slave device interface read address channel, wherein the system on chip SOC includes multiple master devices and multiple slave devices, the master device is connected to the AXI bus through a master device interface, and the slave device is connected to the AXI bus through a slave device interface;
[0134] S2, decoding the slave device interface that the master device interface requests to access;
[0135] S3, if the decoding is successful, arbitrating the read address channel of the slave device interface;
[0136] S4, if the read address channel arbitration is passed, control the read data channel of the master device interface to initiate a connection request to the read data channel of the slave device interface, arbitrate the read data channel of the slave device interface, and obtain the address information of the slave device;
[0137] S5, if the read data channel arbitration is passed, connecting the read data channel of the master device interface with the read data channel of the slave device interface, and controlling the slave device to initiate read data transmission to the master device according to the address information.
[0138] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0139] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0140] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0141] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0142] S1, responding to a read operation request initiated by a master device to a slave device, controlling a master device interface read address channel to initiate a connection request to a slave device interface read address channel, wherein the system on chip SOC includes multiple master devices and multiple slave devices, the master device is connected to the AXI bus through a master device interface, and the slave device is connected to the AXI bus through a slave device interface;
[0143] S2, decoding the slave device interface that the master device interface requests to access;
[0144] S3, if the decoding is successful, arbitrating the read address channel of the slave device interface;
[0145] S4, if the read address channel arbitration is passed, control the read data channel of the master device interface to initiate a connection request to the read data channel of the slave device interface, arbitrate the read data channel of the slave device interface, and obtain the address information of the slave device;
[0146] S5, if the read data channel arbitration is passed, connecting the read data channel of the master device interface with the read data channel of the slave device interface, and controlling the slave device to initiate read data transmission to the master device according to the address information.
[0147] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0148] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0149] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0150] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0151] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A reading method based on an AXI bus interconnection matrix, characterized in that: include: In response to a read operation request initiated by a master device to a slave device, control a master device interface read address channel to initiate a connection request to a slave device interface read address channel, wherein the system on chip SOC includes multiple master devices and multiple slave devices, the master device is connected to the AXI bus through the master device interface, and the slave device is connected to the AXI bus through the slave device interface; Decode the slave device interface that the master device interface requests to access; If the decoding is successful, arbitrating the read address channel of the slave device interface; If the read address channel arbitration is passed, the read data channel of the master device interface is controlled to initiate a connection request to the read data channel of the slave device interface, arbitrate the read data channel of the slave device interface, and obtain the address information of the slave device; If the read data channel arbitration is successful, the read data channel of the master device interface is connected to the read data channel of the slave device interface, and the slave device is controlled to initiate read data transmission to the master device according to the address information.
2. The method according to claim 1, characterized in that Decoding the slave device interface that the master device interface requests to access includes: Control the master device interface read address channel to send the address information of the slave device interface applying for access to the read address decoder; Decoding the address information using the read address decoder to obtain a decoding result; Determining whether the decoding result matches the address range table of the read address decoder; If the decoding result cannot match the address range table of the read address decoder, it is determined that the decoding is wrong; if the decoding result matches the address range table of the read address decoder, it is determined that the decoding is successful.
3. The method according to claim 1, characterized in that: Arbitrating the read address channel of the slave device interface includes: The master device interface is controlled to send an arbitration selection signal to the read address channel arbitrator of the slave device interface. The read address channel arbitrator responds to the arbitration selection signal, arbitrates the read address channel according to the configured arbitration mechanism, and returns the address channel arbitration result to the master device interface.
4. The method according to claim 1, characterized in that Arbitrating the read data channel of the slave device interface includes: The master device interface is controlled to send an arbitration selection signal to the read data channel arbitrator of the slave device interface, and the read data channel arbitrator responds to the arbitration selection signal, arbitrates the read data channel according to the configured arbitration mechanism, and returns the data channel arbitration result to the master device interface.
5. The method according to claim 1, characterized in that After arbitrating the read address channel of the slave device interface, the method includes: If the read address channel arbitration fails, determine whether there are other read address channels applying for strobe arbitration requests; If there are other read address channels applying for strobe arbitration requests and the current read address channel strobe arbitration request is not passed, read the read address channel connection request control information related to the master device interface and the first other slave device interface from the cache module, cache the read address channel connection request control information related to the master device interface and the current slave device interface to the cache module, control the master device interface to initiate a read address channel connection request to the first other slave device interface, and arbitrate the read address channel of the first other slave device interface; If there is no other read address channel arbitration request and the current read address channel arbitration request fails, the master device interface is controlled to continue to initiate a read address channel arbitration strobe request to the current slave device interface.
6. The method according to claim 1, characterized in that Acquiring the address information of the slave device includes: Connecting the read address channel of the master device interface to the read address channel of the slave device interface; Initiate transmission of read address information from the master device to the slave device based on the read address channel; After the transmission is completed, the connection relationship between the read address channel of the master device interface and the read address channel of the slave device interface is closed.
7. The method according to claim 1, characterized in that After acquiring the address information of the slave device, the method further includes: Determine whether there are other read address channels applying for strobe arbitration requests; If there are other read address channel strobe arbitration requests and the current read address channel strobe arbitration request has passed and the read address transmission is completed, read the read address channel connection request control information related to the master device interface and the second other slave device interface from the cache module, control the master device interface to initiate a read address channel connection request to the second other slave device interface, and arbitrate the read address channel of the second other slave device interface; If there is no other read address channel applying for strobe arbitration request and the current read address channel has passed the strobe arbitration and completed the read address transmission, the read address transmission process ends.
8. The method according to claim 1, characterized in that After arbitrating the read data channel of the slave device interface, the method further includes: If the read data channel arbitration fails, determine whether there are other read data channels applying for strobe arbitration requests: If there are other read data channels applying for strobe arbitration requests, and the current read data channel applying for strobe arbitration requests is not passed, then read the read data channel connection request control information related to the master device interface and the third other slave device interface from the cache module, and cache the read data channel connection request control information related to the master device interface and the current slave device interface to the cache module, the master device interface initiates a read data channel connection request to the third other slave device interface, and arbitrates the read data channel of the third other slave device interface; If there is no other read data channel applying for a strobe arbitration request and the current read data channel applying for a strobe arbitration request fails, the control master device interface continues to initiate a read data channel arbitration strobe request to the current slave device interface to arbitrate the read data channel of the current slave device interface.
9. The method according to claim 1, characterized in that: After controlling the slave device to initiate a read data transmission to the master device according to the address information, the method further includes: Determine whether there are other read data channels applying for strobe arbitration requests: If there are other read data channel strobe arbitration requests and the current read data channel strobe arbitration request has passed and the read data transmission has been completed, then read the read data channel connection request control information related to the master device interface and the third other slave device interface from the cache module, control the master device interface to initiate a read data channel connection request to the third other slave device interface, and arbitrate the read data channel of the third other slave device interface; If there is no other read data channel applying for strobe arbitration request and the current read data channel has passed the strobe arbitration and completed the read data transmission, the read data transmission process ends.
10. A reading device based on an AXI bus interconnection matrix, characterized in that: include: A first control module is used to respond to a read operation request initiated by a master device to a slave device, and control a master device interface read address channel to initiate a connection request to a slave device interface read address channel, wherein the system on chip SOC includes a plurality of master devices and a plurality of slave devices, the master device is connected to an AXI bus via a master device interface, and the slave device is connected to the AXI bus via a slave device interface; A decoding module, used for decoding the slave device interface that the master device interface applies to access; An arbitration module, used for arbitrating the read address channel of the slave device interface if the decoding is successful; A processing module, configured to control the read data channel of the master device interface to initiate a connection request to the read data channel of the slave device interface if the read address channel arbitration is passed, arbitrate the read data channel of the slave device interface, and obtain the address information of the slave device; The read operation module is used to connect the read data channel of the master device interface with the read data channel of the slave device interface if the read data channel arbitration is passed, and control the slave device to initiate read data transmission to the master device according to the address information.
11. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 9 when executed.
12. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 9.