3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-23 07:32:32 +00:00
Commit graph

5823 commits

Author SHA1 Message Date
Krystine Sherwin
b296a970d2
abc9: Use push_empty_selection() 2025-03-14 14:08:14 +13:00
Krystine Sherwin
f15cd73419
Fix select_op_random ignoring boxes 2025-03-14 14:08:14 +13:00
Krystine Sherwin
59802584b0
Fix describe_selection_for_assert
If the current selection is not the provided selection, push the provided selection.
2025-03-14 14:08:14 +13:00
Krystine Sherwin
d09ae42951
Fixing selections 2025-03-14 14:08:14 +13:00
Krystine Sherwin
dac2bb7d4d
Use selection helpers
Catch more uses of selection constructor without assigning a design.
2025-03-14 14:08:13 +13:00
Krystine Sherwin
398afd102e
Refactor full_selection
The `Design::selected_*()` methods no longer unconditionally skip boxed modules.  Instead, selections are now box and design aware.
The selection constructor now optionally takes a design pointer, and has a new `selects_boxes` flag.  If the selection has an assigned design, then `Selection::selected_*()` will only return true for boxed modules if the selects_boxes flag is set.  A warning is raised if a selection is checked and no design is set.  Selections can change design via the `Selection::optimize()` method.
Most places that iterate over `Design::modules()` and check `Selection::selected_module()` should instead use `Design::selected_modules()`.
Since boxed modules should only ever be selected explicitly, and `full_selection` (now) refers to all non-boxed modules, `Selection::optimize()` will clear the `full_selection` flag if the `selects_boxes` flag is enabled, and instead explicitly selects all modules (including boxed modules).  This also means that `full_selection` will only get automatically applied to a design without any boxed modules.

These changes necessitated a number of changes to `select.cc` in order to support this functionality when operating on selections, in particular when combining selections (e.g. by union or difference).
To minimize redundancy, a number of places that previously iterated over `design->modules()` now push the current selection to the design, use `design->selected_modules()`, and then pop the selection when done.

