yosys/passes/cmds
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
..
Makefile.inc portarcs: New command to derive propagation arcs 2024-11-13 16:20:35 +01:00
add.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
autoname.cc Speed up the autoname pass by 3x. (#3945) 2023-09-21 09:46:49 +00:00
blackbox.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
box_derive.cc Rename `bbox_derive` to `box_derive` 2024-05-21 16:18:03 +02:00
bugpoint.cc rtlil: represent Const strings as std::string 2024-10-14 06:28:12 +02:00
check.cc check: Skip detailed edge modeling if costly 2024-07-18 13:08:19 +02:00
chformal.cc chformal: Support $check cells and add chformal -lower 2024-02-01 20:10:39 +01:00
chtype.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
clean_zerowidth.cc rtlil: represent Const strings as std::string 2024-10-14 06:28:12 +02:00
connect.cc connect: Do interpret selection arguments 2024-02-01 10:28:36 +01:00
connwrappers.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
copy.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
cover.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
delete.cc rtlil: Make Process handling more uniform with Cell and Wire. 2021-07-12 00:47:34 +02:00
design.cc Fixes for some of clang scan-build detected issues 2023-01-17 12:58:08 +01:00
dft_tag.cc rtlil: represent Const strings as std::string 2024-10-14 06:28:12 +02:00
edgetypes.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
example_dt.cc Add TODO for missing help messages 2024-10-08 08:47:51 +02:00
exec.cc exec: Add missing newline 2024-08-07 13:02:00 +02:00
future.cc Add `future` pass to resolve `$future_ff` cells 2023-09-13 11:32:36 +02:00
glift.cc functional, glift: use fold overload of IdString::in instead of pool literals 2024-11-06 12:48:32 +01:00
internal_stats.cc Merge pull request #4595 from YosysHQ/emil/internal_stats-astnode 2024-09-11 12:21:29 +02:00
logcmd.cc Fix help message typo 2024-06-07 08:26:59 +02:00
logger.cc logger: Adjust print 2024-11-04 13:16:40 +01:00
ltp.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
plugin.cc Add API to overwrite existing pass from plugin 2024-01-30 17:51:11 +01:00
portarcs.cc portarcs: New command to derive propagation arcs 2024-11-13 16:20:35 +01:00
portlist.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
printattrs.cc rtlil: represent Const strings as std::string 2024-10-14 06:28:12 +02:00
rename.cc rename -witness: Bug fix and rename formal cells 2024-03-04 16:53:03 +01:00
scatter.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
scc.cc scc: Use hashlib instead of STL for deterministic behaviour 2023-10-07 10:43:00 +02:00
scratchpad.cc Fitting help messages to 80 character width 2022-08-24 10:40:57 +12:00
select.cc Refactor full_selection 2024-11-19 08:44:45 +13:00
setattr.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
setundef.cc rtlil: represent Const strings as std::string 2024-10-14 06:28:12 +02:00
show.cc show: Add option to add cell/wire "src" attribute into graphviz attribute href 2024-02-14 09:50:53 +01:00
splice.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
splitcells.cc Improve splitcells pass 2023-01-18 00:31:29 +01:00
splitnets.cc rtlil: represent Const strings as std::string 2024-10-14 06:28:12 +02:00
sta.cc sta: warn on unrecognised cells only once 2022-06-08 09:31:49 +01:00
stat.cc stat: Drop unused field 2024-11-05 09:37:35 +01:00
tee.cc tee: Allow logging command output to a given scratchpad value 2022-12-02 14:36:19 +01:00
torder.cc Add v2 memory cells. 2021-08-11 13:34:10 +02:00
trace.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
viz.cc Improvements in "viz" pass 2022-12-09 18:28:17 +01:00
write_file.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
xprop.cc rtlil: represent Const strings as std::string 2024-10-14 06:28:12 +02:00