Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xc7s50 #1797

Closed
wants to merge 103 commits into from
Closed

xc7s50 #1797

wants to merge 103 commits into from

Conversation

MidsummerNight
Copy link
Contributor

Attempt to add xc7s50 support for Project X-Ray. Most fuzzers passed on my own machine (see #1789 for details), @acomodi suggested I make this PR and run it through CI for further inspection. Content of spartan7_50.sh was copied from @MaksRawski's repo.

@MidsummerNight
Copy link
Contributor Author

The original prjxray directory is now a mess after some tinkering so I decided to clone a fresh copy of my xc7s50t branch to do the checkouts and sign-offs. But somehow git clone -b xc7s50t https://github.com/MidsummerNight/prjxray.git cloned my master branch instead of xc7s50t, and now I have trouble passing the DCO. Did I do it wrong?

me@me-machine:~$ gh pr checkout 1797
could not determine base repo: fatal: not a git repository (or any of the parent directories): .git
/usr/bin/git: exit status 128
me@me-machine:~$ cd prjxray-s7
me@me-machine:~/prjxray-s7$ git clone -b xc7s50t https://github.com/MidsummerNight/prjxray.git
Cloning into 'prjxray'...
remote: Enumerating objects: 20677, done.
remote: Counting objects: 100% (257/257), done.
remote: Compressing objects: 100% (177/177), done.
remote: Total 20677 (delta 137), reused 141 (delta 77), pack-reused 20420
Receiving objects: 100% (20677/20677), 6.21 MiB | 1.61 MiB/s, done.
Resolving deltas: 100% (14548/14548), done.
me@me-machine:~/prjxray-s7$ cd prjxray/
me@me-machine:~/prjxray-s7/prjxray$ 
me@me-machine:~/prjxray-s7/prjxray$ 
me@me-machine:~/prjxray-s7/prjxray$ gh pr checkout 1797
? Which should be the base repository (used for e.g. querying issues) for this directory? SymbiFlow/prjxray
Already on 'xc7s50t'
Your branch is up to date with 'origin/xc7s50t'.
Already up to date.
me@me-machine:~/prjxray-s7/prjxray$ git rebase HEAD~12 --signoff
Current branch xc7s50t is up to date, rebase forced.
First, rewinding head to replay your work on top of it...
Applying: 071-ppips: fix allowed and forbidden wires for PCIe
Applying: docs: Update "new device" section
Applying: Makefile: Do not dump the environment during db-prepare
Applying: settings: Handle return code correctly
Applying: fixup! docs: Update "new device" section
Applying: fixup! settings: Handle return code correctly
Applying: 030-iob: increase number of specimens
Applying: Upgrade to GitHub-native Dependabot
Applying: add fuzzer-071 generates ppips for dsp.
Applying: Bump third_party/gflags from `addd749` to `827c769`
Applying: Bump third_party/yaml-cpp from `33316d5` to `a6bbe0e`
Applying: update README
Applying: 034-cmt: fix conflicting PIPs
Applying: 071-ppips: add LIOB33 and RIOB33 ppips
Applying: Delete expired Let's Encrypt certificate.
me@me-machine:~/prjxray-s7/prjxray$ git branch
* (HEAD detached from refs/heads/xc7s50t)
  xc7s50t
me@me-machine:~/prjxray-s7/prjxray$ git push --force-with-lease origin xc7s50t
Everything up-to-date
me@me-machine:~/prjxray-s7/prjxray$ git status
HEAD detached from refs/heads/xc7s50t
nothing to commit, working tree clean
me@me-machine:~/prjxray-s7/prjxray$ 

@mithro
Copy link
Contributor

mithro commented Dec 8, 2021

Try cloning your repository without the branch flag, then switch to the branch with git checkout origin/<branch name> -b <branch name>.

@mithro
Copy link
Contributor

mithro commented Dec 8, 2021

Then do a

git remote add upstream https://github.com/SymbiFlow/prjxray.git
git fetch upstream

Then do a git rebase upstream/master --signoff follow by a git push origin <branch name> --force.

Typing on a phone, so might be typos....

@mithro
Copy link
Contributor

mithro commented Dec 8, 2021

@acomodi and @QuantamHD can you organise to get a Spartan 7 Kokoro runner added? Just follow the Artix / Kintex examples...

@MidsummerNight
Copy link
Contributor Author

Done but I don't think anything's changed

me@me-machine:~/prjxray-s7$ git clone https://github.com/MidsummerNight/prjxray.git
Cloning into 'prjxray'...
remote: Enumerating objects: 20677, done.
remote: Counting objects: 100% (257/257), done.
remote: Compressing objects: 100% (178/178), done.
remote: Total 20677 (delta 137), reused 140 (delta 76), pack-reused 20420
Receiving objects: 100% (20677/20677), 6.20 MiB | 1.20 MiB/s, done.
Resolving deltas: 100% (14554/14554), done.
me@me-machine:~/prjxray-s7$ cd prjxray/
me@me-machine:~/prjxray-s7/prjxray$ git checkout origin/xc7s50t -b xc7s50t
Branch 'xc7s50t' set up to track remote branch 'xc7s50t' from 'origin'.
Switched to a new branch 'xc7s50t'
me@me-machine:~/prjxray-s7/prjxray$ git remote add upstream https://github.com/SymbiFlow/prjxray.git
me@me-machine:~/prjxray-s7/prjxray$ git fetch upstream
remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 12 (delta 6), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (12/12), 5.02 KiB | 2.51 MiB/s, done.
From https://github.com/SymbiFlow/prjxray
 * [new branch]        dependabot/submodules/third_party/abseil-cpp-9336be0 -> upstream/dependabot/submodules/third_party/abseil-cpp-9336be0
 * [new branch]        dependabot/submodules/third_party/abseil-cpp-d96e287 -> upstream/dependabot/submodules/third_party/abseil-cpp-d96e287
 * [new branch]        dependabot/submodules/third_party/cctz-6921e4f -> upstream/dependabot/submodules/third_party/cctz-6921e4f
 * [new branch]        dependabot/submodules/third_party/cctz-ed26741 -> upstream/dependabot/submodules/third_party/cctz-ed26741
 * [new branch]        dependabot/submodules/third_party/fasm-41d22f2 -> upstream/dependabot/submodules/third_party/fasm-41d22f2
 * [new branch]        dependabot/submodules/third_party/fasm-99f199f -> upstream/dependabot/submodules/third_party/fasm-99f199f
 * [new branch]        dependabot/submodules/third_party/googletest-23ef295 -> upstream/dependabot/submodules/third_party/googletest-23ef295
 * [new branch]        dependabot/submodules/third_party/googletest-d61d4d8 -> upstream/dependabot/submodules/third_party/googletest-d61d4d8
 * [new branch]        dependabot/submodules/third_party/python-sdf-timing-5b9dc79 -> upstream/dependabot/submodules/third_party/python-sdf-timing-5b9dc79
 * [new branch]        dependabot/submodules/third_party/python-sdf-timing-fc6a01c -> upstream/dependabot/submodules/third_party/python-sdf-timing-fc6a01c
 * [new branch]        dependabot/submodules/third_party/yaml-cpp-5057a53 -> upstream/dependabot/submodules/third_party/yaml-cpp-5057a53
 * [new branch]        dependabot/submodules/third_party/yosys-a5adb00 -> upstream/dependabot/submodules/third_party/yosys-a5adb00
 * [new branch]        dependabot/submodules/third_party/yosys-d186ea7 -> upstream/dependabot/submodules/third_party/yosys-d186ea7
 * [new branch]        docker     -> upstream/docker
 * [new branch]        master     -> upstream/master
me@me-machine:~/prjxray-s7/prjxray$ 
me@me-machine:~/prjxray-s7/prjxray$ 
me@me-machine:~/prjxray-s7/prjxray$ git rebase upstream/master --signoff
Current branch xc7s50t is up to date, rebase forced.
First, rewinding head to replay your work on top of it...

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'me@me-machine.(none)')
me@me-machine:~/prjxray-s7/prjxray$ git config user.email "******"
me@me-machine:~/prjxray-s7/prjxray$ git config user.name "******"
me@me-machine:~/prjxray-s7/prjxray$ git rebase upstream/master --signoff
HEAD is up to date, rebase forced.
First, rewinding head to replay your work on top of it...
Fast-forwarded HEAD to upstream/master.
me@me-machine:~/prjxray-s7/prjxray$ git push origin xc7s50t --force
Everything up-to-date
me@me-machine:~/prjxray-s7/prjxray$ 
me@me-machine:~/prjxray-s7/prjxray$ gh pr checkout 1797
? Which should be the base repository (used for e.g. querying issues) for this directory? SymbiFlow/prjxray
Previous HEAD position was 60168e9b Merge pull request #1749 from mithro/kokoro-letsencrypt-fix
Switched to branch 'xc7s50t'
Your branch is up to date with 'origin/xc7s50t'.
Already up to date.
me@me-machine:~/prjxray-s7/prjxray$ 

