From 202b0e3e7d9446833613625412532e2f33716410 Mon Sep 17 00:00:00 2001 From: Ilia Sergachev Date: Sun, 7 Nov 2021 16:17:11 +0100 Subject: [PATCH] sqrl_acorn: add option to use vivado programmer --- litex_boards/platforms/sqrl_acorn.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/litex_boards/platforms/sqrl_acorn.py b/litex_boards/platforms/sqrl_acorn.py index 6df6311..3a9094f 100644 --- a/litex_boards/platforms/sqrl_acorn.py +++ b/litex_boards/platforms/sqrl_acorn.py @@ -12,7 +12,7 @@ # RHSResearchLLC that are documented at: https://github.com/RHSResearchLLC/NiteFury-and-LiteFury. from litex.build.generic_platform import * -from litex.build.xilinx import XilinxPlatform +from litex.build.xilinx import XilinxPlatform, VivadoProgrammer from litex.build.openocd import OpenOCD # IOs ---------------------------------------------------------------------------------------------- @@ -130,8 +130,12 @@ class Platform(XilinxPlatform): ["write_cfgmem -force -format bin -interface spix4 -size 16 " "-loadbit \"up 0x0 {build_name}.bit\" -file {build_name}.bin"] - def create_programmer(self): - return OpenOCD("openocd_xc7_ft232.cfg", "bscan_spi_xc7a200t.bit") + def create_programmer(self, name='openocd'): + if name == 'openocd': + return OpenOCD("openocd_xc7_ft232.cfg", "bscan_spi_xc7a200t.bit") + elif name == 'vivado': + # TODO: some board versions may have s25fl128s + return VivadoProgrammer(flash_part='s25fl256sxxxxxx0-spi-x1_x2_x4') def do_finalize(self, fragment): XilinxPlatform.do_finalize(self, fragment)