Skip to content

Commit 340014d

Browse files
committedMar 26, 2015
targets: revert use of integers in clocks/timings
1 parent 9137b91 commit 340014d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed
 

‎targets/minispartan6.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def __init__(self, platform, clk_freq):
1515
self.clock_domains.cd_sys = ClockDomain()
1616
self.clock_domains.cd_sys_ps = ClockDomain()
1717

18-
f0 = 32*1e6
18+
f0 = 32*1000000
1919
clk32 = platform.request("clk32")
2020
clk32a = Signal()
2121
self.specials += Instance("IBUFG", i_I=clk32, o_O=clk32a)
@@ -35,7 +35,7 @@ def __init__(self, platform, clk_freq):
3535
i_DADDR=0, i_DCLK=0, i_DEN=0, i_DI=0, i_DWE=0, i_RST=0, i_REL=0,
3636
p_DIVCLK_DIVIDE=1, p_CLKFBOUT_MULT=m*p//n, p_CLKFBOUT_PHASE=0.,
3737
i_CLKIN1=clk32b, i_CLKIN2=0, i_CLKINSEL=1,
38-
p_CLKIN1_PERIOD=1e9/f0, p_CLKIN2_PERIOD=0.,
38+
p_CLKIN1_PERIOD=1000000000/f0, p_CLKIN2_PERIOD=0.,
3939
i_CLKFBIN=pll_fb, o_CLKFBOUT=pll_fb, o_LOCKED=pll_lckd,
4040
o_CLKOUT0=pll[0], p_CLKOUT0_DUTY_CYCLE=.5,
4141
o_CLKOUT1=pll[1], p_CLKOUT1_DUTY_CYCLE=.5,
@@ -64,7 +64,7 @@ class BaseSoC(SDRAMSoC):
6464
default_platform = "minispartan6"
6565

6666
def __init__(self, platform, sdram_controller_settings=LASMIconSettings(), **kwargs):
67-
clk_freq = 80*1e6
67+
clk_freq = 80*1000000
6868
SDRAMSoC.__init__(self, platform, clk_freq,
6969
with_integrated_rom=True,
7070
sdram_controller_settings=sdram_controller_settings,

‎targets/pipistrello.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self, platform, clk_freq):
2020
self.clk4x_wr_strb = Signal()
2121
self.clk4x_rd_strb = Signal()
2222

23-
f0 = 50*1e6
23+
f0 = 50*1000000
2424
clk50 = platform.request("clk50")
2525
clk50a = Signal()
2626
self.specials += Instance("IBUFG", i_I=clk50, o_O=clk50a)
@@ -41,7 +41,7 @@ def __init__(self, platform, clk_freq):
4141
i_DADDR=0, i_DCLK=0, i_DEN=0, i_DI=0, i_DWE=0, i_RST=0, i_REL=0,
4242
p_DIVCLK_DIVIDE=1, p_CLKFBOUT_MULT=m*p//n, p_CLKFBOUT_PHASE=0.,
4343
i_CLKIN1=clk50b, i_CLKIN2=0, i_CLKINSEL=1,
44-
p_CLKIN1_PERIOD=1e9/f0, p_CLKIN2_PERIOD=0.,
44+
p_CLKIN1_PERIOD=1000000000/f0, p_CLKIN2_PERIOD=0.,
4545
i_CLKFBIN=pll_fb, o_CLKFBOUT=pll_fb, o_LOCKED=pll_lckd,
4646
o_CLKOUT0=pll[0], p_CLKOUT0_DUTY_CYCLE=.5,
4747
o_CLKOUT1=pll[1], p_CLKOUT1_DUTY_CYCLE=.5,
@@ -91,7 +91,7 @@ class BaseSoC(SDRAMSoC):
9191
csr_map.update(SDRAMSoC.csr_map)
9292

9393
def __init__(self, platform, sdram_controller_settings=LASMIconSettings(), **kwargs):
94-
clk_freq = 75*1e6
94+
clk_freq = 75*1000000
9595
if not kwargs.get("with_integrated_rom"):
9696
kwargs["rom_size"] = 0x1000000 # 128 Mb
9797
SDRAMSoC.__init__(self, platform, clk_freq,

‎targets/ppro.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def __init__(self, platform, clk_freq):
1515
self.clock_domains.cd_sys = ClockDomain()
1616
self.clock_domains.cd_sys_ps = ClockDomain()
1717

18-
f0 = 32*1e6
18+
f0 = 32*1000000
1919
clk32 = platform.request("clk32")
2020
clk32a = Signal()
2121
self.specials += Instance("IBUFG", i_I=clk32, o_O=clk32a)
@@ -35,7 +35,7 @@ def __init__(self, platform, clk_freq):
3535
i_DADDR=0, i_DCLK=0, i_DEN=0, i_DI=0, i_DWE=0, i_RST=0, i_REL=0,
3636
p_DIVCLK_DIVIDE=1, p_CLKFBOUT_MULT=m*p//n, p_CLKFBOUT_PHASE=0.,
3737
i_CLKIN1=clk32b, i_CLKIN2=0, i_CLKINSEL=1,
38-
p_CLKIN1_PERIOD=1e9/f0, p_CLKIN2_PERIOD=0.,
38+
p_CLKIN1_PERIOD=1000000000/f0, p_CLKIN2_PERIOD=0.,
3939
i_CLKFBIN=pll_fb, o_CLKFBOUT=pll_fb, o_LOCKED=pll_lckd,
4040
o_CLKOUT0=pll[0], p_CLKOUT0_DUTY_CYCLE=.5,
4141
o_CLKOUT1=pll[1], p_CLKOUT1_DUTY_CYCLE=.5,
@@ -69,7 +69,7 @@ class BaseSoC(SDRAMSoC):
6969
csr_map.update(SDRAMSoC.csr_map)
7070

7171
def __init__(self, platform, sdram_controller_settings=LASMIconSettings(), **kwargs):
72-
clk_freq = 80*1e6
72+
clk_freq = 80*1000000
7373
SDRAMSoC.__init__(self, platform, clk_freq,
7474
cpu_reset_address=0x60000,
7575
sdram_controller_settings=sdram_controller_settings,

0 commit comments

Comments
 (0)
Please sign in to comment.