In this phase we will implement the configuration class. All the requirements of the testbench configurations will be declared inside this class. Virtual interfaces required by verification components driver and receiver for connecting to DUT are declared in this class. We will also declare 4 variables which will hold the port address of the DUT.
uvm_object does not have the simulation phases and can be used in get_config_object and set_config_object method. So we will implement the configuration class by extending uvm_object.
Configuration
1) Define configuration class by extending uvm_object
3) Declare 4 variables which holds the device port address.
bit [7:0] device_add[4] ;
4) uvm_object required to define the uvm_object::creat() method.
uvm_object::create method allocates a new object of the same type as this object and returns it via a base uvm_object handle.
In create method, we have to construct a new object of configuration class and update all the important fields and return it.
virtualfunction uvm_object create(string name="");
Configuration t = new();
In top module we will create an object of the above defined configuration class and update the interfaces so that all the verification components can access to physical interfaces in top module using configuration class object.
1) Declare a Configuration class object
Configuration cfg;
2) Construct the configuration object and update the interfaces.
/////////////////////////////////////////////////////
// Creat Configuration and Strart the run_test//
/////////////////////////////////////////////////////