George Rennie
8f3ed1ee37
Merge b9e4418d14
into c2291c10a6
2025-09-10 02:37:21 +01:00
Robert O'Callahan
66d2c2af08
Make log_header()
use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
d34ac0c87d
Make log()
use the FmtString
infrastructure.
...
Now `log()` supports `std::string`.
We have to fix a few places where the format parameter was not a compile time constant.
This is mostly trivial.
2025-09-09 15:41:03 +02:00
Jannis Harder
61a00b9131
memory_libmap: Fix use of uninitialized value for async read ports
...
The code in memory_libmap expects `clk_en` to be initialized for all
`PortVariant`s but the parsing in memlib.cc didn't initialize it for
variants of kind `PortKind::Ar` (async read ports).
While this fixes the immediate CI failure, it would be best to refactor
the code so it becomes obvious if something isn't initialized.
2025-09-09 13:32:46 +02:00
Jannis Harder
b6db32873d
Add IdString const &id_string() const to StaticIdString and IdString
...
The vast majority of ID(...) uses are in a context that is overloaded
for StaticIdString or will cause implicit conversion to an IdString
constant reference. For some sufficently overloaded contexts, implicit
conversion may fail, so it's useful to have a method to force obtaining
a `IdString const &` from an ID(...) use.
When turning all literal IdStrings of the codebase into StaticIdStrings
this was needed in exactly one place, for which this commit adds an
`id_string()` call.
2025-09-09 09:56:55 +12:00
Jannis Harder
3d14108a96
Merge pull request #5323 from rocallahan/IdString-references
...
Pass `IdString` by reference in more places
2025-09-08 20:40:24 +02:00
Jannis Harder
c468ee7add
Merge pull request #5304 from rocallahan/idstring-stringf
...
Support `IdString` parameters in `stringf()` and remove `.c_str()` in a lot of places
2025-09-08 20:29:20 +02:00
Emil J
80582e02b0
Merge pull request #5317 from donn/libparse_error_weak
...
libparse/filterlib: mark LibertyParser::error() as weak
2025-09-08 19:59:08 +02:00
George Rennie
b9e4418d14
proc_dff: comments and NULL->nulptr
2025-09-05 17:31:18 +01:00
George Rennie
2cd393d9e1
proc_dff: use invoke_result_t instead of result_of
2025-09-05 17:31:18 +01:00
George Rennie
1151ff018f
proc_dff: refactor shrinking logic in optimizers
2025-09-05 17:31:18 +01:00
George Rennie
a8b77ae17d
proc_dff: optimize repeated values at bit granularity
2025-09-05 17:31:18 +01:00
George Rennie
da8f1e49df
proc_dff: optimize self-assignment at bit granularity
2025-09-05 17:31:18 +01:00
George Rennie
a07ec225a3
proc_dff: split constant and non-constant resets into different flops
2025-09-05 17:31:18 +01:00
George Rennie
238e437fca
proc_dff: refactor inference logic
...
* Instead of an ad hoc mix of optimizations and inferences, this tries
to make it more principled by first extracting a set of asynchronous
update rules from the process, then optimizing them before lowering
them to a concrete flip-flop type, preferring simpler ones
2025-09-05 17:31:18 +01:00
George Rennie
e4cf288455
opt_dff: sigmap bits before looking up muxes
2025-09-05 17:31:18 +01:00
Mohamed Gaber
ae8c4e2ea6
libparse/filterlib: mark LibertyParser::error() as weak
...
When FILTERLIB is defined (attempts to compile libparse more or less standalone,) mark the `LibertyParser::error()` as weak so utilities using libparse as a library can override its behavior (the default behavior being exit(1)). As the code is quite performance-critical, I've elected to not modify it to raise an exception or have a callback or similar and simply allow for a link-time replacement.
2025-09-05 00:13:45 +02:00
Mike Inouye
6276464ea7
Increase muxtree glob eval attempts to 10M.
2025-09-04 10:52:37 -07:00
Robert O'Callahan
54a258f854
In hash_cell_inputs, avoid constructing an std::pair (which requires copying the port IdString)
2025-09-04 14:17:08 +02:00
Krystine Sherwin
d70f132792
wrapcell.cc: Avoid format name collision
2025-09-03 03:32:01 +12:00
Robert O'Callahan
c7df6954b9
Remove .c_str() from stringf parameters
2025-09-01 23:34:42 +00:00
Emil J
5aa71505fc
Merge pull request #5287 from Anhijkt/opt_dff-fix-5279
...
opt_dff: fix timeout issue
2025-09-01 11:20:35 +02:00
Miodrag Milanovic
88eb83a0c3
Revert "Merge pull request #5301 from KrystalDelusion/krys/re_5280"
...
This reverts commit c9a602e882
, reversing
changes made to 51eaaffe09
.
2025-08-28 11:58:02 +02:00
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