3 Agents in UVM Env

Hello,

How do you implement this scenario in UVM Testbench ?

Assuming, UVM environment has 3 different agents having scope to their own interfaces.
On driving wrong stimuli on agent1, there will be error pin asserted on interface3
monitor of agent2 sees this). Soon after error-pin assertion, there should be a read transaction from agent2.
How do you make sure your agent2 drives a read transaction on every wrong stimulus from agent1?

Need help from UVM Experts…

Thanks
JeffD

In reply to dvuvmsv:
if your agent2 is not implemented as reactive agent then you will have to add uvm_event in monitor to generate the event(event.trigger()). and your sequence will be running in forever loop ,will be blocked by the event.wait_trigger() function. whenever the sequence see the event it will automatically start executing read_sequence on agent2

Thanks for your reply.
I think in the agent2 monitor run_phase, I should add the code to wait for the error on signal and create the event as you mentioned. I believe the agent2 driver should sample the event
like env.agent2.mon.event.wait_trigger() and start the read sequence.

If you can give an example code that would be great.

JeffD

In reply to dvuvmsv:


class monitor extends uvm_monitor 

uvm_event  ev_read ;
virtual function void build_phase(uvm_phase phase);
  ev_read = uvm_event_pool::get_global("ev_read"); 
endfunction 

virtual task run_phase();
     forever begin 
      .......
      ev_read.trigger();
     end 
endtask 

endclass // monitor 


class sequence extends base_sequence ;
  uvm_event  ev_read ;
   
function new (strint name);
  super.new(name);
  ev_read = uvm_event_pool::get_global("ev_read"); 
endfunction 
  
task body ();
    forever begin 
      ev_read.wait_trigger();
      //    execute your sequence  
    end 
endtask 

endclass