Commit Graph

4191 Commits

Author SHA1 Message Date
Krystine Sherwin 15852de703
Replacing new usages of selected_* 2024-11-25 17:46:11 +13:00
Krystine Sherwin 89c5ff0a39
select.cc: Fixes for selections 2024-11-25 17:18:21 +13:00
Krystine Sherwin 24e54d942a
abc9: Use push_empty_selection() 2024-11-20 11:45:14 +13:00
Krystine Sherwin 453e9f0a23
Fix select_op_random ignoring boxes 2024-11-20 11:03:52 +13:00
Krystine Sherwin 06f2d1e0fc
Fix describe_selection_for_assert
If the current selection is not the provided selection, push the provided selection.
2024-11-20 11:01:42 +13:00
Krystine Sherwin 06427efb83
Fixing selections 2024-11-20 10:38:23 +13:00
Krystine Sherwin 9484d169c8
Use selection helpers
Catch more uses of selection constructor without assigning a design.
2024-11-20 09:38:33 +13:00
Krystine Sherwin 7ea06990e7
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.
2024-11-19 08:44:45 +13:00
Lofty d9ef388fcc
Merge pull request #4698 from YosysHQ/lofty/dfflibmap-enable
dfflibmap: enable inference
2024-11-13 17:50:17 +00:00
Lofty 4f40187759 dfflibmap: move expression code into libparse 2024-11-13 16:06:57 +00:00
Lofty 08ed2c765e dfflibmap: enable inference 2024-11-13 15:57:45 +00:00
Martin Povišer 2dba345049 portarcs: New command to derive propagation arcs 2024-11-13 16:20:35 +01:00
Martin Povišer 4ce8c7a0d3
Merge pull request #4709 from YosysHQ/emil/idstring-in-fold
functional, glift: use fold overload of IdString::in instead of pool …
2024-11-13 15:17:33 +01:00
Martin Povišer 9da7341003
Merge pull request #4727 from georgerennie/george/bufnorm_constants2
bufnorm: preserve constant bits when mapping back to connections
2024-11-13 14:32:15 +01:00
Martin Povišer 915df16c84
Merge pull request #4728 from YosysHQ/emil/fix-filterlib-roundtrip
filterlib: preserve value quotes
2024-11-12 10:54:35 +01:00
Emil J. Tywoniak 49e1597ea4 filterlib: preserve value quotes 2024-11-12 01:21:07 +01:00
George Rennie ff6c9446c0 bufnorm: preserve constant bits when mapping back to connections 2024-11-12 01:05:15 +01:00
Martin Povišer 1b1a6c4aed
Merge pull request #4525 from georgerennie/peepopt_clock_gate
peepopt: Add formal opt to rewrite latches to ffs in clock gates
2024-11-11 14:49:09 +01:00
George Rennie 8f6058a7d6 bufnorm: preserve constant bits driving wires 2024-11-07 11:48:48 +01:00
Emil J. Tywoniak 387a235158 functional, glift: use fold overload of IdString::in instead of pool literals 2024-11-06 12:48:32 +01:00
Martin Povišer 29af057430
Merge pull request #4707 from povik/stat-unused
stat: Drop unused field
2024-11-05 09:38:29 +01:00
Martin Povišer 4df3a5d7ec stat: Drop unused field 2024-11-05 09:37:35 +01:00
Lofty 3250f2b82b
Merge pull request #4700 from povik/select-list-mod
Add `select -list-mod`
2024-11-04 15:38:42 +00:00
Martin Povišer cbe73c9047 cellmatch: Visit whiteboxes for `-derive_luts` 2024-11-04 14:28:46 +01:00
Martin Povišer c9ed6d8dcf cellmatch: Rename `-lut_attrs` to `-derive_luts`; document option 2024-11-04 14:28:40 +01:00
Martin Povišer 35a20da512 logger: Adjust print 2024-11-04 13:16:40 +01:00
Martin Povišer 7aa3fdab80 select: Add `-list-mod` option 2024-11-04 13:16:13 +01:00
Lofty dd7ea0ab6c qwp: remove 2024-10-25 14:09:58 +01:00
Martin Povišer 9432e972f7
Merge pull request #4626 from povik/select-t-at
select: Add new `t:@<name>` syntax
2024-10-16 10:18:05 +02:00
Martin Povišer 09be0351ce select: Add new `t:@<name>` syntax 2024-10-15 12:22:02 +02:00
Emil J. Tywoniak 785bd44da7 rtlil: represent Const strings as std::string 2024-10-14 06:28:12 +02:00
Martin Povišer a00137c2f6
Merge pull request #4625 from povik/cellmatch-lut
cellmatch: Size the `lut` attribute
2024-10-11 14:08:55 +02:00
KrystalDelusion 0be3b7de51
Merge pull request #4635 from YosysHQ/krys/pr_docs_ci
Remove make docs race conditions (and other docs fixes)
2024-10-08 21:39:30 +13:00
Miodrag Milanovic f079772ade Add TODO for missing help messages 2024-10-08 08:47:51 +02:00
Martin Povišer 9479d3bd3c
Merge pull request #4637 from YosysHQ/emil/bufnorm-warning
bufnorm: avoid warning. NFC
2024-10-07 18:01:42 +02:00
Emil J. Tywoniak a76bcdc58f bufnorm: avoid remove warning. NFC 2024-10-07 17:58:48 +02:00
Martin Povišer 74e92d10e8
Merge pull request #4593 from povik/aiger2
New aiger backend
2024-10-07 16:11:25 +02:00
Martin Povišer 2e587c835f abc9_exe: Document SC mapping options 2024-10-07 12:03:49 +02:00
Martin Povišer 3b6dcc7bd0 abc9_exe: Remove `-genlib` option 2024-10-07 12:03:49 +02:00
Martin Povišer e0a86d5483 abc_new: Start new command for aiger2-based round trip 2024-10-07 12:03:49 +02:00
Martin Povišer e58a9b6ab6 abc9: Understand ASIC options similar to `abc` 2024-10-07 12:03:48 +02:00
Martin Povišer ec42b42bd9 cellmatch: Size the `lut` attribute 2024-10-02 11:29:54 +02:00
N. Engelhardt 8e1e2b9a39
Merge pull request #4495 from povik/check-avert-costly-detail 2024-09-23 15:19:48 +02:00
Martin Povišer 38de01807e Mark `bufnorm` experimental 2024-09-17 10:46:20 +02:00
Claire Xenia Wolf 80119386c0 Add RTLIL "buffered-normalized mode" and improve "bufnorm" pass
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2024-09-17 10:46:20 +02:00
Claire Xenia Wolf 8bb70bac8d Improvements in "bufnorm" pass
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2024-09-17 10:46:20 +02:00
Claire Xenia Wolf d027ead4b5 Improvements in "bufnorm" pass
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2024-09-17 10:46:20 +02:00
Claire Xenia Wolf f4b7ea5fb3 Improvements in "bufnorm" pass
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2024-09-17 10:46:20 +02:00
Claire Xenia Wolf 32808a0393 Improvements and fixes to "bufnorm" cmd
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2024-09-17 10:46:20 +02:00
Claire Xenia Wolf d0b5dfa6ef Add bufnorm pass
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2024-09-17 10:46:20 +02:00