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

[Yosys] init #3435

Merged
merged 3 commits into from
Aug 6, 2021
Merged

[Yosys] init #3435

merged 3 commits into from
Aug 6, 2021

Conversation

sjkelly
Copy link
Contributor

@sjkelly sjkelly commented Aug 5, 2021

This adds support for building Yosys, the open source synthesis suite for FPGAs and ASICs.

Y/Yosys/build_tarballs.jl Outdated Show resolved Hide resolved
Y/Yosys/build_tarballs.jl Outdated Show resolved Hide resolved
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6", preferred_gcc_version=v"10")
Copy link
Member

Choose a reason for hiding this comment

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

GCC 10 is a bit too much, especially for a C++ program

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I drop that line all together?

Y/Yosys/build_tarballs.jl Outdated Show resolved Hide resolved
Y/Yosys/build_tarballs.jl Outdated Show resolved Hide resolved
@sjkelly
Copy link
Contributor Author

sjkelly commented Aug 5, 2021

hmm the make CONFIG=${CC} is not handled by the Yosys makefile. They are expecting gcc but cc is passed. Should this be patched or is there a mechanism to do this here?

@giordano
Copy link
Member

giordano commented Aug 5, 2021

0d27f38 (#3435) 🙂

Y/Yosys/build_tarballs.jl Outdated Show resolved Hide resolved
@giordano
Copy link
Member

giordano commented Aug 5, 2021

Actually we already have ABC, but of course here they use a fork...

@sjkelly
Copy link
Contributor Author

sjkelly commented Aug 5, 2021

Was about to say. Should we package YosysABC separate?

@giordano
Copy link
Member

giordano commented Aug 5, 2021

Would you be OK with skipping ABC at the moment? At least to see whether it'd succeed without it, they're all choking there

@sjkelly
Copy link
Contributor Author

sjkelly commented Aug 5, 2021

The diff doesn't look like it should affect, and we can use the in-tree ABC. most (all?) of the yosys ABC changes are related to WASM support: berkeley-abc/abc@master...YosysHQ:yosys-experimental

@sjkelly
Copy link
Contributor Author

sjkelly commented Aug 5, 2021

Please do whatever experiments you like. I am following along and learning.

Y/Yosys/build_tarballs.jl Show resolved Hide resolved
else
CONFIG=gcc
fi
make CONFIG=${CONFIG} PREFIX=${prefix} -j${nproc}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
make CONFIG=${CONFIG} PREFIX=${prefix} -j${nproc}
make CONFIG=${CONFIG} PREFIX=${prefix} LINK_ABC=1 -j${nproc}

Copy link
Member

Choose a reason for hiding this comment

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

I'd like to try

Suggested change
make CONFIG=${CONFIG} PREFIX=${prefix} -j${nproc}
make CONFIG=${CONFIG} PREFIX=${prefix} ENABLE_ABC=0 -j${nproc}

to completely disable ABC, and see what happens, if you're OK

@sjkelly
Copy link
Contributor Author

sjkelly commented Aug 5, 2021

FYI Nix builds with separate ABC. I cribbed from there: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/yosys/default.nix

@sjkelly
Copy link
Contributor Author

sjkelly commented Aug 5, 2021

with 3177fcd

I get:

[22:40:16] /opt/i686-linux-gnu/bin/i686-linux-gnu-ld: passes/techmap/abc.o: unrecognized relocation (0x2b) in section `.text'
[22:40:16] /opt/i686-linux-gnu/bin/i686-linux-gnu-ld: final link failed: Bad value
[22:40:16] clang-12: error: linker command failed with exit code 1 (use -v to see invocation)

on most all platforms. I am setting preferred_gcc_version=v"8" per troubleshooting.md.

@sjkelly sjkelly force-pushed the sjk/yosys1 branch 2 times, most recently from 87b6996 to 277e200 Compare August 6, 2021 05:59
Co-authored-by: Mosè Giordano <[email protected]>
@sjkelly sjkelly changed the title WIP/RFC: init yosys [Yosys] init Aug 6, 2021
@giordano giordano merged commit 02a7e48 into JuliaPackaging:master Aug 6, 2021
simeonschaub pushed a commit to simeonschaub/Yggdrasil that referenced this pull request Feb 23, 2022
* [Yosys] init

Co-authored-by: Mosè Giordano <[email protected]>

* Update Y/Yosys/build_tarballs.jl

* Update Y/Yosys/build_tarballs.jl

Co-authored-by: Mosè Giordano <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants