mibuild/xilinx: Adding programming with the Digilent Adept tools

This commit is contained in:
Tim 'mithro' Ansell 2015-07-02 16:03:44 +02:00 committed by Florent Kermarrec
parent 7afa3d61d9
commit 055f7d51fc
2 changed files with 28 additions and 1 deletions

View File

@ -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

View File

@ -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")