class ECP5CRG(Elaboratable):
- def __init__(self, sys_clk_freq=100e6):
+ def __init__(self, sys_clk_freq=100e6, pod_bits=25):
self.sys_clk_freq = sys_clk_freq
+ self.pod_bits = pod_bits
def elaborate(self, platform):
m = Module()
m.submodules.pll = pll = PLL(ClockSignal("rawclk"), reset=~reset)
# Power-on delay (655us)
- podcnt = Signal(25, reset=-1)
+ podcnt = Signal(self.pod_bits, reset=-1)
pod_done = Signal()
with m.If((podcnt != 0) & pll.locked):
m.d.rawclk += podcnt.eq(podcnt-1)
firmware = "firmware/main.bin"
# set up clock request generator
+ pod_bits = 25
if fpga in ['versa_ecp5', 'versa_ecp5_85', 'isim', 'ulx3s']:
- self.crg = ECP5CRG(clk_freq)
+ if fpga == ['isim']:
+ pod_bits = 2
+ self.crg = ECP5CRG(clk_freq, pod_bits)
if fpga in ['arty_a7']:
self.crg = ArtyA7CRG(clk_freq)