From f6e20700d443d5b450b5b4f97e3e3b980e1d1ca5 Mon Sep 17 00:00:00 2001 From: Pepijn de Vos Date: Sat, 1 Aug 2020 11:05:09 +0200 Subject: [PATCH] add openFPGAloader programmer --- litex/build/openfpgaloader.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 litex/build/openfpgaloader.py diff --git a/litex/build/openfpgaloader.py b/litex/build/openfpgaloader.py new file mode 100644 index 00000000..15a36b7c --- /dev/null +++ b/litex/build/openfpgaloader.py @@ -0,0 +1,20 @@ +# This file is Copyright (c) 2020 Florent Kermarrec +# License: BSD + +import subprocess + +from litex.build.tools import write_to_file +from litex.build.generic_programmer import GenericProgrammer + +# openFPGAloader ------------------------------------------------------------------------------------------ + +class OpenFPGALoader(GenericProgrammer): + needs_bitreverse = False + + def __init__(self, board): + self.board = board + + def load_bitstream(self, bitstream_file): + print(["openFPGALoader", "--board", self.board, bitstream_file]) + subprocess.call(["openFPGALoader", "--board", self.board, bitstream_file]) + print("done") -- 2.30.2