I'll keep researching. Sorry for the trouble, first time making a PR to another repo.

@MidsummerNight
Copy link
Contributor Author

Did something already go wrong? The checks says the presubmit database for spartan7 was successfully built in less than 2 minutes, but the other existing families are still being built even though they've spent nearly 3 hours by now.

@MidsummerNight
Copy link
Contributor Author

@acomodi Good for review?

Copy link
Contributor

@acomodi acomodi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MidsummerNight, thanks for this PR!

Apart from the comments below there is one more thing missing which is enabling CI for the spartan7. This can be done by replacing the call to the nothing.sh script to the db-full.sh one here: https://github.com/SymbiFlow/prjxray/blob/60168e9b7e89956ce8a197f3cfdf6d4bc80926d3/.github/kokoro/presubmit-db-spartan7.cfg#L3 as well as here: https://github.com/SymbiFlow/prjxray/blob/60168e9b7e89956ce8a197f3cfdf6d4bc80926d3/.github/kokoro/continuous-db-spartan7.cfg#L3 similarly as it happens for the other parts.

Makefile Outdated
Comment on lines 186 to 189
ARTIX_PARTS=artix7_50t artix7_200t
ZYNQ_PARTS=zynq7010
KINTEX_PARTS=
SPARTAN_PARTS=spartan7_50
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are actually needed to build extra parts. By extra part is meant everything else apart from the bits documentation, e.g. tile grid, pips and wires, etc.

