AXI Overview
AXI Overview
Upscale Training
AMBA
Advanced Microcontroller Bus Architecture
On-chip bus protocol from ARM
On-chip interconnect specification for the connection and management of
functional blocks including processor and peripheral devices
Introduced in 1996
AMBA is a registered trademark of ARM Limited
AMBA is an open standard
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Course Summary
This presentation outlines the specific topics/sections that need to be
understood.
For each of the topic corresponding section number in the AMBA
AXI and ACE Protocol Specification (Issue E, Date 22 February 2013)
is provided.
This has been divided into 3 parts:
Part A: AMBA AXI3 and AXI4 Protocol Specifications
Part B: AMBA AXI4-Lite
Part C: ACE Protocol Specification
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Features (A1.1)
Revisions (A1.2)
Multiple Transactions
Transaction ID (A5.2)
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Part A
AMBA AXI3 and AXI4 Protocol Specifications
Read Address
Read Data
Write Address
Write Data and
Write Response
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
10
5 Independent Channels
Exception: In AXI4, INCR bursts can have lengths upto 256 transfers.
Data bus can be 8, 16, 32, 64, 128, 256, 512, or 1024 bits wide
NOTES:
Each channel is independent and uses a 2-way flow-control.
11
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
12
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Independent
13
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Independent
14
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Independent
Here you go
15
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Independent
Here you go
16
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
17
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Independent
Independent
18
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Independent
Independent
19
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Independent
Here is the data.
Independent
20
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Independent
Here is the data.
Independent
21
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Independent
Here is the data.
Independent
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
AXI Flow-Control
Always Ready
23
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
AXI Flow-Control
Always Ready
Transfer
Flexible signaling functionality
24
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
AXI Read
Read Address Channel
25
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Read request
is initiated
Slave
is ready
Read request
is accepted
26
1st data
is transferred
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
ADDRESS
DATA
27
A11
A21
D11
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
A31
D22 D23
D31
Read request A
is accepted Read request B
is accepted via AR channel
while data A(0) is
transferred via R channel
28
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Write Data
Channel
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Write request A
is accepted
30
Response completes
write operation
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
31
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
[AXI4]
The AXI3 protocol requires that the write response for all transactions
must not be given until the clock cycle after the acceptance of the last data
transfer
In addition, the AXI4 protocol requires that the write response for all
transactions must not be given until the clock cycle after address
acceptance
WLAST
AXI3
AXI4
32
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Use of IDs
AXI gives an ID tag to every transaction
Write
Data
Channel
Write
Address
Channel
Write
Response
Channel
Read
Address
Channel
Read
Data
Channel
33
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Transaction ID Implementation
Real implementation
Transaction ID = <master ID, channel ID>
Channel ID = original AXI transaction id
Master ID is needed to identify the initiating master among all the masters
CPU
ID: 3
Video
Decode
r
ID: 2
3D
Graphic
s
LCD
Control
ID: 3
ID: 0
Video
Process
Mixer
ID: 3
Interconnect
ID: 4 + ceil(log27)=7 bits
Memory
Controller
34
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
ID: 2
DMA
ID: 4
Use of IDs
Multiple Outstanding Addresses:
By using IDs, a master can issue transactions without waiting for earlier
transactions to complete.
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Out-of-Order Transaction
Ordering by transaction ID
Slave can handle data transfers with different transaction IDs out-oforder
The order within a single burst is maintained
ADDRESS
RDATA
36
A11
A21
A31
D21
D22 D23
D31
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
D11 D12
D13
D14
37
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
38
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Master
IP
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Slave
IP
Slave
IP 1
Interconnect
Slave
IP 2
Interleaving rule
Write Data with different ID can be interleaved.
This is supported only in AXI3
The order within a single burst is maintained
ADDRESS
WDATA
40
A11
A21
A31
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
D23
D31 D13
D14
41
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
[AXI4]
EXOKAY
Exclusive access success
SLVERR
Slave generates error response/unsupported transfer size/WR access to
RO/timeout condition in slave/access to address where no register
present/access to disabled or powered-down function
DECERR
Can not Decode Slave Access then default slave gives DECERR
(Note: For a write transaction, there is just one response given for the entire
burst and not for each data transfer within the burst. In a read transaction,
the slave can give different responses for different transfers within a
burst.)
42
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Write data
WREADY
AXI
Master
Response
AXI
Slave
BREADY
Read Address/Control
ARREADY
Read data
RREADY
43
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
44
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Unaligned Access
Master uses lower address bits; byte lane strobe must be consistent to lower
address bits information
45
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
46
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
In a Narrow Transfer, the address and control (WSTRB) determine which byte
lanes the transfer uses.
WSTRB[n:0] signals, when high specify which byte-lanes are used
47
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Unaligned Transfer
AXI Support Unaligned Transfers
Unaligned Transfer is a transfer in
which the 1st byte accessed is
unaligned with the natural
address boundary
e.g. A 32-bit transfer that starts
at address 0x1002 is not aligned
to the natural 32-bit address
boundary
Master can:
Use low-order address lines to
signal an unaligned start address
OR
Provide an aligned address and
use byte-lane strobes to signal
the unaligned start address
48
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
49
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
After each transfer, the address increments same as for INCR Burst
If incremented address is ( (wrap boundary) + ( total size of data to be
transferred) ), then the address wraps around to wrap-boundary.
50
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
[AXI4]
51
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
[AXI3]
CPU
RF
52
L1 Instruction
Cache
Memory
Unified L2
Cache
L1 Data Cache
Memory
Memory
Memory
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
53
The characteristics of the transaction at the final destination does not have to match the
characteristics of the original transaction.
For writes this means that a number of different writes can be merged together.
For reads this means that a location can be pre-fetched or can be fetched just once for
multiple read transactions.
To determine if a transaction should be cached this bit should be used in conjunction with the
Read Allocate (RA) and Write Allocate (WA) bits.
The interconnect or any component can delay the transaction for any number of cycles. This is
usually only relevant to writes.
Transaction response may not be from the final destination, but from the intermediate point,
like Cache. The cache is then responsible to update the memory.
[AXI3]
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
[AXI4]
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
[AXI4]
RA and WA Bits
For Read Transactions:
RA bit means the same: The location could have been previously allocated in
the cache. It is recommended that this transaction is allocated in cache.
WA bit is redefined: The location could have been previously allocated in the
cache because of other transaction Either Write transaction or Transaction
by other master
For a same location, a read and a write transfer may have different values for
AxCACHE
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Protection Support
(AWPROT[2:0], ARPROT[2:0])
Normal or Privileged Mode: AxPROT[0]
Indicates whether an access was done by a Master in Privilege Mode or
in Unprivileged Mode
LOW indicates an access done by a Master in Unprivileged Mode
HIGH indicates an access done by a Master in Privileged Mode
A privileged processing mode typically has a greater level of access within a
system.
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Atomic Access
(ARLOCK[1:0], AWLOCK[1:0])
Normal access, AxLOCK[1:0]=b00
Exclusive access, b01
Exclusive read
Exclusive write
If no intervening write to the address
region, EXOKAY response. If not,
OKAY response.
Usually used for read-modify-write
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Exclusive Access
Semaphore type operation without requiring bus to remain locked to a
particular master for the duration of the operation
Usually used for read-modify-write kind of operations
Slave must have additional logic to support exclusive access.
The basic process for an exclusive access is:
A master performs an exclusive read from an address location.
At some later time, the master attempts to complete the exclusive operation
by performing an exclusive write to the same address location.
The exclusive write access of the master is signaled as:
Successful (EXOKAY) if no other master has written to that location between the
read and write accesses.
Failed (OKAY) if another master has written to that location between the read and
write accesses. In this case the address location is not updated
Master 1
Master 2
Master 1
E.RD 0x100
WR 0x100
E.WR 0x100
Slave 1
OKAY
time
58
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
[AXI3]
Locked Access
Interconnect must ensure that only that master is allowed access to the
slave region until an unlocked transfer from the same master completes
Master should have no other outstanding transactions waiting to complete
before issuing locked sequence
Final transaction effectively removes the lock
Master 1
0x100
Master 2
0x100
Master 1
0x100
time
Lock
59
Unlock
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
60
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
[AXI4]
[AXI4]
61
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Signals:
CACTIVE: (driven by peripheral)
High => Peripheral requires a clock signal. Clock-Controller must enable the clock
immediately.
Low => Peripheral does not require the clock
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
The peripheral can accept or deny the request, from the system-clockcontroller, to enter low-power state.
The level of the CACTIVE signal when the peripheral acknowledges the
request by driving CSYSACK low indicates the acceptance or denial of the
request.
63
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
64
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
65
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Part B
AMBA AXI4-Lite
66
AXI4 Lite
AXI4-Lite is a subset of the AXI4 protocol intended for communication
with simpler, smaller control-register style interfaces in components.
AXI4-Lite is a simpler AXI4 for onchip devices requiring a more powerful
interface than APB.
Features:
All transactions with burst length of 1
all data accesses are the same size as the width of the data bus
support for data bus width of 32-bit or 64-bit
all accesses are equivalent to AWCACHE or ARCACHE equal to b0000
(i.e. non-modifiable and non-bufferable)
exclusive accesses are not supported.
AXI IDs not supported All transactions must be in order
So signal list reduced
67
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
68
AWLEN, ARLEN
AWSIZE, ARSIZE
AWBURST, ARBURST
AWLOCK, ARLOCK
AWCACHE, ARCACHE
WLAST, RLAST
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Part C
ACE Protocol Specification
69
Coherency Problem
Two problems for systems that
contain caches:
1) Memory may be updated (by
another master) after a cached
master has taken a copy
The cache no-longer contains
up-to-date data
Master1
Master2
Master3
Cache
Cache
Cache
70
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Interconnect
Main
Memory
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Features
ACE is an extension to AXI
72
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Specification
Additional Signaling on the existing AXI4 channels that enables new transactions and
information to be conveyed
73
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Unique:
Shared
Invalid
74
Dirty
Clean
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Non-Shareable
Inner Shareable
System
75
Outer Shareable
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
76
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
77
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
RACK / WACK
78
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
79
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Interconnect:
CCI (Cache Coherent
Interconnect)
ACE Masters
Masters with Caches
ACE-Lite Masters
Components without caches
snooping other caches
Slaves
Components not initiating snoop
transactions
80
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Transaction Groups
Non-Shared Transactions
Non-Cached Transactions
MakeUnique
ReadUnique
CleanUnique
Write-back Transactions
81
ReadShared
ReadNotSharedDirty
CleanShared
CleanInvalid
MakeInvalid
ReadOnce
WriteUnique
WriteLineUnique
WriteBack
WriteClean
Evict
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Transaction Processing
Initiating Master component issues a transaction
Depending on whether coherency support is required, either:
The transaction is passed directly to a slave component
The transaction is passed to the coherency support logic within the
interconnect
82
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
The master component indicates that the transaction has completed, using the
RACK signal
83
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Initiating master performs the store using standard AXI write channels
Initiating master issues and RACK signal, to indicate that the transaction
has completed
84
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
85
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Barrier Instructions
The DMB transaction can flow on the pipelined interconnect but no re-ordering is allowed about the DMB.
Ensures that all memory transactions prior to the barrier are visible by other masters
This prevents re-ordering about the DMB
Everything before the DMB must be complete before anything after the DMB
This was ensured by the ARM MPCore processor cluster
In ACE, the DMB Barriers may define a subset of masters that must be able to observe the barrier:
-
86
This is indicated on the AxDOMAIN signals. These can indicate: Inner, Outer, System or Non-Shareable.
DSB is used to stall the processor until previous transactions have completed
Can be used for example to ensure data written to DMA command buffer in memory has reached its
destination before kicking off the DMA via a peripheral register
Is the most time-consuming barrier since it stops the processor until transactions are complete
A master issues a Barrier on both: Read Address Channel and Write Address channel
simultaneously using ARBAR and AWBAR signaling.
A barrier transaction has an address phase and response phase, but no data transfer occurs.
Barriers enforce ordering because a master must not issue any read or write transaction
until the master has received a response for the barrier on both: read and write channels
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
ACE-Lite Master:
87
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
ACE-Lite
ACE-Lite is a subset of ACE
Enables uncached masters to snoop ACE Coherent masters
e.g. An AXI Master interface like GigabitEthernet that shares data
with CPU can directly read/write cached data shared within the CPU.
88
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
89
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
References
AMBA AXI and ACE Protocol Specification (Issue E, Date 22
February 2013)
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0022e/index.html
90
2010
2010 Wipro
Wipro Ltd
Ltd -- Confidential
Confidential
Thank You
Yashdeep Mahajani
yashdeep.mahajani@wipro.com