litex/jtag.py

15 lines
322 B
Python
Raw Normal View History

2013-07-04 13:19:39 -04:00
import subprocess
def load(bitstream):
cmds = """cable milkymist
detect
pld load {bitstream}
quit
""".format(bitstream=bitstream)
process = subprocess.Popen("jtag", stdin=subprocess.PIPE)
process.stdin.write(cmds.encode("ASCII"))
process.communicate()
def flash(bitstream):
subprocess.call(["m1nor-ng", bitstream])