Commit Graph

4666 Commits

Author SHA1 Message Date
Miodrag Milanović c9a602e882
Merge pull request #5301 from KrystalDelusion/krys/re_5280
Reapply "Workflow adjustments"
2025-08-28 10:51:49 +02:00
Emil J c5d096b7b8
Merge pull request #5308 from YosysHQ/emil/opt_muxtree-refactor
opt_muxtree: refactor
2025-08-25 16:48:01 +02:00
Emil J. Tywoniak b45e5854bf opt_muxtree: comment wording 2025-08-25 16:36:07 +02:00
Emil J. Tywoniak 4dea774171 opt_muxtree: refactor 2025-08-21 12:52:22 +02:00
Robert O'Callahan 8c04e5266c Use commutative hashing instead of expensive allocation and sorting
For one of our large circuits, this improves the `OptMergePass` runtime
from about 150s to about 130s. It's also simpler code.
2025-08-20 19:35:22 +00:00
Robert O'Callahan 7d0ea0d64f Refactor call to sorted_pmux_in to avoid copying the connection dictionary 2025-08-20 19:35:22 +00:00
Emil J 025d7a5641
Merge pull request #5290 from rocallahan/opt-mux-perf
Make `OptMuxtreePass` int-indexed vectors into hashtables
2025-08-20 20:00:26 +02:00
Jannis Harder c9ad7b7ad0
Merge pull request #5284 from jix/fix_5282
check: Limit detailed cell edge checking for $pmux and $bmux
2025-08-20 14:27:19 +02:00
Krystine Sherwin 3ca2b7951f
memlib: Fix ubsan 2025-08-19 17:05:51 +12:00
Jannis Harder 7c409e2d5a
Merge pull request #5285 from jix/abstract_initstates
abstract: Add -initstates option
2025-08-18 15:39:09 +02:00
Emil J f0ccc65820
Merge pull request #5297 from rocallahan/redundant-assignmap
Remove redundant construction of `assign_map`.
2025-08-18 10:43:44 +02:00
Robert O'Callahan 3f2c4f6f83 Remove redundant construction of `assign_map`.
We call 'assign_map.set()' below which wipes the `SigMap` and reconstructs it.

