From c237bcd41291d167b32198eaf7303f08b24a1982 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Wed, 20 Dec 2017 15:52:34 +0100 Subject: [PATCH] Adding top level docs. Signed-off-by: Tim 'mithro' Ansell --- .update-contributing.py | 35 ++++++ CODE_OF_CONDUCT.md | 46 ++++++++ CONTRIBUTING.md | 66 +++++++++++ COPYING | 13 +++ README.md | 166 ++++++++++++++++++++++++++- docs/developer-certificate-of-origin | 37 ++++++ download-latest-db.sh | 6 + 7 files changed, 364 insertions(+), 5 deletions(-) create mode 100755 .update-contributing.py create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 COPYING create mode 100644 docs/developer-certificate-of-origin create mode 100755 download-latest-db.sh diff --git a/.update-contributing.py b/.update-contributing.py new file mode 100755 index 00000000..56aee766 --- /dev/null +++ b/.update-contributing.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 + +# Header +contrib = ["""\ +# Contributing to Project X-Ray +"""] + +# Extract the "Contributing" section from README.md +found = False +for line in open('README.md'): + if found: + if line.startswith('# '): + # Found the next top level header + break + contrib.append(line) + else: + if line.startswith('# Contributing'): + found = True + +# Footer +contrib.append("""\ + + + + + + +---- + +This file is generated from [README.md](README.md), please edit that file then +run the `./.update-contributing.py`. + +""") + +open("CONTRIBUTING.md", "w").write("".join(contrib)) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..c7d7eeb1 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [atom@github.com](mailto:atom@github.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..e3f1e223 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,66 @@ +# Contributing to Project X-Ray +There are a couple of guidelines when contributing to Project X-Ray which are +listed here. + +### Code of Conduct + +By contributing you agree to the [code of conduct](CODE_OF_CONDUCT.md). + +### Sign your work + +To improve tracking of who did what, we follow the Linux Kernel's +["sign your work" system](https://github.com/wking/signed-off-by). +This is also called a +["DCO" or "Developer's Certificate of Origin"](https://developercertificate.org/). + +**All** commits are required to include this sign off and we use the +[Probot DCO App](https://github.com/probot/dco) 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 + it. + + (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.) + + + + + + +---- + +This file is generated from [README.md](README.md), please edit that file then +run the `./.update-contributing.py`. + diff --git a/COPYING b/COPYING new file mode 100644 index 00000000..665f8c2a --- /dev/null +++ b/COPYING @@ -0,0 +1,13 @@ +Copyright (C) 2017 The Project X-Ray Authors. All rights reserved. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/README.md b/README.md index aac9cbf3..d69d2ebd 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,22 @@ -Project X-Ray -============= +# Project X-Ray Documenting the Xilinx 7-series bit-stream format. -Quickstart Guide: ------------------ +This repository contains both tools and scripts which allow you to document the +bit-stream format of Xilinx 7-series FPGAs. + +# Quickstart Guide Pull submodules: git submodule update --init --recursive +Get a head start by downloading current database: + + # Give argument `https` if you want to use to use the https protocol + # instead. + ./download-latest-db.sh + Install CMake and build the C++ tools: sudo apt-get install cmake # version 3.5.0 or later required, @@ -34,4 +41,153 @@ Creating HTML documentation: cd fuzzers/010-lutinit make - make pushdb + + +# Process + +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. + +## Parts + +### [Minitests](minitests) + +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](experiments) + +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](fuzzers) + +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](https://en.wikipedia.org/wiki/Fuzzing). + +### [Tools](tools) & [Libs](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](utils) directory and could be actively used in other +projects. + +### [Utils](utils) + +Utils are various tools which are still highly experimental. These tools should +only be used inside this repository. + +### [Third Party](third_party) + +Third party contains code not developed as part of Project X-Ray. + + +# Database + +Running the all fuzzers in order will produce a database which documents the +bitstream format in the [database](database) directory. + +As running all these fuzzers can take significant time, +[Tim 'mithro' Ansell ](https://github.com/mithro) has graciously +agreed to maintain a copy of the database in the +[prjxray-db](https://github.com/SymbiFlow/prjxray-db) repository. + +Please direct enquires to [Tim](mailto:me@mith.ro) 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**! + + +## TODO List + + - [ ] Write a TODO list + + +# Contributing + +There are a couple of guidelines when contributing to Project X-Ray which are +listed here. + +### Sending + +All contributions should be sent as +[GitHub Pull requests](https://help.github.com/articles/creating-a-pull-request-from-a-fork/). + +### License + +All code in the Project X-Ray repository is licensed under the very permissive +[ISC Licence](COPYING). A copy can be found in the [`COPYING`](COPYING) file. + +All new contributions must also be released under this license. + +### Code of Conduct + +By contributing you agree to the [code of conduct](CODE_OF_CONDUCT.md). We +follow the open source best practice of using the [Contributor +Covenant](https://www.contributor-covenant.org/) 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](https://github.com/wking/signed-off-by). +This is also called a +["DCO" or "Developer's Certificate of Origin"](https://developercertificate.org/). + +**All** commits are required to include this sign off and we use the +[Probot DCO App](https://github.com/probot/dco) 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 + it. + + (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.) diff --git a/docs/developer-certificate-of-origin b/docs/developer-certificate-of-origin new file mode 100644 index 00000000..8201f992 --- /dev/null +++ b/docs/developer-certificate-of-origin @@ -0,0 +1,37 @@ +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +1 Letterman Drive +Suite D4700 +San Francisco, CA, 94129 + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +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 + it. + +(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. diff --git a/download-latest-db.sh b/download-latest-db.sh new file mode 100755 index 00000000..a5837292 --- /dev/null +++ b/download-latest-db.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +GITHUB_PROTO=${1:-git+ssh} +GITHUB_URL=$GITHUB_PROTO://github.com/SymbiFlow/prjxray-db.git +rm -rf database +git clone $GITHUB_URL database