import subprocess
from mibuild.generic_programmer import GenericProgrammer
+from mibuild.xilinx import common
def _run_urjtag(cmds):
with subprocess.Popen("jtag", stdin=subprocess.PIPE) as process:
subprocess.call(["fpgaprog", "-v", "-sa", "-r", "-b", flash_proxy,
"-f", data_file])
+def _source_vivado(vivado_path, ver=None):
+ if sys.platform == "win32" or sys.platform == "cygwin":
+ pass
+ else:
+ settings = common.settings(vivado_path, ver)
+ subprocess.call(["source", settings])
def _run_vivado(cmds):
with subprocess.Popen("vivado -mode tcl", stdin=subprocess.PIPE, shell=True) as process:
class VivadoProgrammer(GenericProgrammer):
needs_bitreverse = False
+ def __init__(self, vivado_path="/opt/Xilinx/Vivado"):
+ GenericProgrammer.__init__(self)
+ _source_vivado(vivado_path)
def load_bitstream(self, bitstream_file):
cmds = """open_hw