This operation is expensive because it scans the whole module. I think it's
better to make heavyweight operations more visible so I'm removing
the less obvious operation.
2025-08-17 23:34:11 +00:00
KrystalDelusion 6d55ca204b
Merge pull request #5281 from suisseWalter/add_parameterised_cells_stat
STAT: Add parameterised cells
2025-08-18 09:21:45 +12:00
clemens 4e45b5e1bb permit trailing comma 2025-08-16 09:40:03 +02:00
clemens 8b1f77ebd2 cleanup. printf to errors or warnings 2025-08-16 09:40:03 +02:00
clemens 50fe9dd7f2 clean parsing code 2025-08-16 09:40:03 +02:00
clemens 5fc0e77c3d add functionality to be able to use parameterised cells.
cells can have their area as a function of the input port width.
2025-08-16 09:40:03 +02:00
clemens a6e0ab5ea5 Update (sequential) area to be only local without -hierarchy 2025-08-16 09:09:57 +02:00
suisseWalter f5b219f59e
Update passes/cmds/stat.cc
Co-authored-by: KrystalDelusion <93062060+KrystalDelusion@users.noreply.github.com>
2025-08-16 08:36:06 +02:00
KrystalDelusion 7799c6e6ac
Merge pull request #5291 from YosysHQ/krys/rename_escape
rename.cc: Fixup ports after -unescape
2025-08-16 12:19:49 +12:00
Emil J 70600bb596
Merge pull request #5239 from rocallahan/abc-incremental
In the ABC pass, avoid scanning the entire module for each ABC run
2025-08-15 20:17:32 +02:00
Robert O'Callahan dd88423334 Make OptMuxtree int-indexed vectors into hashtables
For one of our large circuits, this reduced the time for an OPT_MUXTREE pass from
169s to 5s.
2025-08-14 23:09:15 +00:00
Krystine Sherwin ec18d1aede
rename.cc: Fixup ports after -unescape 2025-08-15 10:48:32 +12:00
Robert O'Callahan 62c441107d Build FfInitVals for the entire module once and use it for every ABC run. 2025-08-14 22:29:51 +00:00
Robert O'Callahan 2654bd5355 Compute `is_port` in AbcPass without iterating through all cells and wires in the module every time we run ABC.
This does not scale when we run ABC thousands of times in a single AbcPass.
2025-08-14 22:29:45 +00:00
Robert O'Callahan ac8259b02e Preserve `assign_map` across ABC invocations.
Currently `assign_map` is rebuilt from the module from scratch every time we invoke ABC.
That doesn't scale when we do thousands of ABC runs over large modules. Instead,
create it once and then maintain incrementally it as we update the module.
2025-08-14 22:27:04 +00:00
Robert O'Callahan 4de3ee093e Mark kept FF output wires as ports directly instead of via the 'keep' attribute 2025-08-14 22:26:38 +00:00
clemens 71307b4a51 add Testcases
Fix existing testcases
Fix edgecase where modules where counted as cells.
2025-08-13 14:46:01 +02:00
Emil J. Tywoniak 856fc43a87 rename: format vector slices consistently with HDL upto/downto direction 2025-08-13 11:11:53 +02:00
Jannis Harder 77089a8d03 rename: add -move-to-cell option in -wire mode 2025-08-13 11:11:52 +02:00
clemens 383d11c2ac fix design overview in json.
Fix some unknown cells apearing twice.
2025-08-13 10:09:02 +02:00
clemens 1eb8844e38 fix labeling in report
fix design hierarchy containing wrong values.
remove left over debug print.
2025-08-13 08:36:26 +02:00
Robert O'Callahan ccb23ffc1a Fix indentation 2025-08-13 05:44:52 +00:00
Robert O'Callahan 885bb744e3 Make `module` a parameter of the function so we can change its constness in context 2025-08-13 05:44:52 +00:00
Robert O'Callahan 53c72c0d39 Move code in `abc_module()` that modifies the design into a new function `extract()`
Splits up the big `abc_module()` function and isolates the code that modifies the design
after running ABC.
2025-08-13 05:44:52 +00:00
Robert O'Callahan ceedcecfae Move the input parameters to `abc_module` that are identical across modules to an `AbcConfig` struct. 2025-08-13 05:44:52 +00:00
Robert O'Callahan 4ba42c4752 Move ABC pass state to a struct instead of storing it in global variables. 2025-08-13 05:44:52 +00:00
Anhijkt b3ca5ee0f1 opt_dff: fix timeout issue 2025-08-13 01:48:59 +03:00
Jannis Harder 1f876f3a22 abstract: Add -initstates option 2025-08-12 15:37:12 +02:00
Jannis Harder 256aa3e389 check: Limit detailed cell edge checking for $pmux and $bmux
While these cells can't have a quadratic number of edges between A, B
and Y, they do have a quadratic number of edges between S and Y.
2025-08-12 14:38:20 +02:00
Emil J fb024c4d55
Merge pull request #5135 from YosysHQ/emil/ast-ownership
ast, read_verilog: ownership in AST, use C++ styles for parser and lexer
2025-08-12 10:58:12 +02:00
clemens 2a97987cf2 formatting and remove debug statements 2025-08-12 09:16:05 +02:00
clemens a0dde68487 Improve STAT 2025-08-12 09:04:16 +02:00
Krystine Sherwin 20c2d2a6f3
test_cell: Add comment on $pmux
`-simlib` also doesn't work.
2025-08-12 10:57:59 +12:00
Martin Povišer c589714433
test_cell: Update to $macc_v2 2025-08-12 10:57:59 +12:00
Krystine Sherwin db4ffaffd2
consteval: Fix $bwmux handling
If the cell type has a S signal and hasn't already been handled, use `CellTypes::eval(cell, A, B, S)`.
2025-08-12 10:57:58 +12:00
Krystine Sherwin 014eadd8b9
test_cell: Fix $bweqx 2025-08-12 10:57:58 +12:00
Krystine Sherwin 22aa9fba3b
test_cell: Support more cell types
Still unsupported:
- wide muxes (`$_MUX16_` and friends)

