Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

clkfx: remove

  • Loading branch information...
commit cc5e4ae7103bf1bc697a0587e4027b5ebc248a7e 1 parent 204452b
Sébastien Bourdeauducq authored February 16, 2012

Showing 1 changed file with 0 additions and 38 deletions. Show diff stats Hide diff stats

  1. 38  milkymist/clkfx/__init__.py
38  milkymist/clkfx/__init__.py
... ...
@@ -1,38 +0,0 @@
1  
-from fractions import Fraction
2  
-
3  
-from migen.fhdl.structure import *
4  
-
5  
-class ClkFX:
6  
-	def __init__(self, infreq, outfreq):
7  
-		self.clkin = Signal()
8  
-		self.clkout = Signal()
9  
-		
10  
-		ratio = Fraction(outfreq)/Fraction(infreq)
11  
-		appr = ratio.limit_denominator(32)
12  
-		m = appr.numerator
13  
-		if m < 2 or m > 32:
14  
-			raise OverflowError
15  
-		d = appr.denominator
16  
-		
17  
-		in_period = float(Fraction(1000000000)/Fraction(infreq))
18  
-		
19  
-		self._inst = Instance("DCM_SP",
20  
-			[("CLKFX", self.clkout)],
21  
-			[("CLKIN", self.clkin),
22  
-			("PSEN", BV(1)),
23  
-			("RST", BV(1))],
24  
-			[("CLKDV_DIVIDE", 2.0),
25  
-			("CLKFX_DIVIDE", d),
26  
-			("CLKFX_MULTIPLY", m),
27  
-			("CLKIN_DIVIDE_BY_2", "FALSE"),
28  
-			("CLKIN_PERIOD", in_period),
29  
-			("CLKOUT_PHASE_SHIFT", "NONE"),
30  
-			("CLK_FEEDBACK", "NONE"),
31  
-			("DESKEW_ADJUST", "SYSTEM_SYNCHRONOUS"),
32  
-			("DUTY_CYCLE_CORRECTION", "TRUE"),
33  
-			("PHASE_SHIFT", 0),
34  
-			("STARTUP_WAIT", "TRUE")]
35  
-		)
36  
-
37  
-	def get_fragment(self):
38  
-		return Fragment([self._inst.ins["PSEN"].eq(0), self._inst.ins["RST"].eq(0)], instances=[self._inst])

0 notes on commit cc5e4ae

Please sign in to comment.
Something went wrong with that request. Please try again.