当文件(.jed)位于Raspberry Pi 3B +(Raspbian Lite)上并且Raspberry与CPLD设备之间的连接是通过JTAG HS3电缆连接时,如何编程CPLD设备(XC2C32A)? >
答案 0 :(得分:0)
为了在文件(.jed)位于Raspberry Pi 3B +(Raspbian Lite)上且Raspberry与CPLD设备之间的连接使用JTAG HS3电缆时对CPLD设备(XC2C32A)进行编程,该软件可以使用Adept 2。
以下是必需的:
现在可以执行以下python3脚本:
import subprocess
# Read if the JTAG-HS3 is there
result = subprocess.check_output(
("djtgcfg enum"),
stderr=subprocess.STDOUT, shell=True).decode('utf-8')
print(result)
# Initialize chain to detect device. The -d option is used to specify the device
result = subprocess.check_output(
("djtgcfg init -d JtagHs3"),
stderr=subprocess.STDOUT, shell=True).decode('utf-8')
print(result)
# Erase the Device
result = subprocess.check_output(
("djtgcfg erase -d JtagHs3 -i 0"),
stderr=subprocess.STDOUT, shell=True).decode('utf-8')
print(result)
# Programming the Device. The -i option is used to specify the chain index and -f to specify the .jed file.
result = subprocess.check_output(
("djtgcfg prog -d JtagHs3 -i 0 -f myfile.jed"),
stderr=subprocess.STDOUT, shell=True).decode('utf-8')
print(result)