3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-01-27 12:28:44 +00:00
Commit graph

4 commits

Author SHA1 Message Date
Natalia
b6715cf74d Simplify regex to be more permissive
Make the regex less strict about exact whitespace and format. Just look
for a number followed by 'wires' or 'ports' anywhere on the line.
2026-01-14 13:59:26 -08:00
Natalia
1b592c7f8d Fix TCL regex to use POSIX character classes
TCL doesn't support \d and \s escape sequences in regexes. Use [0-9] and
[ \t] instead to match digits and whitespace.
2026-01-14 13:21:16 -08:00
Natalia
a4774cac02 Fix test regex to match upstream stat output format
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.
2026-01-14 12:55:18 -08:00
Natalia
6503ad91c9 splitnets: add -ports_only and -top_only options
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.
2026-01-14 12:01:22 -08:00