Commit Graph

572 Commits

Author SHA1 Message Date
tondapusili 29b182fd9b adding more fast Cell accessors and small refactoring to reduce code dup 2026-03-16 10:47:54 -07:00
tondapusili 5d25ae4db6 rtlil: add fast Cell accessors and SigSpec::const_ratio() 2026-03-13 15:56:55 -07:00
tondapusili e394197bc5 rtlil: parameterize SigSpec::is_mostly_const 2026-03-06 15:51:58 -08:00
Akash Levy 7d96a7f73c Update aigmap to go a lot faster using aig template cache and uniquify cache 2026-03-01 22:35:06 -08:00
AdvaySingh1 b29514fafc Added built in cell alongside sim support for cell 2026-02-19 11:48:35 -08:00
Akash Levy 5debd619e5 Add workaround for Liberty duplication 2026-02-13 06:51:42 -08:00
Akash Levy 0485576632 Revert rtlil changes 2026-02-13 04:14:14 -08:00
Akash Levy b8d83c1d5b Fix cell naming issues 2026-02-13 01:05:51 -08:00
Akash Levy f74ac17a5f Undo the terrible upstream changes that break everything... 2026-02-04 22:26:06 -08:00
Akash Levy d3ab45c2fa
Merge branch 'YosysHQ:main' into main 2026-02-04 15:53:43 -08:00
Akash Levy 8e5d24aa6b Bump yosys to latest 2026-02-03 06:08:36 -08:00
Robert O'Callahan dcd7742d52 Avoid scanning entire module if there are no wires to remove
It's pretty common for `opt_clean` to find no wires to remove. In that case,
there is no point scanning the entire design, which can be significantly
expensive for huge designs.
2026-01-23 01:38:20 +00:00
Akash Levy b11037e6c6 Merge remote-tracking branch 'upstream/main' 2026-01-21 15:13:57 -08:00
Robert O'Callahan 2c0448a81b Avoid spurious copy in `IdStringCollector::trace_named()` 2026-01-21 03:31:56 +00:00
Akash Levy ef98c62bf2 Merge 2026-01-14 18:34:16 -08:00
nella 210b733555 Add rtlil string getters 2026-01-14 15:37:18 +01:00
Akash Levy e332ba807d
Merge branch 'YosysHQ:main' into main 2026-01-07 12:40:39 -08: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
Akash Levy 1941e8f042 Bump yosys and abc to latest 2025-12-25 03:46:16 -05: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
Akash Levy f16e34f788 Remove is_mostly_const cover 2025-12-05 20:09:59 -08:00
Akash Levy 2aeada6980 Bump Yosys to latest 2025-12-05 20:05:16 -08:00
Robert O'Callahan 638e904f91 Remove cover() coverage tracking 2025-12-04 16:27:13 +01:00
Akash Levy 4a25f63699 Merge from upstream 2025-11-29 11:53:48 -05: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
Akash Levy a90a5e10d6
Merge branch 'YosysHQ:main' into main 2025-11-18 11:48:04 -05: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
Akash Levy 55cd50f1a6
Merge branch 'YosysHQ:main' into main 2025-11-13 18:11:04 -05: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
Akash Levy 71586d39b0 Merge from upstream 2025-11-12 08:14:33 -08:00
Robert O'Callahan 578d658871 Add timing stats for IdString garbage collection 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 b3f3f42577 Remove StaticIdString and just use IdString now that we can make it constexpr 2025-11-12 11:52:04 +01:00
Robert O'Callahan b0e2d75dbe Make IdString refcounts a hashtable containing only the nonzero refcounts
This saves space and doesn't cost very much since we hardly ever have nonzero refcounts any more.

It also allows for IdStrings with negative indexes, which we're going to add.
2025-11-12 11:52:04 +01:00
Robert O'Callahan 54bde15329 Implement IdString garbage collection instead of refcounting. 2025-11-12 11:52:04 +01:00
Robert O'Callahan 5133b4bdea Create RTLIL::OwningIdString and use it in a few places 2025-11-12 11:52:04 +01:00
Robert O'Callahan d28f97e9da Remove YOSYS_USE_STICKY_IDS 2025-11-12 11:52:04 +01:00
Robert O'Callahan 0fe79ce01b Make RTLIL::Design::get_all_designs() unconditionally defined 2025-11-12 11:52:04 +01:00
Robert O'Callahan e84bc3c6c5 Remove explicit empty-string check when looking up IdStrings 2025-11-12 11:52:04 +01:00
Robert O'Callahan 20639906e3 Store IdString lengths and use them 2025-11-12 11:52:04 +01:00
Akash Levy 950c619569 Smallfixes 2025-11-11 23:50:04 -08:00
Akash Levy e21324d609 Merge from upstream 2025-11-11 22:52:11 -08:00
Robert O'Callahan 1cf3497d15 Repack SigSpecs when possible 2025-11-07 15:54:56 +00:00
Robert O'Callahan 38d1d071a5 Implement SigSpec::updhash() using a relaxed atomic for thread-safety 2025-11-07 15:54:56 +00:00
Robert O'Callahan 745222fa3b Make SigSpec::unpack() non-const 2025-11-07 15:54:56 +00:00