{"id":13648244,"url":"https://github.com/f4pga/prjxray","last_synced_at":"2025-04-22T07:31:01.658Z","repository":{"id":37037040,"uuid":"114421621","full_name":"f4pga/prjxray","owner":"f4pga","description":"Documenting the Xilinx 7-series bit-stream format.","archived":false,"fork":false,"pushed_at":"2025-02-13T08:58:21.000Z","size":6768,"stargazers_count":781,"open_issues_count":155,"forks_count":155,"subscribers_count":59,"default_branch":"master","last_synced_at":"2025-02-13T09:35:39.752Z","etag":null,"topics":["artix","artix7","bitstream","fpga","fuzzer","kintex7","symbiflow","toolchain","tools","vivado","xilinx","xilinx-fpga"],"latest_commit_sha":null,"homepage":"https://f4pga.github.io/prjxray-db/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f4pga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-16T00:16:19.000Z","updated_at":"2025-02-13T08:57:52.000Z","dependencies_parsed_at":"2023-09-23T20:28:23.293Z","dependency_job_id":"e6b41f93-0104-4eab-8f54-186e14dc5877","html_url":"https://github.com/f4pga/prjxray","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4pga%2Fprjxray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4pga%2Fprjxray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4pga%2Fprjxray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4pga%2Fprjxray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f4pga","download_url":"https://codeload.github.com/f4pga/prjxray/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250195033,"owners_count":21390230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artix","artix7","bitstream","fpga","fuzzer","kintex7","symbiflow","toolchain","tools","vivado","xilinx","xilinx-fpga"],"created_at":"2024-08-02T01:04:05.064Z","updated_at":"2025-04-22T07:30:59.936Z","avatar_url":"https://github.com/f4pga.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Project X-Ray\n\n[![Documentation Status](https://img.shields.io/readthedocs/prjxray?longCache=true\u0026style=flat-square\u0026logo=ReadTheDocs\u0026logoColor=fff)](http://prjxray.readthedocs.org/)\n[![License](https://img.shields.io/github/license/f4pga/prjxray.svg?longCache=true\u0026style=flat-square\u0026label=License)](https://github.com/f4pga/prjxray/blob/master/LICENSE)\n![GitHub Actions](https://img.shields.io/github/actions/workflow/status/f4pga/prjxray/Automerge.yml?branch=master\u0026longCache=true\u0026style=flat-square\u0026label=GHA\u0026logo=Github%20Actions\u0026logoColor=fff)\n\nDocumenting the Xilinx 7-series bit-stream format.\n\nThis repository contains both tools and scripts which allow you to document the\nbit-stream format of Xilinx 7-series FPGAs.\n\nMore documentation can be found published on [prjxray ReadTheDocs site](https://prjxray.readthedocs.io/en/latest/) - this includes;\n * [Highlevel Bitstream Architecture](https://prjxray.readthedocs.io/en/latest/architecture/overview.html)\n * [Overview of DB Development Process](https://prjxray.readthedocs.io/en/latest/db_dev_process/index.html)\n\n# Quickstart Guide\nInstructions were originally written for Ubuntu 16.04. Please let us know if you have information on other distributions.\n\n### Step 1: ###\nInstall Vivado 2017.2. If you did not install to /opt/Xilinx default, then set the environment variable\nXRAY_VIVADO_SETTINGS to point to the settings64.sh file of the installed vivado version, ie\n\n    export XRAY_VIVADO_SETTINGS=/opt/Xilinx/Vivado/2017.2/settings64.sh\n\nDo not source the settings64.sh in your shell, since this adds directories of\nthe Vivado installation at the beginning of your PATH and LD_LIBRARY_PATH\nvariables, which will likely interfere with or break non-Vivado applications in\nthat shell. The Vivado wrapper utils/vivado.sh makes sure that the environment\nvariables from XRAY_VIVADO_SETTINGS are automatically sourced in a separate\nshell that is then only used to run Vivado to avoid these problems.\n\n**Why 2017.2?** Currently the fuzzers only work on `2017.2`, see [Issue #14 on prjxray](https://github.com/f4pga/prjxray/issues/14).\n\n**Is 2017.2 really required?** Yes, only `2017.2` works. Until Issue #14 is solved, **only** `2017.2` works and will be supported.\n\n### Step 2: ###\nClone the ``prjxray`` repository and its submodules:\n\n```bash\ngit clone git@github.com:f4pga/prjxray.git\ncd prjxray\ngit submodule update --init --recursive\n```\n\n### Step 3: ###\nInstall CMake:\n\n```bash\nsudo apt-get install cmake # version 3.5.0 or later required,\n                           # for Ubuntu Trusty pkg is called cmake3\n```\n\n### Step 4: ###\nBuild the C++ tools, in the prjxray root directory run:\n\n```bash\nmake build\n```\n\n### Step 5: ###\nChoose one of the following options:\n\n(Option 1) - Install the Python environment locally\n\n```bash\nsudo apt-get install virtualenv python3 python3-pip python3-virtualenv python3-yaml\nmake env\n```\n\n(Option 2) - Install the Python environment globally\n\n```bash\nsudo apt-get install python3 python3-pip python3-yaml\nsudo -H pip3 install -r requirements.txt\n```\n\nThis step is known to fail with a compiler error while building the `pyjson5`\nlibrary when using Arch Linux and Fedora. If this occurs, `pyjson5` needs one\nchange to build correctly:\n\n```bash\ngit clone https://github.com/Kijewski/pyjson5.git\ncd pyjson5\nsed -i 's/char \\*PyUnicode/const char \\*PyUnicode/' src/_imports.pyx\nsudo make\n```\n\nThis might give you an error about `sphinx_autodoc_typehints` but it should\ncorrectly build and install pyjson5. After this, run either option 1 or 2 again.\n\n### Step 6: ###\n\nPrepare the database with static part information, which are needed by the\nfuzzers, either for all device families\n\n```bash\nmake db-prepare-parts\n```\n\nor only for a selected one\n\n```bash\nmake db-prepare-artix7\n```\n\n### Step 7: ###\nAlways make sure to set the environment for the device you are working on before\nrunning any other commands:\n\n```bash\nsource settings/artix7.sh\n```\n\n### Step 8: ###\n\n(Option 1, recommended) - Download a current stable version (you can use the\nPython API with a pre-generated database)\n\n```bash\n./download-latest-db.sh\n```\n\n(Option 2) - (Re-)create the entire database (this will take a very long time!)\n\n```bash\ncd fuzzers\nmake -j$(nproc)\n```\n\n### Step 9: ###\nPick a fuzzer (or write your own), from the ``prjxray`` root dir, run:\n\n```bash\ncd fuzzers/010-clb-lutinit\nmake -j$(nproc) run\n```\n\n### Step 10: ###\nCreate HTML documentation, from the ``prjxray`` root dir, run:\n\n```\ncd htmlgen\npython3 htmlgen.py\n```\n\n# C++ Development\n\nTests are not built by default.  Setting the PRJXRAY\\_BUILD\\_TESTING option to\nON when running cmake will include them. From the ``prjxray`` root dir, run:\n\n```bash\nmkdir -p build\ncd build\ncmake -DPRJXRAY_BUILD_TESTING=ON ..\nmake\n```\n\nThe default C++ build configuration is for releases (optimizations enabled, no\ndebug info). A build configuration for debugging (no optimizations, debug info)\ncan be chosen via the CMAKE\\_BUILD\\_TYPE option. From the ``prjxray`` root dir, run:\n\n```bash\nmkdir -p build\ncd build\ncmake -DCMAKE_BUILD_TYPE=ON ..\nmake\n```\n\nThe options to build tests and use a debug build configuration are independent\nto allow testing that optimizations do not cause bugs.  The build configuration\nand build tests options may be combined to allow all permutations.\n\n# Process\n\nThe documentation is done through a \"black box\" process were Vivado is asked to\ngenerate a large number of designs which then used to create bitstreams. The\nresulting bit streams are then cross correlated to discover what different bits\ndo.\n\n## Parts\n\n### [Minitests](minitests)\n\nThere are also \"minitests\" which are designs which can be viewed by a human in\nVivado to better understand how to generate more useful designs.\n\n### [Experiments](experiments)\n\nExperiments are like \"minitests\" except are only useful for a short period of\ntime. Files are committed here to allow people to see how we are trying to\nunderstand the bitstream.\n\nWhen an experiment is finished with, it will be moved from this directory into\nthe latest \"prjxray-experiments-archive-XXXX\" repository.\n\n### [Fuzzers](fuzzers)\n\nFuzzers are the scripts which generate the large number of bitstream.\n\nThey are called \"fuzzers\" because they follow an approach similar to the\n[idea of software testing through fuzzing](https://en.wikipedia.org/wiki/Fuzzing).\n\n### [Tools](tools) \u0026 [Libs](lib)\n\nTools \u0026 libs are useful tools (and libraries) for converting the resulting\nbitstreams into various formats.\n\nBinaries in the tools directory are considered more mature and stable then\nthose in the [utils](utils) directory and could be actively used in other\nprojects.\n\n### [Utils](utils)\n\nUtils are various tools which are still highly experimental. These tools should\nonly be used inside this repository.\n\n### [Third Party](third_party)\n\nThird party contains code not developed as part of Project X-Ray.\n\n\n# Database\n\nRunning the all fuzzers in order will produce a database which documents the\nbitstream format in the [database](database) directory.\n\nAs running all these fuzzers can take significant time,\n[Tim 'mithro' Ansell \u003cme@mith.ro\u003e](https://github.com/mithro) has graciously\nagreed to maintain a copy of the database in the\n[prjxray-db](https://github.com/f4pga/prjxray-db) repository.\n\nPlease direct enquires to [Tim](mailto:me@mith.ro) if there are any issues with\nit.\n\n# Current Focus\n\nCurrent the focus has been on the Artix-7 50T part. This structure is common\nbetween all footprints of the 15T, 35T and 50T varieties.\n\nWe have also started experimenting with the Kintex-7 parts.\n\nThe aim is to eventually document all parts in the Xilinx 7-series FPGAs but we\ncan not do this alone, **we need your help**!\n\n## Adding a new part to an existing family\n\nWe have written a [detailed guide](https://f4pga.readthedocs.io/projects/prjxray/en/latest/db_dev_process/newpart.html) that walks through the process of adding a new part to an existing family.\n\n## TODO List\n\n - [ ] Write a TODO list\n\n\n# Contributing\n\nThere are a couple of guidelines when contributing to Project X-Ray which are\nlisted here.\n\n### Sending\n\nAll contributions should be sent as\n[GitHub Pull requests](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).\n\n### License\n\nAll software (code, associated documentation, support files, etc) in the\nProject X-Ray repository are licensed under the very permissive\n[ISC Licence](https://opensource.org/licenses/ISC). A copy can be found in the [`LICENSE`](LICENSE) file.\n\nAll new contributions must also be released under this license.\n\n### Code of Conduct\n\nBy contributing you agree to the [code of conduct](CODE_OF_CONDUCT.md). We\nfollow the open source best practice of using the [Contributor\nCovenant](https://www.contributor-covenant.org/) for our Code of Conduct.\n\n### Sign your work\n\nTo improve tracking of who did what, we follow the Linux Kernel's\n[\"sign your work\" system](https://github.com/wking/signed-off-by).\nThis is also called a\n[\"DCO\" or \"Developer's Certificate of Origin\"](https://developercertificate.org/).\n\n**All** commits are required to include this sign off and we use the\n[Probot DCO App](https://github.com/probot/dco) to check pull requests for\nthis.\n\nThe sign-off is a simple line at the end of the explanation for the\npatch, which certifies that you wrote it or otherwise have the right to\npass it on as a open-source patch.  The rules are pretty simple: if you\ncan certify the below:\n\n        Developer's Certificate of Origin 1.1\n\n        By making a contribution to this project, I certify that:\n\n        (a) The contribution was created in whole or in part by me and I\n            have the right to submit it under the open source license\n            indicated in the file; or\n\n        (b) The contribution is based upon previous work that, to the best\n            of my knowledge, is covered under an appropriate open source\n            license and I have the right under that license to submit that\n            work with modifications, whether created in whole or in part\n            by me, under the same open source license (unless I am\n            permitted to submit under a different license), as indicated\n            in the file; or\n\n        (c) The contribution was provided directly to me by some other\n            person who certified (a), (b) or (c) and I have not modified\n            it.\n\n\t(d) I understand and agree that this project and the contribution\n\t    are public and that a record of the contribution (including all\n\t    personal information I submit with it, including my sign-off) is\n\t    maintained indefinitely and may be redistributed consistent with\n\t    this project or the open source license(s) involved.\n\nthen you just add a line saying\n\n\tSigned-off-by: Random J Developer \u003crandom@developer.example.org\u003e\n\nusing your real name (sorry, no pseudonyms or anonymous contributions.)\n\nYou can add the signoff as part of your commit statement. For example:\n\n    git commit --signoff -a -m \"Fixed some errors.\"\n\n*Hint:* If you've forgotten to add a signoff to one or more commits, you can use the\nfollowing command to add signoffs to all commits between you and the upstream\nmaster:\n\n    git rebase --signoff upstream/master\n\n### Contributing to the docs\n\nIn addition to the above contribution guidelines, see the guide to\n[updating the Project X-Ray docs](UPDATING-THE-DOCS.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff4pga%2Fprjxray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff4pga%2Fprjxray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff4pga%2Fprjxray/lists"}