Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6bcdbff

Browse files
committed
Fixes for new LiteX version
1 parent e402894 commit 6bcdbff

File tree

2 files changed

+8
-24
lines changed

2 files changed

+8
-24
lines changed

LiteX/ULX3S.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ improvements as compared to the original LiteX design (see
1616
[boards/radiona_ulx3s_ex.py](boards/radiona_ulx3s_ex.py)), that is:
1717
- circuitry to switch ESP32 on and off, and route the SDCard to the
1818
ESP32 or the FPGA. It makes it possible to upload files to the
19-
SDCard through Wifi while still using the FPGA.
19+
SDCard through Wifi while still using the FPGA. (NOTE: DEACTIVATED
20+
FOR NOW, NEEDS TO BE ADAPTED TO NEW LITEX)
2021
- fixed a video timing problem
2122
- added a crude Blitter to accelerate some graphic functions (clear, fillrect, fillpoly)
2223

LiteX/boards/radiona_ulx3s_ex.py

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,6 @@
2020
from litex_boards.targets import radiona_ulx3s
2121
from litex.gen import *
2222

23-
#--------------------------------------------------------------------------------------------------------
24-
25-
# Add wifi_en pin to ULX3S platform (to activate / deactivate ESP32)
26-
# Quick-and-dirty hack: replace Platform constructor and add the missing pin
27-
# --> Not needed anymore, it is there (called "wifi_gpio0")
28-
#
29-
#def new_platform_init(self, device="LFE5U-45F", revision="2.0", toolchain="trellis", **kwargs):
30-
# assert device in ["LFE5U-12F", "LFE5U-25F", "LFE5U-45F", "LFE5U-85F"]
31-
# assert revision in ["1.7", "2.0"]
32-
# _io = ulx3s_platform._io_common + \
33-
# {"1.7": ulx3s_platform._io_1_7, "2.0": ulx3s_platform._io_2_0}[revision] + \
34-
# [("wifi_en", 0, Pins("F1"), IOStandard("LVCMOS33"), Misc("PULLMODE=UP"), Misc("DRIVE=4"))]
35-
# LatticePlatform.__init__(self, device + "-6BG381C", _io, toolchain=toolchain, **kwargs)
36-
#
37-
#ulx3s_platform.Platform.__init__ = new_platform_init
38-
39-
4023
#--------------------------------------------------------------------------------------------------------
4124

4225
from litex.build.lattice.trellis import trellis_args, trellis_argdict
@@ -84,8 +67,7 @@ def add_blitter(self):
8467
def add_ESP32(self):
8568
self.esp32 = ESP32(self.platform)
8669
self.submodules.esp32 = self.esp32
87-
if hasattr(self,'spisdcard_tristate'):
88-
self.comb += self.spisdcard_tristate.eq(self.esp32._enable.storage)
70+
self.comb += self.get_module('spisdcard').tristate.eq(self.esp32._enable.storage)
8971

9072
# Build -------------------------------------------------------------------------------------------------
9173

@@ -122,14 +104,15 @@ def main():
122104
with_spi_flash = args.with_spi_flash,
123105
**soc_core_argdict(args))
124106

125-
soc.add_spi_sdcard(with_tristate=True)
126-
# soc.add_spi_sdcard()
107+
# soc.add_spi_sdcard(with_tristate=True) # For ESP32 control (commented out for now, see below)
108+
soc.add_spi_sdcard()
127109
if args.with_oled:
128110
soc.add_oled()
129111

130112
# add my own modules
131-
soc.add_blitter() # provides fast memory fill
132-
soc.add_ESP32() # esp32 on/off + spisdcard tristate control (access SDCard with ftp through wifi !)
113+
soc.add_blitter() # provides fast memory fill
114+
# soc.add_ESP32() # esp32 on/off + spisdcard tristate control (access SDCard with ftp through wifi !)
115+
# commented-out for now (there were changes in LiteX that I need to adapt to)
133116

134117
builder = Builder(soc, **builder_argdict(args))
135118
builder_kargs = trellis_argdict(args) if args.toolchain == "trellis" else {}

0 commit comments

Comments
 (0)