Skip to content

Commit 2b76c23

Browse files
author
whitequark
committedNov 20, 2016
altera.programmer: fix Windows-ism in load_bitstream.
To specify a particular programmer, one has to specify it as e.g. "USB-Blaster [USB-0]" on Windows (where 0 is its number on the system) or e.g. "USB-Blaster [2-1.2]" on Linux (where 2-1.2 is its USB path). The existing default therefore did not work on Linux. This commit fixes the default to pick the first USB-Blaster, and renames the argument to deliberately break old code that relies on this nonportable behavior.
1 parent c64f148 commit 2b76c23

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

Diff for: ‎migen/build/altera/programmer.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
class USBBlaster(GenericProgrammer):
77
needs_bitreverse = False
88

9-
def load_bitstream(self, bitstream_file, port=0):
10-
usb_port = "[USB-{}]".format(port)
9+
def load_bitstream(self, bitstream_file, cable_suffix=""):
1110
subprocess.call(["quartus_pgm", "-m", "jtag", "-c",
12-
"USB-Blaster{}".format(usb_port), "-o",
11+
"USB-Blaster{}".format(cable_suffix), "-o",
1312
"p;{}".format(bitstream_file)])

0 commit comments

Comments
 (0)
Please sign in to comment.