For instance, the main part for the artix7 that is used for the bit documentation (e.g. the one that runs the fuzzers) is the 100T: https://github.com/SymbiFlow/prjxray/blob/master/settings/artix7.sh

The 50t and 200t are added to generate the tilegrid and tileconn files as well.

Similarly, for the spartan7 we'd need to have a main part, in this case the 50, which shouldn't be added here as an extra part.

# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
source $(dirname ${BASH_SOURCE[0]})/spartan7_50.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should already contain the spartan7_50.sh content without sourcing it, and the spartan7_50.sh should be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted the old spartan7.sh and renamed spartan7_50.sh to spartan7.sh, deleted spartan7_50 from the Makefile and changed the Kokoro config files as well. Let's see if it works this time!

MidsummerNight added a commit to MidsummerNight/prjxray that referenced this pull request Dec 10, 2021
Files changed according to @acomodi's comments in f4pga#1797
MidsummerNight added a commit to MidsummerNight/prjxray that referenced this pull request Dec 10, 2021
Files changed according to @acomodi's comments in f4pga#1797

Signed-off-by: Steve <lbh_9506@163.com>
@acomodi
Copy link
Contributor

acomodi commented Dec 10, 2021

CI seems to be failing due to missing targets.

I believe you may add the following to the Makefile to run successfully:

db-extras-spartan7-parts:
    @true

db-extras-spartan7-roi:
    @true

db-extras-spartan7-harness:
    @true

mithro and others added 27 commits December 13, 2021 17:48
The old `/usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt` Let's
Encrypt certificate that has expired.

The "best" solution seems to be to delete the certificate. This is fine
because the new non-expired
`/usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt`
certificate is still available.

See the post at
https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/
for more explanation.

Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Content mostly copied from `spartan7.sh` and spartan7_50.sh from @litghost's `spartan7_50` branch of `prjxray`.

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Following Project X-Ray's "Guide to adding a new device to an existing family" to add device.yaml for the Spartan-7 family.

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Added SPARTAN_PARTS

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Add `spartan7` to `DATABASES`

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Make `spartan7` an acceptable parameter

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Add `spartan7` as an acceptable argument

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Change `SPARTAN_PARTS` to `spartan7_50` from `spartan7_50t`

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Change `xc7s50t` to `xc7s50` so that `make db-prepare-spartan7` can work correctly.

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Add `clock pin` and `data pins` from @MaksRawski's `spartan7_50.sh`

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Bump 2020 to 2021 in the copyright section

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Add the ignored wires file to fuzzer 074.

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Sort the order to improve readability

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Content mostly copied from `spartan7.sh` and spartan7_50.sh from @litghost's `spartan7_50` branch of `prjxray`.

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Following Project X-Ray's "Guide to adding a new device to an existing family" to add device.yaml for the Spartan-7 family.

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Change `xc7s50t` to `xc7s50` so that `make db-prepare-spartan7` can work correctly.

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Add `clock pin` and `data pins` from @MaksRawski's `spartan7_50.sh`

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Bump 2020 to 2021 in the copyright section

Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Files changed according to @acomodi's comments in f4pga#1797

Signed-off-by: Steve <lbh_9506@163.com>
Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Add `${SPARTAN_PARTS}` back to `XRAY_PARTS` following how the Makefile handles Kintex

Signed-off-by: Steve <lbh_9506@163.com>
Signed-off-by: Steve <steve.bohan.liu@outlook.com>
Change `nothing.sh` to `db-full.sh`

Signed-off-by: Steve <lbh_9506@163.com>
Signed-off-by: Steve <steve.bohan.liu@outlook.com>
CI seems to miss targets, add spartan7 targets to try fix this

Signed-off-by: Steve <lbh_9506@163.com>
Signed-off-by: Steve <steve.bohan.liu@outlook.com>
A reminder that you should use `tab` instead of `space`

Signed-off-by: Steve <lbh_9506@163.com>
Signed-off-by: Steve <steve.bohan.liu@outlook.com>
@acomodi
Copy link
Contributor

acomodi commented Dec 13, 2021

Closing, superseded by #1802

@acomodi acomodi closed this Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants