mirror of https://github.com/m-labs/artiq.git
examples: fix precompile example for NAC3
This commit is contained in:
parent
eb4e80e022
commit
5ffa6e0522
|
@ -1,20 +1,21 @@
|
||||||
from artiq.experiment import *
|
from artiq.experiment import *
|
||||||
|
|
||||||
|
|
||||||
# NAC3TODO
|
@nac3
|
||||||
|
|
||||||
class Precompile(EnvExperiment):
|
class Precompile(EnvExperiment):
|
||||||
|
hello_str: Kernel[str]
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
self.setattr_device("core")
|
self.setattr_device("core")
|
||||||
self.hello_str = "hello ARTIQ"
|
self.hello_str = "hello ARTIQ"
|
||||||
|
|
||||||
def prepare(self):
|
def prepare(self):
|
||||||
self.precompiled = self.core.precompile(self.hello, "world")
|
self.precompiled = self.core.precompile(self.hello, "world")
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def hello(self, arg):
|
def hello(self, arg: str):
|
||||||
print(self.hello_str, arg)
|
print_rpc((self.hello_str, arg))
|
||||||
self.hello_str = "nowriteback"
|
self.hello_str = "nowriteback"
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.precompiled()
|
self.precompiled()
|
||||||
|
|
Loading…
Reference in New Issue