1
0
mirror of https://github.com/myhdl/myhdl.git synced 2024-12-14 07:44:38 +08:00
myhdl/example/manual/hello1.py
2005-12-11 16:30:52 +00:00

24 lines
337 B
Python

from myhdl import Signal, delay, always, now, Simulation
def HelloWorld():
interval = delay(10)
@always(interval)
def sayHello():
print "%s Hello World!" % now()
return sayHello
def main():
inst = HelloWorld()
sim = Simulation(inst)
sim.run(30)
if __name__ == '__main__':
main()