You are on page 1of 4

APB Testbench Block Diagram

Introduction to OVM and UVM 02/20/202 1


3
APB Test

▪ Now that env, Agent, and components are build


▪ Create an apb_test class derived from uvm_test
▪ It should have a handle for the virtual interface
▪ Build phase should implement following
▪ Create env class
▪ Get the virtual interface from the config_db and pass it down to
env class

▪ Run phase
▪ Should create a sequence and start the sequence on env.agt.sqr
▪ Test finishes when the sequence finishes running

Introduction to OVM and UVM 02/20/202 2


3
APB Testbench Top Module

▪ Once Test, env, Agent and all components are available


▪ Create a top level module called “test_top”
▪ The module should instantiate a physical interface for
apb_if
▪ Generate pclk using an always block
▪ In an initial begin
▪ Set the physical interface to the virtual interface in confid data base
with instance name equal test
▪ Call run_test() with the test name as apb_test

Introduction to OVM and UVM 02/20/202 3


3
Simulate

▪ Compile and simulate the test


▪ Observe what transactions are driven by the driver
▪ See if same transactions are observed by the monitor
component
▪ Then your testbench is good !

Introduction to OVM and UVM 02/20/202 4


3

You might also like