Skip to content

Commit 7825436

Browse files
committed
Updated yosys with latest yosys and removed .git
1 parent bc4a791 commit 7825436

File tree

2,956 files changed

+1258165
-12609
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,956 files changed

+1258165
-12609
lines changed

yosys/.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ insert_final_newline = true
1010
indent_style = space
1111
indent_size = 2
1212
trim_trailing_whitespace = false
13+
14+
[*.yml]
15+
indent_style = space
16+
indent_size = 2

yosys/.gitcommit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dac5bd1983a
1+
$Format:%H$

yosys/.github/actions/setup-build-env/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ runs:
88
shell: bash
99
run: |
1010
sudo apt-get update
11-
sudo apt-get install gperf build-essential bison flex libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot pkg-config python3 libboost-system-dev libboost-python-dev libboost-filesystem-dev zlib1g-dev
11+
sudo apt-get install gperf build-essential bison flex libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot pkg-config python3 libboost-system-dev libboost-python-dev libboost-filesystem-dev zlib1g-dev libbz2-dev
1212
1313
- name: Install macOS Dependencies
1414
if: runner.os == 'macOS'
1515
shell: bash
1616
run: |
17-
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install bison flex gawk libffi pkg-config bash autoconf
17+
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew update
18+
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install bison flex gawk libffi pkg-config bash autoconf llvm lld || true
1819
1920
- name: Linux runtime environment
2021
if: runner.os == 'Linux'
@@ -28,6 +29,7 @@ runs:
2829
shell: bash
2930
run: |
3031
echo "${{ github.workspace }}/.local/bin" >> $GITHUB_PATH
32+
echo "$(brew --prefix llvm)/bin" >> $GITHUB_PATH
3133
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
3234
echo "$(brew --prefix flex)/bin" >> $GITHUB_PATH
3335
echo "procs=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV

yosys/.github/workflows/codeql.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616
- name: Checkout repository
1717
uses: actions/checkout@v4
1818
with:
19-
submodules: true
19+
submodules: true
20+
persist-credentials: false
21+
2022
- name: Initialize CodeQL
2123
uses: github/codeql-action/init@v3
2224
with:

