当前位置:网站首页>[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 !
边栏推荐
- Niuke real problem programming - day20
- [deep learning] image hyperspectral experiment: srcnn/fsrcnn
- Ctfshow, information collection: web7
- CTFshow,信息搜集:web5
- PG basics -- Logical Structure Management (locking mechanism -- table lock)
- 如何在opensea批量发布NFT(Rinkeby测试网)
- Ctfshow, information collection: web9
- MongoD管理数据库的方法介绍
- Novel Slot Detection: A Benchmark for Discovering Unknown Slot Types in the Dialogue System
- 2. Heap sort "hard to understand sort"
猜你喜欢

CTFshow,信息搜集:web5

MySQL bit type resolution

2022年5月互联网医疗领域月度观察

Ctfshow, information collection: web1
![[data mining] visual pattern mining: hog feature + cosine similarity /k-means clustering](/img/a4/7320f5d266308f6003cc27964e49f3.png)
[data mining] visual pattern mining: hog feature + cosine similarity /k-means clustering

Zhiting doesn't use home assistant to connect Xiaomi smart home to homekit

【深度学习】语义分割实验:Unet网络/MSRC2数据集

Mathematical modeling -- what is mathematical modeling

暑期安全很重要!应急安全教育走进幼儿园
Implementation of crawling web pages and saving them to MySQL using the scrapy framework
随机推荐
Window环境下配置Mongodb数据库
Andriod --- JetPack :LiveData setValue 和 postValue 的区别
大表delete删数据导致数据库异常解决
MySQL bit类型解析
使用cpolar建立一个商业网站(2)
leetcode 241. Different Ways to Add Parentheses 为运算表达式设计优先级(中等)
Delete a whole page in word
Novel Slot Detection: A Benchmark for Discovering Unknown Slot Types in the Dialogue System
Mathematical modeling -- what is mathematical modeling
Oracle control file loss recovery archive mode method
Do you know the relationship between the most important indicators of two strong wind control and the quality of the customer base
How to enable radius two factor / two factor (2fa) identity authentication for Anheng fortress machine
[server data recovery] data recovery case of raid failure of a Dell server
[make a boat diary] [shapr3d STL format to gcode]
Change win10 Screensaver
"Baidu Cup" CTF competition 2017 February, web:include
Stm32f103c8t6 PWM drive steering gear (sg90)
8大模块、40个思维模型,打破思维桎梏,满足你工作不同阶段、场景的思维需求,赶紧收藏慢慢学
Used by Jetson AgX Orin canfd
Stream learning notes