示例#1
0
 def final_phase(self, phase):
     if self.phases_started != CORRECT_PHASES:
         uvm_error("PHASES_STARTED_FAIL", self.get_name() + ": " +
                 str(self.phases_started))
     else:
         self.correct = True
         uvm_info("PHASES_STARTED_OK", self.get_name() + ": " + str(self.phases_started),
             UVM_NONE)
示例#2
0
    def build_phase(self, phase):
        super().build_phase(phase)

        _str = []
        if UVMConfigDb.get(self, "", "debug", _str):
            self.debug = _str[0]
        else:
            uvm_error("NO_CONF_MATCH", "Did not get debug")
        UVMConfigDb.set(self, "u1", "v", 0)

        sv.display("%s: In Build: debug = %0d", self.get_full_name(),
                   self.debug)

        self.u1 = ClassC("u1", self)
示例#3
0
    def build_phase(self, phase):
        super().build_phase(phase)

        arr = []
        if UVMConfigDb.get(self, "", "debug", arr):
            self.debug = arr[0]
        else:
            uvm_error("NO_CONF_MATCH", "Failed to get 'debug' from config DB")
        UVMConfigDb.set(self, "*", "v", 0)

        sv.display("%s: In Build: debug = %0d", self.get_full_name(),
                   self.debug)

        self.u1 = ClassC("u1", self)
        self.u2 = ClassC("u2", self)
示例#4
0
    def build_phase(self, phase):
        super().build_phase(phase)
        arr = []
        if UVMConfigDb.get(self, "", "debug", arr) is True:
            self.debug = arr[0]
        UVMConfigDb.set(self, "inst1.u2", "v", 5)
        UVMConfigDb.set(self, "inst2.u1", "v", 3)
        UVMConfigDb.set(self, "inst1.*", "s", 0x10)

        sv.display("%s: In Build: debug = %0d", self.get_full_name(), self.debug)

        self.inst1 = ClassA("inst1", self)
        self.inst2 = ClassB("inst2", self)
        if UVMConfigDb.get(uvm_top, "topenv", "should_match", arr):
            uvm_info("MATCH_OK", "should_match found from DB", UVM_MEDIUM)
        else:
            uvm_error("MATCH_ERROR", "should_match NOT found from DB")
示例#5
0
    def build_phase(self, phase):
        _str = []
        super().build_phase(phase)
        arr = []
        if UVMConfigDb.get(self, "", "v", arr):
            self.v = arr[0]
        arr = []
        if UVMConfigDb.get(self, "", "s", arr):
            self.s = arr[0]

        if UVMConfigDb.get(self, "", "myaa[foo]", _str):
            self.myaa["foo"] = _str[0]
            _str = []
        else:
            uvm_error("NO_CONF_MATCH", "Did not get myaa[foo]")

        if UVMConfigDb.get(self, "", "myaa[bar]", _str):
            self.myaa["bar"] = _str[0]
            _str = []
        else:
            uvm_error("NO_CONF_MATCH", "Did not get myaa[bar]")

        if UVMConfigDb.get(self, "", "myaa[foobar]", _str):
            self.myaa["foobar"] = _str[0]
            _str = []
        else:
            uvm_error("NO_CONF_MATCH", "Did not get myaa[foobar]")