test: prevent NAC3 analysis failures of imported but unused methods

This commit is contained in:
Sébastien Bourdeauducq 2024-09-02 12:48:09 +08:00
parent 770896a64b
commit 618e2788d9
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ from artiq.coredevice.exceptions import CacheError
from artiq.test.hardware_testbench import ExperimentCase from artiq.test.hardware_testbench import ExperimentCase
@nac3 # NAC3TODO @nac3
class _Cache(EnvExperiment): class _Cache(EnvExperiment):
core: KernelInvariant[Core] core: KernelInvariant[Core]
core_cache: KernelInvariant[CoreCache] core_cache: KernelInvariant[CoreCache]

View File

@ -19,7 +19,7 @@ class EdgeCounterExp(EnvExperiment):
self.setattr_device("loop_out") self.setattr_device("loop_out")
# NAC3TODO https://git.m-labs.hk/M-Labs/nac3/issues/461 # NAC3TODO https://git.m-labs.hk/M-Labs/nac3/issues/461
@kernel # NAC3TODO @kernel
def count_pulse_edges(self, gate_fn) -> tuple[int32, int32]: def count_pulse_edges(self, gate_fn) -> tuple[int32, int32]:
self.core.break_realtime() self.core.break_realtime()
with parallel: with parallel:
@ -27,9 +27,9 @@ class EdgeCounterExp(EnvExperiment):
self.core.delay(5. * us) self.core.delay(5. * us)
self.loop_out.pulse(10. * us) self.loop_out.pulse(10. * us)
with sequential: with sequential:
#gate_fn(10. * us) gate_fn(10. * us)
self.core.delay(1. * us) self.core.delay(1. * us)
#gate_fn(10 * us) gate_fn(10 * us)
return (self.loop_in_counter.fetch_count(), return (self.loop_in_counter.fetch_count(),
self.loop_in_counter.fetch_count()) self.loop_in_counter.fetch_count())