Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

clkfx: remove

  • Loading branch information...
commit cc5e4ae7103bf1bc697a0587e4027b5ebc248a7e 1 parent 204452b
Sébastien Bourdeauducq sbourdeauducq authored
Showing with 0 additions and 38 deletions.
  1. +0 −38 milkymist/clkfx/__init__.py
38 milkymist/clkfx/__init__.py
View
@@ -1,38 +0,0 @@
-from fractions import Fraction
-
-from migen.fhdl.structure import *
-
-class ClkFX:
- def __init__(self, infreq, outfreq):
- self.clkin = Signal()
- self.clkout = Signal()
-
- ratio = Fraction(outfreq)/Fraction(infreq)
- appr = ratio.limit_denominator(32)
- m = appr.numerator
- if m < 2 or m > 32:
- raise OverflowError
- d = appr.denominator
-
- in_period = float(Fraction(1000000000)/Fraction(infreq))
-
- self._inst = Instance("DCM_SP",
- [("CLKFX", self.clkout)],
- [("CLKIN", self.clkin),
- ("PSEN", BV(1)),
- ("RST", BV(1))],
- [("CLKDV_DIVIDE", 2.0),
- ("CLKFX_DIVIDE", d),
- ("CLKFX_MULTIPLY", m),
- ("CLKIN_DIVIDE_BY_2", "FALSE"),
- ("CLKIN_PERIOD", in_period),
- ("CLKOUT_PHASE_SHIFT", "NONE"),
- ("CLK_FEEDBACK", "NONE"),
- ("DESKEW_ADJUST", "SYSTEM_SYNCHRONOUS"),
- ("DUTY_CYCLE_CORRECTION", "TRUE"),
- ("PHASE_SHIFT", 0),
- ("STARTUP_WAIT", "TRUE")]
- )
-
- def get_fragment(self):
- return Fragment([self._inst.ins["PSEN"].eq(0), self._inst.ins["RST"].eq(0)], instances=[self._inst])
Please sign in to comment.
Something went wrong with that request. Please try again.