Skip to content

Commit

Permalink
fmcdio_vhdci_eem: fix direction shift register permutation and polarity
Browse files Browse the repository at this point in the history
  • Loading branch information
sbourdeauducq committed Jul 19, 2018
1 parent e71cbe5 commit fe93a45
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions artiq/coredevice/fmcdio_vhdci_eem.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,20 @@
}


fmcdio_shiftreg_permutation = [
1, 0, 3, 2, 5, 4, 7, 6,
9, 8, 11, 10, 13, 12, 15, 14,
17, 16, 19, 18, 21, 20, 23, 22,
25, 24, 27, 26, 29, 28, 31, 30
]


def shiftreg_bits(eem, out_pins):
r = 0
for i in range(8):
if i in out_pins:
shift = eem_fmc_connections[eem][i]
if i not in out_pins:
lvds_line = eem_fmc_connections[eem][i]
shift = fmcdio_shiftreg_permutation.index(lvds_line)
r |= 1 << shift
return r

Expand Down

0 comments on commit fe93a45

Please sign in to comment.