mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-19 00:16:29 +08:00
coredevice: adf5356: add test for failed PLL lock
Signed-off-by: Etienne Wodey <wodey@iqo.uni-hannover.de>
This commit is contained in:
parent
3844123c13
commit
e8730a7e14
@ -62,6 +62,17 @@ class ADF5356Exp(EnvExperiment):
|
|||||||
delay(5 * ms)
|
delay(5 * ms)
|
||||||
self.set_dataset("muxout", self.dev.read_muxout())
|
self.set_dataset("muxout", self.dev.read_muxout())
|
||||||
|
|
||||||
|
@kernel
|
||||||
|
def muxout_lock_detect_no_lock(self):
|
||||||
|
self.core.break_realtime()
|
||||||
|
self.dev.cpld.init()
|
||||||
|
self.dev.init()
|
||||||
|
# set external SMA reference input
|
||||||
|
self.dev.cpld.write_reg(1, (1 << 4))
|
||||||
|
self.dev.set_frequency(100 * MHz)
|
||||||
|
delay(5 * ms)
|
||||||
|
self.set_dataset("muxout", self.dev.read_muxout())
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def set_get_output_power(self):
|
def set_get_output_power(self):
|
||||||
self.core.break_realtime()
|
self.core.break_realtime()
|
||||||
@ -168,6 +179,11 @@ class ADF5356Test(ExperimentCase):
|
|||||||
muxout = self.dataset_mgr.get("muxout")
|
muxout = self.dataset_mgr.get("muxout")
|
||||||
self.assertTrue(muxout)
|
self.assertTrue(muxout)
|
||||||
|
|
||||||
|
def test_muxout_lock_detect_no_lock(self):
|
||||||
|
self.execute(ADF5356Exp, "muxout_lock_detect_no_lock")
|
||||||
|
muxout = self.dataset_mgr.get("muxout")
|
||||||
|
self.assertFalse(muxout)
|
||||||
|
|
||||||
def test_set_too_high_frequency(self):
|
def test_set_too_high_frequency(self):
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError):
|
||||||
self.execute(ADF5356Exp, "set_too_high_frequency")
|
self.execute(ADF5356Exp, "set_too_high_frequency")
|
||||||
|
Loading…
Reference in New Issue
Block a user