Advertisement
Sidsh

env.sv

Oct 29th, 2022 (edited)
1,059
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class our_env extends uvm_env;
  2. `uvm_component_utils (our_env)
  3.  
  4. //instantiate classes
  5.         our_agent agnt;                 //initiated the agnt class we created
  6.  
  7. //constructor
  8. function new(string name="our_env", uvm_component parent = null);
  9.     super.new(name, parent);    //to access all base class properties
  10.  
  11.     //build phase
  12.         function void build_phase(uvm_phase phase);
  13.             agnt = our_agent :: type_id :: create("agnt", this);    //this is we created a new object
  14.         endfunction
  15.  
  16. endclass : our_env
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement