Skip to content

j-marjanovic/jtag-quartus-ft232h

Repository files navigation

JTAG library for FT232H on Pikes Peak / Storey Peak FPGA Boards

This driver allows using the on-board FT232 chip as a JTAG interface in Quartus for the Pikes Peak and Storey Peak FPGA accelerator boards.

Installation

Install pre-reqs:

# On Debian/Ubuntu hosts
sudo apt-get install -y libtool pkg-config texinfo libusb-dev libusb-1.0.0-dev libftdi-dev autoconf libjim-dev git wget build-essential cmake openocd

Build:

git clone https://github.com/j-marjanovic/jtag-quartus-ft232h
cd jtag-quartus-ft232h
mkdir build && cd build
cmake ..
make -j`nproc`

To install, copy libjtag_hw_otma.so to your quartus linux64 directory (eg. $HOME/altera/15.0/quartus/linux64).

To avoid permission errors, create an UDev rule allowing permission to the plugdev group and add your user to this group.

cat << EOF | sudo tee /etc/udev/rules.d/100-usb-ftdi.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", OWNER="root", GROUP="plugdev", TAG+="uaccess"
EOF

Add your user to plugdev group with sudo adduser $USER plugdev

Initialization

Before using this driver, run OpenOCD to initialize the FT232H:

openocd \
    -f interface/ftdi/um232h.cfg \
    -c "adapter speed 2000; transport select jtag; jtag newtap auto0 tap -irlen 10 -expected-id 0x029070dd; init; exit;"

To initialize the interface at different clock speeds, change the adapter_khz parameter.

OpenOCD prebuilt binaries can be downloaded from https://github.com/xpack-dev-tools/openocd-xpack/releases.

Current state

  • JTAG scan chain and programming of the FPGA works (see the screenshot below)
  • Initialization of the MPSSE is not implemented --> run OpenOCD once to init the device
  • Smaller improvements also pending

Download time

The following table present the bitstream download time at different clock speeds for 5SGSMD5 with the bitstream size of 213,798,880 bits (cca 26 MB).

Clock rate [MHz] Download time [mm:ss]
2 03:51
4 02:50
6 02:24
10 02:03
20 01:54

Usage example

Result after programming the bitstream:

Quartus Programmer

Useful links

Dummy device

To install the library:

sudo ln -sf $(readlink -f libjtag_hw_dummy.so) /opt/intelFPGA/19.1/quartus/linux64/

To listen do the debug log:

nc -lkuU /var/tmp/jtag-dummy.sock

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages