文章目录
1.什么是AMBA
AMBA即Advanced Microcontroller Bus Architecture ,是ARM公司定义的片内总线标准,广泛使用于ARM芯片。
AMBA目前一共有五个版本,从AMBA1.0—AMBA5.0,本文主要介绍AMBA2.0。
1.1AMBA2.0总线的分类
AMBA2.0总线主要分为:AHB ASB APB,
AHB:Advanced High-performance Bus
ASB:Advanced System Bus
APB:Advanced Peripheral Bus
其中AHB与ASB为高性能总线,一般用于连接片内RAM、processor等,相比而言AHB使用的更多;APB为外设总线,一般用于连接外设IIC UART等外设。
1.2几种总线的连接方式
2. AMBA2.0的AHB总线
AHB:Advanced High-performance Bus即先进的高性能总线,支持以下特性:
• burst transfers
• split transactions
• single cycle bus master handover
• single clock edge operation
• non-tristate implementation
• wider data bus configurations (64/128 bits)
2.1AHB的总线拓扑
AHB支持多主多从交互,一般而言,主为processor,
2.2AHB的仲裁器arbiter
仲裁器的作用是控制那个master可以访问总线
2.3AHB的译码器decoder
通过地址译码来决定哪一个从设备。它需要知道地址信息,知道后就会分析总线上的address是什么值,落在那个slave的区域。
3. AMBA2.0的ASB总线
ASB总线已逐渐被AHB所替代,可用于AHB不需要的高性能特性的芯片设计上可选的系统总线。ASB也支持高性能处理器,片上内存,片外内存提供接口和慢速外设。
4. AMBA2.0的APB总线
APB:Advanced Peripheral Bus ,顾名思义,主要用来连接外设,如UART、IIC等,支持以下特性:
• performance is improved at high-frequency operation
• performance is independent of the mark-space ratio of the clock
• static timing analysis is simplified by the use of a single clock edge
• no special considerations are required for automatic test insertion
• many Application-Specific Integrated Circuit (ASIC) libraries have a better
selection of rising edge registers
• easy integration with cycle based simulators.
在AMBA总线系统中,对于MCU往往会选用AHB和APB的组合,AHB总线作为主要的核心总线,为控制器和存储器提供高性能的指令和数据传输,而APB总线作为低带宽低功耗的外设总线,两条总线间通过AHB到APB的桥连接。
在APB总线里面,主机先发起要访问的外设地址,外设根据要求返回数据,主机收到数据,这一个完整的流程被称为APB总线协议
4.1APB bridge
APB桥对上连接高速总线AHB,对下连接APB slave.
4.2APB slave
5.参考资料
参考:
1.AMBA™ Specification(Rev 2.0)ARM IHI 0011A
2.AMBA Style Guide