support for bitstream loading on Papilio Pro
This commit is contained in:
parent
08b09fb02a
commit
07d4cc70db
12
jtag.py
12
jtag.py
|
@ -1,11 +1,17 @@
|
|||
import subprocess
|
||||
|
||||
def load(bitstream):
|
||||
cmds = """cable milkymist
|
||||
cables = {
|
||||
"mixxeo": "milkymist",
|
||||
"m1": "milkymist",
|
||||
"papilio_pro": "Flyswatter"
|
||||
}
|
||||
|
||||
def load(platform_name, bitstream):
|
||||
cmds = """cable {cable}
|
||||
detect
|
||||
pld load {bitstream}
|
||||
quit
|
||||
""".format(bitstream=bitstream)
|
||||
""".format(cable=cables[platform_name], bitstream=bitstream)
|
||||
process = subprocess.Popen("jtag", stdin=subprocess.PIPE)
|
||||
process.stdin.write(cmds.encode("ASCII"))
|
||||
process.communicate()
|
||||
|
|
Loading…
Reference in New Issue