Partially supported types have comments in `test_cell.cc`.

Fix `CellTypes::eval() for `$_NMUX_`.
Fix `RTLIL::Cell::fixup_parameters()` for $concat, $bwmux and $bweqx.
2025-08-12 10:57:58 +12:00
Krystine Sherwin 481ecb51a7
test_cell: Disable $macc testing
Needs updating to `$macc_v2`.
2025-08-12 10:57:58 +12:00
Emil J. Tywoniak c8e0ac0c61 ast, read_verilog: ownership in AST, use C++ styles for parser and lexer 2025-08-11 13:34:10 +02:00
KrystalDelusion 1ae82d7b9d
Merge pull request #5233 from YosysHQ/krys/equiv_assume
Assumptions for equiv_*
2025-08-09 10:39:04 +12:00
Emil J d68d28d05e
Merge pull request #5183 from YosysHQ/emil/test-diagnostics
logger: add -expect types prefix-log, prefix-warning, prefix-error
2025-08-08 14:46:25 +02:00
Krystine Sherwin e02f4469c0
equiv_simple: Avoid std::array
VS build currently failing with `error C2641: cannot deduce template arguments for 'std::array'`.
Changing to `std::array<Cone, 2>` gives `error C2027: use of undefined type` instead.
2025-08-08 12:37:38 +12:00
Emil J. Tywoniak fcd9f98245 equiv_simple: refactor 2025-08-08 01:35:33 +02:00
Emil J 1e58443397
Merge pull request #5264 from YosysHQ/krys/raise_error_always
raise_error: Add -always
2025-08-07 11:43:04 +02:00
Krystine Sherwin 4ac100fe13
cutpoint: Track wire drivers
Necessary to avoid multiple drivers being inserted when a blackbox has inout ports (like when importing an unknown module with `verific`).
If any bits of an inout port have a known driver, treat the port as an input.
If there are no bits with a known driver, treat the port as an output, and mark each bit as having a driver.
2025-08-06 18:11:05 +12:00
Krystine Sherwin b1eeb7de3d
Less verbose equiv assumes
both only print on the first step, and equiv_simple only prints if also verbose
2025-08-06 15:21:10 +12:00
Krystine Sherwin 93b39ad9b3
equiv_induct: Add -set-assumes option
Uses mostly the same code as equiv_simple, but the assumes are already being imported so long as they're in the selection, so it's even easier.
2025-08-06 15:12:48 +12:00
Krystine Sherwin 3959d19291
Reapply "Add groups to command reference"
This reverts commit 81f87ce6ed.
2025-08-06 13:52:12 +12:00
Lofty 7537a49f0d
Merge pull request #5241 from Anhijkt/opt_dff-simplify-pt
opt_dff: implement simplify_patterns
2025-08-04 09:44:57 +01:00
Krystine Sherwin 895dfd963f
raise_error: Add -always 2025-08-02 14:53:36 +12:00
Anhijkt 85e0e8ca67 typo 2025-07-30 21:40:20 +03:00
Anhijkt bfff7a47f1 typo 2025-07-30 21:34:42 +03:00
Anhijkt 206d2a4553 opt_dff: refactor simplify_patterns 2025-07-30 21:31:34 +03:00
KrystalDelusion a18acaca82
Merge pull request #5068 from YosysHQ/krys/bugpoint_fixes
Updates to bugpoint
2025-07-30 10:05:22 +12:00
Fred Tombs b64484795d Fix typos in memlib 2025-07-29 15:27:59 -04:00
Drew Lewis d9b3a3f7bb Improve the performance of `concat_name` in the flattening pass
- Make IdString parameter pass by const ref to avoid IdString ref counting in the constructor
- Remove extra std::string allocation to remove prefix
- Avoid using `stringf` for concatenation
2025-07-29 10:52:32 +02:00
Krystine Sherwin d3ff803b81
bugpoint: Add -suffix option
Allows for adding a suffix to the `bugpoint-case` file name so that multiple `bugpoint`s can run in the same directory, e.g. during a `make test -j4`.
2025-07-29 11:39:52 +12:00
Krystine Sherwin 93f7429f4f
tests: Add bugpoint to MK_TEST_DIRS
Also change `-err_grep` to `-err-grep` for consistency with `-expect-return`.
2025-07-29 11:39:51 +12:00
Krystine Sherwin b5a13ae95b
bugpoint.cc: Rename to -err_grep 2025-07-29 11:39:51 +12:00
Krystine Sherwin 65147670a6
bugpoint.cc: Include csignal for windows 2025-07-29 11:39:51 +12:00
Krystine Sherwin fb92eabdcd
bugpoint: Add -greperr option
`-greperr <string>` redirects stderr to 'bugpoint-case.err', and then searches that file for `<string>`.
Move `-runner` option up with the other options to reduce ambiguity (i.e. so it doesn't look like it's another design parts constraint).
Also some shuffling of `err.ys`.
2025-07-29 11:39:51 +12:00
Krystine Sherwin 8d5dbae06e
raise_error.cc: Option for direct to stderr
Add more to help text to describe usage.
Add test for no value (should `exit(1)`).
2025-07-29 11:39:50 +12:00
Krystine Sherwin 134da811f7
Add raise_error pass
Raise errors from attributes for testing.
I want it for bugpoint tests but it could be useful elsewhere.
2025-07-29 11:39:50 +12:00
Krystine Sherwin a7a926b247
bugpoint.cc: WIN32 exit signals 2025-07-29 11:39:50 +12:00
Krystine Sherwin 8a732080e0
bugpoint: Add -expect-return
Allows checking return value from crashing design.  Makes it possible to only accept designs that crash with e.g. SEGFAULT.
Based on `exec -expect-return`.
2025-07-29 11:39:50 +12:00
Krystine Sherwin 902cbda4f9
bugpoint: Document -wires flag 2025-07-29 11:39:49 +12:00
N. Engelhardt 81f87ce6ed
Revert "Add groups to command reference" 2025-07-23 14:41:49 +00:00
Anhijkt d9fc6dda9e typo 2025-07-21 14:42:52 +03:00
Anhijkt ca8af1f8c8 opt_dff: implement simplify_patterns 2025-07-21 14:15:26 +03:00
Krystine Sherwin 3eb7b35c29
flatten: Move to hierarchy folder 2025-07-21 10:36:19 +12:00
Krystine Sherwin 4ba403829b
cmdref: Groups and group names 2025-07-21 10:36:19 +12:00
Krystine Sherwin af3c28f274
synthprop: Use override keyword
`formatted_help()` introduced the override keyword, which means that the other two methods that were marked as virtual instead raised a warning about inconsistent use of override.  This fixes that by bringing the synthprop (more) in line with the rest of the code-base.
2025-07-21 10:36:18 +12:00
Krystine Sherwin da9bf5d610
cmdref: Drop optiongroups
Linking to optiongroups doesn't add *that* much, and is kind of a pain; meanwhile having the optiongroups adds an extra level of indentation.
Instead of options needing to be in an option group, they instead go in either the root node or nested in a usage node.  Putting them in a usage node allows for more-or-less the previous behaviour but without making it the default.
2025-07-21 10:36:18 +12:00
Krystine Sherwin 5d010789e2
cmdref: Split passes/status from passes/cmds
Rename passes/cmds from "General passes" to "Design modification".
More `yosys.h` includes.

cmdref: Split passes/status from passes/cmds

Rename passes/cmds from "General passes" to "Design modification".
More `yosys.h` includes.
2025-07-21 10:35:57 +12:00
Krystine Sherwin f2ef17b581
cmdref: Assign rmports to greenpak group
Also tidy `#include`s.
2025-07-21 10:35:57 +12:00
Krystine Sherwin 92ab125113
cmdref: Assigning cmds to formal group
Give formal index a proper title.
Use `Pass::formatted_help()` to assign the group, but still return `false` because the help text still comes from `Pass::help()`.
Tidy up some of the affected files' includes to make use of the shared `yosys.h` includes.
2025-07-21 10:35:56 +12:00
Krystine Sherwin d62a110dc8
register.h: Add internal_flag to Pass
Update experimental pass warnings to use a shared function.  Reduces repetition, and also allows all of the warning flags to be combined (which at present is just experimental and the new internal).
Update `test_*` passes to call `internal()` in their constructors.
2025-07-21 10:35:19 +12:00
Krystine Sherwin 1529d991fd
log_help: Refactor help content adding
Content is now added to the `ContentListing` rather than the `PrettyHelp`.
`open_*` methods return the `ContentListing` that was added instead of leaving a hanging continuation.
This allows for (e.g.) options to be added directly to optiongroups, instead of requiring that groups be closed before continuation.
This also means that all `PrettyHelp`s are a listing, with the actual log being called by the default `Pass::help()`; making the mode field redundant.
Added `PrettyHelp::log_help()` which replaces the `PrettyHelp::Mode::LOG` logic.
Added `ContentListing::back()` which just returns the last element of the underlying content vector.
Some of the content tracking was made redundant and removed, in particular `PrettyHelp::_current_listing` and `ContentListing::parent`.

