From: David Lattimore Date: Mon, 2 Nov 2020 06:19:47 +0000 (+1100) Subject: vendor.lattice_ice40: zero-pad CLKHF_DIV in SB_HFOSC instance. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=781a3aa76776532657d79ea195a1ac28f18b23d6;p=nmigen.git vendor.lattice_ice40: zero-pad CLKHF_DIV in SB_HFOSC instance. Fixes #520. --- diff --git a/nmigen/vendor/lattice_ice40.py b/nmigen/vendor/lattice_ice40.py index 14026fa..d5e4dd6 100644 --- a/nmigen/vendor/lattice_ice40.py +++ b/nmigen/vendor/lattice_ice40.py @@ -379,7 +379,7 @@ class LatticeICE40Platform(TemplatedPlatform): m.submodules += Instance("SB_HFOSC", i_CLKHFEN=1, i_CLKHFPU=1, - p_CLKHF_DIV="0b{0:b}".format(self.hfosc_div), + p_CLKHF_DIV="0b{0:02b}".format(self.hfosc_div), o_CLKHF=clk_i) delay = int(100e-6 * self.default_clk_frequency) # Internal low-speed clock: 10 KHz.