当前位置:网站首页>[quick start of Digital IC Verification] 26. Ahb-sramc of SystemVerilog project practice (6) (basic points of APB protocol)
[quick start of Digital IC Verification] 26. Ahb-sramc of SystemVerilog project practice (6) (basic points of APB protocol)
2022-07-07 15:20:00 【luoganttcc】
Reading guide : The author has the honor to be a pioneer in the field of electronic information in China “ University of electronic technology ” During postgraduate study , Touch the cutting edge Numbers IC Verification knowledge , I heard something like Huawei Hisilicon 、 Tsinghua purple light 、 MediaTek technology And other top IC related enterprises in the industry , Pairs of numbers IC Verify some knowledge accumulation and learning experience . Want to get started for help IC Verified friends , After one or two thoughts , This column is specially opened , In order to spend the shortest time , Take the least detours , Most learned IC Verify technical knowledge .
List of articles
- One 、 Description of content
- Two 、APB Bus Overview
- 2.1、APB And AHB contrast
- 2.2、APB Signal Introduction
- 2.3、APB Signal interpretation
- 2.4、APB Slave Address decoding
- 2.5、APB Interconnection diagram
- 2.6、APB sequential ( important )
- 2.7、APB Bridge
- 2.8、APB Bridge FSM( State machine )
- 2.9、APB Slave block diagram ( Interface signal , Need to be able to draw )
- 2.10、APB To AHB Timing conversion - read
- 3、 ... and 、 Different IP The interconnection between
- Four 、AMBA Review
- 5、 ... and 、 summary
One 、 Description of content
- APB Signal Introduction
- APB Transmission timing
- AHB And APB The difference between timing conversion
- Different IP The interconnection between
Two 、APB Bus Overview
2.1、APB And AHB contrast
AHB It is mainly used in high-speed and high-performance peripherals , and APB It is mainly used to mount low-speed peripherals .
stay APB Most of the peripherals mounted on the are Slave, No, Master, That is, peripherals that passively receive data .
Understand AHB After the bus , Study APB Naturally . Okay , I don't say much nonsense , Enter the text quickly .
2.2、APB Signal Introduction
| Signal name | Signal description |
|---|---|
| PCLK | APB Bus clock |
| PRESETn | APB Reset |
| PADDR[31:0] | APB Address bus |
| PSELx | APB Slave Select signal |
| PENABLE | APB Enable signal |
| PWRITE | APB Bus transmission direction |
| PRDATA | APB Read the data bus |
| PWDATA | APB Write data bus |
notes :APB Signals can be combined AHB Signal understanding memory .
2.3、APB Signal interpretation
- PADDR[31:0]
- Address bus , By the device bus bridge Unit drive
- PSELx
- The signal from the decoder , To a bus slave x
- PENABLE
- It is used to carry out all accesses in time stages on the device bus
- PWRITE
- High level : Write
- Low level : read
- PRDATA and PWDATA
- most 32 A wide
2.4、APB Slave Address decoding

- AHB-APB Bridge We can understand it as AHB Slave
- The black part in the above figure is Default Slave
- Address decoding is level by level
2.5、APB Interconnection diagram

- Bridge Role is AHB To APB Timing conversion
2.6、APB sequential ( important )
2.6.1、 Write transfer

APB relative AHB Speaking of There is no running water , Each command is fixed At least 2 Clock cycles complete !
- APB There are two stages , First stage yes
SETUPStage , There is only one clock cycle . herePSELThe signal is high ,PENABLEThe signal is low . Analogical AHB Address transmission phase in ! - The second stage is
ENBALEStage . herePSELThe signal is high ,PENABLEThe signal is high . read / The write data signal is valid , Analogical AHB Data transmission phase in !
- APB There are two stages , First stage yes
The above sequence is only AMBA 1.0/2.0 The temporal , Fixed only two beats . Upgrade to AMBA 3.0 Can be used later HREADY Expand
ENABLEStage , andSETUPOr a clock cycle .
2.6.2、 Read transfer

