targets/ulx3s: use AsyncResetSynchronizer and derivate sys_clk/sys_clk_ps constraints from clk25

Now supported by Trellis/Nextpnr.
This commit is contained in:
Florent Kermarrec 2019-03-04 09:27:31 +01:00
parent 5ef28bdf75
commit e6f97e08d2
1 changed files with 2 additions and 5 deletions

View File

@ -26,6 +26,7 @@ class _CRG(Module):
# clk / rst # clk / rst
clk25 = platform.request("clk25") clk25 = platform.request("clk25")
rst = platform.request("rst") rst = platform.request("rst")
platform.add_period_constraint(clk25, 40.0)
# pll # pll
self.submodules.pll = pll = ECP5PLL() self.submodules.pll = pll = ECP5PLL()
@ -33,11 +34,7 @@ class _CRG(Module):
pll.register_clkin(clk25, 25e6) pll.register_clkin(clk25, 25e6)
pll.create_clkout(self.cd_sys, 50e6, phase=11) pll.create_clkout(self.cd_sys, 50e6, phase=11)
pll.create_clkout(self.cd_sys_ps, 50e6, phase=20) pll.create_clkout(self.cd_sys_ps, 50e6, phase=20)
# FIXME: AsyncResetSynchronizer needs FD1S3BX support. self.specials += AsyncResetSynchronizer(self.cd_sys, rst)
#self.specials += AsyncResetSynchronizer(self.cd_sys, rst)
self.comb += self.cd_sys.rst.eq(rst)
platform.add_period_constraint(self.cd_sys.clk, 20.0)
platform.add_period_constraint(self.cd_sys_ps.clk, 20.0)
# sdram clock # sdram clock
self.comb += platform.request("sdram_clock").eq(self.cd_sys_ps.clk) self.comb += platform.request("sdram_clock").eq(self.cd_sys_ps.clk)