yosys/.github/workflows/extra-builds.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v4
2727
with:
28-
submodules: true
28+
submodules: true
29+
persist-credentials: false
2930
- name: Build
3031
run: make vcxsrc YOSYS_VER=latest
3132
- uses: actions/upload-artifact@v4
@@ -59,7 +60,8 @@ jobs:
5960
steps:
6061
- uses: actions/checkout@v4
6162
with:
62-
submodules: true
63+
submodules: true
64+
persist-credentials: false
6365
- name: Build
6466
run: |
6567
WASI_SDK=wasi-sdk-19.0
@@ -86,12 +88,17 @@ jobs:
8688
name: "Build nix flake"
8789
needs: pre_job
8890
if: needs.pre_job.outputs.should_skip != 'true'
89-
runs-on: ubuntu-latest
91+
runs-on: ${{ matrix.os }}
92+
strategy:
93+
matrix:
94+
os: [ubuntu-latest, macos-latest]
95+
fail-fast: false
9096
steps:
9197
- uses: actions/checkout@v4
9298
with:
9399
submodules: true
100+
persist-credentials: false
94101
- uses: cachix/install-nix-action@v26
95102
with:
96103
install_url: https://releases.nixos.org/nix/nix-2.18.1/install
97-
- run: nix build .?submodules=1
104+
- run: nix build .?submodules=1 -L
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Build docs artifact with Verific
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
check_docs_rebuild:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
skip_check: ${{ steps.skip_check.outputs.should_skip }}
10+
docs_export: ${{ steps.docs_var.outputs.docs_export }}
11+
env:
12+
docs_export: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/docs-preview') || startsWith(github.ref, 'refs/tags/') }}
13+
steps:
14+
- id: skip_check
15+
uses: fkirc/skip-duplicate-actions@v5
16+
with:
17+
paths_ignore: '["**/README.md"]'
18+
# don't cancel in case we're updating docs
19+
cancel_others: 'false'
20+
# only run on push *or* pull_request, not both
21+
concurrent_skipping: ${{ env.docs_export && 'never' || 'same_content_newer'}}
22+
- id: docs_var
23+
run: echo "docs_export=${docs_export}" >> $GITHUB_OUTPUT
24+
25+
prepare-docs:
26+
# docs builds are needed for anything on main, any tagged versions, and any tag
27+
# or branch starting with docs-preview
28+
needs: check_docs_rebuild
29+
if: ${{ needs.check_docs_rebuild.outputs.should_skip != 'true' }}
30+
runs-on: [self-hosted, linux, x64, fast]
31+
steps:
32+
- name: Checkout Yosys
33+
uses: actions/checkout@v4
34+
with:
35+
persist-credentials: false
36+
submodules: true
37+
38+
- name: Runtime environment
39+
run: |
40+
echo "procs=$(nproc)" >> $GITHUB_ENV
41+
42+
- name: Build Yosys
43+
run: |
44+
make config-clang
45+
echo "ENABLE_VERIFIC := 1" >> Makefile.conf
46+
echo "ENABLE_VERIFIC_EDIF := 1" >> Makefile.conf
47+
echo "ENABLE_VERIFIC_LIBERTY := 1" >> Makefile.conf
48+
echo "ENABLE_VERIFIC_YOSYSHQ_EXTENSIONS := 1" >> Makefile.conf
49+
echo "ENABLE_CCACHE := 1" >> Makefile.conf
50+
make -j$procs ENABLE_LTO=1
51+
52+
- name: Prepare docs
53+
shell: bash
54+
run:
55+
make docs/prep -j$procs TARGETS= EXTRA_TARGETS=
56+
57+
- name: Upload artifact
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: cmd-ref-${{ github.sha }}
61+
path: |
62+
docs/source/cmd
63+
docs/source/generated
64+
docs/source/_images
65+
docs/source/code_examples
66+
67+
- name: Install doc prereqs
68+
shell: bash
69+
run: |
70+
make docs/reqs
71+
72+
- name: Test build docs
73+
shell: bash
74+
run: |
75+
make -C docs html -j$procs TARGETS= EXTRA_TARGETS=
76+
77+
- name: Trigger RTDs build
78+
if: ${{ needs.check_docs_rebuild.outputs.docs_export == 'true' }}
79+
80+
with:
81+
webhook_url: ${{ secrets.RTDS_WEBHOOK_URL }}
82+
webhook_token: ${{ secrets.RTDS_WEBHOOK_TOKEN }}
83+
commit_ref: ${{ github.ref }}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Create source archive with vendored dependencies
2+
3+
on: [push, workflow_dispatch]
4+
5+
jobs:
6+
vendor-sources:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repository with submodules
10+
uses: actions/checkout@v4
11+
with:
12+
submodules: 'recursive'
13+
persist-credentials: false
14+
15+
- name: Create clean tarball
16+
run: |
17+
git archive --format=tar HEAD -o yosys-src-vendored.tar
18+
git submodule foreach '
19+
git archive --format=tar --prefix="${sm_path}/" HEAD --output=${toplevel}/vendor-${name}.tar
20+
'
21+
22+
# 2008 bug https://lists.gnu.org/archive/html/bug-tar/2008-08/msg00002.html
23+
for file in vendor-*.tar; do
24+
tar --concatenate --file=yosys-src-vendored.tar "$file"
25+
done
26+
27+
gzip yosys-src-vendored.tar
28+
29+
- name: Store tarball artifact
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: vendored-sources
33+
path: yosys-src-vendored.tar.gz
34+
retention-days: 1

yosys/.github/workflows/test-build.yml

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
uses: actions/checkout@v4
4747
with:
4848
submodules: true
49+
persist-credentials: false
4950

5051
- name: Setup environment
5152
uses: ./.github/actions/setup-build-env
@@ -56,7 +57,8 @@ jobs:
5657
mkdir build
5758
cd build
5859
make -f ../Makefile config-$CC
59-
make -f ../Makefile -j$procs
60+
echo 'SANITIZER = undefined' >> Makefile.conf
61+
make -f ../Makefile -j$procs ENABLE_LTO=1
6062
6163
- name: Log yosys-config output
6264
run: |
@@ -82,13 +84,16 @@ jobs:
8284
if: needs.pre_job.outputs.should_skip != 'true'
8385
env:
8486
CC: clang
87+
UBSAN_OPTIONS: halt_on_error=1
8588
strategy:
8689
matrix:
8790
os: [ubuntu-latest, macos-latest]
8891
fail-fast: false
8992
steps:
9093
- name: Checkout Yosys
9194
uses: actions/checkout@v4
95+
with:
96+
persist-credentials: false
9297

