async def task3(): for _ in range(100): await asyncio.sleep(0.05) print("T3\n") # @pyvpi_tools.At('top.a') # def printx(self): # print("hellox") add_task(task()) add_task(task2()) # add_task(task2()) # @pyvpi_tools.AtTime(200e-6) # def ip(self): # IPython.embed() # @pyvpi_tools.AtTime(1000000.0e-9) # def ip(self): # IPython.embed() pyvpi.setDebugLevel(40) # time.sleep(0.6) @pyvpi_tools.SysTask(tfname="$ipython") def itr(self): print('heelo') IPython.embed()
#! python import pyvpi import pyvpi_cons as cons pyvpi.setDebugLevel(30) a = pyvpi.handleByName("test.a") b = pyvpi.handleByName("test.b") o = pyvpi.handleByName("test.o") val_a = pyvpi.Value(cons.vpiVectorVal) val_b = pyvpi.Value(cons.vpiVectorVal) val_o = pyvpi.Value(cons.vpiVectorVal) pyvpi.getValue(a, val_a) pyvpi.getValue(b, val_b) pyvpi.getValue(o, val_o) pyvpi.printf("a{} + b{} = o{}\n".format(val_a.value.vec, val_b.value.vec, val_o.value.vec)) pyvpi.putValue(b, val_o)
#! python import pyvpi import pyvpi_cons as cons pyvpi.setDebugLevel(30) a = pyvpi.handleByName("test.a") b = pyvpi.handleByName("test.b") o = pyvpi.handleByName("test.o") val_a = pyvpi.Value() val_b = pyvpi.Value(cons.vpiVectorVal) val_o = pyvpi.Value(cons.vpiVectorVal) pyvpi.getValue(a,val_a) pyvpi.getValue(b,val_b) pyvpi.getValue(o,val_o) pyvpi.printf("a[{}] + b{} = o{}\n".format(val_a.value,val_b.value.vec,val_o.value.vec))