Skip to content

Commit

Permalink
targets/simple: use new generic DifferentialInput
Browse files Browse the repository at this point in the history
enjoy-digital committed Mar 12, 2015
1 parent f18ae9b commit 1b72b81
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions targets/simple.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from migen.fhdl.std import *
from migen.bus import wishbone
from migen.genlib.io import DifferentialInput

from misoclib.soc import SoC, mem_decoder
from misoclib.com.liteeth.phy import LiteEthPHY
@@ -29,12 +30,7 @@ def __init__(self, platform, **kwargs):
clk_in = platform.request(platform.default_clk_name)
clk_crg = Signal()
if hasattr(clk_in, "p"):
from mibuild.xilinx.vivado import XilinxVivadoPlatform
from mibuild.xilinx.ise import XilinxISEPlatform
if isinstance(platform, (XilinxISEPlatform, XilinxVivadoPlatform)):
self.specials += Instance("IBUFDS", i_I=clk_in.p, i_IB=clk_in.n, o_O=clk_crg)
else:
raise NotImplementedError
self.specials += DifferentialInput(clk_in.p, clk_in.n, clk_crg)
else:
self.comb += clk_crg.eq(clk_in)
self.submodules.crg = _CRG(clk_crg)

0 comments on commit 1b72b81

Please sign in to comment.