Commit Graph

1671 Commits

Author SHA1 Message Date
Mohamed Gaber 80fcce64da
pyosys: fix ref-only classes, implicit conversions
+ cleanup
2025-10-03 11:54:44 +03:00
Mohamed Gaber 447a6cb3f0
misc: `WITH_PYTHON` -> `YOSYS_ENABLE_PYTHON`
For consistency.

Also trying a new thing: only rebuilding objects that use the pybind11 library. The idea is these are the only objects that include the Python/pybind headers and thus the only ones that depend on the Python ABI in any capacity, so other objects can be reused across wheel builds. This has the potential to cut down build times.
2025-10-03 11:54:44 +03:00
Mohamed Gaber dc88906c91
tests/pyosys: print log on failed test, fix make clean 2025-10-03 11:54:44 +03:00
Mohamed Gaber 54799bb8be
pyosys: globals, set operators for opaque types
There is so much templating going on that compiling wrappers.cc now takes 1m1.668s on an Apple M4…
2025-10-03 11:54:44 +03:00
Mohamed Gaber 88be728353
pyosys: rewrite using pybind11
- Rewrite all Python features to use the pybind11 library instead of boost::python.
  Unlike boost::python, pybind11 is a header-only library that is just included by Pyosys code, saving a lot of compile time on wheels.
- Factor out as much "translation" code from the generator into proper C++ files
- Fix running the embedded interpreter not supporting "from pyosys import libyosys as ys" like wheels
- Move Python-related elements to `pyosys` directory at the root of the repo
- Slight shift in bridging semantics:
  - Containers are declared as "opaque types" and are passed by reference to Python - many methods have been implemented to make them feel right at home without the overhead/ambiguity of copying to Python and then copying back after mutation
  - Monitor/Pass use "trampoline" pattern to support virual methods overridable in Python: virtual methods no longer require `py_` prefix
- Create really short test set for pyosys that just exercises basic functionality
2025-10-03 11:54:44 +03:00
github-actions[bot] f7120e9c2a Bump version 2025-10-02 00:22:09 +00:00
github-actions[bot] 01eaaa4b90 Bump version 2025-10-01 00:26:18 +00:00
Miodrag Milanovic e6fa0223c8 Force linking log_compat when extensions are linked 2025-09-30 08:44:31 +02:00
github-actions[bot] 5fd2aecd90 Bump version 2025-09-30 00:23:05 +00:00
github-actions[bot] 6a5d956747 Bump version 2025-09-26 00:22:24 +00:00
Miodrag Milanovic 4a7f94f1c1 Enable synth_ecp5 wrapper and copy sim files for backwards compatibility 2025-09-25 15:44:05 +01:00
github-actions[bot] 3f29cd7f4e Bump version 2025-09-25 00:22:44 +00:00
github-actions[bot] ef22c6ee73 Bump version 2025-09-24 00:22:58 +00:00
github-actions[bot] 93dca50b91 Bump version 2025-09-23 00:22:45 +00:00
Emil J a78eb9e151
Merge pull request #5315 from YosysHQ/emil/write_rtlil-no-sort
write_rtlil: don't sort
2025-09-22 11:14:39 +02:00
github-actions[bot] b9dc578411 Bump version 2025-09-21 00:25:14 +00:00
github-actions[bot] 6b3a7e2440 Bump version 2025-09-20 00:21:36 +00:00
github-actions[bot] a686c5a73c Bump version 2025-09-18 00:22:24 +00:00
Jannis Harder d88d6fce87 kernel: Rewrite bufNormalize
This is a complete rewrite of the RTLIL-kernel-side bufnorm code. This
is done to support inout ports and undirected connections as well as to
allow removal of cells while in bufnorm mode.

