N. Engelhardt
4513783a02
add tests
2025-10-14 15:48:16 +02:00
Krystine Sherwin
1eb5181700
Add tests/verilog/local_include.*
...
`read_verilog` supports checking both the current directory and the source directory for relative includes. Make sure we aren't regressing that.
2025-10-14 15:47:08 +02:00
Emil J. Tywoniak
e9aedf505c
chtype: replace publish pass with chtype -publish_icells
2025-10-14 15:01:48 +02:00
Emil J. Tywoniak
c46df9ffdc
box_derive: rename -apply to -apply_derived_type
2025-10-13 17:24:32 +02:00
Emil J. Tywoniak
d7cea2c35c
box_derive: add -apply
2025-10-13 17:24:32 +02:00
Emil J
9a12d92551
Merge pull request #5386 from YosysHQ/emil/liberty-glob-all
...
Expand wildcards in Liberty file consumers
2025-10-09 20:21:48 +02:00
Miodrag Milanović
ba1a347d59
Merge pull request #5370 from donn/pyosys_pybind11
...
pyosys: rewrite using pybind11
2025-10-08 13:07:59 +02:00
Miodrag Milanović
4cdaac003f
Merge pull request #3991 from adrianparvino/alumacc-sign
...
alumacc: merge independent of sign
2025-10-08 13:02:10 +02:00
Mohamed Gaber
80fcce64da
pyosys: fix ref-only classes, implicit conversions
...
+ cleanup
2025-10-03 11:54:44 +03:00
Mohamed Gaber
c8404bf86b
pyosys/hashlib: equivalence operators
2025-10-03 11:54:44 +03:00
Mohamed Gaber
dc88906c91
tests/pyosys: print log on failed test, fix make clean
2025-10-03 11:54:44 +03:00
Mohamed Gaber
54799bb8be
pyosys: globals, set operators for opaque types
...
There is so much templating going on that compiling wrappers.cc now takes 1m1.668s on an Apple M4…
2025-10-03 11:54:44 +03:00
Mohamed Gaber
384f7431fd
pyosys: rewrite wrapper generator
...
[skip ci]
2025-10-03 11:54:44 +03:00
Mohamed Gaber
88be728353
pyosys: rewrite using pybind11
...
- Rewrite all Python features to use the pybind11 library instead of boost::python.
Unlike boost::python, pybind11 is a header-only library that is just included by Pyosys code, saving a lot of compile time on wheels.
- Factor out as much "translation" code from the generator into proper C++ files
- Fix running the embedded interpreter not supporting "from pyosys import libyosys as ys" like wheels
- Move Python-related elements to `pyosys` directory at the root of the repo
- Slight shift in bridging semantics:
- Containers are declared as "opaque types" and are passed by reference to Python - many methods have been implemented to make them feel right at home without the overhead/ambiguity of copying to Python and then copying back after mutation
- Monitor/Pass use "trampoline" pattern to support virual methods overridable in Python: virtual methods no longer require `py_` prefix
- Create really short test set for pyosys that just exercises basic functionality
2025-10-03 11:54:44 +03:00
Jannis Harder
47639f8a98
Merge pull request #5388 from jix/bufnorm-followup
...
Refactor and fixes to incremental bufNormalize + related changes
2025-09-29 15:15:29 +02:00
Jannis Harder
6a7372626a
Merge pull request #5389 from jix/sva_continue
...
verific: New `-sva-continue-on-error` import option
2025-09-29 15:07:54 +02:00
Martin Povišer
ffe2f7a16d
opt_hier: Fix two optimizations conflicting
...
Fix a conflict between the following two:
* propagation of tied-together inputs in
* propagation of unused inputs out
2025-09-29 12:27:27 +02:00
Jannis Harder
86fb2f16f7
bufnorm: Refactor and fix incremental bufNormalize
...
This fixes some edge cases the previous version didn't handle properly
by simplifying the logic of determining directly driven wires and
representatives to use as buffer inputs.
2025-09-29 08:21:28 +02:00
Jannis Harder
4bb4b6c662
verific: Extend -sva-continue-on-err to handle FSM explosion
...
This also rolls back any added cells and wires, since we might have
added a lot of helper logic by the point we detect this.
2025-09-27 21:13:02 +02:00
KrystalDelusion
7ebd972165
Merge pull request #5277 from YosysHQ/krys/fix_4983_alt
...
autoname: Avoid integer overflow
2025-09-26 14:11:20 +12:00
Krystine Sherwin
941ba3b745
autoname.ys: Extra check for rename order
...
Disabling comparison with best score will cause this check to fail. Preferred names will not be possible if $name2 has not yet been renamed.
2025-09-26 11:36:23 +12:00
Krystine Sherwin
fef6bdae6c
autoname.cc: Return number of renames
...
Was previously the number of proposed renames, but since renames can be skipped this causes the final count to differ from the number of actually renamed objects.
Check counts in `tests/various/autoname.ys`.
2025-09-26 11:05:50 +12:00
Jannis Harder
83dd99efb7
verific: New `-sva-continue-on-error` import option
...
This option allows you to process a design that includes unsupported
SVA. Unsupported SVA gets imported as formal cells using 'x inputs and
with the `unsupported_sva` attribute set. This allows you to get a
complete list of defined properties or to check only a supported subset
of properties. To ensure no properties are unintentionally skipped for
actual verification, even in cases where `-sva-continue-on-error` is
used by default to read and inspect a design, `hierarchy -simcheck` and
`hierarchy -smtcheck` (run by SBY) now ensure that no `unsupported_sva`
property cells remain in the design.
2025-09-24 18:58:54 +02:00
Emil Jiří Tywoniak
4508676e67
libcache: support liberty filename globbing
2025-09-24 11:41:51 +02:00
Emil Jiří Tywoniak
856a387aad
dfflibmap: support liberty filename globbing
2025-09-24 11:41:51 +02:00
Emil Jiří Tywoniak
a28c0c632b
clockgate: support liberty filename globbing
2025-09-24 11:41:51 +02:00
Emil J
5f6819fd76
Merge pull request #5361 from YosysHQ/emil/simplemap-transfer-src
...
simplemap: fix src attribute transfer
2025-09-23 20:40:57 +02:00
Emil Jiří Tywoniak
6527cc2134
gowin: fix test
2025-09-23 20:03:50 +02:00
KrystalDelusion
d4071b63f7
Merge pull request #5268 from YosysHQ/krys/cutpoint_inout
...
Track wire drivers in cutpoint
2025-09-24 04:14:19 +12:00
Miodrag Milanović
fcc3d7132d
Fix building and running unit tests ( #5374 )
...
* Fix building and running unit tests
* Enable unit tests
* Add gtest always
* test-sanitizers.yml: Use makefile.conf
* proper test setup
* make it run on macOS
* Run libyosys build only for unit tests after testing is done
* Disable LTO on public CI
---------
Co-authored-by: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com>
2025-09-23 17:10:18 +02:00
Emil J
a78eb9e151
Merge pull request #5315 from YosysHQ/emil/write_rtlil-no-sort
...
write_rtlil: don't sort
2025-09-22 11:14:39 +02:00
Emil J. Tywoniak
0d8c21129f
rtlil: remove textual RTLIL reference tests for ease of maintenance
2025-09-19 16:23:26 +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
Emil J. Tywoniak
85bcdee232
rtlil: fix roundtrip test on macOS due to sed non-POSIX non-sense
2025-09-16 15:47:38 +02:00
Emil J. Tywoniak
7e6126f753
rtlil: fix roundtrip test by eliminating absolute paths from src attributes with -relativeshare
2025-09-16 15:47:38 +02:00
Emil J. Tywoniak
73747f6928
read_verilog: add -relativeshare for synthesis reproducibility testing
2025-09-16 15:47:35 +02:00
Emil J. Tywoniak
175e024033
functional: in test, rely less on wreduce doing a perfect job
2025-09-16 15:47:16 +02:00
Emil J. Tywoniak
70e681ba7d
rtlil: move test temporary files to temp directory
2025-09-16 15:47:16 +02:00
Emil J. Tywoniak
fdbdd193c1
rtlil: add roundtrip test for design -stash and design -save, fix #5321
2025-09-16 15:47:16 +02:00
Emil J. Tywoniak
4215f3c134
rtlil: add textual roundtrip test
2025-09-16 15:47:16 +02:00
Emil J. Tywoniak
118c1890b1
raise_error: don't rely on module ordering in test
2025-09-16 15:47:16 +02:00
rhanqtl
11b829ba70
fix(parse): #5234 adjust width of rhs according to lhs
2025-09-16 15:24:23 +02: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
67a274ed1f
Optimize Const::hash_into to hash packed bits efficiently
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
9493292690
Update tests to avoid bits()
2025-09-16 03:17:23 +00:00
Robert O'Callahan
662a3df987
Update Const API with alternatives to direct use of bits()
...
In particular, `Const::resize()`, `Const::set()`, and `Const::iterator`.
2025-09-16 03:17:22 +00:00
Robert O'Callahan
03127173c6
Fix const_iterator postincrement behavior
2025-09-16 03:17:22 +00:00
Emil J. Tywoniak
bc24947a84
tests: replace CC and gcc with CXX and g++
2025-09-11 16:50:23 +02:00
Emil J
5278b9cfe1
Merge pull request #5332 from YosysHQ/parse_specify-rebased
...
Add state_dependent_path_declaration so that `ifnone` can be parsed (rebased)
2025-09-09 21:53:04 +02:00
Michael Kupfer
75316e8c49
Add state_dependent_path_declaration so that `ifnone` can be parsed
2025-09-09 13:04:52 +02:00
Jannis Harder
985b9164da
Disable flaky arch/anlogic/mux test
2025-09-09 10:04:08 +12: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
George Rennie
8fb3f88842
tests: remove -seq 1 from sat with -tempinduct where possible
...
* When used with -tempinduct mode, -seq <N> causes assertions to be
ignored in the first N steps. While this has uses for reset modelling,
for these test cases it is unnecessary and could lead to failures
slipping through uncaught
2025-09-08 18:04:32 +02:00
Emil J. Tywoniak
62120bda06
verilog: test cases that look like SVA labels #862
2025-09-05 12:34:38 +02:00
Krystine Sherwin
bc77b6213b
autoname: Fix selection arg
2025-09-05 00:15:26 +02:00
Krystine Sherwin
f45255f5a2
tests: More autoname tests
2025-09-05 00:15:26 +02:00
Robert O'Callahan
c41ba912d8
Support IdString parameters in stringf
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
Emil J. Tywoniak
8333a83cef
opt_dff: more explicit testing, typo
2025-08-27 11:29:57 +02:00
Emil J
a67a3ca49c
Merge pull request #4497 from YosysHQ/emil/bitpattern-comments
...
bitpattern: comments
2025-08-25 15:25:37 +02:00
Emil J. Tywoniak
01de9fb453
hashlib: extend unit test with subset collisions, shorten runtime
2025-08-20 00:08:23 +02:00
Robert O'Callahan
3a5742ffd2
Improve commutative hashing.
...
The simple XOR `commutative_eat()` implementation produces a lot of collisions.
https://www.preprints.org/manuscript/201710.0192/v1/download is a useful reference on this topic.
Running the included `hashTest.cc` without the hashlib changes, I get 49,580,349 collisions.
The 49,995,000 (i,j) pairs (0 <= i < 10000, i < j < 10000) hash into only 414,651 unique hash values.
We get simple collisions like (0,1) colliding with (2,3).
With the hashlib changes, we get only 707,099 collisions and 49,287,901 unique hash values.
Much better! The `commutative_hash` implementation corresponds to `Sum(4)` in the paper
mentioned above.
2025-08-19 21:45:52 +00:00
Anhijkt
e1276560cd
opt_dff: add another test
2025-08-19 23:48:45 +03:00
Emil J
b0d709f6cf
Merge pull request #5294 from rocallahan/precision-tests
...
Add tests for dynamic precision and with with an int parameter
2025-08-19 16:42:49 +02:00
Emil J. Tywoniak
7ee62c832b
bitpattern: unit test
2025-08-18 19:57:45 +02:00
Jannis Harder
7c409e2d5a
Merge pull request #5285 from jix/abstract_initstates
...
abstract: Add -initstates option
2025-08-18 15:39:09 +02: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
9278bed853
removed copyright notice on lib file.
...
Should be covered by the yosys license not anything else.
2025-08-16 09:40:03 +02:00
clemens
73d1177665
testcases
...
one testcase for single parameter cells.
one testcase for double parameter cells.
2025-08-16 09:40:03 +02:00
clemens
d8fb4da437
updated testcase
2025-08-16 09:32:08 +02:00
Robert O'Callahan
e906ea3f1b
Add tests for dynamic precision and with with an int parameter
2025-08-15 23:58:58 +00:00
Krystine Sherwin
ec18d1aede
rename.cc: Fixup ports after -unescape
2025-08-15 10:48:32 +12:00
Emil J
195d3ef940
Merge pull request #5100 from jix/rename_move_to_cell
...
rename: add -move-to-cell option in -wire mode
2025-08-14 16:45:33 +02:00
Anhijkt
e486994f60
opt_dff: add test
2025-08-14 00:13:23 +03:00
clemens
71307b4a51
add Testcases
...
Fix existing testcases
Fix edgecase where modules where counted as cells.
2025-08-13 14:46:01 +02:00
Jannis Harder
77089a8d03
rename: add -move-to-cell option in -wire mode
2025-08-13 11:11:52 +02:00
Jannis Harder
1f876f3a22
abstract: Add -initstates option
2025-08-12 15:37:12 +02:00
Emil J. Tywoniak
6042ae0e8a
simplify: add smoke test for system function calls
2025-08-12 12:59:31 +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
KrystalDelusion
7f0e864d44
Merge pull request #5265 from bhagwat-rahul/fix-package-import
...
Support package import
2025-08-08 09:32:54 +12: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
Rahul Bhagwat
5cc1365b32
add newline - whitespace
2025-08-06 19:00:11 -04:00
Rahul Bhagwat
d3c8e6c14c
use more standard naming conventions
2025-08-06 15:39:30 -04:00
Rahul Bhagwat
7e0157ba2b
fix whitespace issues
2025-08-06 15:32:36 -04:00
Emil J
8576d2d147
Merge pull request #5263 from rocallahan/stringf-width
...
Making `stringf()` use the format conversion specs as-is without widening them
2025-08-06 11:36:28 +02:00
Krystine Sherwin
af7d1d3f4f
cutpoint_blackbox.ys: Extra edge case
2025-08-06 18:11:35 +12:00
Krystine Sherwin
1bf9530fcc
cutpoint_blackbox.ys: Add verific-style unknown module
2025-08-06 16:51:14 +12:00
Krystine Sherwin
f9e8127e2b
tests: Add equiv_induct to equiv_assume.ys
2025-08-06 15:13:04 +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
Rahul Bhagwat
761015b23e
add separate module test
2025-08-03 23:48:33 -04:00
Krystine Sherwin
f78cd9d13f
raise_error: Extra test
2025-08-02 14:54:32 +12:00
Krystine Sherwin
895dfd963f
raise_error: Add -always
2025-08-02 14:53:36 +12:00
Robert O'Callahan
ffd52a0d8e
Making `stringf()` use the format conversion specs as-is without widening them.
...
And make sure our fast-path for `%d` and `%u` narrows to `int` correctly.
Resolves #5260
2025-07-31 10:54:56 +00:00
KrystalDelusion
a18acaca82
Merge pull request #5068 from YosysHQ/krys/bugpoint_fixes
...
Updates to bugpoint
2025-07-30 10:05:22 +12:00