tow3rs / jtag-mpsse-blaster

Use an MPSSE FTDI device as a JTAG interface in Quartus tools
GNU General Public License v3.0
14 stars 2 forks source link
blaster ft2232d ft2232h ft232h ft4232h jtag mpsse quartus

JTAG-MPSSE-Blaster
==================

This project allows to use an MPSSE capable FTDI device as a JTAG interface in Quartus tools.

Build and installation

Windows hosts

Linux hosts

Red Hat based distro

$ sudo yum groupinstall "Development tools"


- Build the `libjtag_hw_mpsse.so` using the provided Makefile and copy it to the Quartus install path.  
```console
$ make
$ sudo cp libjtag_hw_mpsse.so quartus_install_dir/quartus/linux64/

Code review

This library targets the FT232H device and has been tested with the Catapult Smartnics described in my other repo: catapult-v3-smartnic-re.

Several tests have been performed in Mint-21.2 / Fedora-38 / Windows 11-22H2, running Quartus 20.1 / 22.1, the following tools have been checked:

Support for other MPSSE devices such as the FT2232H, FT2232D or the FT4232H can easilly done by adding new entries in the validDevices array and creating the matching udev rules for them when used in Linux systems.

const ValidDevice validDevices[] =
{
    { .Type = FT_DEVICE_232H, .VID = 0x0403, .PID = 0x6014 },  // Single RS232-HS - (FT232H)
    { .Type = FT_DEVICE_2232H, .VID = 0x0403, .PID = 0x6012 }, // Dual RS232-HS - (FT2232H/FT2232D)
    { .Type = FT_DEVICE_4232H, .VID = 0x0403, .PID = 0x6011 }, // Quad RS232-HS - (FT4232H)
};

These are the default VID/PID values for FTDI devices when no EEPROM is attached to them. If the device has an EEPROM with custom VID/PID then it can be also added to this array.

JTAG test tool

This tool is a standalone executable and uses the library routines to perform a basic JTAG scan on all available interfaces, then prints the first device IDCode that has been found in the JTAG chain foreach interface.
The tool can be used to troubleshoot JTAG connectivity problems or easily debug the library code.

Device:         [JTAG-MPSSE-Blaster]

  Port:                 [00 Single RS232-HS (0403:6014)]
  Raw TDO bits:         11111111 11111111 10111011 00000110 00000111 0100000
  Raw TDO bytes:        FF FF DD 60 E0 02
  JTAG IDCode:          02E060DD

  Port:                 [01 Single RS232-HS (0403:6014)]
  Raw TDO bits:         11111111 11111111 10111011 00001110 00001001 0100000
  Raw TDO bytes:        FF FF DD 70 90 02
  JTAG IDCode:          029070DD

  Port:                 [02 Single RS232-HS (0403:6014)]
  Raw TDO bits:         11111111 11111111 10111011 00000110 00000111 0100000
  Raw TDO bytes:        FF FF DD 60 E0 02
  JTAG IDCode:          02E060DD

TODO List

Implement the ability to set a custom JTAG TCK frequency. For now the target TCK frequency is harcoded:

MPSSE-Blaster in action

Quartus Programmer

Quartus jtagconfig tool

External resources

Disclaimer

All trademarks mentioned in this project are the property of their respective owners.
This project has no commercial purpose.