Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/358.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Raspberry pi 使用Raspberry Pi和JTAG HS3电缆编程CPLD_Raspberry Pi_Raspberry Pi3_Jtag - Fatal编程技术网

Raspberry pi 使用Raspberry Pi和JTAG HS3电缆编程CPLD

Raspberry pi 使用Raspberry Pi和JTAG HS3电缆编程CPLD,raspberry-pi,raspberry-pi3,jtag,Raspberry Pi,Raspberry Pi3,Jtag,当文件(.jed)位于Raspberry Pi 3B+(Raspbian Lite)上并且Raspberry和CPLD设备之间的连接使用JTAG HS3电缆时,如何对CPLD设备(XC2C32A)进行编程?以便在文件(.jed)位于Raspberry Pi 3B+(Raspbian Lite)上时对CPLD设备(XC2C32A)进行编程Raspberry和CPLD设备之间的连接采用JTAG HS3电缆,可以使用软件Adept 2 以下是必要的: 双绞线JTAG-HS3电缆 raspberry需

当文件(.jed)位于Raspberry Pi 3B+(Raspbian Lite)上并且Raspberry和CPLD设备之间的连接使用JTAG HS3电缆时,如何对CPLD设备(XC2C32A)进行编程?

以便在文件(.jed)位于Raspberry Pi 3B+(Raspbian Lite)上时对CPLD设备(XC2C32A)进行编程Raspberry和CPLD设备之间的连接采用JTAG HS3电缆,可以使用软件Adept 2

以下是必要的:

  • 双绞线JTAG-HS3电缆
  • raspberry需要安装Adept 2运行时和实用程序(ARM-raspberry Pi)。更多信息请参见下文
  • 使用JTAG电缆将设备连接到Raspberry pi
现在可以执行以下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)