def TimerFunc(self): # with main_lock: # pyvpi.printf("<<<<<<<<<<<<<<TimerFunc<<<<<<<<<<<<<\n") # pyvpi.printf("<<<<<<<<<<<<Simtime=%d<<<<<<<<<<<\n"%Simtime.value) loop_schedule(self) # time.sleep(0.0016) pyvpi.removeCb(self)
def func(self): # print("here is wait @%d"%Simtime.value) new_loop.call_soon_threadsafe(self.done) while (any([x.arm_time < Simtime.value for x in pending_task])): time.sleep(0.001) # print_mem() pyvpi.removeCb(self)
def callback(arg): pyvpi.printf("%s : " % arg.time.low) pyvpi.printf("%s : " % arg.value.value) pyvpi.printf("%s\n" % "callback is run...") if cb.user_data == 3: pyvpi.removeCb(arg) cb.user_data += 1
def remove(self): ''' remove cb ''' pyvpi.removeCb(self) if self.register_in_gd: self.remove_from_gd()
def callback(arg): pyvpi.printf("%s : " % arg.time.low) pyvpi.printf("%s : " % arg.value.value) pyvpi.printf("%s\n" % "callback is run...") if cb.user_data == 3 : pyvpi.removeCb(arg) cb.user_data += 1
def _pyinteractive_cb(self): pyinteractive_lock = sys.modules['__main__'].__dict__['pyinteractive_lock'] pyinteractive_lock.clear() if sys.modules['__main__'].__dict__['pyinteractive_mode']: pyvpi.printf("Enter Pyinteractive @ %d\n" % Simtime.value) pyinteractive_lock.wait() else: pyinteractive_lock.clear() time.sleep(0.1) pyvpi.removeCb(self)
def ChangeFunc(self): # with main_lock: # pyvpi.printf("<<<<<<<<<<<<<<ChangeFunc<<<<<<<<<<<<<\n") # pyvpi.printf("<<<<<<<<<<<<<<Simtime=%d<<<<<<<<<<<\n"%Simtime.value) # pyvpi.printf("<<<<<<<<<<<<<<CbTime=%d<<<<<<<<<<<\n"%self.wait_ev.arm_time) # tasks = asyncio.all_tasks(new_loop) # pyvpi.printf(repr(tasks)) # pyvpi.printf('\n') loop_schedule(self) # time.sleep(0.0016) pyvpi.removeCb(self)
def remove(self): pyvpi.removeCb(self)
def ChangeFunc(self): loop_schedule(self) pyvpi.removeCb(self)
def TimerFunc(self): # pyvpi.printf("Timer Func @{}\n".format(Simtime.value)) loop_schedule(self) pyvpi.removeCb(self)