def build_phase(self, phase): UVMEnv.build_phase(self, phase) self.sqr = UVMSequencer("sequence_controller", self) # create and connect driver self.drv = my_driver("my_driver", self) uvm_info("ENV", "Connecting ports now here", UVM_MEDIUM) self.drv.seq_item_port.connect(self.sqr.seq_item_export)
def __init__(self, name, parent): UVMEnv.__init__(self, name, parent) self.monitor = None self.masters = [] self.slaves = [] self.vif = None # Control properties self.has_bus_monitor = True self.num_masters = 1 self.num_slaves = 1
def build_phase(self, phase): UVMEnv.build_phase(self, phase) num_masters = [] if UVMConfigDb.get(self, "ubus0", "num_masters", num_masters): num_masters = num_masters[0] else: num_masters = 1 UVMConfigDb.set(self, "ubus0", "num_masters", num_masters) num_slaves = [] if UVMConfigDb.get(self, "ubus0", "num_slaves", num_slaves): num_slaves = num_slaves[0] else: num_slaves = 1 UVMConfigDb.set(self, "ubus0", "num_slaves", num_slaves) self.ubus0 = ubus_env.type_id.create("ubus0", self) self.scoreboard0 = ubus_example_scoreboard.type_id.create( "scoreboard0", self)
def build_phase(self, phase): inst_name = "" UVMEnv.build_phase(self, phase) #// set_phase_domain("uvm") arr = [] if UVMConfigDb.get(None, "*", "vif", arr): uvm_info("GOT_VIF", "vif was received from configDb", UVM_HIGH) self.vif = arr[0] if self.vif is None: self.uvm_report_fatal( "NOVIF", "virtual interface must be set for: " + self.get_full_name() + ".vif") if self.has_bus_monitor is True: self.bus_monitor = ubus_bus_monitor.type_id.create( "bus_monitor", self) arr = [] if UVMConfigDb.get(self, "", "num_masters", arr) is True: self.num_masters = arr[0] for i in range(self.num_masters): inst_name = sv.sformatf("masters[%0d]", i) master = ubus_master_agent.type_id.create(inst_name, self) self.masters.append(master) UVMConfigDb.set(self, inst_name + ".monitor", "master_id", i) UVMConfigDb.set(self, inst_name + ".driver", "master_id", i) arr = [] if UVMConfigDb.get(self, "", "num_slaves", arr) is True: self.num_slaves = arr[0] for i in range(self.num_slaves): inst_name = sv.sformatf("slaves[%0d]", i) self.slaves.append(ubus_slave_agent.type_id.create( inst_name, self))
def __init__(self, name, parent=None): UVMEnv.__init__(self, name, parent) self.scoreboard0 = None self.ubus0 = None
def __init__(self, name, parent): UVMEnv.__init__(self, name, parent) self.drv = None self.sqr = None self.error = False
def __init__(self, name="tb_env", parent=None): UVMEnv.__init__(self, name, parent)