3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-15 03:35:40 +00:00
Commit graph

497 commits

Author SHA1 Message Date
Emil J. Tywoniak
1a8a95b472 rtlil: fix masquerade 2026-06-10 14:54:45 +02:00
Emil J. Tywoniak
2d3b7e9c92 rtlil: introduce ModuleNameMasq (KNOWN BROKEN, do not merge) 2026-06-10 14:54:43 +02:00
Emil J. Tywoniak
8f8a07efee rtlil: replace AttrObject::meta_idx_ with ObjMeta pointer 2026-06-10 14:54:31 +02:00
Emil J. Tywoniak
0f31d3089e rtlil: extend per-Design meta vector to hold name slot 2026-06-10 14:54:16 +02:00
Emil J. Tywoniak
f1edb571f2 rtlil: evacuate src_id_ from AttrObject to per-Design meta vector 2026-06-10 14:54:05 +02:00
Emil J. Tywoniak
e70eed3296 rtlil: add Module* back-pointer to RTLIL::Memory 2026-06-10 14:53:59 +02:00
Emil J. Tywoniak
9ed93e210b rtlil: add per-Design src meta vector + freelist 2026-06-10 14:53:55 +02:00
Emil J. Tywoniak
29ab42bc4e rtlil: add Module* back-pointer to inner-process AttrObjects 2026-06-10 14:53:48 +02:00
Emil J. Tywoniak
3424c00cd0 twine 2026-06-10 14:53:45 +02:00
Emil J. Tywoniak
c264649ae7 rtlil, patch: incremental signorm via connect_incremental, replacing batched sigNormalize in Patch::patch 2026-06-10 14:52:53 +02:00
Emil J. Tywoniak
5a6568edbe rtlil, patch: update signorm index and driver fields when committing Cell from Patch to Design 2026-05-23 01:09:26 +02:00
Emil J. Tywoniak
9f22b9d2a0 patch: source transfer 2026-05-23 00:10:02 +02:00
Emil J. Tywoniak
dbc7e33908 rtlil: add CellAdderMixin for shared Cell adder interface between Module and Patch 2026-05-23 00:09:14 +02:00
Emil J. Tywoniak
6f0be1b4e9 rtlil: allow friends to use Wire constructors with a factory token pattern 2026-05-23 00:07:39 +02:00
Emil J. Tywoniak
3e6b740430 rtlil: allow friends to use Cell constructors with a factory token pattern 2026-05-23 00:07:39 +02:00
Emil J. Tywoniak
b3f605e0d2 patcher: start 2026-05-23 00:07:39 +02:00
Emil J. Tywoniak
b9eae3f64b rtlil: publish signorm fanout 2026-05-22 18:41:49 +02:00
Emil J. Tywoniak
5dce475325 signorm: add timers 2026-05-22 18:40:16 +02:00
Emil J. Tywoniak
fb03a34277 rtlil: add dump_sigmap for hacky signorm debugging 2026-05-22 18:37:58 +02:00
Emil J. Tywoniak
6d08c53429 rtlil: forbid rewrite_sigspecs in signorm 2026-05-22 18:37:13 +02:00
Jannis Harder
423c8be71b WIP half broken snapshot 2026-05-22 18:37:11 +02:00
Emil J. Tywoniak
10bbda93f7 rtlil: extend SigSpec::extract test 2026-04-24 11:04:19 +02:00
Emil J. Tywoniak
25b9b796c4 rtlil: complicate extract again for packing 2026-04-24 11:04:19 +02:00
Robert O'Callahan
b42bb05b63 Parallelize Design::check() 2026-03-06 02:03:21 +00:00
Robert O'Callahan
7af5dbae35 Add IdString::unescape() method
We've already talked about adding this as an alternative to `log_id()`, and we'll
need it later in this PR.
2026-03-06 02:03:21 +00:00
nella
04822c6660 Readd builtin_ff_cell_types for plugin parity. 2026-03-04 12:39:45 +01:00
nella
66bd4716cf rtlil use newcelltypes. 2026-03-04 12:39:45 +01:00
Natalia
cf511628b0 modify generator for pyosys/wrappers.cc instead of headers 2026-01-18 02:11:09 -08:00
Natalia
fb864e91ee Add Design::run_pass() API for programmatic pass execution
This commit adds a new run_pass() method to the RTLIL::Design class,
providing a convenient API for executing Yosys passes programmatically.

This is particularly useful for PyYosys users who want to run passes
on a design object without needing to manually construct Pass::call()
invocations. The method wraps Pass::call() with appropriate logging
to maintain consistency with command-line pass execution.

Example usage (from Python):
    design = ys.Design()
    # ... build or load design ...
    design.run_pass("hierarchy")
    design.run_pass("proc")
    design.run_pass("opt")

