Skip to content

Commit d617bf5

Browse files
authored
Merge branch 'YosysHQ:main' into master
2 parents 130d5e2 + 21b9c8e commit d617bf5

File tree

243 files changed

+6446
-844
lines changed

Some content is hidden

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

243 files changed

+6446
-844
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
contact_links:
2-
- name: Discussions
3-
url: https://github.com/YosysHQ/yosys/discussions
4-
about: "Have a question? Ask it on our discussions page!"
5-
- name: Community Slack
6-
url: https://join.slack.com/t/yosyshq/shared_invite/zt-1aopkns2q-EiQ97BeQDt_pwvE41sGSuA
7-
about: "Yosys Community Slack"
2+
- name: Discourse
3+
url: https://yosyshq.discourse.group
4+
about: "Have a question? Ask it on our Discourse group!"
85
- name: IRC Channel
96
url: https://web.libera.chat/#yosys
107
about: "#yosys on irc.libera.chat"
11-
8+

.github/workflows/prepare-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
echo "ENABLE_VERIFIC_LIBERTY := 1" >> Makefile.conf
4848
echo "ENABLE_VERIFIC_YOSYSHQ_EXTENSIONS := 1" >> Makefile.conf
4949
echo "ENABLE_CCACHE := 1" >> Makefile.conf
50+
echo "ENABLE_HELP_SOURCE := 1" >> Makefile.conf
5051
make -j$procs ENABLE_LTO=1
5152
5253
- name: Prepare docs
@@ -59,7 +60,6 @@ jobs:
5960
with:
6061
name: cmd-ref-${{ github.sha }}
6162
path: |
62-
docs/source/cmd
6363
docs/source/generated
6464
docs/source/_images
6565
docs/source/code_examples

.github/workflows/test-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ jobs:
225225
run: |
226226
make config-clang
227227
echo "ENABLE_CCACHE := 1" >> Makefile.conf
228+
echo "ENABLE_HELP_SOURCE := 1" >> Makefile.conf
228229
make -j$procs
229230
230231
- name: Install doc prereqs

.github/workflows/wheels.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ jobs:
119119
upload_wheels:
120120
name: Upload Wheels
121121
runs-on: ubuntu-latest
122+
# Specifying a GitHub environment is optional, but strongly encouraged
123+
environment: pypi
124+
permissions:
125+
# IMPORTANT: this permission is mandatory for Trusted Publishing
126+
id-token: write
122127
needs: build_wheels
123128
steps:
124129
- uses: actions/download-artifact@v4
@@ -132,6 +137,3 @@ jobs:
132137
mv *.whl ./dist
133138
- name: Publish
134139
uses: pypa/gh-action-pypi-publish@release/v1
135-
with:
136-
password: ${{ secrets.PYPI_TOKEN }}
137-
repository-url: ${{ vars.PYPI_INDEX || 'https://upload.pypi.org/legacy/' }}

.gitignore

