Files
-
hardware / ButterStick_r0.1 / ButterStick.kicad_pcb
-
hardware / ButterStick_r0.1 / ButterStick.sch
-
hardware / ButterStick_r0.1 / fileEthernet.sch
-
hardware / ButterStick_r0.1 / fileFPGA.sch
-
hardware / ButterStick_r0.1 / fileHyperRAM.sch
-
hardware / ButterStick_r0.1 / fileIO.sch
-
hardware / ButterStick_r0.1 / filePower.sch
-
hardware / ButterStick_r0.1 / fileSDMMC.sch
-
hardware / ButterStick_r0.1 / SmartVIO.sch
-
hardware / ButterStick_r0.1 / SYZYGY_PORT0.sch
-
hardware / ButterStick_r0.1 / SYZYGY_PORT1.sch
-
hardware / ButterStick_r0.1 / SYZYGY_PORT2.sch
-
hardware / ButterStick_r0.1 / SyzygyStandard.sch
-
hardware / ButterStick_r0.2 / ButterStick.kicad_pcb
-
hardware / ButterStick_r0.2 / ButterStick.sch
-
hardware / ButterStick_r0.2 / fileEthernet.sch
-
hardware / ButterStick_r0.2 / fileFPGA.sch
-
hardware / ButterStick_r0.2 / fileHyperRAM.sch
-
hardware / ButterStick_r0.2 / fileIO.sch
-
hardware / ButterStick_r0.2 / filePower.sch
-
hardware / ButterStick_r0.2 / fileSDMMC.sch
-
hardware / ButterStick_r0.2 / PCBSpecs.sch
-
hardware / ButterStick_r0.2 / SmartVIO.sch
-
hardware / ButterStick_r0.2 / SYZYGY_PORT0.sch
-
hardware / ButterStick_r0.2 / SYZYGY_PORT1.sch
-
hardware / ButterStick_r0.2 / SYZYGY_PORT2.sch
-
hardware / ButterStick_r0.2 / SyzygyStandard.sch
-
hardware / ButterStick_r0.2 / TestPonts.sch
Last update 5 years 7 months
by
Greg Davill
FilesgatewareGigEplatform | |
---|---|
.. | |
__init__.py | |
pll.py | |
programmer.py |
pll.py#!/usr/bin/env python3 import os from migen.genlib.resetsync import AsyncResetSynchronizer from migen import * class pll(Module): def __init__(self, platform): ref_clk = platform.request("clk_in") self.clock_domains.cd_clk50 = ClockDomain() #self.clock_domains.cd_clk25_90 = ClockDomain() self.clock_domains.cd_clk125 = ClockDomain() self.clock_domains.cd_clk125_90 = ClockDomain() self.clock_domains.cd_por = ClockDomain() clk_0_125 = Signal() clk_1_125_90 = Signal() clk_2_25 = Signal() clk_lock = Signal() self.specials += [ Instance("pll_test", i_CLKI=ref_clk, o_CLKOP=clk_0_125, o_CLKOS=clk_1_125_90, o_CLKOS2=clk_2_25, #o_CLKOS3=clk_3_125_90, o_LOCK=clk_lock, ), ] reset_delay = Signal(12, reset=2048) self.comb += [ self.cd_clk50.clk.eq(clk_2_25), self.cd_clk125.clk.eq(clk_0_125), self.cd_clk125_90.clk.eq(clk_1_125_90), self.cd_clk50.rst.eq(reset_delay != 0), self.cd_clk125.rst.eq(reset_delay != 0), self.cd_clk125_90.rst.eq(reset_delay != 0), ] self.comb += [ self.cd_por.clk.eq(clk_2_25) ] self.sync.por += \ If((reset_delay != 0) & (clk_lock != 0), reset_delay.eq(reset_delay - 1) ) vdir = os.path.join(os.path.abspath(os.path.dirname(__file__)), "verilog") platform.add_source(os.path.join(vdir, "pll.v"))