Changes:
- kernel/rtlil.h: Add run_pass() method declaration
- kernel/rtlil.cc: Implement run_pass() method
- tests/unit/kernel/test_design_run_pass.cc: Add unit tests
2026-01-14 17:35:45 -08:00
nella
210b733555 Add rtlil string getters 2026-01-14 15:37:18 +01:00
Robert O'Callahan
8da919587d Parallelize opt_merge.
I'm not sure why but this is actually faster than existing `opt_merge` even with
YOSYS_MAX_THREADS=1, for the jpeg synthesis test. 16.0s before, 15.5s after for
end-to-end synthesis.
2026-01-08 04:21:39 +00:00
Emil J
0ab967b036
Merge pull request #5564 from rocallahan/pass-fuzz
Add support for fuzz-test comparison of two passes intended to give identical RTLIL results
2026-01-06 20:07:31 +01:00
Robert O'Callahan
a6d696ba2b Give IdString a default move constructor and make it a POD type.
Now that we're not refcounting `IdString`, it can use the default move constructor.
This lets us make `IdString` a POD type so it can be passed in registers
in the standard C++ ABI.
2025-12-30 22:35:14 +00:00
Robert O'Callahan
48cdb499f2 Remove IdString::id_string().
This was needed for the short time when `ID()` could return a value of `StaticIdString`.
That is no longer a problem.
2025-12-22 01:57:30 +00:00
Robert O'Callahan
46cb05c471 Pass IdString by value instead of by const reference.
When IdString refcounting was expensive, it made sense to pass it by const reference
instead of by value, to avoid refcount churn. Now that IdString is not refcounted,
it's slightly more efficient to pass it by value.
2025-12-22 01:52:59 +00:00
Robert O'Callahan
ddd6a16ee0 Add -legalize option to read_rtlil 2025-12-21 21:47:48 +00:00
Robert O'Callahan
b23dc345ae Make it safe to access .c_str() for autoidx IDs in a multithreaded context 2025-11-25 22:49:41 +00:00
Robert O'Callahan
948001f39f Merge the two autoidx hashtables into one
When something calls `IdString::c_str()` on an autoidx ID, we need to cache the
full string in a thread-safe way. If we need to allocate an entry in some data
structure to do that, it's difficult to do in a thread-safe no-performance-hazard way.
So instead, store the cached string pointer in the same hashtable as the prefix
pointer.
2025-11-25 21:57:46 +00:00
Robert O'Callahan
8f0ecce53f Forbid creating IdStrings and incrementing autoidx during multithreaded phases, and add dynamic checks for that
We could make it safe to increment autoidx during multithreaded passes, but that's
actually undesirable because it would lead to nondeterminism. If/when we need new
IDs during parallel passes, we'll have to figure out how to allocate them in a
deterministic way, and that will depend on the details of what the pass does.
So don't try to tackle that now.
2025-11-25 21:57:46 +00:00
Robert O'Callahan
4c8b537d71 Remove YOSYS_NO_IDS_REFCNT
Refcounting is hardly used at all so this option is not that useful.

We might want to have a different option that disables GC if that becomes
a performance issue, but that should be a different option.
2025-11-25 21:57:46 +00:00
Emil J. Tywoniak
9f07e21e35 rtlil: undeprecate builtin_ff_cell_types 2025-11-19 15:20:50 +01:00
Robert O'Callahan
261a0ae9e1 Implement at() methods on SigSpec so that SigSpec::bits().at() continues to work as it did
Fixes a regression caused by commit 745222fa3b, which caused some
third-party code to fail to build, e.g.:
5d7aa035c6/lib/Transforms/YosysOptimizer/RTLILImporter.cpp (L229)
2025-11-17 09:15:55 +00:00
Emil J. Tywoniak
c497b3b24c Revert "rtlil: make tracing optional in IdString garbage collection"
This reverts commit 8c76f93fce.
2025-11-14 15:32:10 +01:00
Emil J. Tywoniak
8c76f93fce rtlil: make tracing optional in IdString garbage collection 2025-11-12 20:22:30 +01:00
Emil J. Tywoniak
1ee4fc9d27 fix YOSYS_XTRACE_GET_PUT 2025-11-12 20:20:51 +01:00
Robert O'Callahan
578d658871 Add timing stats for IdString garbage collection 2025-11-12 11:52:04 +01:00
Robert O'Callahan
df8444c5e7 Optimize IdString operations to avoid calling c_str() 2025-11-12 11:52:04 +01:00
Robert O'Callahan
e95ed7bbab Make NEW_ID create IDs whose string allocation is delayed 2025-11-12 11:52:04 +01:00
Robert O'Callahan
8895757364 Ensure that new_id(_suffix)() cannot create collisions with existing IdStrings. 2025-11-12 11:52:04 +01:00
Robert O'Callahan
b3f3f42577 Remove StaticIdString and just use IdString now that we can make it constexpr 2025-11-12 11:52:04 +01:00