- The biggest difference between reading and writing is
PWRITEThe signal , At this time, the signal is low . - The above sequence is only AMBA 1.0/2.0 The temporal , Fixed only two beats . Upgrade to AMBA 3.0 Can be used later HREADY Expand
ENABLEStage , andSETUPOr a clock cycle .
2.7、APB Bridge

- AHB It's running water , about Bridge Speaking of , The main function is to interrupt the running water , Namely the AHB The sequence of turns into APB, If AHB If it's running water , It'll go through this Bridge To interrupt !
- Mainly through
HREADYSignal to beat the flowing water into two beats .
- Mainly through
- APB Bridge Another function is to do a two-level decoding
2.8、APB Bridge FSM( State machine )

2.9、APB Slave block diagram ( Interface signal , Need to be able to draw )

- Control Signal comparison AHB Much less !
- ABMA 3.0 Support
PReadySignal oh ~!
2.10、APB To AHB Timing conversion - read

- Above, AHB Read APB Slave Sequential operation of , You can see through
HReadyThe signal interrupts the flow operationT1-T2BetweenHREADYFor the high , adoptHADDRTransmit address signal , adoptHWRITEFor low , Transmit read control signal .T2-T3BetweenHREADYFor low , interrupt AHB Read operation of pipelining . meanwhile ,APB OfPSELFor the high ,PENABLEFor low ,APB Get intoSETUPStage , Read address and read control signal .T3-T4Between ,APB OfPSELFor the high ,PENABLEFor the high ,APB Get intoENABLEStage , adoptPRDATARead APB Slave The data of . meanwhileHREADYFor the high , Will read to APB Slave data , Back toHRDATA.- So far, a read operation is completed .
PRDATAYes, it can be sent directly toHRDATA( In the same shot ), If you want toHRDATATake a picture , Can be in APBENABLEStage will alsoHREADYPull it down , suchHRDATAIt will be later thanPRADTAOne shot .
3、 ... and 、 Different IP The interconnection between
3.1、 communication mode
- CPU (Master) < – > IP (Slave)
- IP(Master) < – > IP (Slave)
3.2、Memory Mapped IO
- Each slave device occupies a section of address space in the system
- All slaves are addressable
- register / Memory is accessed by memory mapping
- CPU/IP Read and write other IP The data of is similar to read-write memory
3.3、IP Communication interconnection between
- The main device is arbiter grant after , You can access all slave devices on the bus

3.4、 One IP You can have both master device interface and slave device interface

- Master Go outside to read and write data
- Slave Configure as a register
3.5、CPU And IP Communication between

