AMBA 3 AHB-Lite 버스 구조: 신호 설명과 트랜잭션 동작
7장 AMBA 3 AHB-Lite Bus Architecture 개요
AHB-Lite는 ARM AMBA(Advanced Microcontroller Bus Architecture) 3.0 표준의 Single master 버전. Cortex-M0/M3 계열 MCU의 표준 시스템 버스.
AMBA 3 AHB-Lite 특징
- Single-master bus: 기존 AHB는 multi-master였지만 Lite는 단일 master (arbiter 생략)
- Pipelined transactions: Address phase와 Data phase 중첩 → throughput ↑
- Burst transfer 지원 (INCR, WRAP)
- Split transaction 지원 X (Lite 버전)
Signal Description
Master Output
- HCLK: bus clock
- HRESETn: active-low reset
- HADDR[31:0]: address
- HWRITE: 1=write, 0=read
- HSIZE[2:0]: transfer size (byte/halfword/word)
- HBURST[2:0]: burst type (SINGLE, INCR, WRAP4, INCR4, …)
- HPROT[3:0]: protection/cache attribute
- HTRANS[1:0]: transfer type (IDLE, BUSY, NONSEQ, SEQ)
- HWDATA[31:0]: write data
- HMASTLOCK: locked transaction
Slave Output
- HRDATA[31:0]: read data
- HREADY: slave ready (wait state)
- HRESP: response (OKAY, ERROR)

AHB-Lite Transaction
기본 transaction은 Address phase와 Data phase의 2 cycle:
T0 T1 T2
HCLK __/\__/\__/\__/\__
HADDR ___[Addr]________
HWRITE __[____1_____]____
HTRANS ___[NONSEQ]__[IDLE]_
HWDATA __________[Data]__
HREADY ___________/‾‾‾\_
- T1 (Address phase): Master가 address + control 제공
- T2 (Data phase): Slave가 data 제공 또는 받음, HREADY로 완료 신호
Wait State
Slave가 준비 안되면 HREADY=0 유지 → Data phase 연장.
Burst Transfer
연속된 여러 word 전송을 하나의 NONSEQ + 여러 SEQ로:
Burst Type (HBURST)
- SINGLE: 단일 transfer
- INCR: unspecified length increment
- WRAP4: 4-beat wrapping (cache line)
- INCR4: 4-beat incrementing
- WRAP8, INCR8, WRAP16, INCR16: 길이 지정
HTRANS
- IDLE: no transfer
- BUSY: burst 중 일시 중지
- NONSEQ: burst 시작 또는 단일 transfer
- SEQ: burst 내 후속 transfer (address 증가)

AHB-Lite System 구성
[AHB Master]
│ AHB
▼
┌─── [Decoder] ─── HSELx
│ │
[MUX] [AHB Slave 1]
│ [AHB Slave 2]
│ [AHB Slave 3]
▼
(HRDATA, HREADY, HRESP)
- Decoder: HADDR을 decoding해서 해당 Slave의 HSEL 활성화
- MUX: 선택된 Slave의 HRDATA, HREADY, HRESP를 master로
HSELx & Address Decode
각 Slave에는 고유 address 범위가 할당됨. Decoder가 HADDR 상위 bit으로 HSEL 선택:
if (HADDR[31:20] == 0x400)
HSEL_UART = 1;
else if (HADDR[31:20] == 0x401)
HSEL_GPIO = 1;
AHB to APB Bridge
AHB-Lite와 저속 APB를 연결. Bridge가 AHB master 역할, APB slave와 통신. Cortex-M0 SoC의 일반적 구조:
[Cortex-M0 Core]
│ AHB-Lite
▼
[AHB Interconnect]
│ │ │
│ │ └── SRAM
│ └───── Flash
└─────── AHB→APB Bridge
│ APB
├── UART
├── Timer
├── GPIO
└── SPI/I2C

HPROT (Protection Signals)
Cache/bufferability, user/privileged, data/opcode를 나타냄:
- HPROT[0]: opcode fetch (0) / data access (1)
- HPROT[1]: user (0) / privileged (1)
- HPROT[2]: non-bufferable (0) / bufferable (1)
- HPROT[3]: non-cacheable (0) / cacheable (1)
HRESP
- OKAY (0): normal completion
- ERROR (1): slave error — master가 2-cycle 시퀀스로 error 응답 받음
정리
| 요소 | 핵심 |
|---|---|
| AHB-Lite | Single-master 버전 AHB |
| Pipelined | Address/Data 2-stage overlap |
| Burst | INCR, WRAP으로 cache line fill |
| HREADY | Wait state 제어 |
| Decoder + MUX | 여러 slave에 라우팅 |
| Bridge to APB | Peripheral 연결 |
AHB-Lite는 Cortex-M0/M3 SoC의 기본 bus로, 단순하면서도 충분한 대역폭을 제공해 저전력 임베디드 시스템에 적합하다.

Comments (0)
No comments yet. Be the first to comment!
Please to write a comment.