3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-28 12:19:01 +00:00
Commit graph

15834 commits

Author SHA1 Message Date
Jannis Harder
4918f37be3 write_aiger2: Treat inout ports as output ports
With the previous bufnorm implementation inout ports were not supported
at all, so this didn't matter, but with the new bufnorm implementation
they need to be treated as output ports.
2025-09-17 13:56:46 +02:00
Jannis Harder
5f79a6e868 Clean up $buf with 'z inputs, $input_port and $connect cells
This ensures that entering and leaving bufnorm followed by `opt_clean`
is equivalent to just running `opt_clean`.

Also make sure that 'z-$buf cells get techmapped in a compatible way.
2025-09-17 13:56:46 +02:00
Jannis Harder
d88d6fce87 kernel: Rewrite bufNormalize
This is a complete rewrite of the RTLIL-kernel-side bufnorm code. This
is done to support inout ports and undirected connections as well as to
allow removal of cells while in bufnorm mode.

This doesn't yet update the (experimental) `bufnorm` pass, so to
manually test the new kernel functionality, it is important to only use
`bufnorm -update` and `bufnorm -reset` which rely entirely on the kernel
functionality. Other modes of the `bufnorm` pass may still fail in the
presence of inout ports or undirected connections.
2025-09-17 13:56:46 +02:00
Jannis Harder
1251e92e3a Add $input_port and $connect cell types 2025-09-17 13:56:46 +02:00
Jannis Harder
c4f435569f kernel: Add known_driver method to Wire/SigSpec 2025-09-17 13:56:46 +02:00
Jannis Harder
22423b97c1 kernel: Add RTLIL::PortDir for a combined input and output flag 2025-09-17 13:56:46 +02:00
Jannis Harder
6466b15367
Merge pull request #5351 from jix/xaiger_ponum_fix
write_xaiger2: Fix output port mapping when opaque boxes are present
2025-09-17 13:56:21 +02:00
Jannis Harder
2d81726459 write_xaiger2: Fix output port mapping when opaque boxes are present 2025-09-17 13:10:04 +02:00
Emil J
73e47ac3fe
Merge pull request #5357 from rocallahan/builtin-ff
Instead of using `builtin_ff_cell_types()` directly, go through a method `Cell::is_builtin_ff()`
2025-09-17 11:37:16 +02:00
Emil J
0e4e2de8f1
Merge pull request #5354 from rocallahan/more-remove-cstr
Remove more `.c_str()` calls
2025-09-17 11:17:01 +02:00
Robert O'Callahan
d24488d3a5 Instead of using builtin_ff_cell_types() directly, go through a method Cell::is_builtin_ff() 2025-09-17 03:24:19 +00:00
github-actions[bot]
5e550ddc30 Bump version 2025-09-17 00:22:59 +00:00
Robert O'Callahan
f80be49fa1 Remove unnecessary .c_str() in EDIF_ macros 2025-09-16 23:14:11 +00:00
Robert O'Callahan
a1141f1a4c Remove some unnecessary .c_str() calls to the result of unescape_id() 2025-09-16 23:12:14 +00:00
Robert O'Callahan
d276529d46 Remove .c_str() calls from parameters to log_file_info() 2025-09-16 23:06:28 +00:00
Robert O'Callahan
548deba259 Remove .c_str() calls from parameters to log_file_warning() 2025-09-16 23:03:45 +00:00
Robert O'Callahan
a7c46f7b4a Remove .c_str() calls from parameters to log_warning()/log_warning_noprefix() 2025-09-16 23:02:16 +00:00
Robert O'Callahan
d1fd6de6da Remove .c_str() calls from parameters to log_header() 2025-09-16 23:00:42 +00:00
Robert O'Callahan
5ac6858f26 Remove .c_str() from log_cmd_error() and log_file_error() parameters 2025-09-16 22:59:08 +00:00
Jannis Harder
b95549b469
Merge pull request #5348 from rocallahan/remove-string_buf
Remove `string_buf` by making `log_signal()` and `log_const()` return `std::string`
2025-09-16 20:20:56 +02:00
Emil J
7bbd0595bb
Merge pull request #5347 from rocallahan/fix-subcircuit
Fix `subcircuit` building without `#define _YOSYS_`
2025-09-16 17:01:45 +02:00
Emil J
d52d2772d0
Merge pull request #5328 from rhanqtl/issue-5234
fix(parse): #5234 adjust width of rhs according to lhs
2025-09-16 17:00:46 +02:00
rhanqtl
11b829ba70 fix(parse): #5234 adjust width of rhs according to lhs 2025-09-16 15:24:23 +02:00
Emil J
c0577890f0
Merge pull request #5316 from rocallahan/cleanup-Const
Cleanup `RTLIL::Const`
2025-09-16 10:47:29 +02:00
Robert O'Callahan
fee2b8992c Stop using mutable in Const.
Now that we only call `bitvectorize()` in non-const methods, we can move the casting-away-const to only happen
in `bitvectorize()`, which is deprecated so only some plugins (maybe) are using it.

This means `const` `Const` methods don't change the underlying data, which means
they'll be safe to use from multiple threads if/when we want to do that.
2025-09-16 03:17:24 +00:00
Robert O'Callahan
29810f1e7c Make Const::is_*() functions work on packed bits without decaying to vector<State> 2025-09-16 03:17:24 +00:00
Robert O'Callahan
caaf9a4400 Const::decode_string() doesn't need to call bitvectorize 2025-09-16 03:17:24 +00:00
Robert O'Callahan
cb1186aac5 Make Const::as_string work without reducing packed bits to vector<State> 2025-09-16 03:17:24 +00:00
Robert O'Callahan
f61e3377a9 Hash strings 8 bytes at a time 2025-09-16 03:17:24 +00:00
Robert O'Callahan
67a274ed1f Optimize Const::hash_into to hash packed bits efficiently 2025-09-16 03:17:24 +00:00
Robert O'Callahan
1a367b907c Use fast path for 32-bit Const integer constructor in more places 2025-09-16 03:17:24 +00:00
Robert O'Callahan
9ad83cc67b Fast path for Const::operator== 2025-09-16 03:17:24 +00:00
Robert O'Callahan
b597ad777e Make Const::as_bool and Const::as_int work with packed bits without decaying to vector<State> 2025-09-16 03:17:24 +00:00
Robert O'Callahan
b06085ab6c Make Const::Const(long long) constructor use packed bits internally if possible 2025-09-16 03:17:24 +00:00
Robert O'Callahan
61caa5e042 Deprecate Const::bitvectorize() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
1e244cd78a Deprecate Const::bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
9493292690 Update tests to avoid bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
09b493cfcd Update techlibs to avoid bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
6dc9a8bacf Update kernel to avoid bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
7f247fb125 Update passes/hierarchy to avoid bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
159ca3ba56 Update passes/tests to avoid bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
8cc86b2643 Update passes/techmap to avoid bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
d1642bf510 Update passes/sat to avoid bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
2d5ce8c363 Update passes/proc to avoid bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
5600eb2e5b Update passes/opt to avoid bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
23f196a3b8 Update passes/memory to avoid bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
e1d0c010ef Update passes/fsm to avoid bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
1b589b065d Update passes/cmds to avoid bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
f65ca488ec Update frontends to avoid bits() 2025-09-16 03:17:23 +00:00
Robert O'Callahan
34df6569a6 Update backends to avoid bits() 2025-09-16 03:17:23 +00:00