1 from migen
.fhdl
.module
import Module
2 from migen
.fhdl
.specials
import Instance
3 from migen
.genlib
.io
import DifferentialInput
, DifferentialOutput
6 class AlteraDifferentialInputImpl(Module
):
7 def __init__(self
, i_p
, i_n
, o
):
8 self
.specials
+= Instance("ALT_INBUF_DIFF",
15 class AlteraDifferentialInput
:
18 return AlteraDifferentialInputImpl(dr
.i_p
, dr
.i_n
, dr
.o
)
21 class AlteraDifferentialOutputImpl(Module
):
22 def __init__(self
, i
, o_p
, o_n
):
23 self
.specials
+= Instance("ALT_OUTBUF_DIFF",
30 class AlteraDifferentialOutput
:
33 return AlteraDifferentialOutputImpl(dr
.i
, dr
.o_p
, dr
.o_n
)
36 altera_special_overrides
= {
37 DifferentialInput
: AlteraDifferentialInput
,
38 DifferentialOutput
: AlteraDifferentialOutput