This doesn't yet update the (experimental) `bufnorm` pass, so to
manually test the new kernel functionality, it is important to only use
`bufnorm -update` and `bufnorm -reset` which rely entirely on the kernel
functionality. Other modes of the `bufnorm` pass may still fail in the
presence of inout ports or undirected connections.
2025-09-17 13:56:46 +02:00
github-actions[bot] 5e550ddc30 Bump version 2025-09-17 00:22:59 +00:00
Emil J. Tywoniak 4215f3c134 rtlil: add textual roundtrip test 2025-09-16 15:47:16 +02:00
github-actions[bot] fe9eed0498 Bump version 2025-09-16 00:22:09 +00:00
Robert O'Callahan 27462da208 Run ABCs in parallel.
Large circuits can run hundreds or thousands of ABCs in a single AbcPass.
For some circuits, some of those ABC runs can run for hundreds of seconds.
Running ABCs in parallel with each other and in parallel with main-thread
processing (reading and writing BLIF files, copying ABC BLIF output into
the design) can give large speedups.
2025-09-15 17:18:42 +02:00
github-actions[bot] fa02d71f65 Bump version 2025-09-13 00:20:53 +00:00
github-actions[bot] 727998f663 Bump version 2025-09-12 00:22:43 +00:00
github-actions[bot] c2291c10a6 Bump version 2025-09-10 00:22:30 +00:00
Jannis Harder 75a97241fa Maintain logging ABI compatiblity with YosysHQ Verific Extensions
The YosysHQ Verific Extensions are compiled separately using their own
stripped-down version of the Yosys headers. To maintain ABI
compatibility with older extension builds post C++-ification of Yosys's
logging APIs, which are backwards compatible on the API but not ABI
level, this commit adds ABI compatible versions of a subset of the old
logging API used by the extensions.
2025-09-09 15:41:03 +02:00
github-actions[bot] 23e4c0e424 Bump version 2025-09-09 00:23:18 +00:00
github-actions[bot] 012ddc2f1e Bump version 2025-09-06 00:21:53 +00:00
github-actions[bot] baa61a146f Bump version 2025-09-05 00:23:12 +00:00
Miodrag Milanovic cec48c6abd Next dev cycle 2025-09-04 08:03:57 +02:00
Miodrag Milanovic 3aca86049e Release version 0.57 2025-09-04 08:00:38 +02:00
github-actions[bot] cd7f924290 Bump version 2025-09-04 00:22:11 +00:00
github-actions[bot] 45829e4d08 Bump version 2025-09-03 00:21:58 +00:00
github-actions[bot] d4c4b21066 Bump version 2025-08-29 00:23:40 +00:00
github-actions[bot] 83d953e957 Bump version 2025-08-26 00:23:36 +00:00
Miodrag Milanovic 9f0904d048 Makefile: fix hardcoded -install_name for libyosys.so 2025-08-25 07:46:34 +02:00
Miodrag Milanovic c6b8f0eed7 Merge branch 'bugfix/remove-hardcoded-soname' of github.com:Jiahui17/yosys into Jiahui17-bugfix/remove-hardcoded-soname 2025-08-25 07:45:26 +02:00
github-actions[bot] 6fdcdd41de Bump version 2025-08-22 00:23:32 +00:00
github-actions[bot] 4926e846f6 Bump version 2025-08-21 00:22:37 +00:00
github-actions[bot] bfc9a322e2 Bump version 2025-08-19 00:24:35 +00:00
github-actions[bot] d73cd78001 Bump version 2025-08-18 00:27:23 +00:00
github-actions[bot] d10fdc0ec5 Bump version 2025-08-16 00:24:02 +00:00
github-actions[bot] bf625951d7 Bump version 2025-08-15 00:26:03 +00:00
github-actions[bot] a265b23ac0 Bump version 2025-08-14 00:25:16 +00:00
github-actions[bot] 8634d83320 Bump version 2025-08-13 00:25:15 +00:00
Krystine Sherwin f4016d96cc Makefile: Add flex lib/include for brew 2025-08-11 13:34:10 +02:00
github-actions[bot] 0d4585dd5f Bump version 2025-08-09 00:24:43 +00:00
github-actions[bot] c9558b3d4f Bump version 2025-08-08 00:26:50 +00:00
Miodrag Milanovic e6059d042d Next dev cycle 2025-08-07 09:20:45 +02:00
Miodrag Milanovic 9c447ad9d4 Release version 0.56 2025-08-07 07:59:29 +02:00
github-actions[bot] ab66d8b814 Bump version 2025-08-07 00:27:08 +00:00
Krystine Sherwin 891a907a30
Add and use ENABLE_HELP_SOURCE
Conditionally include help source tracking to preserve ABI.
Docs builds can (and should) use `ENABLE_HELP_SOURCE` so that the generated sphinx docs can perform default grouping and link to source files.
Regular user-builds don't need the source tracking.
2025-08-06 13:52:13 +12:00
Krystine Sherwin 3959d19291
Reapply "Add groups to command reference"
This reverts commit 81f87ce6ed.
2025-08-06 13:52:12 +12:00
github-actions[bot] 2ad3532a55 Bump version 2025-08-06 00:27:13 +00:00
github-actions[bot] f22fe91237 Bump version 2025-08-05 00:27:22 +00:00
github-actions[bot] 15b4716d18 Bump version 2025-08-03 00:29:54 +00:00
github-actions[bot] 262b00d5e5 Bump version 2025-07-31 00:26:33 +00:00
github-actions[bot] 6440499e57 Bump version 2025-07-30 00:26:56 +00:00
KrystalDelusion a18acaca82
Merge pull request #5068 from YosysHQ/krys/bugpoint_fixes
Updates to bugpoint
2025-07-30 10:05:22 +12:00
github-actions[bot] 8f6d7a3043 Bump version 2025-07-29 00:29:04 +00:00
Krystine Sherwin 93f7429f4f
tests: Add bugpoint to MK_TEST_DIRS
Also change `-err_grep` to `-err-grep` for consistency with `-expect-return`.
2025-07-29 11:39:51 +12:00
github-actions[bot] bf9aaac0fe Bump version 2025-07-25 00:26:42 +00:00
N. Engelhardt 81f87ce6ed
Revert "Add groups to command reference" 2025-07-23 14:41:49 +00:00
github-actions[bot] 2223d7848b Bump version 2025-07-22 00:26:35 +00:00
Krystine Sherwin 14a5cd6c4c
Makefile: Fix chformal.cc copy 2025-07-21 10:37:30 +12:00
Krystine Sherwin c92f200491
Drop <cmd>.rst dump 2025-07-21 10:37:30 +12:00
Krystine Sherwin d88688781d
Docs: Skeleton documentation for writing command help
Use `chformal` as example, comparing the `autocmd` output with `ChformalPass::formal_help()`, the json dump from the `ContentListing`, the command line output, and the RST generated (using `autocmd_rst`).
Includes bullet points on each step for more information.
Should eventually end up in `yosys_internals/extending_yosys/contributing.rst`, but it currently lives in `cmd/index_internal.rst` to avoid merge conflicts since cell help documentation is still WIP.
Also exports chformal source and help output to `docs/source/generated` during `make docs/prep`.
2025-07-21 10:35:57 +12:00
Krystine Sherwin 534163cf4b
source_location: Auto detect library
Drop `ENABLE_SOURCE_LOCATION` flag.
2025-07-21 10:34:54 +12:00
Krystine Sherwin 4722b07485
Docs: docs/source/cmd is source only
i.e. we don't need to clean it, and we don't need to include it in the docs artifact
2025-07-21 10:34:54 +12:00
Krystine Sherwin bab867f347
Makefile: Drop cmds rst from docs/prep 2025-07-21 10:34:13 +12:00
Krystine Sherwin ae3514adfd
log_help: Include source_location
Use `std::experimental::source_location` because clang support is `??`
Add `ENABLE_SOURCE_LOCATION` make variable and corresponding `YOSYS_ENABLE_SOURCE_LOCATION` define.
Dummy out the struct if disabled and check for null instead of using `#ifdef` blocks everywhere.
2025-07-21 10:34:12 +12:00
Krystine Sherwin 3bef122a3f
WIP docs: Proto log_help
Define `PrettyHelp` class with methods for declaring different parts of help message.
Currently able to produce standard help messages as expected.
Updates chformal to use (only) the new help_v2.
Currently makes use of a global static to track the current help context, allowing register.h to live in blissful ignorance and instead rely on help_v2 implementations calling `auto *help = PrettyHelp::get_current();` and `return true;` to minimise impact on rebuilds (i.e. not requiring every source file to be recompiled).
2025-07-21 10:34:11 +12:00
Krystine Sherwin 3718f916f3
Makefile: Add cmds.json to docs/prep 2025-07-21 10:33:31 +12:00
Krystine Sherwin 804e18e0c6
Docs: WIP dump_cmds_json 2025-07-21 10:32:51 +12:00
Krystine Sherwin fe3adfd960
Docs: Remove unused write_cell_rst function
The `help -write-rst-cells-manual` approach was made redundant by `help -dump-cells-json`.
2025-07-21 10:32:09 +12:00
github-actions[bot] aa1daa7023 Bump version 2025-07-18 00:25:48 +00:00
github-actions[bot] af0b263557 Bump version 2025-07-16 00:25:58 +00:00
Catherine 62c270a38b Allow installing headers and `yosys-config` without the rest.
This is useful to be able to build a plugin like `yosys-slang` without
having to build the entirety of Yosys, which can save a lot of time.
2025-07-15 01:28:09 +00:00
github-actions[bot] e57a2b9442 Bump version 2025-07-11 00:25:36 +00:00
Emil J 9334a5c275
Merge pull request #5216 from YosysHQ/emil/publish-libparse-header
Install libparse.h for use in plugins
2025-07-09 14:28:59 +02:00
github-actions[bot] 7566af4a4b Bump version 2025-07-09 00:25:57 +00:00
Emil J. Tywoniak ad80e2bd39 libparse: install headers for use in plugins 2025-07-08 13:39:03 +02:00
github-actions[bot] e60cf3e2fa Bump version 2025-07-08 00:25:06 +00:00
Miodrag Milanovic 8af60b7e17 Next dev cycle 2025-07-07 12:40:53 +02:00
Miodrag Milanovic 60f126cd00 Release version 0.55 2025-07-07 11:26:04 +02:00
github-actions[bot] 99f7d79abb Bump version 2025-07-05 00:23:55 +00:00
github-actions[bot] 67583fee48 Bump version 2025-06-30 00:27:10 +00:00
github-actions[bot] a0a77cd1d0 Bump version 2025-06-24 00:24:55 +00:00
github-actions[bot] 44aa313ba9 Bump version 2025-06-20 00:24:40 +00:00
Jiahui Xu 059228dd4e Makefile: remove hardcoded -soname for libyosys.so 2025-06-19 18:47:48 +02:00
github-actions[bot] cd71f190cd Bump version 2025-06-14 00:24:06 +00:00
github-actions[bot] c561ba84e3 Bump version 2025-06-10 00:24:41 +00:00
Miodrag Milanovic c16cc539d4 Next dev cycle 2025-06-09 08:12:26 +02:00
Miodrag Milanovic db72ec3bde Release version 0.54 2025-06-09 07:23:54 +02:00
github-actions[bot] 2a25d92413 Bump version 2025-06-07 00:24:11 +00:00
github-actions[bot] 50b63c6481 Bump version 2025-06-05 00:24:30 +00:00
github-actions[bot] 86282027c0 Bump version 2025-05-31 00:23:36 +00:00
github-actions[bot] e046e3cdbf Bump version 2025-05-28 00:24:34 +00:00
github-actions[bot] 4f968c6695 Bump version 2025-05-27 00:24:03 +00:00
Emil J 4f7ea38b49
Merge pull request #5127 from RonxBulld/refine_strip
Disable STRIP operations when appropriate.
2025-05-26 15:03:34 +02:00
github-actions[bot] 209df95fb9 Bump version 2025-05-24 00:23:33 +00:00
github-actions[bot] 6c67b29bbb Bump version 2025-05-23 00:24:38 +00:00
RonxBulld 64a115e6f0
Disable STRIP operations when appropriate. 2025-05-18 01:07:06 +08:00
github-actions[bot] 388955031f Bump version 2025-05-17 00:23:43 +00:00
Emil J 3823157c25
Merge pull request #5080 from akashlevy/muldiv_c
Add `muldiv_c` peepopt
2025-05-15 11:03:25 +02:00
github-actions[bot] ae47c49af5 Bump version 2025-05-15 00:22:59 +00:00
github-actions[bot] e3ae7b1400 Bump version 2025-05-13 00:24:04 +00:00
KrystalDelusion c590c0c12c
Merge pull request #5111 from YosysHQ/krys/config_python
Makefile: Conditional assignment of python exe
2025-05-13 09:54:26 +12:00
github-actions[bot] 6900818105 Bump version 2025-05-10 00:22:55 +00:00
KrystalDelusion 1e2d6508d0
Makefile: Conditional assignment of python exe
Using `:=` while providing an override (either in Makefile.conf or on the command line) does not correctly apply the override in other simply expanded variables (using `:=`).  Instead, passing an explicit `PYTHON_EXECUTABLE=python3.15` while leaving `PYTHON_CONFIG` implicitly defined results in it being set to `python3-config` instead of the expected `python3.15-config`.
2025-05-10 09:09:30 +12:00
github-actions[bot] 55bd950af4 Bump version 2025-05-09 00:27:47 +00:00
github-actions[bot] 8da97d0044 Bump version 2025-05-07 00:24:00 +00:00
Miodrag Milanovic 20921ad908 Next dev cycle 2025-05-06 08:26:46 +02:00
Miodrag Milanovic 53c22ab7c0 Release version 0.53 2025-05-06 07:45:16 +02:00
github-actions[bot] 5924f2de7b Bump version 2025-05-06 00:23:55 +00:00
github-actions[bot] 765485a375 Bump version 2025-05-04 00:26:28 +00:00
github-actions[bot] aa30589c12 Bump version 2025-05-01 00:26:28 +00:00
KrystalDelusion 4213f75caa
Merge pull request #4969 from YosysHQ/krys/check_yosys_git
Makefile: Test yosys git status in check-git-abc
2025-05-01 10:09:08 +12:00
Akash Levy 4bd91fbb11 Add `muldiv_c` peepopt pass 2025-04-30 08:06:59 -07:00
github-actions[bot] 58e7cfa559 Bump version 2025-04-27 00:25:27 +00:00
Krystine Sherwin 1e8adc6bd0
Makefile: Redirect all git output
For some platforms (Arch Linux, at least), `git status` reports errors on stdout instead of stderr, so we need to redirect that to `/dev/null` too.  This also prevents `git status` from logging output when the yosys directory is a git repo, but is missing the abc folder.
2025-04-26 10:59:24 +12:00
github-actions[bot] 94af24c801 Bump version 2025-04-25 00:23:50 +00:00
github-actions[bot] c550c301dc Bump version 2025-04-24 00:23:08 +00:00
github-actions[bot] bf20bc0848 Bump version 2025-04-23 00:23:08 +00:00
Emil J a628f84ec0
Merge pull request #5044 from RonxBulld/main
Fixed the problem of not calling abc correctly when using libyosys.so
2025-04-22 12:38:07 +02:00
github-actions[bot] 1788ffcaf7 Bump version 2025-04-22 00:23:01 +00:00
RonxBulld a8ae6f05ea
Fixed the problem of not calling abc correctly when using libyosys.so library (it will try to call yosys-abc as command line instead of calling abc::Abc_RealMain) 2025-04-22 00:54:51 +08:00
github-actions[bot] 08b3a9fc7b Bump version 2025-04-17 00:22:57 +00:00
github-actions[bot] c894685f26 Bump version 2025-04-16 00:23:21 +00:00
github-actions[bot] ea2c1e7ac7 Bump version 2025-04-15 00:23:32 +00:00
Miodrag Milanović 9f25f972dc
Merge pull request #5008 from donn/wheel_builds_fix
wheels: fix builds, add linux aarch64 to ci
2025-04-14 15:10:37 +02:00
Donn b7062143e1 hotfix: fix CHECK_BOOST_PYTHON missing libpython 2025-04-14 14:54:38 +02:00
Donn c18f1310a5 Revert #4901
Partially reverts commit 9c5bffcf93.

