From 5f7229ef9233441d576515817cd2012e14e1fafe Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Sun, 9 Oct 2016 20:34:15 +0200 Subject: [PATCH] ad9154: tweak jesd prbs test --- artiq/examples/phaser/repository/test_ad9154_prbs.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/artiq/examples/phaser/repository/test_ad9154_prbs.py b/artiq/examples/phaser/repository/test_ad9154_prbs.py index 887b45d29..337da468f 100644 --- a/artiq/examples/phaser/repository/test_ad9154_prbs.py +++ b/artiq/examples/phaser/repository/test_ad9154_prbs.py @@ -10,12 +10,15 @@ class Test(EnvExperiment): self.setattr_device("ad9154") def run(self): - self.prbs(2, 100) # prbs31 + for i in range(3): # prbs7, prbs15, prbs31 + self.prbs(i, 100) def p(self, f, *a): print(f % a) - def prbs(self, p, t): + def prbs(self, p, t, inject_errors=0): + self.ad9154.jesd_prbs((1 << p) | (inject_errors << 3)) + self.ad9154.dac_write(AD9154_PHY_PRBS_TEST_CTRL, AD9154_PHY_PRBS_PAT_SEL_SET(p)) self.ad9154.dac_write(AD9154_PHY_PRBS_TEST_EN, 0xff)