1
0
forked from M-Labs/nac3
nac3/nac3artiq/demo.py
Sebastien Bourdeauducq 3b10172810 nac3artiq: get closer to original ARTIQ semantics in demo
Currently crashes the compiler with:
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', nac3core/src/codegen/expr.rs:395:58
2021-10-08 23:41:41 +08:00

27 lines
468 B
Python

from min_artiq import *
from numpy import int32, int64
@kernel
class Demo:
core: Core
led: TTLOut
def __init__(self):
self.core = Core()
self.led = TTLOut(0)
@kernel
def main_kernel(self):
self.core.reset()
while True:
self.led.pulse_mu(int64(100000000))
delay_mu(int64(100000000))
def run(self):
self.core.run(self.main_kernel)
if __name__ == "__main__":
Demo().run()