Amba2 0rev PDF
Amba2 0rev PDF
Amba2 0rev PDF
1
Outline
Overview
AHB
APB
Test methodology
Disadvantage
Performance bottleneck
SoC Design Lab Shao-Yi Chien 4
AMBA Introduction
Advanced Microcontroller Bus Architecture
An on-chip communication standard
Three buses defined
AHB (Advanced High-performance Bus)
ASB (Advanced System Bus)
APB (Advanced Peripheral Bus)
Technology independent
Not define electrical characteristics
Timing specification only at the cycle level
Exact timing requirements will depend on the
process technology used and operation
frequency
Decoder
SoC Design Lab Shao-Yi Chien 15
AHB Transfer Sequence Grants the bus ownership
to the master
Initiate a request
to arbiter Arbiter Address & control
broadcasted to all
Drives address slaves, only the
and control signal selected slave
response
HREADY_IN
From decoder
Decoder tell the slave that the bus is available
Not explained in AMBA spec. 2.0 !!
01 : BUSY
Allow the master to insert IDLE cycle during
transfers
SoC Design Lab Shao-Yi Chien 25
Transfer Type (cont.)
10 : NOSEQ
Indicate a single transfer
or the first transfer of a burst
The address & control signals are unrelated to
the previous transfer
11 : SEQ
Indicate
the following transfers
The address is related to the previous transfer
HSIZE[2:0]
000 : 8 bits
100 : 128 bits
001 : 16 bits
101 : 256 bits
010 : 32 bits
110 : 512 bits
011 : 64 bits
111 : 1024 bits
The max is constrained by the bus configuration
32 bits (010) is often used
SoC Design Lab Shao-Yi Chien 28
Burst Operation
AHB burst operations
4-beat, 8-beat, 16-beat, single transfer, and
undefined-length transfer
Both incrementing & wrapping burst
Incrementing burst
Sequential,the address is just the increment of the
previous one
Wrapping burst
Ifthe start address is not aligned (size x beats), the
address will wrap when the boundary is reached
Ex: 4-beat warping burst of word (4-byte):
0x34Æ0x38Æ0x3CÆ0x30
SoC Design Lab Shao-Yi Chien 29
Address Calculation Example
The address calculation is according to HSIZE and HBURST
Example: HSIZE = 010 (32 bits) with starting address = 0x48
HBURST Type Address
000 SINGLE 0x48
001 INCR 0x48, 0x4C, 0x50,… The most useful
010 WRAP4 0x48, 0x4C, 0x40, 0x44
011 INCR4 0x48, 0x4C, 0x50, 0x54
100 WRAP8 0x48, 0x4C, 0x50, 0x54, 0x58, 0x5c, 0x40, 0x44
101 INCR8 0x48, 0x4C, 0x50, 0x54, 0x58, 0x5c, 0x60, 0x64
110 WRAP16 0x48, 0x4C,…, 0x7c, 0x40, 0x44
111 INCR16 0x48, 0x4C,…, 0x7c, 0x80, 0x84
SoC Design Lab Shao-Yi Chien 30
Important!!
Burst transfer can’t cross the 1K boundary
Because the minimal address range for a
slave is 1 KB
NONSEQ → SEQ → 1KB Boundary →
NONSEQ → SEQ…
The master do not attempt to start a fixed-
length incrementing burst which would
cause this boundary to be crossed
11 : SPLIT
The transfer is not completed
Ask the master to perform a split transfer
SoC Design Lab Shao-Yi Chien 38
Two-cycle Response
HRESP[1:0]
OKAY: single cycle response
ERROR : two-cycle response
RETRY : two-cycle response
SPLIT : two-cycle response
1st 2nd
SoC Design Lab Shao-Yi Chien 40
ERROR Response Example
An error response which needs three cycles
Additional cycle
SoC Design Lab Shao-Yi Chien 41
Different Between Retry and Split
HSPLITx[15:0]
Used by the slave to indicate the arbiter which
master should be allowed to re-attempt a split
transaction
Each bit corresponds to a single master
Get grant!
SoC Design Lab Shao-Yi Chien 50
Arbitration Example (3)
Handover after burst
Master Slave
Wrapper
Design
Require or
clean Write! Write!
transition
Read!
The first write transfer can occur with zero wait stages
AHB
0 0 0 Normal operation
0 1 0 Reserved
0 1 1 Read vector
Turnaround vectors
SoC Design Lab Shao-Yi Chien 82
Enter Test Mode
Write
Pipelined
Wait
Tri-state Tri-state
Wait
LASTREAD
TURNAROUND
There must be a tri-state
after address and read vector
SoC Design Lab Shao-Yi Chien 85
Control Vector
Read Write
97
Communications
CPU (master) ÅÆ IP (slave)
IP (master) ÅÆ IP (slave)
Master Slave
Slave Master
Step 4: DMA
interrupts CPU
Step 5: CPU checks
the status of DMA
Read(0x30004, &status)