build/io: Add ClkInput/Ouptut to be able to abstract Clk Input/Output primitives.
This commit is contained in:
parent
36ce71d59b
commit
412f0f59b9
|
@ -43,6 +43,37 @@ class DifferentialOutput(Special):
|
|||
def lower(dr):
|
||||
raise NotImplementedError("Attempted to use a Differential Output, but platform does not support them")
|
||||
|
||||
# Clk Input/Output ---------------------------------------------------------------------------------
|
||||
|
||||
class ClkInput(Special):
|
||||
def __init__(self, i, o):
|
||||
Special.__init__(self)
|
||||
self.i = wrap(i)
|
||||
self.o = o if isinstance(o, str) else wrap(o)
|
||||
|
||||
def iter_expressions(self):
|
||||
yield self, "i", SPECIAL_INPUT
|
||||
yield self, "o", SPECIAL_OUTPUT
|
||||
|
||||
@staticmethod
|
||||
def lower(dr):
|
||||
raise NotImplementedError("Attempted to use a Clk Input, but platform does not support them")
|
||||
|
||||
|
||||
class ClkOutput(Special):
|
||||
def __init__(self, i, o):
|
||||
Special.__init__(self)
|
||||
self.i = i if isinstance(i, str) else wrap(i)
|
||||
self.o = wrap(o)
|
||||
|
||||
def iter_expressions(self):
|
||||
yield self, "i", SPECIAL_INPUT
|
||||
yield self, "o", SPECIAL_OUTPUT
|
||||
|
||||
@staticmethod
|
||||
def lower(dr):
|
||||
raise NotImplementedError("Attempted to use a Clk Output, but platform does not support them")
|
||||
|
||||
# SDR Input/Output ---------------------------------------------------------------------------------
|
||||
|
||||
class InferedSDRIO(Module):
|
||||
|
|
Loading…
Reference in New Issue