2024-06-14 10:22:33 +08:00
|
|
|
from min_artiq import *
|
|
|
|
from numpy import int32
|
|
|
|
|
|
|
|
|
|
|
|
@nac3
|
2024-12-27 17:44:11 +08:00
|
|
|
class Demo2:
|
2024-06-14 10:22:33 +08:00
|
|
|
core: KernelInvariant[Core]
|
|
|
|
attr1: KernelInvariant[str]
|
|
|
|
attr2: KernelInvariant[int32]
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
self.core = Core()
|
|
|
|
self.attr2 = 32
|
|
|
|
self.attr1 = "SAMPLE"
|
|
|
|
|
|
|
|
@kernel
|
|
|
|
def run(self):
|
|
|
|
print_int32(self.attr2)
|
|
|
|
self.attr1
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2024-12-27 17:44:11 +08:00
|
|
|
Demo2().run()
|