Glasgow -- a polyglot appliance for communicating with digital interfaces


The Glasgow hardware can support many digital interfaces because it uses reconfigurable logic. Instead of only offering a small selection of standard hardware supported interfaces, it uses an FPGA to adapt on the fly to the task at hand without compromising on performance or reliability, even for unusual, custom or obsolete interfaces.

The Glasgow software is a set of building blocks designed to eliminate incidental complexity. Each interface is packaged into a self-contained applet that can be used directly from the command line, or reused as a part of a more complex system. Using Glasgow does not require any programming knowledge, although it becomes much more powerful if you know a bit of Python.


Glasgow is written entirely in Python 3. The interface logic that runs on the FPGA is described using Amaranth, which is a Python-based domain specific language. Using that, the logic on the FPGA will be assembled on demand, building upon the very reliable and fast open-source iCE40 FPGA toolchain.

Programmable USB conversations

Implementing reliable, high-performance USB communication is not trivial—packetization, buffering, and USB quirks add up. Glasgow abstracts away USB: on the FPGA, the applet gateware writes to or reads from a FIFO, and on the host, applet software writes to or reads from a socket-like interface. Idiomatic Python code can communicate at maximum USB 2 bulk bandwidth on a modern PC without additional effort. Moreover, when a future Glasgow revision will use Ethernet in addition to USB, no changes to applet code will be required.

Logic analyzer

Debugging new applets can be hard, especially if bidirectional buses are involved. Glasgow provides a built-in cycle-accurate logic analyzer that can relate the I/O pin level and direction changes to commands and responses received and sent by the applet. The logic analyzer compresses waveforms and can pause the applet if its buffer is about to overflow.

Wide-range of applications

Some of the tasks Glasgow can do well are:

  • communicate via UART,
    • automatically determine and follow the baud rate of device under test,
  • initiate transactions via SPI or I²C,
  • read and write 24-series I²C EEPROMs,
  • read and write 25-series SPI Flash memories,
    • determine memory parameters via SFDP,
  • read and write ONFI-compatible Flash memories,
    • determine memory parameters via ONFI parameter page,
  • read and write parallel 27/28/29-series EPROMs, EEPROMs and Flash memories,
    • determine the extent of floating gate charge decay and rescue data,
  • program and verify AVR microcontrollers with SPI interface,
  • automatically determine unknown JTAG pinout,
  • play back JTAG SVF files,
  • debug ARC processors via JTAG,
  • debug some MIPS processors via EJTAG,
  • program and verify XC9500XL CPLDs via JTAG,
  • communicate using nRF24L01(+) radios,
  • program nRF24LE1 and nRF24LU1(+) microcontrollers,
  • synthesize sound using a Yamaha OPLx/OPM chip and play it in real time on a webpage,
  • read raw modulated data from 5.25"/3.5" floppy drives,
  • … and more!