The reasoning behind this is that setup.py is intended to strictly consume the Makefile and not be consumed by it. The attempt at using them recursively has caused a number of issues and has rendered Pyosys unusable to some users: See https://github.com/YosysHQ/yosys/issues/5012

Additionally, unlike the previous pyosys installation target, the wheel installation does not respect PREFIX=, only venvs.

For installation inside a venv, the intended method should remain a user manually executing `pip3 install .` instead of relying on the Makefile.
2025-04-14 14:45:41 +02:00
github-actions[bot] 9d3d0a4336 Bump version 2025-04-12 00:22:23 +00:00
github-actions[bot] 33c57937cd Bump version 2025-04-10 00:22:42 +00:00
Emil J a5e8f52ce5
Merge pull request #4976 from Logikable/main
Support array ranges for identifiers in the Liberty parser.
2025-04-09 22:49:52 +02:00
Donn 2bc2105d82 wheels: fix builds, add linux aarch64 to ci
Essentially, something is attempting to build the Yosys EXE when you build libyosys.so now. With `ENABLE_PYTHON_CONFIG_EMBED=0`, the Yosys EXE will always fail to build.

Furthermore, because `ENABLE_PYOSYS` now attempts to build a wheel, building a wheel has become recursive.

This commit uses a supplementary set of libs for the EXE (EXE_LIBS) so it and libyosys.so can be built simultaneously, as well as a new Makefile flag, `ENABLE_WHEEL`, to prevent the aforementioned recursion.