Introduce `RTLIL::NamedObject`, to allow for iterating over all members of a module with a single iterator instead of needing to iterate over wires, cells, memories, and processes separately.
Also implement `Module::selected_{memories, processes, members}()` to match wires and cells methods.  The `selected_members()` method combines each of the other `selected_*()` methods into a single list.
2025-03-14 14:05:39 +13:00
Alain Dargelas
6b6c5c2c19 Actually re-enable pass 2025-03-13 14:48:14 -07:00
Alain Dargelas
68312d046a Fix Yosys test failures 2025-03-13 14:15:13 -07:00
Akash Levy
0a68eb32b3 Disable sub-neg peepopt 2025-03-13 01:55:14 -07:00
Akash Levy
e6da1a2d69 Fix unused warning in annotate_cell_fanout 2025-03-12 20:54:03 -07:00
Akash Levy
e4066b784d Merge remote-tracking branch 'upstream/main' 2025-03-12 19:21:32 -07:00
Martin Povišer
6da543a61a
Merge pull request #4818 from povik/macc_v2
Add `$macc_v2`
2025-03-12 22:55:40 +01:00
Alain Dargelas
8b928a8274 Fixes to enable keep_hierarchy 2025-03-11 10:26:02 -07:00
Emil J. Tywoniak
6c9857403c share: use share.pattern_limit from scratchpad 2025-03-11 14:57:00 +01:00
Akash Levy
4d4e574ebb
Merge pull request #60 from alaindargelas/peepopt_neg_sub
neg-sub peepopt pass
2025-03-10 15:48:49 -07:00
Alain Dargelas
e1671b45b6 Code review 2025-03-10 14:44:14 -07:00
Akash Levy
e360511339
Merge branch 'YosysHQ:main' into main 2025-03-10 14:21:49 -07:00
Akash Levy
3da52326dd Undo muxpack change that causes test failures 2025-03-10 13:50:54 -07:00
Alain Dargelas
6de80bc6b3 neg sub pass 2025-03-10 13:47:06 -07:00
Emil J. Tywoniak
ca9176cd0f share: bail better on too many patterns 2025-03-10 17:55:04 +01:00
Martin Povišer
d8a4991289
Merge pull request #4931 from povik/buf-clean
opt_clean, simplemap: Add `$buf` handling
2025-03-10 15:10:17 +01:00
Emil J. Tywoniak
1d773b50a4 opt_merge: fix dangling pointers in known_cells when keep attribute is used 2025-03-10 13:14:06 +01:00
Emil J. Tywoniak
176faae7c9 opt_merge: fix trivial binary regression 2025-03-10 13:14:06 +01:00
Emil J. Tywoniak
8903740147 opt_merge: switch to unordered_set 2025-03-10 13:14:06 +01:00
Emil J. Tywoniak
ffc057a89c opt_merge: fix the many collisions case 2025-03-10 13:14:06 +01:00
Emil J. Tywoniak
cbb776c626 opt_merge: avoid hashing strings 2025-03-10 13:14:06 +01:00
Akash Levy
2679e1d458 Undo the changes to muxcover so that Yosys tests can pass 2025-03-10 00:41:52 -07:00
Akash Levy
73417368b4 Add muxcover changes 2025-03-09 22:08:19 -07:00
Akash Levy
706872237f Only muxpack to pmux for size 3 or bigger (size 2 is just a mux) 2025-03-09 22:08:00 -07:00
Akash Levy
6cfa779bfa Reduce verbosity of splitfanout 2025-03-09 22:07:30 -07:00
Akash Levy
86d67b47a4
Merge branch 'YosysHQ:main' into main 2025-03-08 15:11:04 -08:00
Emil J
8bb24badf2
Merge pull request #4895 from YosysHQ/emil/fix-share-portbit-infinite-loop
share: fix infinite loop in find_terminal_bits on $mux loop
2025-03-08 13:14:11 +01:00
Akash Levy
3098dcc86c
Merge pull request #56 from alaindargelas/limit_fanout
Fanout limit with buffer tree
2025-03-07 14:19:45 -08:00
Alain Dargelas
52b1cbf456 Separate into 2 passes 2025-03-07 14:11:25 -08:00
Martin Povišer
557047fe1e opt_clean, simplemap: Add $buf handling 2025-03-07 16:08:38 +01:00
Akash Levy
fa97c4830e Generalize muxadd to muxorder 2025-03-06 16:57:47 -08:00
Alain Dargelas
c54c3f66b7 Single call to splitnets 2025-03-06 16:46:22 -08:00
Alain Dargelas
81ab3b5fed call splitnets for the whole design 2025-03-06 16:21:11 -08:00
Alain Dargelas
d4e4ece9fe bit split initial splitfanout call 2025-03-06 10:47:27 -08:00
Alain Dargelas
4b598e317b getfanout factor 2025-03-05 13:10:53 -08:00
Alain Dargelas
f65d822935 cleanup dangling buffers 2025-03-05 11:49:12 -08:00
Alain Dargelas
7d46ab08d5 clocks, resets filters 2025-03-05 10:28:49 -08:00
Alain Dargelas
bc05f4fead Use buf instead of pos 2025-03-05 09:40:26 -08:00
Akash Levy
881080a827 Merge upstream 2025-03-05 07:54:26 -08:00
Akash Levy
12137c7ac4 Update memory_dff naming 2025-03-05 06:39:47 -08:00
Akash Levy
27c0fd9905 Fix pmuxtree naming 2025-03-05 06:36:17 -08:00
Akash Levy
e42e196695 Reenable opt_clean in submod 2025-03-05 06:18:38 -08:00
Akash Levy
fce2f2676d Rename minor things in opt_share 2025-03-05 06:17:41 -08:00
Akash Levy
7c1cb53c85 Packed muxes have src attr for each constituent mux 2025-03-05 06:09:40 -08:00
Akash Levy
8117ab228e Use set for strpool_attribute to maintain ordering, but keep some backwards compatibility 2025-03-05 03:28:19 -08:00