forked from M-Labs/artiq
1
0
Fork 0

test/stress: partial port to NAC3

This commit is contained in:
Sébastien Bourdeauducq 2024-08-19 22:21:08 +08:00
parent 745935785f
commit ff664666b8
1 changed files with 11 additions and 7 deletions

View File

@ -1,23 +1,27 @@
import os
import time
import unittest
from numpy import int32
from artiq.experiment import *
from artiq.test.hardware_testbench import ExperimentCase
from artiq.coredevice.core import Core
@nac3
class _Stress(EnvExperiment):
core: KernelInvariant[Core]
def build(self):
self.setattr_device("core")
@rpc(flags={"async"})
def sink(self, data):
# NAC3TODO https://git.m-labs.hk/M-Labs/nac3/issues/182
@rpc #(flags={"async"})
def sink(self, data: int32):
pass
@kernel
def async_rpc(self, n):
def async_rpc(self, n: int32):
for _ in range(n):
self.sink(b"")
self.sink(0)
class StressTest(ExperimentCase):