- CPU Always be the main device
- IP Always act as a slave
- IP You can send an interrupt request
- Only Slave Interface IP, If you want to take the initiative to inform CPU You can interrupt
- There should not be too much information in the interrupt
- CPU Enter interrupt mode , from interrupt service routine(ISR) To handle interrupts
Four 、AMBA Review
- AMBA brief introduction
- AMBA2.0:AHB、ASB、APB
4.1、AHB
AHB Component part
- AHB Master、AHB Slave、AHB Aribiter、AHB Decoder
AHB The signal
- HCLK、HRESETn、HADDR、HTRANS、HWRITE、HSIZE、HBURST、HWDATA、HSELx、HRDATA、HREADY、HRESP
AHB Two stages of transmission
- Address cycle 、 Data cycle
Current transmission status HTRANS
- IDLE、BUST、NOSEQ、SEQ
Burst transmission type HBURST( understand )
- SINGLE、INCR( How to start a new INCR transmission ?)
- Burst Transmission cannot be crossed 1K The border
HSEL: from AHB Decoder Given by address mapping
AHB Slave response signal
- HREADY Transmission complete 、HRESP Transmit response (OK、ERROR、RETRY)
- AHB Slave Unable to respond in a short time (HREADY)? Unable to respond for a long time (HRESP)【 In practice, it is impossible to define what short time is , What is long time , So it is not used much !】
32 Valid bytes of the data bus at the bit size end
AHB Arbitration signal ( understand )
- HBUSREQ、HGRANT、HMASTER
- Main equipment x Can control the conditions of the bus
AHB Master、AHB Slave、AHB Arbiter、AHB Decoder Interface signal of
AHB-Lite
4.2、APB
APB Component part
- AHB2APB Bridge、APB Slave
APB The signal
- PCLK、PRESETn、PADDR、PSEL、PENABLE、PWRITE、PRDATA、PWDATA
APB Slave Address mapping for
APB transmission (AMBA 1.0/2.0)
- Always two cycle transfer:Setup cycle、Enable Cycle
- No wait cycle and response signal(AMBA 3.0 There is )
APB Bridge and APB Slave Interface signal of
5、 ... and 、 summary
thus AMBA In the agreement APB The theoretical knowledge of bus is introduced ,APB a AHB The biggest feature is that there is no flow operation , And APB stay AMBA 2.0 in , The execution of the command is fixed for two clock cycles . Through the introduction of this article, it is not difficult to find ,APB and AHB Many signals are similar , And APB a AHB A lot of control signals are missing , So just understand AHB,APB Naturally . Later we will pass AHB-SRAMC Actual project , Continue to understand AHB and APB.
Postscript : Because my level is limited , Shortcomings are inevitable , Please comment and make corrections . About bloggers 《 Numbers IC Verify the quick start 》 Series articles , Currently in CSDN Serial update , Welcome to subscribe to !
边栏推荐
- CTFshow,信息搜集:web12
- Ctfshow, information collection: web8
- Wechat applet 01
- How to enable radius two factor / two factor (2fa) identity authentication for Anheng fortress machine
- 暑期安全很重要!应急安全教育走进幼儿园
- Summer safety is very important! Emergency safety education enters kindergarten
- Pat grade a 1103 integer factorizatio
- What are PV and UV? pv、uv
- 有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛?
- Runnable是否可以中断
猜你喜欢

“百度杯”CTF比赛 2017 二月场,Web:include

Protection strategy of server area based on Firewall

微信小程序 01
![[understanding of opportunity -40]: direction, rules, choice, effort, fairness, cognition, ability, action, read the five layers of perception of 3GPP 6G white paper](/img/38/cc5bb5eaa3dcee5ae2d51a904cf26a.png)
[understanding of opportunity -40]: direction, rules, choice, effort, fairness, cognition, ability, action, read the five layers of perception of 3GPP 6G white paper

Change win10 Screensaver

Ctfshow, information collection: web7

Niuke real problem programming - Day12

How to enable radius two factor / two factor (2fa) identity authentication for Anheng fortress machine

Ctfshow, information collection: web12

Use cpolar to build a business website (2)
随机推荐
Jetson AGX Orin CANFD 使用
[understanding of opportunity -40]: direction, rules, choice, effort, fairness, cognition, ability, action, read the five layers of perception of 3GPP 6G white paper
【原创】一切不谈考核的管理都是扯淡!
Niuke real problem programming - day18
[server data recovery] a case of RAID data recovery of a brand StorageWorks server
CTFshow,信息搜集:web4
#HPDC智能基座人才发展峰会随笔
What are PV and UV? pv、uv
拜拜了,大厂!今天我就要去厂里
Write a ten thousand word long article "CAS spin lock" to send Jay's new album to the top of the hot list
【OBS】RTMPSockBuf_ Fill, remote host closed connection.
[make a boat diary] [shapr3d STL format to gcode]
Oracle control file loss recovery archive mode method
Niuke real problem programming - day14
【深度学习】图像超分实验:SRCNN/FSRCNN
How does the database perform dynamic custom sorting?
There is a cow, which gives birth to a heifer at the beginning of each year. Each heifer has a heifer at the beginning of each year since the fourth year. Please program how many cows are there in the
全日制研究生和非全日制研究生的区别!
CTFshow,信息搜集:web9
Ctfshow, information collection: web9