Documenting the Xilinx 7-series bit-stream format.
Clone or download
mcmasterg Merge pull request #166 from mcmasterg/rm_db_assert
fuzzers: remove db assert where possible
Latest commit c5c4a2d Oct 17, 2018
Failed to load latest commit information.
.github infra: Adding autolabeler configuration. Feb 28, 2018
database a7 expand roi w/ bram + dsp Oct 17, 2018
docs docs: tileconn, tilegrid Aug 29, 2018
experiments move to prjxray, class segmaker => Segmaker Oct 18, 2018
fuzzers fuzzers: remove db assert where possible Oct 18, 2018
gridinfo Reformat existing Python files with yapf Jan 9, 2018
htmlgen htmlgen: use newer tilegrid format, misc cleanup Oct 18, 2018
lib lib: xilinx: catch exceptions by reference Oct 18, 2018
minitests Add ROI annotations and update some missing tilegrid changes. Oct 6, 2018
prjxray fuzzers: remove db assert where possible Oct 18, 2018
third_party Import Dec 20, 2017
tools Move tools .py files to utils to be consistent Oct 17, 2018
utils move to prjxray, class segmaker => Segmaker Oct 18, 2018
vagrant Vagrant configuration for easy development setup Dec 24, 2017
.clang-format clang-format configuration Jan 9, 2018
.gcloudignore Google Cloud Builder configuration for database generation Feb 6, 2018
.gitignore Add target for a Python virtualenv. Oct 12, 2018
.gitmodules Import Dec 20, 2017
.style.yapf Use yapf instead of autopep8 for Python formatting Jan 9, 2018
.travis.yml Make ignored wires database specific and have travis be aware of python. Sep 27, 2018 Reformat existing Python files with yapf Jan 9, 2018
CMakeLists.txt cmake: Only add `-Wall and -Werror` for our code. Sep 27, 2018 Adding top level docs. Dec 20, 2017 Updated the contribution guidelines by running May 7, 2018
COPYING Adding top level docs. Dec 20, 2017
Dockerfile Force amd64 image for nginx Feb 27, 2018
Makefile Add target for a Python virtualenv. Oct 12, 2018 First commit of docs guide. May 7, 2018 Fixes some formatting in the guide to updating docs. May 7, 2018
cloudbuild.yaml Google Cloud Builder configuration for database generation Feb 6, 2018 Make download-latest-db use https by default. Dec 21, 2017
requirements.txt Adding timing fuzzer needs to requirements.txt Oct 15, 2018

Project X-Ray

Documenting the Xilinx 7-series bit-stream format.

This repository contains both tools and scripts which allow you to document the bit-stream format of Xilinx 7-series FPGAs.

More documentation can be found published on prjxray ReadTheDocs site - this includes;

Quickstart Guide

Install Vivado 2017.2 (2017.3 has a known compatibility issue, see Then source the settings script, ie

source /opt/Xilinx/Vivado/2017.2/

Pull submodules:

git submodule update --init --recursive

Get a head start by downloading current database:

# Give the argument;
# - https if you to use the https protocol (default)
# - git+ssh if you want to use git+ssh protocol
# - git if you want to use the git protocol

Install CMake and build the C++ tools:

sudo apt-get install cmake # version 3.5.0 or later required,
                           # for Ubuntu Trusty pkg is called cmake3
mkdir build
pushd build
cmake ..

Always make sure to set the environment for the device you are working on before running any other commands:

source database/artix7/

Creating HTML documentation:

cd htmlgen

(Re-)creating the database:

cd fuzzers
make -j$(nproc)

(Re-)creating parts of the database, for example LUT init bits:

cd fuzzers/010-lutinit
make -j$(nproc) run

Tests are not built by default. Setting the PRJXRAY_BUILD_TESTING option to ON when running cmake will include them:


The default C++ build configuration is for releases (optimizations enabled, no debug info). A build configuration for debugging (no optimizations, debug info) can be chosen via the CMAKE_BUILD_TYPE option:

cmake -DCMAKE_BUILD_TYPE=Debug ..

The options to build tests and use a debug build configuration are independent to allow testing that optimizations do not cause bugs. The build configuration and build tests options may be combined to allow all permutations.


The documentation is done through a "black box" process were Vivado is asked to generate a large number of designs which then used to create bitstreams. The resulting bit streams are then cross correlated to discover what different bits do.



There are also "minitests" which are designs which can be viewed by a human in Vivado to better understand how to generate more useful designs.


Experiments are like "minitests" except are only useful for a short period of time. Files are committed here to allow people to see how we are trying to understand the bitstream.

When an experiment is finished with, it will be moved from this directory into the latest "prjxray-experiments-archive-XXXX" repository.


Fuzzers are the scripts which generate the large number of bitstream.

They are called "fuzzers" because they follow an approach similar to the idea of software testing through fuzzing.

Tools & Libs

Tools & libs are useful tools (and libraries) for converting the resulting bitstreams into various formats.

Binaries in the tools directory are considered more mature and stable then those in the utils directory and could be actively used in other projects.


Utils are various tools which are still highly experimental. These tools should only be used inside this repository.

Third Party

Third party contains code not developed as part of Project X-Ray.


Running the all fuzzers in order will produce a database which documents the bitstream format in the database directory.

As running all these fuzzers can take significant time, Tim 'mithro' Ansell has graciously agreed to maintain a copy of the database in the prjxray-db repository.

Please direct enquires to Tim if there are any issues with it.

Current Focus

Current the focus has been on the Artix-7 50T part. This structure is common between all footprints of the 15T, 35T and 50T varieties.

We have also started experimenting with the Kintex-7 parts.

The aim is to eventually document all parts in the Xilinx 7-series FPGAs but we can not do this alone, we need your help!


  • Write a TODO list


There are a couple of guidelines when contributing to Project X-Ray which are listed here.


All contributions should be sent as GitHub Pull requests.


All code in the Project X-Ray repository is licensed under the very permissive ISC Licence. A copy can be found in the COPYING file.

All new contributions must also be released under this license.

Code of Conduct

By contributing you agree to the code of conduct. We follow the open source best practice of using the Contributor Covenant for our Code of Conduct.

Sign your work

To improve tracking of who did what, we follow the Linux Kernel's "sign your work" system. This is also called a "DCO" or "Developer's Certificate of Origin".

All commits are required to include this sign off and we use the Probot DCO App to check pull requests for this.

The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as a open-source patch. The rules are pretty simple: if you can certify the below:

    Developer's Certificate of Origin 1.1

    By making a contribution to this project, I certify that:

    (a) The contribution was created in whole or in part by me and I
        have the right to submit it under the open source license
        indicated in the file; or

    (b) The contribution is based upon previous work that, to the best
        of my knowledge, is covered under an appropriate open source
        license and I have the right under that license to submit that
        work with modifications, whether created in whole or in part
        by me, under the same open source license (unless I am
        permitted to submit under a different license), as indicated
        in the file; or

    (c) The contribution was provided directly to me by some other
        person who certified (a), (b) or (c) and I have not modified

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

then you just add a line saying

Signed-off-by: Random J Developer <>

using your real name (sorry, no pseudonyms or anonymous contributions.)

You can add the signoff as part of your commit statement. For example:

git commit --signoff -a -m "Fixed some errors."

Hint: If you've forgotten to add a signoff to one or more commits, you can use the following command to add signoffs to all commits between you and the upstream master:

git rebase --signoff upstream/master

Contributing to the docs

In addition to the above contribution guidelines, see the guide to updating the Project X-Ray docs.