Esempio n. 1
0
 async def b_transport(self, t, delay):
     if delay == None:
         uvm_error(
             "UVM/TLM/NULLDELAY",
             cat(self.get_full_name(),
                 ".b_transport() called with 'null' delay"))
         return
     await getattr(self, imp).b_transport(t, delay)
Esempio n. 2
0
    def __init__(self, name, parent, imp=None):
        super().__init__(name, parent)
        self.m_imp = parent if imp is None else imp
        self.bw_port = UVMTLMNbTransportBwPort("bw_port", self.get_comp())

        if self.m_imp is None:
            uvm_error("UVM/TLM2/NOIMP",
                      cat("nb_target socket ", name, " has no implementation"))
Esempio n. 3
0
 def nb_transport_bw(self, t, p, delay):
     if delay is None:
         uvm_error(
             "UVM/TLM/NULLDELAY",
             cat(self.get_full_name(),
                 ".nb_transport_bw() called with 'null' delay"))
         return uvm_tlm_sync_e.UVM_TLM_COMPLETED
     return getattr(self, imp).nb_transport_bw(t, p, delay)
Esempio n. 4
0
    def __init__(self, name, parent, imp=None):
        super().__init__(name, parent)

        if (imp is None):
            imp = parent
        else:
            uvm_error(
                "UVM/TLM2/NOIMP",
                cat("nb_initiator socket ", name, " has no implementation"))
        self.bw_imp = UVMTLMNbTransportBwImp("bw_imp", imp)
Esempio n. 5
0
    def decr(self, t, scaled, secs):
        if (t < 0.0):
            uvm_error(
                "UVM/TLM/TIMENEG",
                cat("Cannot decrement uvm_tlm_time variable ", self.m_name,
                    " by a negative value"))
            return
        if (scaled == 0):
            uvm_fatal(
                "UVM/TLM/BADSCALE",
                "uvm_tlm_time::decr() called with a scaled time literal that is smaller than the current timescale"
            )

        self.m_time -= self._to_m_res(t, scaled, secs)

        if (self.m_time < 0.0):
            uvm_error(
                "UVM/TLM/TOODECR",
                cat("Cannot decrement uvm_tlm_time variable ", self.m_name,
                    " to a negative value"))
            self.reset()
Esempio n. 6
0
    def incr(self, t, scaled, secs=1.0e-9):
        if (t < 0.0):
            uvm_error(
                "UVM/TLM/TIMENEG",
                cat("Cannot increment uvm_tlm_time variable ", self.m_name,
                    " by a negative value"))
            return
        if (scaled == 0):
            uvm_fatal(
                "UVM/TLM/BADSCALE",
                "uvm_tlm_time::incr() called with a scaled time literal that is smaller than the current timescale"
            )

        self.m_time += self._to_m_res(t, scaled, secs)
Esempio n. 7
0
 def __init__(self, name, parent, imp=None):
     super().__init__(name, parent)
     self.m_imp = parent if imp == None else imp
     if (self.m_imp == None):
         uvm_error("UVM/TLM2/NOIMP",
                   cat("b_target socket ", name, " has no implementation"))