forked from M-Labs/artiq
test/stress: partial port to NAC3
This commit is contained in:
parent
745935785f
commit
ff664666b8
|
@ -1,23 +1,27 @@
|
||||||
import os
|
|
||||||
import time
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
from numpy import int32
|
||||||
|
|
||||||
from artiq.experiment import *
|
from artiq.experiment import *
|
||||||
from artiq.test.hardware_testbench import ExperimentCase
|
from artiq.test.hardware_testbench import ExperimentCase
|
||||||
|
from artiq.coredevice.core import Core
|
||||||
|
|
||||||
|
@nac3
|
||||||
class _Stress(EnvExperiment):
|
class _Stress(EnvExperiment):
|
||||||
|
core: KernelInvariant[Core]
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
self.setattr_device("core")
|
self.setattr_device("core")
|
||||||
|
|
||||||
@rpc(flags={"async"})
|
# NAC3TODO https://git.m-labs.hk/M-Labs/nac3/issues/182
|
||||||
def sink(self, data):
|
@rpc #(flags={"async"})
|
||||||
|
def sink(self, data: int32):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def async_rpc(self, n):
|
def async_rpc(self, n: int32):
|
||||||
for _ in range(n):
|
for _ in range(n):
|
||||||
self.sink(b"")
|
self.sink(0)
|
||||||
|
|
||||||
|
|
||||||
class StressTest(ExperimentCase):
|
class StressTest(ExperimentCase):
|
||||||
|
|
Loading…
Reference in New Issue