Must Haves in the Test Bench - 1.1 English

AXI Verification IP LogiCORE IP Product Guide (PG267)

Document ID
Release Date
1.1 English

While coding the test bench for the AXI VIP , the following requirements must be met. Otherwise, the AXI VIP does not work. These are the requirements for all VIPs.

1. Create module test bench as all other standard SystemVerilog test benches.

module testbench();


2. Import two required packages: axi_vip_pkg and <component_name>_pkg . The <component_name>_pkg includes agent classes and its subclasses for AXI VIP . For each VIP instance, it has a component package which is automatically generated when the outputs are created. This component package includes a typedef class of a parameterized agent. Xilinx recommends importing this package because reconfiguration of the VIP has no impact of the test bench. This Figure shows how to retrieve the <component_name>_pkg from a standalone AXI VIP.

Figure 6-5: Standalone <component_name>_pkg

X-Ref Target - Figure 6-5


This Figure shows how to retrieve the <component_name>_pkg from an IP integrator design. First, select the VIP and in the Block Properties window click Properties . Then, under the CONFIG column select Component_Name .

Figure 6-6: IP Integrator <component_name>_pkg

X-Ref Target - Figure 6-6


3. Declare agents. One agent for one AXI VIP has to be declared. Depending on the AXI VIP interface mode, different typedef class should be called for declaration of the agent.

Table 6-2: Declare Agents




Master VIP


Slave VIP without memory model


Slave VIP with memory model


Pass-through VIP without memory model


Pass-through VIP with memory model

4. Create a new for the agent and pass the hierarchy path of IF correctly into the new function. Before the agent is set to new , run the simulation with an empty test bench to find the hierarchy path of the AXI VIP instance. A message like this shows up and then puts the path into a new function (see This Figure ).

agent = new("my VIP agent", <hierarchy_path>.IF);