amba specification overview - cms3.koreatech.ac.kr · pwdata apb write data bus prdata apb read...
TRANSCRIPT
AMBA BUS
한국기술교육대학교 임베디드SOC 설계및실습 1
AMBA Specification OverviewAMBA : Advanced Microcontroller Bus Architecture
AMBA Bus의 목적
① Right-first-time
② Technology-independent
③ Modular system design
AMBA는 3종류의 세부 버스구조로 나뉘어진다.
Advanced High-performance Bus (AHB)
Advanced System Bus (ASB)
Advanced Peripheral Bus (APB)
한국기술교육대학교 임베디드SOC 설계및실습 2
AMBA Bus
APB는 higher bandwidth main system과 lower bandwidth디바이스를연결하는 2차버스의 역할을 담당한다.
한국기술교육대학교 임베디드SOC 설계및실습 3
용어정의
Bus cycleAHB, APB → rising edge to rising edgeASB → falling edge to falling edge
Bus transferAHB, ASB → 하나이상의 버스 사이클을 요구하는 Data read/Write.
지정된 slave로부터 completion응답을 이 이루어 질때까지.ASB에서의 전송사이즈는 byte(8bit), halfword(16bit), word(32bit)AHB는 ASB에서 지원되는 사이즈를 지원하며 64bit, 128bit를 추가적으로 지원한다.
APB → 항상 two-bus cycle을 요구한다.
Burst OperationBus master에 의해 초기화되는 하나 이상의 데이터전송동작.APB에서는 지원되지 않는다.
한국기술교육대학교 임베디드SOC 설계및실습 4
AMBA AHB Overview(1)
Multiple bus master와 high-bandwidth operation을 위한 high-performance system bus
? Burst transfers
? Split transactions
? Single-cycle bus master handover
? Single clock edge operation
? Non-tristate implementation
?Wider data bus configuration(64/128)
내?외부메모리, APB bridge는 가장 일반적인 형태의 AHB slave.
또한 다른 peripheral들도 AHB slave가 될 수 있다. 그러나 low
Bandwidth peripheral들은 대체적으로 APB에 연결된다.
한국기술교육대학교 임베디드SOC 설계및실습 5
AMBA AHB Overview(2)
AHB master : 한번에 하나의 master만이 bus를 사용할 수 있다.
AHB slave : 슬레이브는 주어진 어드레스 범위내에서 read/write동작을
수행한다. Slave는 데이터 전송에 대한 success, failure,waiting상태에 대한 정보를 master에게 돌려 주어야 한다.
AHB arbiter : arbiter는 한번에 하나의 master만이 bus를 사용하도록 권한
을 부여 한다. 하나의 AHB는 하나의 arbiter를 갖는다.
AHB decoder : decoder는 전송하고자 하는 slave의 어드레스를 디코딩한다.
하나의 decoder가 모든 AHB상의 slave들을 디코딩 한다.
한국기술교육대학교 임베디드SOC 설계및실습 6
AMBA ASB Overview
ASB는 APB보다는 상위 버스구조에 속하면서 high-performance system에서요구하는 특징들을 지닌 bus이다.
?burst transfers
?pipelined transfer operation?multiple bus master
ASB master, ASB slave, ASB decoder, ASB arbiter는 AHB의 특징과 동일
*그러나 signal list와 bus동작방법은 차이를 보인다.
한국기술교육대학교 임베디드SOC 설계및실습 7
AMBA APB Overview
AHB/ASB의 slave device로 encapsulated되어 2차버스 구조로 동작APB는 low-bandwidth와 Pipelined bus interface를 요구하지 않는Peripheral들을 인터페이스하는데 사용한다.
APB bridge는 bus handshake신호의 핸들링과 APB측으로의 control신호를 retiming하는 slave모듈이다. 또한 어드레스, 데이터, 컨트롤신호들을 래치하는 기능을 갖는다.
APB slave의 특징
UnpipelinedAPB가 동작하지 않는 동안 전력 소비가 없다.Strobe 타이밍에 의한 디코딩 동작(Unclocked interface)
한국기술교육대학교 임베디드SOC 설계및실습 8
AHB/ASB와 APB
• 많은 수의 peripheral macrocell로 인한 버스의 과부하는전력의 소비 증가와 성능의 저하를 가져온다.
• 저속의 디바이스는 버스의 최대 성능을 제한한다.
한국기술교육대학교 임베디드SOC 설계및실습 9
Bus Selection
AHB/ASB는 다음과 같은 장치들을 인터페이스한다.• Bus masters• On-chip memory blocks• External memory blocks• High-bandwidth peripherals with FIFO interfaces
• DMA slave peripherals
APB는 다음과 같은 장치들을 인터페이스한다.• Simple register-mapped slave devices• Very low power interface• Grouping Narrow-bus peripherals to avoid loading the system bus
한국기술교육대학교 임베디드SOC 설계및실습 10
AHB signal list(1)
Slave selectDecoderHSELx
Read data busSlaveHRDATA[31:0]
Transfer doneSlaveHREADY
Write databusMasterHWDATA[31:0]
Protection controlMasterHPROT[3:0]
Burst typeMasterHBURST[2:0]
Transfer sizeMasterHSIZE[2:0]
Transfer directionMasterHWRITE
Transfer typeMasterHTRANS[1:0]
Address bus MasterHADDR[31:0]
Reset(Active low)Reset controllerHRESETn
Bus clock (rising edge)Clock sourceHCLK
DescriptionSourceName
한국기술교육대학교 임베디드SOC 설계및실습 11
Split completion requestSlaveHSPLITx[15:0]
Locked sequenceArbiterHMASTLOCK
Master numberArbiter HMASTER[3:0]
Bus grantArbiterHGRANTx
Locked transfersMasterHLOCKx
Bus requestMasterHBUSREQx
Transfer responseSlaveHRESP[1:0]
DescriptionSourceName
AHB signal list(2)
• AHB는 multiple bus master동작을 지원한다. 위의 테이블에서 suffix x는모듈x로부터의 신호를 가리킨다. HBUSREQx의 경우 HBUSREQarm,HBUSREQdma, HBUSREQtic와 같이 arbiter를 통해 선택되는 소스를 표시
한국기술교육대학교 임베디드SOC 설계및실습 12
ASB signal list
Error response HIGH=Error Low= transfer successfulBERROR
Last response BLAST
Bus requestAREQx
Wait response HIGH=Bus cycle required Low=transfer completeBWAIT
Bus grantAGNTx
Locked transfers BLOK
Slave selectDSELx
Data busBD[31:0]
Protection control BPROT[1:0]
Transfer sizeBSIZE[1:0]
Transfer direction HIGH=Write, Low=READBWRITE
Transfer typeBTRAN[1:0]
Address busBA[31:0]
Reset(Active low)BnRES
Bus clock(falling edge)BCLK
DescriptionName
한국기술교육대학교 임베디드SOC 설계및실습 13
APB signal list
APB write data busPWDATA
APB read data busPRDATA
APB transfer directionPWRITE
APB strobePENABLE
APB select (secondary decorder, within peripheral bridge)PSELx
APB address busPADDR[31:0]
APB reset (Active low)PRESETn
Bus clock (Rising edge)PCLK
DescriptionName
한국기술교육대학교 임베디드SOC 설계및실습 14
AMBA AHB
한국기술교육대학교 임베디드SOC 설계및실습 15
A typical AMBA AHB-based system
한국기술교육대학교 임베디드SOC 설계및실습 16
Multiplexor interconnection
한국기술교육대학교 임베디드SOC 설계및실습 17
AHB - Simple transfer
*Data phase는 HREADY신호가 ‘1’이 될 때까지 지속된다.
한국기술교육대학교 임베디드SOC 설계및실습 18
AHB – Transfer with wait states
한국기술교육대학교 임베디드SOC 설계및실습 19
Multiple transfers
한국기술교육대학교 임베디드SOC 설계및실습 20
AHB – Transfer type
Burst로 데이터를 전송할 경우 NONSEQ의 다음데이터부터 SEQ로 동작한다.
SEQ11
단일 데이터 전송이나 Burst전송의 첫 번째 동작에 사용된다.
NONSEQ10
Burst전송 동작 중 IDLE상태를 갖도록 한다. Burst동작 중 데이터를 가져오기 전에 어떤 처리를 위하여 기다리게 될 경우에 중간에 IDLE상태를 만들기 위해 BUSY를 사용한다.
BUSY01
어떤 데이터 전송도 이루어지지 않는다. Master가 Slave로 데이터를 전송하고자 할 때 언제든지Slave로부터 Okay응답을 받을 수 있다.
IDLE00
DescriptionTypeHTRANS[1:0]
한국기술교육대학교 임베디드SOC 설계및실습 21
AHB – Transfer type example (BURST)
한국기술교육대학교 임베디드SOC 설계및실습 22
Burst operation(1)
16-beat increment burstINCR16111
16-beat wrapping burstWRAP16110
8-beat increment burstINCR8101
8-beat wrapping burst WRAP8100
4-beat increment burst INCR4011
4-beat wrapping burst WRAP4010
Incrementing burst of unspecified lengthINCR001
Single transferSINGLE000
DescriptionTypeHBURST[2:0]
• Bursts동작은 1kB어드레스 범위를 넘어설 수 없다.• unspecified length동작을 이용하여 single transfer동작을 행할 수 있다.
한국기술교육대학교 임베디드SOC 설계및실습 23
Burst operation(2)
• Burst사이즈는 bytes의 수를 의미하지 않고 beat의 수를 의미한다.HSIZE[2:0]도 동시에 고려해야 한다.ex) word단위로 4beat전송 -> 16bytes전송
한국기술교육대학교 임베디드SOC 설계및실습 24
4-beat wrapping burst
한국기술교육대학교 임베디드SOC 설계및실습 25
4-beat incrementing burst
한국기술교육대학교 임베디드SOC 설계및실습 26
Eight-beat wrapping burst
한국기술교육대학교 임베디드SOC 설계및실습 27
Undefined-length bursts
한국기술교육대학교 임베디드SOC 설계및실습 28
Control signals – Transfer size
-1024bits111
-512bits110
8-word line256bits101
4-word line128bits100
-64bits011
Word32bits010
Halfword16bits001
Byte8bits000
DescriptionSizeHSIZE[2:0]
한국기술교육대학교 임베디드SOC 설계및실습 29
Address decoding – slave select
한국기술교육대학교 임베디드SOC 설계및실습 30
Slave transfer responses
?HREADY
?HRESP[1:0]
전송이 완료되지 않은 상태. 버스의 권한을
다시 부여 받으면 계속하여 전송을 하게된다.SPLIT11
RETRY응답은 전송이 아직 완료되지 않았음을
알려준다. Master는 전송이 완료 될 때까지
지속적으로 RETRY를 하게 된다.
RETRY10
이 응답은 에러가 발생되었음을 알려준다.ERROR01
전송이 성공할 경우에 HREADY가 “H”가 된다.
HREADY신호가 “L”일 경우에는 나머지 ERROR, RETRY, SPLIT중 하나로 응답이 이루어진다.
OKAY00
DescriptionResponseHRESP[1:0]
* ERROR, RETRY, SPLIT는 모두 2-cycle응답을 필요로 한다.
한국기술교육대학교 임베디드SOC 설계및실습 31
Transfer with retry response
한국기술교육대학교 임베디드SOC 설계및실습 32
Error response
한국기술교육대학교 임베디드SOC 설계및실습 33
Data buses
* Active byte lanes for a 32-bit little-endian data bus
한국기술교육대학교 임베디드SOC 설계및실습 34
* Active byte lanes for a 32-bit big-endian data bus
Data buses
한국기술교육대학교 임베디드SOC 설계및실습 35
Granting access with no wait states
한국기술교육대학교 임베디드SOC 설계및실습 36
Granting access with wait states
한국기술교육대학교 임베디드SOC 설계및실습 37
Data bus ownership
한국기술교육대학교 임베디드SOC 설계및실습 38
Handover after burst
한국기술교육대학교 임베디드SOC 설계및실습 39
Bus master grant signals
한국기술교육대학교 임베디드SOC 설계및실습 40
AHB bus slaveInterface diagram
한국기술교육대학교 임베디드SOC 설계및실습 41
Interface diagram
AHB bus master
한국기술교육대학교 임베디드SOC 설계및실습 42
Interface diagram
AHB arbiter
한국기술교육대학교 임베디드SOC 설계및실습 43
AHB decoder
한국기술교육대학교 임베디드SOC 설계및실습 44
Ex) Excalibur에서 AHB BUS Interface
한국기술교육대학교 임베디드SOC 설계및실습 45
AMBA APB
한국기술교육대학교 임베디드SOC 설계및실습 46
A typical AMBA AHB-based system
한국기술교육대학교 임베디드SOC 설계및실습 47
State Diagram
한국기술교육대학교 임베디드SOC 설계및실습 48
APB Write & read
Write Read
한국기술교육대학교 임베디드SOC 설계및실습 49
APB Slave
한국기술교육대학교 임베디드SOC 설계및실습 50
APB bridge
한국기술교육대학교 임베디드SOC 설계및실습 51
APB BRIDGE MODULE
한국기술교육대학교 임베디드SOC 설계및실습 52
APB BRIDGE BLOCK DIAGRAM
한국기술교육대학교 임베디드SOC 설계및실습 53
AHB-TO-APB INTERFACE
한국기술교육대학교 임베디드SOC 설계및실습 54
APB-TO-AHB INTERFACE
한국기술교육대학교 임베디드SOC 설계및실습 55