mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
support for bitstream loading on Papilio Pro
This commit is contained in:
parent
08b09fb02a
commit
07d4cc70db
2 changed files with 10 additions and 4 deletions
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()
|
||||
|
|
2
make.py
2
make.py
|
@ -92,7 +92,7 @@ def main():
|
|||
"build/" + build_name + ".fpg"])
|
||||
|
||||
if args.load:
|
||||
jtag.load("build/" + build_name + ".bit")
|
||||
jtag.load(platform.name, "build/" + build_name + ".bit")
|
||||
if args.flash:
|
||||
jtag.flash("build/" + build_name + ".fpg")
|
||||
|
||||
|
|
Loading…
Reference in a new issue