AMBA APB v2
AMBA APB v2
AMBA APB v2
0 (APB4)
AMBA Overview
AMBA (Advanced Microcontroller Bus Architecture) is an open standard,
on-chip interconnect for the connection and management of functional
blocks in SoC (System-on-Chip) designs.
It facilitates multi-processor designs with large number of controllers and
peripherals along with the bus architecture.
The first AMBA buses were ASB(Advanced System Bus) and APB(Advanced
Peripheral Bus).
It was first introduced by ARM in 1996.
AMBA 2 was introduced in 1999 which contained AHB(Advanced High
performance Bus).
In 2003, ARM introduced AMBA 3 including AXI(Advanced Extensible
interface) and ATB(Advanced Trace Bus).
In 2010, AMBA 4 specifications were introduced that included AMBA 4 AXI4.
In 2013, AMBA 5 CHI (Coherent Hub Interface) was introduced to reach
even higher performance and reduce the congestion.
AMBA Bus Implementation
Following diagram represents traditional AMBA based SoC design.
Introduction to APB
APB (Advanced Peripheral Bus) defines an interface that is optimized for
minimal power consumption.
It reduces the complexity of interface.
It is not pipelined.
The entire transaction is timed at rising edge of clock.
Every transition will take atleast two clock cycles.
APB can interface with:
1.) AMBA AHB
2.) AMBA AHB-lite
3.) AMBA AXI
4.) AMBA AXI-lite
This bus has an address and data phase similar to AHB but with less
complexity (for example no bursts).
APB Revisions
APB specification introduced in 1998, is now outdated and is replaced by
following three revisions:
AMBA 2 APB Specification.
AMBA 3 APB Protocol Specification v1.0
AMBA APB Protocol Specification v2.0
Write transfer:
With no wait states.
With wait states.
Read transfer:
With no wait states.
With wait states.
• Write Transfer:
Below figure shows the write transfer with no wait states.
• Write Transfer:
The write strobe signals, PSTRB, enable sparse data transfer on the
write data bus.
Each write strobe signal corresponds to one byte of the write data
bus.
When asserted HIGH, a write strobe indicates that the corresponding
byte lane of the write data bus contains valid information.
There is one write strobe for each eight bits of the write data bus, so
PSTRB[n] corresponds to PWDATA[(8n + 7):(8n)].
Note: For read transfers the bus master must drive all bits of PSTRB
LOW.
Error response:
Signal added for this functionality in the latest version is : PSLVERR
It indicates failure of an APB transfer which is possible in both read and write
transactions.
Dependencies: PSLVERR should only occur in the last cycle when PSEL,
PENABLE and PREADY are high.
It is recommended to drive PSLVERR low when any of PSEL,
PENABLE and PREADY are low.
NOTE: If an error occurs in any of the transaction, change of state in
peripheral might or might not occur so it is completely peripheral specific.
If error occurs in write transaction, it doesn’t mean the register within the
peripheral is not updated.
If error occurs in read transaction, it can return invalid data. There is no
requirement for the peripheral to drive all the data bus to 0’s to indicate
read error.
• For write transfer: