- Simply add empty virtual methods in the component say in a driver and invoke the virtual methods at appropriate locations , test writer or the user extends the driver class implements the virtual methods and uses set instance override to accomplish the functionality.
- Create a class which extends form uvm_callback class and it implements the virtual methods. Use `uvm_do_callbacks() to place the virtual methods at strategic points in the component say a driver. Now the test writer or user extends the callback class and implements the virtual methods and registers or associate the extended callback class with the instance of the component say the driver using add to accomplish the functionality.
Saturday, December 1, 2012
Callback in UVM !!!
Saturday, November 3, 2012
Adding user defined phase using uvm_phase !!!
- name of the phase task or function
- top down or bottom up phase
- task or function
Tuesday, October 2, 2012
Usage of uvm_resource_db & uvm_config_db !!!
`uvm_error("ERROR","cannot locate the resource ");
Sunday, September 2, 2012
Accessing components bottom up using set_config_* and get_config_* in UVM !!!
Sunday, August 19, 2012
TLM 2.0 Non-blocking Transport in UVM !!!
Saturday, July 7, 2012
Command line processor in UVM !!!
Saturday, June 23, 2012
Virtual sequences in UVM !!!
Friday, May 11, 2012
Algorithmic comparator (Scoreboard) in UVM !!!
Tuesday, April 24, 2012
do_copy() , do_compare(), do_byte_pack() , do_is_vaild() , do_allocate() & do_byte_unpack() !!!
Wednesday, March 7, 2012
Factory services in VMM !!!
Factory in VMM was implemented by assigning different blueprints to factory place holders like randomize_obj and scenario_set[] for atomic generator and scenario generator respectively. With the introduction of factory services from VMM1.1 replacing any type of object say a transaction or transactor can be done easily using methods like override_with_new() or override_with_copy(). We can replace one particular instance of an object with the derived object or we can replace all the instances of the object with the derived object.
Following are the steps one has to follow to use VMM factory services.
- Use the macro `vmm_class_factory(class_name) to register the class to factory services
- Use create_instance() to create an object instead of using new()
- Use override_with_new() or override_with_copy() to replace and existing object with a derived object.
- Use pattern matching to replace all the instance of the class or a particular instance of the class.
Saturday, February 18, 2012
Accessing class attributes bottom up !!!
Accessing a property of a class top down is done through hierarchical access through dot operator which is very common in the HVL world. Accessing class properties bottom up through multiple levels is also a requirement we come across in verification which is little bit tricky to implement.
Following is an example on how we could do a bottom up access of a class property.
class top;
int flag;
level_1 obj;
function new();
obj=new(this);
endfunction
endclass
class level_1;
top parent_of_the_class;
function new ( top parent_of_the_class);
this.parent_of_the_class=parent_of_the_class;
endfunction
task run();
if(parent_of_the_class.flag==1)
begin
$display(" Flag set \n");
end
else
begin
$display(" Flag not set \n");
end
endtask
endclass
Saturday, January 28, 2012
Constraint solver performance !!!
Debugging constraint solver performance issues is a real challenge; even a small mistake in a constraint can impact constraint solver performance . Common mistake people do which results in constrain solver performance degradation is to constraint the data payload to a predictable pattern to enable designers to debug RTL faster. When predictable data pattern is constrained for every transaction the number of bidirectional constraints solved increases exponentially resulting in constraint solver performance degradation. The problem would be magnified further when a scenario generator is used to randomize sequence of transactions.
The solution to this is if you would require a predictable data pattern to be used in the data payload override the random value with predictable pattern in post_randomize() method instead of going for a constraint, this would improve the runtime performance of your simulation.