Method for realizing AXI bus cache mechanism

文档序号:1556508 发布日期:2020-01-21 浏览:17次 中文

阅读说明:本技术 一种axi总线缓存机制的实现方法 (Method for realizing AXI bus cache mechanism ) 是由 刘尚 孙中琳 刘大铕 朱苏雁 刘奇浩 王运哲 于 2019-09-27 设计创作,主要内容包括:本发明公开一种AXI总线缓存机制的实现方法,本方法在AXI从设备端增加高速缓冲存储器cache,cache由多条大小相同的cache line组成,每条cache line包括cache address和cache data,设有CFG模块对cache进行配置并且寄存配置信息,cache address设有地址运算模块,用于实现传输地址和数据的匹配,并判定一次读传输的所有数据是否均可从cache提供;cache缓存数据的同时不影响正常操作,命中CACHE时,可直接从CACHE回复数据,不需要向SLAVE发起操作,大幅提升了小批量数据的读效率,极大提高了AXI总线的传输效率,实现高带宽、低响应延时的最优化传输。(The invention discloses a method for realizing an AXI bus cache mechanism, which is characterized in that a cache is added at an AXI slave device end, the cache consists of a plurality of cache lines with the same size, each cache line comprises a cache address and cache data, a CFG module is arranged for configuring the cache and registering configuration information, and the cache address is provided with an address operation module for realizing the matching of a transmission address and data and judging whether all data which are transmitted once can be provided from the cache; when the CACHE CACHEs data, normal operation is not influenced, when the CACHE hits CACHE, the CACHE can directly reply the data from the CACHE without initiating operation to SLAVE, so that the reading efficiency of small-batch data is greatly improved, the transmission efficiency of an AXI bus is greatly improved, and the optimized transmission with high bandwidth and low response delay is realized.)

1. A method for implementing an AXI bus caching mechanism, comprising: the method comprises the steps that a cache memory is added at an AXI slave device end, the cache memory consists of a plurality of cache lines with the same size, the cache lines are basic operation units of the cache memory, each cache line comprises a cache address at a high position and a cache data at a low position, the cache addresses are used for caching addresses, the cache data are used for caching data, a CFG (computational fluid dynamics) module is arranged for configuring the cache and registering configuration information, the cache addresses are provided with address operation modules used for realizing the matching of transmission addresses and data, and judging whether all data which are transmitted once can be provided from the cache, so that a cache hit signal is sent out; when the master device initiates write transmission, a write address channel and a write data channel which are sent to a slave device are respectively introduced into a cache, for transmission meeting configuration conditions, cache operation of addresses and data is carried out, when the master device initiates read transmission, the read address channel is introduced into the cache, when the data of the operation cannot be completely provided by the cache, the cache cannot hit, the data is read from the slave device, the addresses are operated according to an instruction format and then are registered, when the data of the channel to be read arrives, cache line is updated by combining with the corresponding addresses, cache is completed, if all the data of the operation can be provided by the cache, the cache hits, the cache immediately sends a hit signal, the read instruction is intercepted to the slave device, under the condition of hit, the read data is provided by the cache, and the read response after the data reply is sent by the cache at the same time, and the read transmission is completed.

2. The method of implementing an AXI bus caching mechanism as claimed in claim 1, wherein: the information for the CFG module to configure the cache comprises the threshold value of the cache, the width of the cache address in the cache line, the width of the cache data and the depth of the cache.

3. The method of implementing an AXI bus caching mechanism as claimed in claim 2, wherein: the process of the address operation module for realizing the matching of the transmission address and the data comprises the following steps: according to the AXI protocol, sequentially calculating all address information in the transmission process according to an awburst/awsize signal or an arbburst/arsize signal transmitted at one time, corresponding to transmission data, writing into a cache line, and judging whether all data read and transmitted at one time can be provided from the cache by the following steps: when the addresses exist in the cache, the cache hits, the instruction sent to the slave-oriented module is intercepted, data and response are provided by the cache module, otherwise, the instruction normally enters the slave-oriented module, the cache monitors the data replied by the slave from a bypass, and the cache corresponding to the address and the data is completed.

4. The method of implementing an AXI bus caching mechanism as claimed in claim 1, wherein: when the master device initiates write transmission, the judgment process of the transmission meeting the configuration condition is as follows: the data volume of one-time transmission is less than or equal to the configured cache threshold.

5. The method of implementing an AXI bus caching mechanism as claimed in claim 1, wherein: the cache address takes bit as the minimum unit, and the cache data takes byte as the minimum unit.

6. The method of implementing an AXI bus caching mechanism as claimed in claim 1, wherein: and the cache addresses correspond to the cache data one by one.

7. The method of implementing an AXI bus caching mechanism as claimed in claim 1 or 6, wherein: the size of the cacheaddress is configured according to the bit width of an address bus of an AXI bus controller kernel, and the size of the cache data is configured according to the bit width of a data bus of the AXI bus controller kernel.

8. The method of implementing an AXI bus caching mechanism as claimed in claim 1, wherein: the method is applied to BURST or WRAP transmission of the AXI bus.

9. The method of implementing an AXI bus caching mechanism as claimed in claim 1, wherein: and each updating of the cache is carried out by taking the cache line as a basic operation unit, the updating of the cache line is circularly carried out according to a pointer mode, and the cache line with the longest storage time in the cache is always updated.

Technical Field

The invention relates to a method for realizing an AXI bus caching mechanism, belonging to the technical field of AXI buses.

Background

