Advertisement
Sidsh

agent.sv

Oct 29th, 2022 (edited)
1,066
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class our_agent extends uvm_agent;
  2.     `uvm_component_utils(our_agent)
  3.  
  4. our_sequencer seqr;     //initiated sequencer, driver and monitor classes in agent acc. to hierarchy
  5. our_driver drv;
  6. our_monitor mon;
  7.  
  8. //buildphase
  9. function void build_phase(uvm_phase phase)
  10.  
  11.     seqr = our_sequencer :: type_id :: create("seqr", this)     //these are the components we will be writing code for
  12.     drv = our_driver :: type_id :: create ("drv", this)
  13.     mon = our_monitor :: type_id :: create ("mon", this)
  14. endfunction
  15.  
  16. //connect phase
  17. function void connect_phase(uvm_phase phase);
  18.     //necessary connections
  19.         drv.seq_item_port.connect(seqr.seq_item_export)     //made aconnection between the drivers port and sequencers export
  20.  
  21. //run phase
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement