vendor.lattice_ice40: zero-pad CLKHF_DIV in SB_HFOSC instance.

Fixes #520.
This commit is contained in:
David Lattimore 2020-11-02 17:19:47 +11:00 committed by GitHub
parent 8fe319f065
commit 781a3aa767
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.