From f579cbc603ece30bf7969801f52f99465caced43 Mon Sep 17 00:00:00 2001 From: Michael Betz Date: Tue, 23 Apr 2019 09:16:42 +0200 Subject: [PATCH] build/xilinx/programmer: add position parameter to XC3SProg --- litex/build/xilinx/programmer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/litex/build/xilinx/programmer.py b/litex/build/xilinx/programmer.py index 4c60b091..c46c704f 100644 --- a/litex/build/xilinx/programmer.py +++ b/litex/build/xilinx/programmer.py @@ -45,12 +45,14 @@ flashmem "{address}" "{data_file}" noverify class XC3SProg(GenericProgrammer): needs_bitreverse = False - def __init__(self, cable, flash_proxy_basename=None): + def __init__(self, cable, flash_proxy_basename=None, p=0): + """ p = Use device at JTAG Chain position """ GenericProgrammer.__init__(self, flash_proxy_basename) self.cable = cable + self.p = str(p) def load_bitstream(self, bitstream_file): - subprocess.call(["xc3sprog", "-v", "-c", self.cable, bitstream_file]) + subprocess.call(["xc3sprog", "-v", "-c", self.cable, "-p", self.p, bitstream_file]) def flash(self, address, data_file): flash_proxy = self.find_flash_proxy() -- 2.30.2