CrazyBingo

Avalon-MM 阿窝龙妹妹应用笔记

0
阅读(3752)

Avalon Interface Special http://www.altera.com.cn/literature/manual/mnl_avalon_spec.pdf

Avalon总线是SOPC硬件系统的重要组成部分,了解龙妹妹总线的特点、信号以及传输模式等,是构建SOPC硬件系统、开发自定义外设IP的基础。

Avalon接口规范定义了外设和Avalon开关互联结构(Avalon Switch Fabric)之间的数据传输。

Avalon接口是一种开放标准,使用Avalon接口创建和发布定制外设不需要任何授权。

Avalon接口定义(片选,读使能,写使能,地址,数据)

(1)一组信号类型

(2)信号的行为

(3)信号支持的传输类型

 

一下是6种不同的接口类型:

Avalon Memory Mapped Interface (Avalon-MM)—an address-based read/write interface typical of master–slave connections.
Avalon Streaming Interface (Avalon-ST)—an interface that supports the unidirectional flow of data, including multiplexed streams, packets, and DSP data.
Avalon Memory Mapped Tristate Interface—an address-based read/write interface to support off-chip peripherals. Multiple peripherals can share data and address buses to reduce the pin count of an FPGA and the number of traces on the PCB.
Avalon Clock—an interface that drives or receives clock and reset signals to synchronize interfaces and provide reset connectivity.
Avalon Interrupt—an interface that allows components to signal events to other components.
Avalon Conduit—an interface that allows signals to be exported out at the top level of an SOPC Builder system where they can be connected to other modules of the design or FPGA pins.

 

 

Avalon端口分为 主端口 和 从端口()

(1)主端口:用于在Avalon总线上发起传输的一组信号

(2)从端口:用于响应传输请求的一组信号\

在传输期间,主端口的控制和数据信号通过Avalon Switch Fabric与从端口进行通信

Avalon Switch Frabic :片上互联逻辑,将Avalon外设连接在一起,形成较大的系统。

Avalon Memory-Mapped Master(http://www.altera.com.cn/support/examples/nios2/exm-avalon-memory-slave.html#figure1

Avalon Memory-Mapped Slave(http://www.altera.com.cn/support/examples/nios2/exm-avalon-memory-slave.html

 

Clock input Signal Types


基本的信号量:

(1)clk : Avalon 接口同步时钟

(2)reset_n : 外设复位信号

(3)chipselect : Avalon 从接口的片选信号

(4)address(1~32) : 从Avalon Switch Fabric到Avalon从接口的地址线。可访问一个字,指定一个字的偏移量到从端口的地址空间。控制最宽位1个字(16bit,超出动态寻址)。address进行译码,配置寄存器

但是实际设计中碰到了


实际上,当address为静态寻址的时候,Address至少是[1:0]的 4的倍数

 

(5)byteenable(0,2,4,8,16) : 允许特殊的字节段,高低字节片选等(长度超过8位时,byteenable有效)

(6)read : 从主端口读请求信号

(7)readdata (32): 从主端口读传输数据

(8)write : 来自主端口的写请求

(9)writedata(32): 到Avalon Switch Fabric的写传输数据

等待状态信号,pepeline信号,突发信号,流控制信号,三态信号,其他信号:Avalon主从端口个不一样,此处不具体讲述,相见文档

readdata,writedata,可以不用用一个或者两个1~128(使用动态总线的时候必须8,16,,3,64,128)

 

Avalon 从端口传输

(1)从端口读传输:

chipselect :

address :

read :

readdata :

byteenable :


一个周期:

(A)第一个周期开始于clk上升沿

(B)read和address信号有效

(C)从Avalon Switch Fabric 对address译码,并设置chipselect有效

(D)clk上升沿标志第一个且是唯一的一个等待周期结束。从端口可在clk上升沿捕获address,read,chipselect

(E)从端口在第二个周期内返回有效数据

(F)从Avalon Switch Fabric 在clk上升沿捕获readdata,读传输到此结。下一个周期从此开始

 

(2)从端口写传输

chipselect :

address  :

write :

writedata :

byteenable : 为writedata大于1个字节时候,只写指定字节提供机制(不使用所有字节段则始终被允许)


一个周期:

(A)写传输开始于clk上升沿

(B)Avalon Switch Fabric 设置 writedata,address,byteenable,write有效

(C)Avalon Switch Favric对address译码,并向从端口设置chipselect

(D)从端口的下一个clk上升沿捕获writedata,address,byteenable,write和chipselect,写传输结束。下一个周期从这里开始

 

Focus on Avalon-MM Slave Transfers




这是不是说slave_writedata必须是8,16,32…位宽的??

 The minimum requirements are readdata for read for a read-only interface or writedata and write for a write-only interface.



等等……

Memory chip

Conduit

。。。。还是不懂,发现自己不懂得 越来越多