Converted `ContentListing` to a class instead of a struct, adjusting constructors to match.
Added `ContentListing` constructor that accepts a `source_location`.

Update `HelpPass::dump_cmds_json()` for new log_help.
2025-07-21 10:35:18 +12:00
Krystine Sherwin 605f12c2ae
Rename help_v2 to formatted_help
Also add comments to `help()` and `formatted_help()` to clarify usage.
2025-07-21 10:34:54 +12:00
Krystine Sherwin 1c627f4a1b
log_help: Add manual group support
Sets `chformal` group to "formal" for testing purposes
2025-07-21 10:34:31 +12:00
Krystine Sherwin 10fea26fa9
log_help: Options can have content
Refactor `PrettyHelp::endgroup()` -> `PrettyHelp::close(int levels = 1)`.
2025-07-21 10:34:11 +12:00
Krystine Sherwin 3bef122a3f
WIP docs: Proto log_help
Define `PrettyHelp` class with methods for declaring different parts of help message.
Currently able to produce standard help messages as expected.
Updates chformal to use (only) the new help_v2.
Currently makes use of a global static to track the current help context, allowing register.h to live in blissful ignorance and instead rely on help_v2 implementations calling `auto *help = PrettyHelp::get_current();` and `return true;` to minimise impact on rebuilds (i.e. not requiring every source file to be recompiled).
2025-07-21 10:34:11 +12:00
Krystine Sherwin 5ce097ed3d
Docs: Test new pass help with chformal 2025-07-21 10:33:31 +12:00
Martin Povišer 9ab1946799
Merge pull request #5209 from povik/hieropt
Start `opt_hier` to enable hierarchical optimization
2025-07-17 14:12:18 +02:00
N. Engelhardt d009bcc9b6
Merge pull request #5198 from YosysHQ/nak/lcov 2025-07-17 11:57:58 +02:00
N. Engelhardt beb71a6c47 update short help 2025-07-16 17:11:19 +02:00
N. Engelhardt fb6974dcd7 print summary of line coverage to log 2025-07-16 13:40:07 +02:00
Krystine Sherwin d30f934d0d
equiv_simple: Add -set-assumes option
Based on existing code for input cone and the `sat` handling of `-set-assumes`.
Update `equiv_assume.ys` to use `-set-assumes` option.
2025-07-16 21:04:41 +12:00
Emil J. Tywoniak 21e68ec9be libparse: fix space ANDs 2025-07-15 12:53:13 +02:00
Emil J. Tywoniak bf1f236998 dfflibmap: add back tab and quote filters for good vibes 2025-07-11 23:12:58 +02:00
Emil J. Tywoniak c6e1d461fa libparse: support space ANDs 2025-07-11 23:09:30 +02:00
Emil J. Tywoniak 4b1a8a3b66 libparse: add LibertyExpression::str for testing 2025-07-11 18:27:19 +02:00
Emil J 14aad097f0
Merge pull request #5190 from YosysHQ/emil/dfflibmap-fix-negated-next_state
dfflibmap: propagate negated next_state to output correctly
2025-07-10 19:50:02 +02:00
N. Engelhardt 02323295b0
Merge pull request #5179 from YosysHQ/krys/assert2cover 2025-07-10 14:53:22 +02:00
Emil J. Tywoniak ad80e2bd39 libparse: install headers for use in plugins 2025-07-08 13:39:03 +02:00
Emil J 66035f706e
Merge pull request #5177 from YosysHQ/emil/rename-unescape
rename: add -unescape
2025-07-08 10:45:11 +02:00
Emil J. Tywoniak 658c7dd424 rename: fix help 2025-07-07 16:16:57 +02:00
Martin Povišer 22a44e4333 Start `opt_hier` 2025-07-05 16:45:52 +02:00
Miodrag Milanović 54013c6da7
Merge pull request #5162 from YosysHQ/micko/attrmap
Make attrmap able to alter memory attributes as well
2025-06-30 15:24:04 +02:00
N. Engelhardt ef3f541501 add linecoverage command to generate lcov report from selection 2025-06-26 13:21:53 +02:00
Emil J. Tywoniak 2b659626a3 rename: add -unescape 2025-06-24 12:33:33 +02:00
Emil J. Tywoniak 778079b058 dfflibmap: propagate negated next_state to output correctly 2025-06-24 12:01:12 +02:00
George Rennie 170933ecb0
Merge pull request #5165 from georgerennie/george/opt_dff_uaf
opt_dff: don't remove cells until all have been visited to prevent UAF
2025-06-20 23:33:26 +01:00
Krystine Sherwin beaca05b40
Include boxes in attrmap
Rename `selected_members` iterator to memb.
Add comment on `selected_processes` loop for clarity.
2025-06-21 09:49:56 +12:00
Emil J. Tywoniak 41107e5473 log: add -expect types prefix-log, prefix-warning, prefix-error 2025-06-16 21:26:08 +02:00
Krystine Sherwin 45131f4425
chformal: Add -assert2cover option
Also add to chformal tests.
2025-06-14 10:54:23 +12:00
Emil J c0f52c6ead
Merge pull request #5167 from YosysHQ/emil/fix-splitnets-single-bit-vector
splitnets: handle single-bit vectors consistently
2025-06-11 22:47:48 +02:00
N. Engelhardt 0b19f628e9
Merge pull request #5172 from YosysHQ/nak/reduce_warning_spam 2025-06-08 06:50:56 +00:00
George Rennie 8c38e2081d opt_dff: don't emit cells until all have been visited to prevent UAF 2025-06-06 23:46:07 +01:00
N. Engelhardt f1dea78603 don't warn for every blackbox from verific 2025-06-06 15:37:42 +02:00
Emil J. Tywoniak 239c265093 splitnets: handle single-bit vectors consistently 2025-06-05 10:58:06 +02:00
George Rennie 19cdbc5a0c opt_dff: don't remove cells until all have been visited to prevent UAF 2025-06-04 21:02:21 +01:00
Miodrag Milanovic 784de0f6e3 Make attrmap able to alter memory attributes as well 2025-06-04 08:01:21 +02:00
Krystine Sherwin 785cabcb0f
abc9_ops: Skip opt_expr in proc 2025-05-31 12:16:37 +12:00
Krystine Sherwin ab0e3cc05f
Proc: Use selections consistently
All `proc_*` passes now use the same module and process for loops, using `design->all_selected_modules()` and `mod->selected_processes()` respectively.
This simplifies the code, and makes the couple `proc_*` passes that were ignoring boxed modules stop doing that (which seems to have been erroneous rather than intentional).
2025-05-31 12:04:42 +12:00
Lofty e4ab6acb46 Add genlib support to abc_new 2025-05-27 09:47:29 +01:00
Emil J 18abf2d4f7
Merge pull request #5138 from YosysHQ/emil/libcache-verbose
libcache: add -quiet and -verbose
2025-05-24 00:05:46 +02:00
George Rennie e05b21cfae
Merge pull request #5140 from garytwong/typo-fix
Fix typo ("exist" -> "exit").
2025-05-23 13:01:57 +01:00
Gary Wong 4f0cbf2ee6 Fix typo ("exist" -> "exit"). 2025-05-22 18:52:33 -06:00
George Rennie 6331f92d00
Merge pull request #5101 from georgerennie/george/opt_expr_shift_ovfl
opt_expr: fix shift optimization with overflowing shift amount
2025-05-22 15:16:19 +01:00
KrystalDelusion 4c72b0ecd8
Merge pull request #5116 from YosysHQ/krys/update_fst
Update fstlib
2025-05-16 09:22:52 +12:00
KrystalDelusion 3a5ce2df64
Merge pull request #5112 from YosysHQ/krys/on_shutdown
design.cc: Use on_shutdown method
2025-05-16 09:22:39 +12:00
KrystalDelusion f7888c607b
Merge pull request #5089 from YosysHQ/krys/cutpoint_whole
cutpoint: Re-add whole module optimization
2025-05-16 09:22:28 +12:00
Emil J 3823157c25
Merge pull request #5080 from akashlevy/muldiv_c
Add `muldiv_c` peepopt
2025-05-15 11:03:25 +02:00
George Rennie 748600c167
small whitespace cleanup (#5119) 2025-05-14 15:18:57 +02:00
Krystine Sherwin d0b9a0cb98
sim.cc: Move cycle check
Calling `throw dst_end_of_data_exception()` when the desired number of cycles has been reached means that the fst reader can't tidy up after itself and leads to memory leaks.
This doesn't happen when the `-stop` flag is used because the `Yosys::FstData` struct tracks the end time and skips the outer callback if the simulation has gone past the desired end time.
Move cycle checking into the inner callback along with the time checking means that the outer callback no longer needs to throw an exception in order to stop checking further values, while still allowing the fst reader to finish reading and deallocate memory.
2025-05-12 12:48:01 +12:00
Krystine Sherwin cc402ee065
libs/fst: Update upstream
libfst is no longer included in gtkwave and instead has its own repo.  There has also been some refactoring, so the patches need to update to match, as does sim.cc.
2025-05-12 10:21:06 +12:00
Krystine Sherwin af75dce660
Fix Crashes with GCC 15 #5088
When building `WITH_PYTHON`, where a global list of modules is maintained, deleting a module also erases the entry in said global list.  This can lead to memory corruption if the global list is destructed before the module.
Using `on_shutdown()` instead means the module destructor is explicitly called before the global list can be destructed, preventing the issue.
Also add a comment to `Pass::~Pass()` to suggest the same for future passes that might try to use that (and see this commit in the blame if they need a reason why).
2025-05-10 09:59:13 +12:00
Emil J. Tywoniak 2ca2ecaa1c libcache: fix help 2025-05-09 12:40:45 +02:00
Emil J. Tywoniak 0d621ecc11 libcache: add -quiet and -verbose 2025-05-09 11:36:39 +02:00
George Rennie 0dcd94b6ad opt_expr: saturate shift amount instead of overflowing for large shifts 2025-05-07 14:41:13 +02:00
Emil J. Tywoniak 90a2c92370 driver: allow --no-version still write things like Generated by Yosys 2025-05-07 11:34:23 +02:00
Krystine Sherwin 7c89355b70
cutpoint: Re-add whole module optimization
Also add a test script for it.
2025-05-06 09:57:34 +12:00
Emil J. Tywoniak d7affb8821 driver: add --no-version to suppress writing Yosys version in command outputs 2025-05-05 13:12:08 +02:00
KrystalDelusion 22c72a5af4
Merge pull request #4619 from malmeloo/fix/tee-path-whitespace
Allow whitespace in `tee` command paths
2025-05-01 09:33:47 +12:00
Emil J 11f2348246
Merge pull request #5073 from YosysHQ/emil/fix-uncompressed-missing-file-error
gzip: refactor file open failure errors
2025-04-30 19:29:13 +02:00
Akash Levy 4bd91fbb11 Add `muldiv_c` peepopt pass 2025-04-30 08:06:59 -07:00
Emil J. Tywoniak adb1986dc1 gzip: refactor file open failure errors 2025-04-29 10:37:35 +02:00
KrystalDelusion bfe05965f9
Merge pull request #5066 from YosysHQ/george/opt_expr_shr_sign
opt_expr: fix sign extension for shifts
2025-04-29 09:29:10 +12:00