Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
 def remove(self):
     '''
     remove cb
     '''
     pyvpi.removeCb(self)
     if self.register_in_gd:
         self.remove_from_gd()
Ejemplo n.º 5
0
 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
Ejemplo n.º 6
0
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)
Ejemplo n.º 7
0
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)
Ejemplo n.º 8
0
 def remove(self):
     pyvpi.removeCb(self)
Ejemplo n.º 9
0
def ChangeFunc(self):
    loop_schedule(self)
    pyvpi.removeCb(self)
Ejemplo n.º 10
0
def TimerFunc(self):
    # pyvpi.printf("Timer Func @{}\n".format(Simtime.value))
    loop_schedule(self)
    pyvpi.removeCb(self)