AMBA APB Slave Verification IP

This post will only be focused on APB Slave Verification IP (VIP). Master VIP is already discussed in the previous post.

You can download the APB Verification IP if you are registered and logged in.

Features

  1. Easy to use.
  2. Configurable APB data size.
  3. Misaligned transfers.
  4. FIFO mode.
  5. Fixed and random pready timing delays.
  6. Slave error insertion for specified addresses.
  7. Failed transaction buffer.

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 example. For running Slave example:

  1. Go to the following folder: <unpack_dir>/apb_vip/examples/slave/sim
  2. If you have VCS type the following command: vcs -f file_list.f -sverilog
  3. If you have QuestaSim6.4 type the following command: qverilog -f file_list.f

The test will run for a while. At the end of the test you must have no any unexpected errors reported.

Integration

  1. Instantiate apb_s_if interface module to your testbench top file.
  2. Import APB_S package to your test.

Interface module is located  in the <unpack_dir>/apb_vip/verification_ip/slave/apb_m_if.sv file.

APB_S package is located in the <unpack_dir>/apb_vip/verification_ip/slave/apb_m.sv file.

This is all you need for integration. Now you can start to use the VIP.

Usage

Before starting to use any commands you need to create ABP_s_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:

  1. Start APB Master Verification Environment: call startEnv() command.
  2. Configure VIP.
  3. Start data processing.
  4. Print all failed transactions if there are any.

Test Environment

Figure below shows the SystemVerilog test environment where the APB Slave VIP was tested.

SystemVerilog testbench for APB slave devices

As you can see on the figure there is no any DUT in the testsbench. The DUT is modeled inside the test. For connection to the Slave interface the APB Master Verification IP was used. If you already have fully functional and verified master VIP it is better to use it instead of DUT for testing slave VIP. This way is more flexible and you will cover a lot of corner cases.

Support

If you have any questions please don’t hesitate to contact me directly or use article comments below. Your comments are welcome!

Leave a Reply