Skip to content

Commit 055f7d5

Browse files
mithroenjoy-digital
authored andcommittedJul 2, 2015
mibuild/xilinx: Adding programming with the Digilent Adept tools
1 parent 7afa3d6 commit 055f7d5

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed
 

Diff for: ‎mibuild/xilinx/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
from mibuild.xilinx.platform import XilinxPlatform
2-
from mibuild.xilinx.programmer import UrJTAG, XC3SProg, FpgaProg, VivadoProgrammer, iMPACT
2+
from mibuild.xilinx.programmer import UrJTAG, XC3SProg, FpgaProg, VivadoProgrammer, iMPACT, Adept

Diff for: ‎mibuild/xilinx/programmer.py

+27
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,30 @@ def flash(self, address, data_file):
150150
quit
151151
""".format(data=data_file)
152152
_run_vivado(self.vivado_path, self.vivado_ver, cmds)
153+
154+
155+
class Adept(GenericProgrammer):
156+
"""Using the Adept tool with an onboard Digilent "USB JTAG" cable.
157+
158+
You need to install Adept Utilities V2 from
159+
http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,66,828&Prod=ADEPT2
160+
"""
161+
162+
needs_bitreverse = False
163+
164+
def __init__(self, board, index, flash_proxy_basename=None):
165+
GenericProgrammer.__init__(self, flash_proxy_basename)
166+
self.board = board
167+
self.index = index
168+
169+
def load_bitstream(self, bitstream_file):
170+
subprocess.call([
171+
"djtgcfg",
172+
"--verbose",
173+
"prog", "-d", self.board,
174+
"-i", str(self.index),
175+
"-f", bitstream_file,
176+
])
177+
178+
def flash(self, address, data_file):
179+
raise ValueError("Flashing unsupported with DigilentAdept tools")

0 commit comments

Comments
 (0)
Please sign in to comment.