The test was using regexes that matched Silimate's modified stat output
format ('Number of wires: <count>'), but upstream yosys uses a different
format (' <count> <area> wires'). Update the regex to match the upstream
format.
Add two new options to the splitnets pass:
- `-ports_only`: Split only module ports, not internal signals. This is
useful when you want to split ports for interface compatibility while
keeping internal signals as multi-bit wires for better readability.
- `-top_only`: Apply splitting only at the top module level, not in
submodules. This is helpful for hierarchical designs where you need
split signals only at the top-level interface.
These options can be combined with existing flags:
- `splitnets -ports_only`: Split all ports in all modules
- `splitnets -ports_only -top_only`: Split ports only in top module
- `splitnets -ports -top_only`: Split both ports and nets only in top
Add comprehensive tests that verify wire/port counts for all flag
combinations using a hierarchical design.
I am getting weird crashes on `main` in `tests/sdc/alu_sub.ys` which I traced to a null `Wire*`
in `SdcObjects::constrained_ports`. The null `Wire*` is being set in the `SdcObjects`
constructor. I don't understand what's going on here, so I added this check to detect the
missing wire early ... and that made the crash go away. Compiler bug maybe? I have
`Debian clang version 19.1.7 (3+build5)`, default build configuration.
Anyway this code seems fine to have.
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.
This avoids changing `assign_map` and `initvals`, which are inputs to the hash function for `known_cells`,
while `known_cells` exists. Changing the hash function for a hashtable while it exists leads to
confusing behavior. That also means the exact behavior of `opt_merge` cannot be reproduced by a
parallel implementation.
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.