Amba Protocols Overview
Amba Protocols Overview
Introduction
Advanced Microcontroller Bus Architecture (AMBA)
• an open standard, on:chip bus specification by ARM
• describes a strategy for the interconnection and management of
functional blocks that make up a System:On:Chip (SoC)
• provides systematic and efficient bus interface design
specifications
• enhances portable and re:usable on:chip designs
2
Overview
AMBA 2 (i.e., rev 2) defines three distinct interface buses:
• Advanced High8Performance Bus (AHB)
• Advanced System Bus (ASB – first generation of the AMBA bus)
• Advanced Peripheral Bus (APB)
AMBA;based Microcontroller
4
AMBA;based Architecture
The AHB/ASB backbone system bus is used for
‘core/block’ with high:bandwidth interface requirements
• CPU & co:processor
• DMA:based peripherals
• High:bandwidth peripherals with FIFO interfaces
support data transfers that involve:
– pipelined operation (two operations in one cycle)
– multiple bus masters
– burst transfer (AHB only)
– split transaction (AHB only)
6
AHB: Advanced High;Performance Bus
8
AHB System
A typical AHB system will contain:
• one or more bus Master
Processor, test interface, DMA controller that can
initiate data transfer operation by providing an
address and control information
• multiple bus Slaves
APB bridge, on:chip internal memory response to
read/write operation when selected by the master
10
Multi;Master AHB System
AHB
Decoder
11
AHB;Lite
AHB:Lite is a subset of the full AHB specifications
• for design with a single master
• or multi:layer AHB where there is only one AHB
master on a layer
• i.e., no arbitration is needed
12
AHB;Lite System
13
15
16
AHB Data Transfer
A basic AHB transfer consists of two distinct phases:
(i) Address phase
– Address and control signals are decoded and
output to the selected target
– can last for one HCLK cycle
17
A+4
18
A Simple Transfer
Addr
Control
Data
Slave
ready
Data
19
The address phase of the next transfer can occur during the data
phase of the previous transfer
• pipelined operation of the AHB
• overlap of address phase and data phase enables higher
throughput performance
20
Pipelined Operation
A B C
Data Data B
Data
21
A B
Control
Master holds
Slave not ready, Slave now
the write data
insert wait states ready
22
AHB Transfer Types
For more sophisticated operations, another 2:bit signal
can also be monitored to indicate the type of transfer
HTRANS[1:0]
a) 00 : Idle
No data transfer is required, although the Master
is granted the bus
b) 01 : Busy
The master is not able to execute the next transfer
immediately but want to remain connected to the
slave
23
d) 11 : SEQ
A sequential transfer is to follow. The control
information is identical to the previous transfer
with appropriate address increment
24
Transfer Type Example
T3: After one cycle, the master is ready to start the next transfer in
the burst, and completes with no wait states
T6: The final transfer of the burst completes with zero wait states.
26
Some Other AHB Signals
HBURST[2:0] : Burst operation (single or multiple)
27
28
AMBA APB
29
30
APB System
Consists of a master (APB bridge) and multiple slaves
(all other peripherals)
31
APB Features
A simple bus structure
• non:pipelined architecture
• simple interface with the peripherals acting as slaves
• a bridge acts as the Master of APB
32
Bus Implementations
APB interconnection can be implemented in two ways:
i) with separate read and write data buses
• use a multiplexed bus to connect the various slaves onto
the bus (i.e., like AHB)
33
APB Signals
The APB signals are much less complicated than the AHB
signals due to its simple operation.
• PCLK – APB bus clock
• PADDR[31:0] – APB address bus
• PRDATA[31:0] – APB read data bus (slave to bridge)
35
36
APB Write Transfer
a) Initially in the IDLE cycle: T1–T2
b) PSEL is asserted, together with the address, data,
and write control signals after the rising edge of the
clock at T2
• enter the SETUP cycle: T2–T3
c) PENABLE is asserted at the rising edge of the clock
at T3
• enter the ENABLE cycle: T3–T4
• address, data, and control signals all remain valid
throughout the ENABLE transfer cycle
c) PENABLE is de:asserted at the end of the transfer
• the PSEL signal will also be de:asserted
• back to the IDLE cycle: T4–T5
37
38
No Wait State on APB
Why is there no Wait signal on the APB?
• APB is designed to implement as simple an interface
as possible.
• Many APB peripherals are slow devices, e.g., UARTs,
which are normally accessed via registers.
– typically the driver software will first access a
status register to determine that data is available
– then access the data register.
These accesses are possible without the need of
additional wait state(s).
Peripherals that require wait states can/should be
designed as AHB slaves.
39
41
42
Interfacing APB to AHB
Wait
Read transfer to AHB Address state Data
phase phase
AHB
APB
43
44
Interfacing APB to AHB
Burst of read transfer to AHB
Extended Extended Extended
45
46
AHB to APB: Write Transfer
Write transfer from AHB – transfer starts at T2
• The bridge will first sample and hold the address,
followed by the data
• The address and data are latched for the duration of
the write transfer on the APB
The No Wait state is incurred for a single write transfer.
• But the Wait state may be required for burst of write
transfers
• The bridge needs to contain two address registers:
– one for the current latched address
– the other for sampling the next address
47
48
Summary
AMBA provides a standard to interface subsystems together
on an SoC design.
49