p3 AMBA AHB Lite
p3 AMBA AHB Lite
Overview
1
ARM® AMBA® Open Specification
Open standard (No License required)
AMBA 5 CHI (Coherent Hub Interface) specification is the latest addition to the AMBA
(mainly used for server and networking SoCs)
More info: http://www.arm.com/products/system-ip/amba/amba-open-specifications.php
2
AMBA Acronyms
Acronyms
3
How to access the full specification?
Go to http://infocenter.arm.com/
4
AMBA 3 AHB-Lite
Original AHB Specification was part of AMBA 2
5
AMBA 3 AHB-Lite
Single Master
Simple slaves
No arbitration issues
7
AHB-Lite transactions
Master
Register Read
Register Write
Burst Read
Burst Write
Slave/Peripheral
Can make Master wait
Can give error response
8
AHB-Lite Features
Single Clock Edge operation
Uni-directional busses
No tri-state signals
Good for synthesis
Pipelined Operation
9
A system based on AHB-Lite
10
Components of AHB-Lite System
Master
Slaves/Peripherals
Address Decoder
AHB-Lite Interconnect
Multiplexor
11
AHB-Lite Master
Transfer Response
Address and
AHB-Lite
AHB-Lite Control
Master
Master
Read Data Write Data
Global Signals
12
AHB-Lite Slave
Slave Select
Transfer Response
Address and AHB-Lite
AHB-Lite
Control Slave
Slave
13
AHB-Lite Master & Slave
Slave Select
Write Data
AHB-Lite AHB-Lite
Master Slave
Transfer Response
Read Data
Global Signals
14
Decoder & MUX
Address & Control Wdata
AHB-Lite
Transfer Response Slave
ADDR
AHB-Lite
Master SEL1
Read Data
Memory Map SEL2 AHB-Lite
(Address) Slave
Decoder
SEL3
MUX SEL
AHB-Lite
Slave
FF
MUX SEL
15
Pipelined Transactions (Conceptual Level)
Data phase
Address phase
N cycles
HCLK
Address &
Control
A
Data
A
& Response
16
AHB-Lite Signals
17
AHB-Lite Master Signals
Transfer Response
Address and
AHB-Lite
AHB-Lite Control
Master
Master
Read Data Write Data
Global Signals
AHB-Lite
Master
18
AHB-Lite Slave Signals
Slave Select
Transfer Response
Address and AHB-Lite
AHB-Lite
Control Slave
Slave
AHB-Lite
AHB-Lite
Slave
Slave
19
AHB-Lite Master & Slave
AHB-Lite
Master
AHB-Lite
Slave
20
AHB-Lite Master & Slave
AHB-Lite
Master
AHB-Lite
AHB-Lite
Slave
Slave
21
Cortex M0 doesn’t speak the entire language !
Cortex M0 does not support BURST transaction
HBURST[2:0] is always 3’b000
22
AHB-Lite Master & Slave
AHB-Lite
Master
AHB-Lite
AHB-Lite
Slave
Slave
23
HTRANS[1:0]
HTRANS Type Description
25
HPROT[3:0] Protection Signal Encoding
26
Transactions
Data Access
Instruction Fetch
27
Control Signals Recap
HTRANS[1:0] HBURST[2:0] HMASTLOCK
HSIZE[2:0] HPROT[3:0]
Byte Data/Opcode
Halfword Privileged/user
Word Bufferable
Doubleword Cacheable
...
28
Transfer Response Signals
29
AHB-Lite Transactions
30
Basic transfer - Write
Address phase Data phase
HCLK
HADDR [ 31 : 0 ] A B
HWRITE
HWDATA [ 31 : 0 ] Data (A )
HREADY
31
Basic transfer - Read
Address phase Data phase
HCLK
HADDR [ 31 : 0 ] A B
HWRITE
HRDATA [ 31 : 0 ] Data (A )
HREADY
32
AHB Pipelined Transaction
Address Phase A Data Phase A
Address Phase B Data Phase B
Address Phase C Data Phase C
Address Phase ….
HCLK
HADDR A B C
HWRITE A B C
HWDATA A B
HRDATA A B
HREADY
33
Pipelined Operation
Address & Control Wdata
AHB-Lite
Transfer Response Slave
ADDR
AHB-Lite
Master SEL1
Read Data
Memory Map SEL2 AHB-Lite
(Address) Slave
Decoder
SEL3
MUX SEL
AHB-Lite
Slave
FF
MUX SEL
34
AHB basic signal timing – Adding wait states
HCLK
HADDR A B
HWRITE A B
HWDATA A
HREADY A A
HRDATA A
AHB-Lite
Master
HREADY
AHB-Lite
Slave 2
AHB-Lite
Slave 3
FF
MUX SEL
HREADYOUT 1
HREADYOUT 2
MUX
HREADYOUT 3
36
HRESP – Slave Response
37
ERROR Response
HCLK
HREADY
If HRESP = ERROR, CM0-DS takes an exception and you should implement appropriate
exception handler to catch the error
38
A simple AHB-Lite Slave
AHB2LED.v
39
AHB2LED TOP LEVEL
Slave Select
Transfer Response
Address and
AHB2LED
Control
Read Data
Write Data
LED
Global Signal
40
Sampling Address & Control
Address Phase Data Phase A Data Phase B
A Address Phase B
HCLK
HADDR A B C
HSEL_A
HWRITE
HREADY
41
Sampling Address & Control
Data Phase A
Address Phase Data Phase B
Address Phase B
A
HCLK
HADDR A B C
HSEL_A
HWRITE
HREADY
HWDATA A B
42
Lab
Analyse the AHB2LED.v file provided
In the next lab, we will look into system integration, simulation and implementation of a
complete AHB-Lite System using Cortex M0 Design Start core
43