From 0ac0f9e75d850d76b8e57e36a99d12de2c7cbd5d Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 25 Oct 2021 12:49:48 +0200 Subject: [PATCH] efinix_xyloni_dev_kit: Switch to openFPGALoader to load bitstream. --- litex_boards/platforms/efinix_xyloni_dev_kit.py | 4 ++-- litex_boards/targets/efinix_xyloni_dev_kit.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/litex_boards/platforms/efinix_xyloni_dev_kit.py b/litex_boards/platforms/efinix_xyloni_dev_kit.py index fb7dd49..93b2979 100644 --- a/litex_boards/platforms/efinix_xyloni_dev_kit.py +++ b/litex_boards/platforms/efinix_xyloni_dev_kit.py @@ -6,7 +6,7 @@ from litex.build.generic_platform import * from litex.build.efinix.platform import EfinixPlatform -from litex.build.efinix import EfinixProgrammer +from litex.build.openfpgaloader import OpenFPGALoader # IOs ---------------------------------------------------------------------------------------------- @@ -77,7 +77,7 @@ class Platform(EfinixPlatform): EfinixPlatform.__init__(self, "T8F81C2", _io, _connectors, toolchain="efinity") def create_programmer(self): - return EfinixProgrammer() + return OpenFPGALoader("xyloni_spi") def do_finalize(self, fragment): EfinixPlatform.do_finalize(self, fragment) diff --git a/litex_boards/targets/efinix_xyloni_dev_kit.py b/litex_boards/targets/efinix_xyloni_dev_kit.py index 6c8bd13..997564d 100755 --- a/litex_boards/targets/efinix_xyloni_dev_kit.py +++ b/litex_boards/targets/efinix_xyloni_dev_kit.py @@ -110,11 +110,10 @@ def main(): if args.load: prog = soc.platform.create_programmer() - prog.load_bitstream(os.path.join(builder.gateware_dir, f"outflow/{soc.build_name}.bit")) + prog.load_bitstream(os.path.join(builder.gateware_dir, f"outflow/{soc.build_name}.hex")) if args.flash: - from litex.build.openfpgaloader import OpenFPGALoader - prog = OpenFPGALoader("xyloni_spi") + prog = soc.platform.create_programmer() prog.flash(0, os.path.join(builder.gateware_dir, f"outflow/{soc.build_name}.hex")) prog.flash(args.bios_flash_offset, os.path.join(builder.software_dir, "bios/bios.bin"))