Tuesday, May 7, 2013

MyHDL: Hello World

MyHDL simulation script from Introduction to MyHDL.
from myhdl import Signal, delay, always, now, Simulation
def HelloWorld():
interval = delay(10)
@always(interval)
def sayHello():
print "%s Hello World!" % now()
return sayHello
inst = HelloWorld()
sim = Simulation(inst)
sim.run(30)
view raw hello1.py hosted with ❤ by GitHub

No comments:

Post a Comment