I also enabled aarch64 Linux in the CI because it's publicly available now.
2025-04-09 10:42:40 +02:00
Miodrag Milanovic a2c0847667 Next dev cycle 2025-04-09 08:21:08 +02:00
Miodrag Milanovic fee39a3284 Release version 0.52 2025-04-09 07:38:42 +02:00
github-actions[bot] f602248a2e Bump version 2025-04-09 00:22:49 +00:00
Miodrag Milanovic a9656455b1 Update to latest ABC 2025-04-08 17:39:41 +02:00
github-actions[bot] 857baf2031 Bump version 2025-04-08 00:22:31 +00:00
github-actions[bot] 331952f78d Bump version 2025-04-05 00:22:08 +00:00
KrystalDelusion 40c5694650
Merge pull request #4901 from akashlevy/pyosys_copy_abc
Copy `abc` stuff for pyosys to enable use of the `abc` pass
2025-04-05 10:57:02 +13:00
Akash Levy 9c0da98531 Updates 2025-04-03 17:47:48 -07:00
Sean Luchen bdcbbf2db6 Fix existing tests/liberty tests, and add them to Makefile. 2025-04-03 09:56:24 -07:00
KrystalDelusion 1cfe1e2813
Merge pull request #4974 from YosysHQ/micko/config_exitcode
yosys-config: Propagate exit code for help command
2025-04-03 09:56:13 +13:00
github-actions[bot] f03b44959b Bump version 2025-04-02 00:23:07 +00:00
Miodrag Milanovic 66d7ffb2c5 yosys-config: redirect to stderr/stdout depending of exit code 2025-04-01 08:39:11 +02:00