ARM之AXI總線協議初試


AXI總線協議的學習

1、AXI總線的初步認識

What is AXI?
AXI is part of ARM AMBA, a family of micro controller buses first introduced in 1996. The
first version of AXI was first included in AMBA 3.0, released in 2003. AMBA 4.0, released in
2010, includes the second major version of AXI, AXI4.
There are three types of AXI4 interfaces:
• AXI4: For high-performance memory-mapped requirements.
• AXI4-Lite: For simple, low-throughput memory-mapped communication (for example,
to and from control and status registers).
• AXI4-Stream: For high-speed streaming data.

這段是摘自xilinx的ug1037的對於AXI的簡介。大概意思就是AXI是ARM AMBA的一部分,有常用的三種形式。感覺讀完后還是什么都不知道。作為一個傳輸協議,主要的目的還是傳輸數據。如何能夠快速地理解一個協議呢?找到這個協議的傳輸特點。

由於AXI的種類有多種,具體的設計一般只會使用一種(會一種基本上就可以會其他的)。所以,先看一下AXI4總線的優勢。

Summary of AXI4 Benefits
AXI4 is widely adopted in Xilinx product offerings, providing benefits to Productivity,
Flexibility, and Availability:
• Productivity: By standardizing on the AXI interface, developers need to learn only a
single protocol for IP.
• Flexibility: Providing the right protocol for the application:
° AXI4 is for memory-mapped interfaces and allows high throughput bursts of up to
256 data transfer cycles with just a single address phase.
° AXI4-Lite is a light-weight, single transaction memory-mapped interface. It has a
small logic footprint and is a simple interface to work with both in design and
usage.
° AXI4-Stream removes the requirement for an address phase altogether and allows
unlimited data burst size. AXI4-Stream interfaces and transfers do not have address
phases and are therefore not considered to be memory-mapped.
• Availability: By moving to an industry-standard, you have access not only to the
Vivado IP Catalog, but also to a worldwide community of ARM partners.
° Many IP providers support the AXI protocol.
° A robust collection of third-party AXI tool vendors is available that provide many
verification, system development, and performance characterization tools. As you
begin developing higher performance AXI-based systems, the availability of these
tools is essential.

這里談到了AXI4的效率、靈活性、可用性。簡單來說,就是AXI對於設計者來說只需要知道IP協議,對於傳輸來說是應用程序協議,可以直接由程序調用。由於是ARM家族的,自然可以適用於各種ARM器件。這里就可以大致的了解AXI協議是什么了。AXI支持直接的硬件設計,可以由硬件描述語言構建發送和接受的模塊。同時,該協議還支持APPLICATION直接調用,相當於實現了數據有硬件層向軟件層跨越。對比串口協議,串口的數據只能通過軟件端的庫函數接受和發送,直接的軟件是不能夠直接訪問傳輸中的數據的。換言之,軟件無法直接操控傳輸。

2、AXI總線的設計思路

Both AXI4 and AXI4-Lite interfaces consist of five different channels:
• Read Address Channel
• Write Address Channel
• Read Data Channel
• Write Data Channel
• Write Response Channel

這是AXI總線的工作通道。從這里就可以看出AXI總線的復雜之處。同樣對比串口,串口沒有地址,數據通道的讀寫共用。寫響應也是夾雜在數據位中。另外一個有代表性的通信協議是SCCB協議。SCCB協議的雙向口具有數據、地址、響應這三個模塊,加上狀態線sio_e也是可以進行多機通信的。但是,顯然,過於集中的數據流向限制了通信效率。而AXI作為內部總線協議,效率的考量是大於面積的。畢竟在芯片內部的布線資源要遠大於IO口的資源。

作為協議,基本的功能就是數據傳輸。和其他協議一樣,AXI的讀操作也是需要讀地址和讀數據兩個步驟。寫操作需要寫數據、寫地址和寫響應三個部分的操作。這只是單向操作。設計到多個從屬設備時,情況會更加復雜。可以在后面的設計中有所體現。

3、AXI總線的開發概念

為什么會學到AXI,在ZYNQ內部集成了ARM內核,是一個可以搭載微型操作系統的內核。而FPGA被作為外設資源置於外圍。這種片上系統的操作是明確的。通過FPGA設計出足夠靈活的外設,將信號處理后傳遞到ARM,有ARM的穩定架構加工,即可快速實現各種功能。而在內部,PS和PL的連接協議就是芯片內部常用的AXI總線協議。使用這個協議的原因前面已經分析過了。

這種結構的優勢是將ARM的穩定性和FPGA的靈活性融合在一起,用於實現特定的目的。所以,如果想要掌握這種設計方法,AXI總線會是躲不開的坎。你總不能用IO口去連接ARM和FPGA,這個太奢侈了。

小結一下,就是使用AXI是ARM結合FPGA的靈魂。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM