2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 11:18:27 +08:00

eem/grabber: allow third EEM to be specified

This commit is contained in:
Sebastien Bourdeauducq 2019-08-29 18:58:12 +08:00
parent 90e8e074cd
commit 1fb317778a
2 changed files with 8 additions and 3 deletions

View File

@ -431,7 +431,7 @@ class Grabber(_EEM):
return ios
@classmethod
def add_std(cls, target, eem, eem_aux=None, ttl_out_cls=None, iostandard="LVDS_25"):
def add_std(cls, target, eem, eem_aux=None, eem_aux2=None, ttl_out_cls=None, iostandard="LVDS_25"):
cls.add_extension(target, eem, eem_aux, iostandard=iostandard)
pads = target.platform.request("grabber{}_video".format(eem))

View File

@ -64,12 +64,17 @@ def peripheral_zotino(module, peripheral):
def peripheral_grabber(module, peripheral):
if len(peripheral["ports"]) == 1:
port, port_aux = peripheral["ports"][0], None
port = peripheral["ports"][0]
port_aux = None
port_aux2 = None
elif len(peripheral["ports"]) == 2:
port, port_aux = peripheral["ports"]
port_aux2 = None
elif len(peripheral["ports"]) == 3:
port, port_aux, port_aux2 = peripheral["ports"]
else:
raise ValueError("wrong number of ports")
eem.Grabber.add_std(module, port, port_aux)
eem.Grabber.add_std(module, port, port_aux, port_aux2)
def add_peripherals(module, peripherals):