Skip to content

Commit

Permalink
ad9154: tweak jesd prbs test
Browse files Browse the repository at this point in the history
jordens committed Oct 9, 2016
1 parent 1f93658 commit 5f7229e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions artiq/examples/phaser/repository/test_ad9154_prbs.py
Original file line number Diff line number Diff line change
@@ -10,12 +10,15 @@ def build(self):
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)

0 comments on commit 5f7229e

Please sign in to comment.