serdes-transceiver/eem_helpers.py

30 lines
630 B
Python
Raw Normal View History

2023-04-23 11:42:18 +08:00
from migen import *
from migen.build.generic_platform import *
def _eem_signal(i):
n = "d{}".format(i)
if i == 0:
n += "_cc"
return n
def _eem_pin(eem, i, pol):
return "eem{}:{}_{}".format(eem, _eem_signal(i), pol)
def default_iostandard(eem):
return IOStandard("LVDS_25")
def diff_io(eem, iostandard=default_iostandard):
return [("dio{}".format(eem), i,
Subsignal("p", Pins(_eem_pin(eem, i, "p"))),
Subsignal("n", Pins(_eem_pin(eem, i, "n"))),
iostandard(eem))
for i in range(8)]
def generate_pads(platform, eem):
platform.add_extension(diff_io(eem))