From: Florent Kermarrec Date: Mon, 20 Feb 2017 16:37:03 +0000 (+0100) Subject: build/xilinx/programmer: add target parameter to load_bitstream to select jtag programmer X-Git-Tag: 24jan2021_ls180~1883 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1cda83f11b1a975cba203971be61684e6770b281;p=litex.git build/xilinx/programmer: add target parameter to load_bitstream to select jtag programmer --- diff --git a/litex/build/xilinx/programmer.py b/litex/build/xilinx/programmer.py index b28ab94c..72d91ed9 100644 --- a/litex/build/xilinx/programmer.py +++ b/litex/build/xilinx/programmer.py @@ -92,10 +92,10 @@ class VivadoProgrammer(GenericProgrammer): self.vivado_ver = vivado_ver self.flash_part = flash_part - def load_bitstream(self, bitstream_file): + def load_bitstream(self, bitstream_file, target=""): cmds = """open_hw connect_hw_server -open_hw_target +open_hw_target {target} set_property PROBES.FILE {{}} [lindex [get_hw_devices] 0] set_property PROGRAM.FILE {{{bitstream}}} [lindex [get_hw_devices] 0] @@ -104,7 +104,7 @@ program_hw_devices [lindex [get_hw_devices] 0] refresh_hw_device [lindex [get_hw_devices] 0] quit -""".format(bitstream=bitstream_file) +""".format(target=target, bitstream=bitstream_file) _run_vivado(self.vivado_path, self.vivado_ver, cmds) # XXX works to flash bitstream, adapt it to flash bios