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
|
import subprocess
|
||||||
|
|
||||||
def load(bitstream):
|
cables = {
|
||||||
cmds = """cable milkymist
|
"mixxeo": "milkymist",
|
||||||
|
"m1": "milkymist",
|
||||||
|
"papilio_pro": "Flyswatter"
|
||||||
|
}
|
||||||
|
|
||||||
|
def load(platform_name, bitstream):
|
||||||
|
cmds = """cable {cable}
|
||||||
detect
|
detect
|
||||||
pld load {bitstream}
|
pld load {bitstream}
|
||||||
quit
|
quit
|
||||||
""".format(bitstream=bitstream)
|
""".format(cable=cables[platform_name], bitstream=bitstream)
|
||||||
process = subprocess.Popen("jtag", stdin=subprocess.PIPE)
|
process = subprocess.Popen("jtag", stdin=subprocess.PIPE)
|
||||||
process.stdin.write(cmds.encode("ASCII"))
|
process.stdin.write(cmds.encode("ASCII"))
|
||||||
process.communicate()
|
process.communicate()
|
||||||
|
|
2
make.py
2
make.py
|
@ -92,7 +92,7 @@ def main():
|
||||||
"build/" + build_name + ".fpg"])
|
"build/" + build_name + ".fpg"])
|
||||||
|
|
||||||
if args.load:
|
if args.load:
|
||||||
jtag.load("build/" + build_name + ".bit")
|
jtag.load(platform.name, "build/" + build_name + ".bit")
|
||||||
if args.flash:
|
if args.flash:
|
||||||
jtag.flash("build/" + build_name + ".fpg")
|
jtag.flash("build/" + build_name + ".fpg")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue