Example #1
0
 def __init__(self, handle, path, handle_type):
     NonHierarchyObject.__init__(self, handle, path)
     if handle_type in [simulator.INTEGER, simulator.ENUM]:
         self._value = simulator.get_signal_val_long(self._handle)
     elif handle_type == simulator.REAL:
         self._value = simulator.get_signal_val_real(self._handle)
     elif handle_type == simulator.STRING:
         self._value = simulator.get_signal_val_str(self._handle)
     else:
         val = simulator.get_signal_val_binstr(self._handle)
         self._value = BinaryValue(n_bits=len(val))
         try:
             self._value.binstr = val
         except:
             self._value = val
Example #2
0
 def _getvalue(self):
     return simulator.get_signal_val_long(self._handle)