Commit Graph

18230 Commits

Author SHA1 Message Date
Mohamed Gaber 384f7431fd
pyosys: rewrite wrapper generator
[skip ci]
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
Akash Levy 623c54d513 Only do SFCU if has VHDL 2025-10-02 06:02:39 -07:00
Akash Levy 6021168b03 Add back VHDL support 2025-10-02 00:39:33 -07:00
Akash Levy aa16191b80
Merge branch 'YosysHQ:main' into main 2025-10-01 22:22:07 -07:00
Akash Levy a353716202 Update fanoutbuf 2025-10-01 20:59:36 -07:00
Akash Levy 66abd04b5a Remove annotate_logic_depth 2025-10-01 20:57:51 -07:00
Akash Levy c8d8c4f408 Add fanoutbuf pass 2025-10-01 19:23:45 -07:00
Akash Levy 17e3ed3258 Remove annotate_unqcoef (for now) 2025-10-01 19:23:13 -07:00
github-actions[bot] f7120e9c2a Bump version 2025-10-02 00:22:09 +00:00
Jannis Harder 058766da22
Merge pull request #5393 from sifferman/ifdef_tran
Added ifndef SIMLIB_NOCONNECT
2025-10-01 21:05:44 +02:00
Ethan Sifferman d5beb65d30 added SIMLIB_VERILATOR_COMPAT 2025-10-01 10:19:25 -07:00
Emil J 2872847ea5
Merge pull request #5403 from rocallahan/idstring-empty
Optimize `IdString::empty()`
2025-10-01 11:23:59 +02:00
Robert O'Callahan d45223976a Optimize `IdString::empty()`
I actually saw this take 0.6% of the time in an `opt_clean` pass (under Module::check()).
Trivial issue, but the fix is also trivial and simple.
2025-10-01 02:49:03 +00:00
Robert O'Callahan 915ad949f9 Limit the maximum size of parsed RTLIL constants to 1 Gb.
Without this check it's trivially easy to crash Yosys with a tiny RTLIL input
by specifying a constant with very large width. Fuzz testers love hitting this
over and over again.
2025-10-01 02:17:22 +00:00
Robert O'Callahan ac4cb5e460 Implement a handwritten recursive-descent RTLIL parser with minimal copying 2025-10-01 02:17:22 +00:00
github-actions[bot] 01eaaa4b90 Bump version 2025-10-01 00:26:18 +00:00
Robert O'Callahan 7f550468ea Update RTLIL text representation docs 2025-09-30 21:39:19 +00:00
Robert O'Callahan db3d9a1baf When adding named elements to an RTLIL::Module, std::move the name to avoid refcount churn 2025-09-30 21:39:18 +00:00
Robert O'Callahan 86d8dd6224 Add a moving assignment operator for IdString to avoid refcount churn 2025-09-30 21:39:18 +00:00
Robert O'Callahan 39c6e06e3d Add an IdString(std::string_view) constructor for efficiency when we already know the string length 2025-09-30 21:39:18 +00:00
Robert O'Callahan 6b43fca8df Make the Const string constructor take the string by value and move it into the const 2025-09-30 21:39:18 +00:00
Akash Levy 40f562475e Smallfix 2025-09-30 14:18:23 -07:00
Akash Levy dee059bee8 Fix minor Yosys issues 2025-09-30 12:05:36 -07:00
Akash Levy c26f38faeb
Merge branch 'YosysHQ:main' into main 2025-09-30 11:14:33 -07:00
Emil J 7719beb4ae
Merge pull request #5349 from rocallahan/cleanup-hashops
Reduce hashops verbiage in `OptMergePass`
2025-09-30 19:34:44 +02:00
Emil J 60c551f961
Merge pull request #5400 from YosysHQ/emil/github-contribution-template-update
Update contribution templates
2025-09-30 11:03:49 +02:00
Emil J. Tywoniak dc7764e247 .github: typos 2025-09-30 11:03:19 +02:00
Miodrag Milanović 330a5fc101
Merge pull request #5402 from YosysHQ/micko/extensions
Force linking log_compat when extensions are linked
2025-09-30 09:10:04 +02:00
Miodrag Milanovic e6fa0223c8 Force linking log_compat when extensions are linked 2025-09-30 08:44:31 +02:00
Akash Levy 16215b8786 Merge upstream 2025-09-29 20:58:56 -07:00
Akash Levy 93a24fe275 Put back is_mostly_const 2025-09-29 20:56:58 -07:00
Akash Levy 313c7e4b95 Fix wreduce using queueing algorithm 2025-09-29 20:28:55 -07:00
github-actions[bot] 5fd2aecd90 Bump version 2025-09-30 00:23:05 +00:00
Emil J. Tywoniak b86cc0d9b3 docs: replace Slack with Discourse in extensions writing guide 2025-09-29 23:20:06 +02:00
Emil J. Tywoniak b2adaeec69 .github: replace Slack and GitHub Discussions with Discourse in issue templates 2025-09-29 23:03:54 +02:00
Emil J. Tywoniak 4c17ac5ac2 .github: suggest Discourse in PR template 2025-09-29 23:03:29 +02:00
Akash Levy d36bc8231f Revert wreduce to initial state 2025-09-29 12:44:30 -07:00
ShinyKate 30cb72a162
Merge pull request #4125 from povik/read-blif-gate-ff
read_blif: Represent sequential elements with gate cells
2025-09-29 08:21:16 -05:00
Jannis Harder 47639f8a98
Merge pull request #5388 from jix/bufnorm-followup
Refactor and fixes to incremental bufNormalize + related changes
2025-09-29 15:15:29 +02:00
Jannis Harder 6a7372626a
Merge pull request #5389 from jix/sva_continue
verific: New `-sva-continue-on-error` import option
2025-09-29 15:07:54 +02:00
Emil J 87c1a868d3
Merge pull request #5384 from rocallahan/simplify-opt-merge-logic
Move `OptMerge` cell filtering logic to happen while building the cell vector
2025-09-29 15:03:01 +02:00
Martin Povišer 04c7013f0e
Merge pull request #5399 from povik/opt_hier-bug
opt_hier: Fix two optimizations conflicting
2025-09-29 14:53:54 +02:00
Akash Levy ded986c510 Probably not fast but it works 2025-09-29 04:39:07 -07:00
Akash Levy b2f2d6d6e3 Actually fix wreduce 2025-09-29 04:16:18 -07:00
Akash Levy acf3a6606f Small gitignore fixes 2025-09-29 12:11:59 +01:00
Akash Levy dfc8607a77 Fixups 2025-09-29 03:49:44 -07:00
Martin Povišer a9318db2fa opt_hier: Adjust messages 2025-09-29 12:27:27 +02:00
Martin Povišer ffe2f7a16d opt_hier: Fix two optimizations conflicting
Fix a conflict between the following two:

 * propagation of tied-together inputs in
 * propagation of unused inputs out
2025-09-29 12:27:27 +02:00
Akash Levy 5bf99ac85b
Merge branch 'YosysHQ:main' into main 2025-09-29 02:31:20 -07:00