From 93bc2760fe37e10a72859b94b7c2b3cddd4b9a05 Mon Sep 17 00:00:00 2001 From: Andrew Dennison Date: Mon, 29 May 2023 14:37:12 +1000 Subject: [PATCH] build/openfpgaloader: support jtag index-chain * allows loading a FPGA that is not the only device in a JTAG scan chain --- litex/build/openfpgaloader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litex/build/openfpgaloader.py b/litex/build/openfpgaloader.py index 4ac59aa1e..d3ca7773f 100644 --- a/litex/build/openfpgaloader.py +++ b/litex/build/openfpgaloader.py @@ -12,7 +12,7 @@ from litex.build.generic_programmer import GenericProgrammer class OpenFPGALoader(GenericProgrammer): needs_bitreverse = False - def __init__(self, board="", cable="", freq=0): + def __init__(self, board="", cable="", freq=0, index_chain=None): self.cmd = ["openFPGALoader"] if board: self.cmd += ["--board", board] @@ -20,6 +20,8 @@ class OpenFPGALoader(GenericProgrammer): self.cmd += ["--cable", cable] if freq: self.cmd += ["--freq", str(int(float(freq)))] + if index_chain is not None: + self.cmd += ["--index-chain", str(int(index_chain))] def load_bitstream(self, bitstream_file): cmd = self.cmd + ["--bitstream", bitstream_file]