// ---------------------------------------------------------------------- // Driver for AXI transactions // ---------------------------------------------------------------------- class axi_driver extends uvm_driver; // #(axi_transaction); virtual `AXI_INTF.MANAGER m_if; virtual `AXI_INTF.SUBORDINATE s_if; axi_agent_type_t agent_type; `uvm_component_utils(axi_driver) // -------------------------------------------------- // Constructor function new(string name = "axi_driver", uvm_component parent = null); super.new(name, parent); endfunction // -------------------------------------------------- // Set agent type function void set_agent_type(axi_agent_type_t atype); agent_type = atype; `uvm_info("set_agent_type", $sformatf("Agent type set to %s", agent_type.name()), UVM_LOW) endfunction // -------------------------------------------------- // Set virtual interfaces function void set_virtual_interfaces(virtual `AXI_INTF.MANAGER m_if_p, virtual `AXI_INTF.SUBORDINATE s_if_p); `uvm_info("set_virtual_interfaces", $sformatf("Setting virtual interfaces"), UVM_LOW) m_if = m_if_p; s_if = s_if_p; endfunction endclass : axi_driver