Beispiel #1
0
 def get_value(self, value=None) :
   if value :
     try :
       return value(self)
     except :
       try : 
         self.set_format(value)
       except :
         raise signalFormatException(repr(value))
   elif self.type : 
     return self.type(self)
   
   vpi.vpi_get_value(self.handle, self.vpi_value)
   self.vpi_chk_error = vpiChkError()
   # take a copy of the string value
   if self.vpi_value.format in self._vpiStringVals :
     self.copy = str(self.vpi_value.value.str)
   else :
     self.copy = None
   return self.decode(self.vpi_value, self.copy)
Beispiel #2
0
 def get(self, signal) :
   vpi.vpi_get_value(signal.handle, self.vpi_value)
   self.copy = str(self.vpi_value.value.str)
   self.vpi_chk_error = vpiChkError()
   return self