From: Tim 'mithro' Ansell Date: Thu, 2 Jul 2015 14:03:44 +0000 (+0200) Subject: mibuild/xilinx: Adding programming with the Digilent Adept tools X-Git-Tag: 24jan2021_ls180~2099^2~40^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=055f7d51fc587276954454db52a2b651c0db1adc;p=litex.git mibuild/xilinx: Adding programming with the Digilent Adept tools --- diff --git a/mibuild/xilinx/__init__.py b/mibuild/xilinx/__init__.py index af787b30..0594435c 100644 --- a/mibuild/xilinx/__init__.py +++ b/mibuild/xilinx/__init__.py @@ -1,2 +1,2 @@ from mibuild.xilinx.platform import XilinxPlatform -from mibuild.xilinx.programmer import UrJTAG, XC3SProg, FpgaProg, VivadoProgrammer, iMPACT +from mibuild.xilinx.programmer import UrJTAG, XC3SProg, FpgaProg, VivadoProgrammer, iMPACT, Adept diff --git a/mibuild/xilinx/programmer.py b/mibuild/xilinx/programmer.py index ac3d0cff..36667a93 100644 --- a/mibuild/xilinx/programmer.py +++ b/mibuild/xilinx/programmer.py @@ -150,3 +150,30 @@ endgroup quit """.format(data=data_file) _run_vivado(self.vivado_path, self.vivado_ver, cmds) + + +class Adept(GenericProgrammer): + """Using the Adept tool with an onboard Digilent "USB JTAG" cable. + + You need to install Adept Utilities V2 from + http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,66,828&Prod=ADEPT2 + """ + + needs_bitreverse = False + + def __init__(self, board, index, flash_proxy_basename=None): + GenericProgrammer.__init__(self, flash_proxy_basename) + self.board = board + self.index = index + + def load_bitstream(self, bitstream_file): + subprocess.call([ + "djtgcfg", + "--verbose", + "prog", "-d", self.board, + "-i", str(self.index), + "-f", bitstream_file, + ]) + + def flash(self, address, data_file): + raise ValueError("Flashing unsupported with DigilentAdept tools")