From 8404434956c4987d4730b7ba48c843a937194808 Mon Sep 17 00:00:00 2001 From: David Shah Date: Wed, 31 Oct 2018 12:27:05 +0000 Subject: [PATCH] Fix Trellis build; ULX3S demo boots to BIOS Signed-off-by: David Shah --- litex/boards/platforms/ulx3s.py | 4 +++- litex/boards/targets/ulx3s.py | 4 ++++ litex/build/lattice/prjtrellis.py | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/litex/boards/platforms/ulx3s.py b/litex/boards/platforms/ulx3s.py index e1ccaa31e..319596d29 100644 --- a/litex/boards/platforms/ulx3s.py +++ b/litex/boards/platforms/ulx3s.py @@ -36,6 +36,8 @@ _io = [ Subsignal("dm", Pins("U19 E20")), IOStandard("LVCMOS33") ), + + ("wifi_gpio0", 0, Pins("L2"), IOStandard("LVCMOS33")), ] @@ -44,4 +46,4 @@ class Platform(LatticePlatform): default_clk_period = 10 def __init__(self, **kwargs): - LatticePlatform.__init__(self, "LFE5U-85F-6BG381C", _io, **kwargs) + LatticePlatform.__init__(self, "LFE5U-45F-6BG381C", _io, **kwargs) diff --git a/litex/boards/targets/ulx3s.py b/litex/boards/targets/ulx3s.py index 1e1a30063..6d8a4e077 100755 --- a/litex/boards/targets/ulx3s.py +++ b/litex/boards/targets/ulx3s.py @@ -46,6 +46,10 @@ class _CRG(Module): sdram_ps_clk = new_sdram_ps_clk self.comb += self.cd_sys_ps.clk.eq(sdram_ps_clk) + # Stop ESP32 from resetting FPGA + wifi_gpio0 = platform.request("wifi_gpio0") + self.comb += wifi_gpio0.eq(1) + class BaseSoC(SoCSDRAM): def __init__(self, **kwargs): diff --git a/litex/build/lattice/prjtrellis.py b/litex/build/lattice/prjtrellis.py index e27ae1c6a..ec983505f 100644 --- a/litex/build/lattice/prjtrellis.py +++ b/litex/build/lattice/prjtrellis.py @@ -98,10 +98,11 @@ class LatticePrjTrellisToolchain: fragment = fragment.get_fragment() platform.finalize(fragment) - top_output = platform.get_verilog(fragment) + top_output = platform.get_verilog(fragment, name=build_name) named_sc, named_pc = platform.resolve_signals(top_output.ns) top_file = build_name + ".v" top_output.write(top_file) + platform.add_source(top_file) # generate constraints tools.write_to_file(build_name + ".lpf", _build_lpf(named_sc, named_pc))