Для программирования устройства CPLD (XC2C32A), когда файл (.jed) находится на Raspberry Pi 3B + (Raspbian Lite) и соединение между Raspberry и устройством CPLD осуществляется с помощью кабеля JTAG HS3, программное обеспечение Адепт 2 может быть использован.
Необходимо следующее:
- Digilent JTAG-HS3 Кабель
- У малины должна быть установлена Adept 2 Runtime и Utilities (ARM - Raspberry Pi). Больше информации в следующей ссылке
- Подключите устройство к Raspberry pi с помощью кабеля JTAG
Теперь можно выполнить следующий скрипт на 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)