This guide was developed with revC1 hardware.


Get Toolchain

# see:

read os <<< "linux"
read arch < <( uname -m )

read url < <(
  curl -L "" \
    | jq -r \
      --arg os "${os}" \
      --arg arch "${arch}" \
          | select(.name | contains($os + "_" + $arch))
          | select(.name | endswith(".tar.gz"))
          | .browser_download_url

curl -LO "${url}"
tar -xvf "${url##*/}"

export PATH="$(readlink -f ./fpga-toolchain/bin/):${PATH}"

yosys -V
nextpnr-ecp5 -V

udev Rules


You only need to copy 99-cypress.rules if you plan to work with brand new boards, or use the glasgow factory subcommand.

sudo cp -t /etc/udev/rules.d/ ./config/99-cypress.rules ./config/99-glasgow.rules
udevadm control --reload-rules

Virtual Environment

python3 -m venv venv
. venv/bin/activate

Build and Install Glasgow


Allowing nMigen to be installed automatically (as a dependancy) will cause a version conflict on pyvcd... to resolve this, just install nMigen explicitly first

cd ./software/
python3 sdist

pip install nmigen
pip install ./dist/glasgow-*.tar.gz

Factory Setup


The revC1 design currently does not work correctly with pins-int, pins-ext or pins-pull, leading to many false-positives.

glasgow factory --rev C1
glasgow flash

# power cycle the board, or unplug/plug it

# disconnect all pins
glasgow run selftest loopback

# connect A[0:7] -> B[0:7]
glasgow run selftest pins-loop

# connect AV -> AS, BV -> BS
glasgow run selftest voltage


Step 1 (loopback)


Step 2 (pins-loop)


Step 3 (voltage)


Serial Number

The serial number is assigned by glasgow factory, and consists of the board revision and timestamp. For example: C1-20200923T174926Z.


The serial number is not present until the glasgow utility has interacted with the board for the first time. If you see a zero-length serial number, then try running something innocuous like glasgow run selftest loopback.

The serial number can be passed to glasgow using the --serial flag to select a specific board that may be attached to the system.

Running glasgow list will report a list of all boards attached to the system.