The AXI system bus is a controller in the AXI bus system, connects a plurality of AXI MASTER devices to a plurality of AXI slave devices, and realizes address and data transmission among a plurality of memory-mapped devices. At present, a system bus mostly adopts a single-address channel multi-data channel mode, MASTER MASTER equipment initiates a write transmission application, an address decoder determines that the write transmission application needs to be transmitted to a certain SLAVE SLAVE equipment, the SLAVE receives a write command and write data, and after data transmission is completed, a write response is returned. The MASTER MASTER device initiates a read transmission application, determines that the application needs to be transmitted to a certain SLAVE SLAVE device through an address decoder, and the SLAVE receives a read command and returns read data and a read response. In the method, read-write transmission in an AXI system bus can only be accessed one by one, and after one-time transmission is completed, the next-time transmission can be started, so that the defects of single mode, narrow application range, inflexibility and low data transmission efficiency exist. Especially, when the MASTER initiates multiple read-write transmission applications, and the access addresses are repeated or continuous, the transmission needs to be initiated again, the SLAVE access times are increased, and a large number of clock cycles are wasted.

Disclosure of Invention

The invention aims to solve the technical problem of providing an AXI bus cache mechanism, and the method adds a cache with configurable capacity and high access speed at a SLAVE end, can effectively reduce SLAVE access, improves the data transmission efficiency of the AXI bus, and does not influence normal transmission.

In order to solve the technical problem, the technical scheme adopted by the invention is as follows: a method for realizing an AXI bus cache mechanism comprises the steps that a cache is added at an AXI slave device end, the cache is composed of a plurality of cache lines with the same size, the cache lines are basic operation units of the cache, each cache line comprises a cache address at a high position and a cache data at a low position, the cache addresses are used for caching addresses, the cache data are used for caching data, a CFG module is arranged for configuring the cache and registering configuration information, the cache addresses are provided with address operation modules used for realizing matching of transmission addresses and the data, whether all data which are transmitted in one-time reading mode can be provided from the cache or not is judged, and cache hit signals are sent out; when the main device initiates write transmission, a write address channel and a write data channel which are sent to a slave machine are respectively introduced into a cache, for transmission meeting configuration conditions, address and data caching operation can be carried out, when the main device initiates read transmission, the read address channel is introduced into the cache, when the data of the operation cannot be completely provided by the cache, the cache cannot hit, the data is read from the slave machine, the address is operated according to an instruction format and then is registered, when the channel data to be read arrives, cache line is combined with the corresponding address to complete caching, if all the data of the operation can be provided by the cache, the cache hits, the cache immediately sends a hit signal, the read instruction is intercepted to be sent to the slave machine, under the condition of hit, the read instruction is provided by the read data cache, and the read response after the data reply is sent by the cache at the same time, and the read transmission is completed.

Further, the information configured by the CFG module for the cache includes a threshold of the cache, a width of a cache address in a cache line, a width of cache data, and a depth of the cache.

Further, the process of the address operation module for matching the transmission address and the data is as follows: according to an AXI protocol, sequentially calculating all address information in a transmission process according to an awburst/awsize signal or an arburst/arsize signal transmitted for one time, corresponding to transmission data, judging whether all data read for one time can be provided by a cache or not, introducing an instruction into a slave-facing module and introducing the instruction into an address operation module, simultaneously calculating all addresses related to the transmission process by the address operation module according to the arburst/arsize signal, when the addresses exist in the cache, the cache hits, the instruction sent to the slave-facing module is intercepted, the data and response are provided by the cache module, otherwise, the instruction normally enters the slave-facing module, and the cache monitors data returned by the slave from a bypass, so as to finish the cache of the corresponding address and data.

Further, when the master device initiates write transmission, the determination process of transmission that meets the configuration condition is as follows: the data volume of one-time transmission is less than or equal to the configured cache threshold.

Furthermore, the cache address takes bit as the minimum unit, and the cache data takes byte as the minimum unit.

Further, cache addresses correspond to cache data one to one.

Further, the size of the cache address is configured according to the bit width of an address bus of the interconnect, and the size of the cache data is configured according to the bit width of a data bus of the interconnect.

Further, the method is applied to BURST or WRAP transmission of the AXI bus.

Furthermore, each updating of the cache is carried out by taking the cache line as a basic operation unit, the updating of the cache line is circularly carried out according to a pointer mode, and the cache line with the longest storage time in the cache is always updated.

The invention has the beneficial effects that: the cache of the cache with configurable capacity and high access speed is added at the slave end of the bus controller, the design area is increased controllably, the access to the slave can be effectively reduced, and the data transmission efficiency of the AXI bus is improved; the size of the cache line can be matched, the size of the burst of the cache can be matched, and the customization requirements in practical application can be flexibly met; the cache operation does not interfere with normal transmission and does not influence the normal transmission; when the cache hits, the instruction interception can be immediately carried out, and the data are simultaneously replied, so that the additional clock overhead can not be increased. The working mode of the N-M system is further expanded, the MASTER MASTER device initiates reading operation of the same address for many times, data is directly read from the cache, the performance limit of repetitive transmission on a complex bus system is broken through, the transmission performance of the system bus is greatly improved, and the high-performance requirement of the system bus is met.

Drawings

FIG. 1 is a schematic diagram of an AXI bus N-M full interconnect caching mechanism with configurable functionality;

FIG. 2 is a schematic structural diagram of the cache;

FIG. 3 is a schematic diagram of cache operation during write transmission;

FIG. 4 is a diagram illustrating a read transfer miss cache operation;

FIG. 5 is a diagram illustrating a read transfer hit cache operation.

Detailed Description

The invention is further described with reference to the following figures and specific embodiments.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于区块链的神经网络多端口超高速传播仪

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!