mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +08:00
24 lines
337 B
Python
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()
|
|
|
|
|