How to override normal driver with error driver parallely
while driving normal driver with in some delay,we have to drive Error driver
Any method to do this
How to override normal driver with error driver parallely
while driving normal driver with in some delay,we have to drive Error driver
Any method to do this
In reply to shiva kumar:
How to do this is very specific to your design.
Generally, you use the factory to override your driver class with an error_driver class, and then override one of the driver’s methods. Inside that method, you need to make a decision amour what and when to introduce an error.
class driver extends uvm_driver;
`uvm_component_utils(driver)
...
task run_phase(uvm_phase phase);
forever (@posedge vif.clk) begin
do_a();
do_b();
end
endtask
virtual task do_a();
...
endtask
endclass
class error_driver extends driver;
`uvm_component_utils(error_driver)
task do_a();
if(error_condition)
... // do some error
else
super.do_A();
endtask
endclass
In reply to dave_59:
If driver is VIP we cannot do modifications to Base class driver.
can we use delays in run phase and change override method back to normal driver from error driver
In reply to shiva kumar:
You can still do as I suggested, but only with virtual methods in the original base class.