add openFPGAloader programmer
authorPepijn de Vos <pepijndevos@gmail.com>
Sat, 1 Aug 2020 09:05:09 +0000 (11:05 +0200)
committerPepijn de Vos <pepijndevos@gmail.com>
Sat, 1 Aug 2020 09:05:09 +0000 (11:05 +0200)
litex/build/openfpgaloader.py [new file with mode: 0644]

diff --git a/litex/build/openfpgaloader.py b/litex/build/openfpgaloader.py
new file mode 100644 (file)
index 0000000..15a36b7
--- /dev/null
@@ -0,0 +1,20 @@
+# This file is Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr>
+# 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")