2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-19 00:16:29 +08:00

ad9154: tweak jesd prbs test

This commit is contained in:
Robert Jördens 2016-10-09 20:34:15 +02:00
parent 1f93658724
commit 5f7229ef92

View File

@ -10,12 +10,15 @@ class Test(EnvExperiment):
self.setattr_device("ad9154") self.setattr_device("ad9154")
def run(self): 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): def p(self, f, *a):
print(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, self.ad9154.dac_write(AD9154_PHY_PRBS_TEST_CTRL,
AD9154_PHY_PRBS_PAT_SEL_SET(p)) AD9154_PHY_PRBS_PAT_SEL_SET(p))
self.ad9154.dac_write(AD9154_PHY_PRBS_TEST_EN, 0xff) self.ad9154.dac_write(AD9154_PHY_PRBS_TEST_EN, 0xff)