Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

41 строка
1.2 KiB

  1. class axi_env extends uvm_env;
  2. `uvm_component_utils(axi_env)
  3. // Components
  4. axi_master master;
  5. axi_slave slave;
  6. axi_scoreboard scb;
  7. env_config env_cfg;
  8. //
  9. function new(string name, uvm_component parent);
  10. super.new(name, parent);
  11. endfunction //new()
  12. // Function: build_phase
  13. extern function void build_phase(uvm_phase phase);
  14. // Function: connect_phase
  15. extern function void connect_phase(uvm_phase phase);
  16. endclass //axi_env extends uvm_env
  17. function void axi_env::build_phase(uvm_phase phase);
  18. /* note: Do not call super.build_phase() from any class that is extended from an UVM base class! */
  19. /* For more information see UVM Cookbook v1800.2 p.503 */
  20. //super.build_phase(phase);
  21. master = axi_master::type_id::create("master", this);
  22. slave = axi_slave::type_id::create("slave", this);
  23. scb = axi_scoreboard::type_id::create("scb", this);
  24. endfunction: build_phase
  25. function void axi_env::connect_phase(uvm_phase phase);
  26. super.connect_phase(phase);
  27. master.ap.connect(scb.m_ap_imp);
  28. slave.ap.connect(scb.s_ap_imp);
  29. endfunction: connect_phase