forked from M-Labs/artiq
eem/grabber: allow third EEM to be specified
This commit is contained in:
parent
90e8e074cd
commit
1fb317778a
|
@ -431,7 +431,7 @@ class Grabber(_EEM):
|
||||||
return ios
|
return ios
|
||||||
|
|
||||||
@classmethod
|
@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)
|
cls.add_extension(target, eem, eem_aux, iostandard=iostandard)
|
||||||
|
|
||||||
pads = target.platform.request("grabber{}_video".format(eem))
|
pads = target.platform.request("grabber{}_video".format(eem))
|
||||||
|
|
|
@ -64,12 +64,17 @@ def peripheral_zotino(module, peripheral):
|
||||||
|
|
||||||
def peripheral_grabber(module, peripheral):
|
def peripheral_grabber(module, peripheral):
|
||||||
if len(peripheral["ports"]) == 1:
|
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:
|
elif len(peripheral["ports"]) == 2:
|
||||||
port, port_aux = peripheral["ports"]
|
port, port_aux = peripheral["ports"]
|
||||||
|
port_aux2 = None
|
||||||
|
elif len(peripheral["ports"]) == 3:
|
||||||
|
port, port_aux, port_aux2 = peripheral["ports"]
|
||||||
else:
|
else:
|
||||||
raise ValueError("wrong number of ports")
|
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):
|
def add_peripherals(module, peripherals):
|
||||||
|
|
Loading…
Reference in New Issue