mibuild/altera: cleanup
This commit is contained in:
parent
65eeb33329
commit
f57ee296a9
|
@ -1,14 +1,11 @@
|
||||||
from migen.fhdl.std import (Instance, Module)
|
from migen.fhdl.std import Instance, Module
|
||||||
from migen.genlib.io import (DifferentialInput, DifferentialOutput)
|
from migen.genlib.io import DifferentialInput, DifferentialOutput
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['altera_special_overrides']
|
|
||||||
|
|
||||||
|
|
||||||
class QuartusDifferentialInputImpl(Module):
|
class QuartusDifferentialInputImpl(Module):
|
||||||
def __init__(self, i_p, i_n, o):
|
def __init__(self, i_p, i_n, o):
|
||||||
self.specials += Instance("ALT_INBUF_DIFF",
|
self.specials += Instance("ALT_INBUF_DIFF",
|
||||||
name='ibuf_diff',
|
name="ibuf_diff",
|
||||||
i_i=i_p,
|
i_i=i_p,
|
||||||
i_ibar=i_n,
|
i_ibar=i_n,
|
||||||
o_o=o)
|
o_o=o)
|
||||||
|
@ -23,7 +20,7 @@ class QuartusDifferentialInput:
|
||||||
class QuartusDifferentialOutputImpl(Module):
|
class QuartusDifferentialOutputImpl(Module):
|
||||||
def __init__(self, i, o_p, o_n):
|
def __init__(self, i, o_p, o_n):
|
||||||
self.specials += Instance("ALT_OUTBUF_DIFF",
|
self.specials += Instance("ALT_OUTBUF_DIFF",
|
||||||
name='obuf_diff',
|
name="obuf_diff",
|
||||||
i_i=i,
|
i_i=i,
|
||||||
o_o=o_p,
|
o_o=o_p,
|
||||||
o_obar=o_n)
|
o_obar=o_n)
|
||||||
|
@ -34,6 +31,7 @@ class QuartusDifferentialOutput:
|
||||||
def lower(dr):
|
def lower(dr):
|
||||||
return QuartusDifferentialOutputImpl(dr.i, dr.o_p, dr.o_n)
|
return QuartusDifferentialOutputImpl(dr.i, dr.o_p, dr.o_n)
|
||||||
|
|
||||||
|
|
||||||
altera_special_overrides = {
|
altera_special_overrides = {
|
||||||
DifferentialInput: QuartusDifferentialInput,
|
DifferentialInput: QuartusDifferentialInput,
|
||||||
DifferentialOutput: QuartusDifferentialOutput
|
DifferentialOutput: QuartusDifferentialOutput
|
||||||
|
|
Loading…
Reference in New Issue