9398
- name: Setup environment
9499
uses: ./.github/actions/setup-build-env
@@ -100,12 +105,22 @@ jobs:
100105
cd iverilog
101106
echo "IVERILOG_GIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
102107
108+
- name: Get vcd2fst
109+
shell: bash
110+
run: |
111+
git clone https://github.com/mmicko/libwave.git
112+
mkdir -p ${{ github.workspace }}/.local/
113+
cd libwave
114+
cmake . -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/.local
115+
make -j$procs
116+
make install
117+
103118
- name: Cache iverilog
104119
id: cache-iverilog
105120
uses: actions/cache@v4
106121
with:
107122
path: .local/
108-
key: ${{ matrix.os }}-${{ env.IVERILOG_GIT }}
123+
key: ${{ matrix.os }}-${IVERILOG_GIT}
109124

110125
- name: Build iverilog
111126
if: steps.cache-iverilog.outputs.cache-hit != 'true'
@@ -157,6 +172,8 @@ jobs:
157172
steps:
158173
- name: Checkout Yosys
159174
uses: actions/checkout@v4
175+
with:
176+
persist-credentials: false
160177

161178
- name: Setup environment
162179
uses: ./.github/actions/setup-build-env
@@ -178,4 +195,47 @@ jobs:
178195
- name: Run tests
179196
shell: bash
180197
run: |
181-
make -C docs test -j${{ env.procs }}
198+
make -C docs test -j$procs
199+
200+
test-docs-build:
201+
name: Try build docs
202+
runs-on: [self-hosted, linux, x64, fast]
203+
needs: [pre_docs_job]
204+
if: needs.pre_docs_job.outputs.should_skip != 'true'
205+
strategy:
206+
matrix:
207+
docs-target: [html, latexpdf]
208+
fail-fast: false
209+
steps:
210+
- name: Checkout Yosys
211+
uses: actions/checkout@v4
212+
with:
213+
submodules: true
214+
persist-credentials: false
215+
216+
- name: Runtime environment
217+
run: |
218+
echo "procs=$(nproc)" >> $GITHUB_ENV
219+
220+
- name: Build Yosys
221+
run: |
222+
make config-clang
223+
echo "ENABLE_CCACHE := 1" >> Makefile.conf
224+
make -j$procs
225+
226+
- name: Install doc prereqs
227+
shell: bash
228+
run: |
229+
make docs/reqs
230+
231+
- name: Build docs
232+
shell: bash
233+
run: |
234+
make docs DOC_TARGET=${{ matrix.docs-target }} -j$procs
235+
236+
- name: Store docs build artifact
237+
uses: actions/upload-artifact@v4
238+
with:
239+
name: docs-build-${{ matrix.docs-target }}
240+
path: docs/build/
241+
retention-days: 7

yosys/.github/workflows/test-compile.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,22 @@ jobs:
3030
- ubuntu-latest
3131
compiler:
3232
# oldest supported
33-
- 'clang-14'
33+
- 'clang-10'
3434
- 'gcc-10'
35-
# newest
36-
- 'clang'
37-
- 'gcc'
35+
# newest, make sure to update maximum standard step to match
36+
- 'clang-19'
37+
- 'gcc-13'
3838
include:
3939
# macOS
4040
- os: macos-13
4141
compiler: 'clang'
42-
# oldest clang not available on ubuntu-latest
43-
- os: ubuntu-22.04
44-
compiler: 'clang-11'
4542
fail-fast: false
4643
steps:
4744
- name: Checkout Yosys
4845
uses: actions/checkout@v4
4946
with:
5047
submodules: true
48+
persist-credentials: false
5149

5250
- name: Setup environment
5351
uses: ./.github/actions/setup-build-env
@@ -72,7 +70,7 @@ jobs:
7270
7371
# maximum standard, only on newest compilers
7472
- name: Build C++20
75-
if: ${{ matrix.compiler == 'clang' || matrix.compiler == 'gcc'}}
73+
if: ${{ matrix.compiler == 'clang-19' || matrix.compiler == 'gcc-13' }}
7674
shell: bash
7775
run: |
7876
make config-$CC_SHORT

0 commit comments

Comments
 (0)