AMBA APB Master Verification IP
The AMBA Peripheral Bus (APB) Verification IP described here is Verification IP (VIP) written on SystemVerilog for verifying a DUT with AMBA3.0 compliant APB interface.
If you are registered and logged in you can download the APB Verification IP from here.
The APB VIP package includes Master, Slave verification IPs, user manual and examples. For detailed information about this VIP please read apb_vip_user_manual.pdf. This post will only be focused on APB master VIP. Slave will be discussed in the next post.
The APB Master Verification IP doesn’t support multiple slaves. For testing multiple APB slave devices the external multiplexor should be used.
Features
- Easy to use.
- Configurable APB data size.
- Data word transfer.
- Data buffer transfer.
- Misaligned transfers.
- Configurable valid pready detection.
- Fixed timing delays.
- Random timing delays.
- Slave error detection.
- Error buffer to hold all failed transactions, Slave errors and time outs.
Installation
This Verification IP was tested on VCS2008 and QuestaSim6.4. There is no guarantee that this VIP will work on lower versions.
Download apb_vip.zip and unpack it. Now you are ready to run examples.
For running Master example:
- Go to the following folder: <unpack_dir>/apb_vip/examples/master/sim
- If you have VCS type the following command: vcs -f file_list.f -sverilog
- If you have QuestaSim6.4 type the following command: qverilog -f file_list.f
Test is not short and will take about 20 minutes on VCS and about 30 minutes on QuestaSim. At the end of the test you must have no any unexpected errors reported.
Integration
- Instantiate apb_m_if interface module to your testbench top file.
- Import APB_M package to your test.
Interface module is located in the <unpack_dir>/apb_vip/verification_ip/master/apb_m_if.sv file.
APB_M package is located in the <unpack_dir>/apb_vip/verification_ip/master/apb_m.sv file.
This is all you need to do for integration. Now you can start to use the VIP.
Usage
Before starting to use any commands you need to create ABP_m_env class object. During this object creation you should provide interface module instance name and APB bus data size. After this you can do the following steps:
- Start APB Master Verification Environment: call startEnv() command.
- Configure VIP.
- Start data transfers.
- Print all failed transactions if there are any.
Support
If you have any questions please don’t hesitate to contact me.
You can also use article comments below to ask your questions, to report about bugs or to tell some ideas for future improvement. Your comments are always welcome!

Hi Tiksan,
Thank you very much for your verification IP. I tried to integrate the master VIP in my environment and it was really easy without any problems. I even reused you test environment from examples.
In the next step I want to test multiple slaves. Is it difficult to extend master APB VIP to support multiple slaves?
Thank you very much,
Andrew.
Hi Andrew,
If your system is not supporting several slaves selects at the same time then you can create simple multiplexer in you testbench. Decode APB address bus and generate select signals to your slaves.
But if you want to write to several slaves at the same time then master VIP should be modified. I can help you with that.
If you have any other questions please don’t hesitate to ask.
I’m glad to help you.
Best Regards,
Tiksan
Hi Tiksan
At this moment I dont need to select multiple slaves. So I’ll create mux in my testbench.
Thanks,
Andrew