Lines changed: 45 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
1+
## user config
2+
/Makefile.conf
3+
4+
## build artifacts
5+
# compiler intermediate files
16
*.o
27
*.d
38
*.dwo
4-
.*.swp
59
*.gch
610
*.gcda
711
*.gcno
8-
*~
9-
__pycache__
10-
/.cache
11-
/.cproject
12-
/.project
13-
/.settings
14-
/qtcreator.files
15-
/qtcreator.includes
16-
/qtcreator.config
17-
/qtcreator.creator
18-
/qtcreator.creator.user
19-
/compile_commands.json
20-
/coverage.info
21-
/coverage_html
22-
/Makefile.conf
23-
/viz.js
12+
*.so.dSYM/
13+
14+
# compiler output files
15+
/kernel/version_*.cc
16+
/share
2417
/yosys
2518
/yosys.exe
2619
/yosys.js
@@ -36,22 +29,50 @@ __pycache__
3629
/yosys-witness-script.py
3730
/yosys-filterlib
3831
/yosys-filterlib.exe
39-
/kernel/*.pyh
40-
/kernel/python_wrappers.cc
41-
/kernel/version_*.cc
42-
/share
4332
/yosys-win32-mxebin-*
4433
/yosys-win32-vcxsrc-*
4534
/yosysjs-*
4635
/libyosys.so
36+
37+
# build directories
4738
/tests/unit/bintest/
4839
/tests/unit/objtest/
4940
/tests/ystests
41+
/build
5042
/result
5143
/dist
52-
/*.egg-info
53-
/build
54-
/venv
44+
45+
# pyosys
46+
/kernel/*.pyh
47+
/kernel/python_wrappers.cc
5548
/boost
5649
/ffi
50+
/venv
5751
/*.whl
52+
/*.egg-info
53+
54+
# yosysjs dependency
55+
/viz.js
56+
57+
# other
58+
/coverage.info
59+
/coverage_html
60+
61+
62+
# these really belong in global gitignore since they're not specific to this project but rather to user tool choice
63+
# but too many people don't have a global gitignore configured:
64+
# https://docs.github.com/en/get-started/git-basics/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer
65+
__pycache__
66+
*~
67+
.*.swp
68+
/.cache
69+
/.vscode
70+
/.cproject
71+
/.project
72+
/.settings
73+
/qtcreator.files
74+
/qtcreator.includes
75+
/qtcreator.config
76+
/qtcreator.creator
77+
/qtcreator.creator.user
78+
/compile_commands.json

CHANGELOG

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,26 @@
22
List of major changes and improvements between releases
33
=======================================================
44

5-
Yosys 0.55 .. Yosys 0.56-dev
5+
Yosys 0.56 .. Yosys 0.57-dev
66
--------------------------
77

8+
Yosys 0.55 .. Yosys 0.56
9+
--------------------------
10+
* New commands and options
11+
- Added "-unescape" option to "rename" pass.
12+
- Added "-assert2cover" option to "chformal" pass.
13+
- Added "linecoverage" pass to generate lcov report from selection.
14+
- Added "opt_hier" pass to enable hierarchical optimization.
15+
- Added "-hieropt" option to "synth" pass.
16+
- Added "-expect-return", "-err-grep" and "-suffix" options
17+
to "bugpoint" pass.
18+
- Added "raise_error" dev pass.
19+
20+
* Various
21+
- Added groups to command reference documentation.
22+
- Added bugpoint guide to documentation.
23+
- verific: correctly reset Verific flags after import.
24+
825
Yosys 0.54 .. Yosys 0.55
926
--------------------------
1027
* Various

CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ much easier for someone to respond and help.
1919

2020
### Bug reports
2121

22-
Before you submit an issue, please have a search of the existing issues in case
23-
one already exists. Making sure that you have a minimal, complete and
24-
verifiable example (MVCE) is a great way to quickly check an existing issue
25-
against a new one. Stack overflow has a guide on [how to create an
26-
MVCE](https://stackoverflow.com/help/minimal-reproducible-example). The
27-
[`bugpoint`
28-
command](https://yosyshq.readthedocs.io/projects/yosys/en/latest/cmd/bugpoint.html)
29-
in Yosys can be helpful for this process.
22+
Before you submit an issue, please check out the [how-to guide for
23+
`bugpoint`](https://yosys.readthedocs.io/en/latest/using_yosys/bugpoint.html).
24+
This guide will take you through the process of using the [`bugpoint`
25+
command](https://yosys.readthedocs.io/en/latest/cmd/bugpoint.html) in Yosys to
26+
produce a [minimal, complete and verifiable
27+
example](https://stackoverflow.com/help/minimal-reproducible-example) (MVCE).
28+
Providing an MVCE with your bug report drastically increases the likelihood that
29+
someone will be able to help resolve your issue.
3030

3131

3232
# Using pull requests

Makefile

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ ENABLE_VERIFIC_LIBERTY := 0
2424
ENABLE_COVER := 1
2525
ENABLE_LIBYOSYS := 0
2626
ENABLE_ZLIB := 1
27+
ENABLE_HELP_SOURCE := 0
2728

2829
# python wrappers
2930
ENABLE_PYOSYS := 0
@@ -109,18 +110,16 @@ PLUGIN_LINKFLAGS += -L"$(LIBDIR)"
109110
PLUGIN_LIBS := -lyosys_exe
110111
endif
111112

113+
ifeq ($(ENABLE_HELP_SOURCE),1)
114+
CXXFLAGS += -DYOSYS_ENABLE_HELP_SOURCE
115+
endif
116+
112117
PKG_CONFIG ?= pkg-config
113118
SED ?= sed
114119
BISON ?= bison
115120
STRIP ?= strip
116121
AWK ?= awk
117122

118-
ifneq ($(shell :; command -v rsync),)
119-
RSYNC_CP ?= rsync -rc
120-
else
121-
RSYNC_CP ?= cp -ru
122-
endif
123-
124123
ifeq ($(OS), Darwin)
125124
PLUGIN_LINKFLAGS += -undefined dynamic_lookup
126125
LINKFLAGS += -rdynamic
@@ -160,7 +159,7 @@ ifeq ($(OS), Haiku)
160159
CXXFLAGS += -D_DEFAULT_SOURCE
161160
endif
162161

163-
YOSYS_VER := 0.55+0
162+
YOSYS_VER := 0.56+0
164163
YOSYS_MAJOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f1)
165164
YOSYS_MINOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f2 | cut -d'+' -f1)
166165
YOSYS_COMMIT := $(shell echo $(YOSYS_VER) | cut -d'+' -f2)
@@ -183,7 +182,7 @@ endif
183182
OBJS = kernel/version_$(GIT_REV).o
184183

185184
bumpversion:
186-
sed -i "/^YOSYS_VER := / s/+[0-9][0-9]*$$/+`git log --oneline 60f126c.. | wc -l`/;" Makefile
185+
sed -i "/^YOSYS_VER := / s/+[0-9][0-9]*$$/+`git log --oneline 9c447ad.. | wc -l`/;" Makefile
187186

188187
ABCMKARGS = CC="$(CXX)" CXX="$(CXX)" ABC_USE_LIBSTDCXX=1 ABC_USE_NAMESPACE=abc VERBOSE=$(Q)
189188

@@ -532,7 +531,6 @@ LIBS_VERIFIC += -Wl,--whole-archive $(patsubst %,$(VERIFIC_DIR)/%/*-linux.a,$(VE
532531
endif
533532
endif
534533

535-
536534
ifeq ($(ENABLE_COVER),1)
537535
CXXFLAGS += -DYOSYS_ENABLE_COVER
538536
endif
@@ -627,12 +625,14 @@ endif
627625
$(eval $(call add_include_file,libs/sha1/sha1.h))
628626
$(eval $(call add_include_file,libs/json11/json11.hpp))
629627
$(eval $(call add_include_file,passes/fsm/fsmdata.h))
628+
$(eval $(call add_include_file,passes/techmap/libparse.h))
630629
$(eval $(call add_include_file,frontends/ast/ast.h))
631630
$(eval $(call add_include_file,frontends/ast/ast_binding.h))
632631
$(eval $(call add_include_file,frontends/blif/blifparse.h))
633632
$(eval $(call add_include_file,backends/rtlil/rtlil_backend.h))
634633

635634
OBJS += kernel/driver.o kernel/register.o kernel/rtlil.o kernel/log.o kernel/calc.o kernel/yosys.o kernel/io.o kernel/gzip.o
635+
OBJS += kernel/log_help.o
636636
OBJS += kernel/binding.o kernel/tclapi.o
637637
OBJS += kernel/cellaigs.o kernel/celledges.o kernel/cost.o kernel/satgen.o kernel/scopeinfo.o kernel/qcsat.o kernel/mem.o kernel/ffmerge.o kernel/ff.o kernel/yw.o kernel/json.o kernel/fmt.o kernel/sexpr.o
638638
OBJS += kernel/drivertools.o kernel/functional.o
@@ -867,6 +867,7 @@ MK_TEST_DIRS += tests/arch/nexus
867867
MK_TEST_DIRS += tests/arch/quicklogic/pp3
868868
MK_TEST_DIRS += tests/arch/quicklogic/qlf_k6n10f
869869
MK_TEST_DIRS += tests/arch/xilinx
870+
MK_TEST_DIRS += tests/bugpoint
870871
MK_TEST_DIRS += tests/opt
871872
MK_TEST_DIRS += tests/sat
872873
MK_TEST_DIRS += tests/sim
@@ -980,6 +981,12 @@ unit-test: libyosys.so
980981
clean-unit-test:
981982
@$(MAKE) -C $(UNITESTPATH) clean
982983

984+
install-dev: $(PROGRAM_PREFIX)yosys-config share
985+
$(INSTALL_SUDO) mkdir -p $(DESTDIR)$(BINDIR)
986+
$(INSTALL_SUDO) cp $(PROGRAM_PREFIX)yosys-config $(DESTDIR)$(BINDIR)
987+
$(INSTALL_SUDO) mkdir -p $(DESTDIR)$(DATDIR)
988+
$(INSTALL_SUDO) cp -r share/. $(DESTDIR)$(DATDIR)/.
989+
983990
install: $(TARGETS) $(EXTRA_TARGETS)
984991
$(INSTALL_SUDO) mkdir -p $(DESTDIR)$(BINDIR)
985992
$(INSTALL_SUDO) cp $(filter-out libyosys.so,$(TARGETS)) $(DESTDIR)$(BINDIR)
@@ -1027,19 +1034,8 @@ ifeq ($(ENABLE_PYOSYS),1)
10271034
endif
10281035
endif
10291036

1030-
# also others, but so long as it doesn't fail this is enough to know we tried
1031-
docs/source/cmd/abc.rst: $(TARGETS) $(EXTRA_TARGETS)
1032-
$(Q) mkdir -p docs/source/cmd
1033-
$(Q) mkdir -p temp/docs/source/cmd
1034-
$(Q) cd temp && ./../$(PROGRAM_PREFIX)yosys -p 'help -write-rst-command-reference-manual'
1035-
$(Q) $(RSYNC_CP) temp/docs/source/cmd docs/source
1036-
$(Q) rm -rf temp
1037-
docs/source/cell/word_add.rst: $(TARGETS) $(EXTRA_TARGETS)
1038-
$(Q) mkdir -p docs/source/cell
1039-
$(Q) mkdir -p temp/docs/source/cell
1040-
$(Q) cd temp && ./../$(PROGRAM_PREFIX)yosys -p 'help -write-rst-cells-manual'
1041-
$(Q) $(RSYNC_CP) temp/docs/source/cell docs/source
1042-
$(Q) rm -rf temp
1037+
docs/source/generated/cmds.json: docs/source/generated $(TARGETS) $(EXTRA_TARGETS)
1038+
$(Q) ./$(PROGRAM_PREFIX)yosys -p 'help -dump-cmds-json $@'
10431039

10441040
docs/source/generated/cells.json: docs/source/generated $(TARGETS) $(EXTRA_TARGETS)
10451041
$(Q) ./$(PROGRAM_PREFIX)yosys -p 'help -dump-cells-json $@'
@@ -1056,6 +1052,15 @@ docs/source/generated/functional/rosette.diff: backends/functional/smtlib.cc bac
10561052
PHONY: docs/gen/functional_ir
10571053
docs/gen/functional_ir: docs/source/generated/functional/smtlib.cc docs/source/generated/functional/rosette.diff
10581054

1055+
docs/source/generated/%.log: docs/source/generated $(TARGETS) $(EXTRA_TARGETS)
1056+
$(Q) ./$(PROGRAM_PREFIX)yosys -qQT -h '$*' -l $@
1057+
1058+
docs/source/generated/chformal.cc: passes/cmds/chformal.cc docs/source/generated
1059+
$(Q) cp $< $@
1060+
1061+
PHONY: docs/gen/chformal
1062+
docs/gen/chformal: docs/source/generated/chformal.log docs/source/generated/chformal.cc
1063+
10591064
PHONY: docs/gen docs/usage docs/reqs
10601065
docs/gen: $(TARGETS)
10611066
$(Q) $(MAKE) -C docs gen
@@ -1091,7 +1096,7 @@ docs/reqs:
10911096
$(Q) $(MAKE) -C docs reqs
10921097

10931098
.PHONY: docs/prep
1094-
docs/prep: docs/source/cmd/abc.rst docs/source/generated/cells.json docs/gen docs/usage docs/gen/functional_ir
1099+
docs/prep: docs/source/generated/cells.json docs/source/generated/cmds.json docs/gen docs/usage docs/gen/functional_ir docs/gen/chformal
10951100

10961101
DOC_TARGET ?= html
10971102
docs: docs/prep
@@ -1115,7 +1120,7 @@ clean:
11151120
rm -f tests/tools/cmp_tbdata
11161121
rm -f $(addsuffix /run-test.mk,$(MK_TEST_DIRS))
11171122
-$(MAKE) -C docs clean
1118-
rm -rf docs/source/cmd docs/util/__pycache__
1123+
rm -rf docs/util/__pycache__
11191124
rm -f *.whl
11201125
rm -f libyosys.so
11211126

@@ -1222,5 +1227,5 @@ echo-cxx:
12221227

12231228
FORCE:
12241229

1225-
.PHONY: all top-all abc test install install-abc docs clean mrproper qtcreator coverage vcxsrc
1230+
.PHONY: all top-all abc test install-dev install install-abc docs clean mrproper qtcreator coverage vcxsrc
12261231
.PHONY: config-clean config-clang config-gcc config-gcc-static config-gprof config-sudo

0 commit comments

Comments
 (0)