Robert O'Callahan
b3baba4522
Merge cd370bf6d1
into c2291c10a6
2025-09-10 11:49:17 +02:00
Robert O'Callahan
c41ba912d8
Support IdString parameters in stringf
2025-09-01 23:34:42 +00:00
Robert O'Callahan
a515055be4
Make Const::is_*() functions work on packed bits without decaying to vector<State>
2025-09-01 02:45:58 +00:00
Robert O'Callahan
9c96e61e9b
Const::decode_string() doesn't need to call bitvectorize
2025-09-01 02:45:58 +00:00
Robert O'Callahan
a57b7dfd2e
Make Const::as_string work without reducing packed bits to vector<State>
2025-09-01 02:45:58 +00:00
Robert O'Callahan
c2ad2a407a
Optimize Const::hash_into to hash packed bits efficiently
2025-09-01 02:45:57 +00:00
Robert O'Callahan
ec52d6c649
Fast path for Const::operator==
2025-09-01 02:45:57 +00:00
Robert O'Callahan
60099e5005
Make Const::as_bool and Const::as_int work with packed bits without decaying to vector<State>
2025-09-01 02:45:57 +00:00
Robert O'Callahan
e206b059f6
Make Const::Const(long long) constructor use packed bits internally if possible
2025-09-01 02:45:57 +00:00
Robert O'Callahan
f9ee5e4c31
Update tests to avoid bits()
2025-09-01 02:45:57 +00:00
Robert O'Callahan
e151fbc5df
Update Const API with alternatives to direct use of bits()
...
In particular, `Const::resize()`, `Const::set()`, and `Const::iterator`.
2025-09-01 02:44:23 +00:00
Robert O'Callahan
4657768506
Fix const_iterator postincrement behavior
2025-08-31 23:42:53 +00: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
Emil J. Tywoniak
7ee62c832b
bitpattern: unit test
2025-08-18 19:57:45 +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
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
Emil J. Tywoniak
c7a3abbcc4
libparse: LibertyExpression unit test
2025-07-15 12:53:30 +02:00
Emil J. Tywoniak
e960428587
unit tests: fix run failure detection
2025-07-15 12:21:01 +02:00
Jannis Harder
7cd822b7f5
rtlil: Add {from,to}_hdl_index methods to Wire
...
In the past we had the occasional bug due to some place not handling all
4 combinations of upto/downto and zero/nonzero start_offset correctly.
2025-02-18 17:08:45 +01:00
Emil J. Tywoniak
785bd44da7
rtlil: represent Const strings as std::string
2024-10-14 06:28:12 +02:00
Roland Coeurjoly
4a2fb18718
Changes in libs, passes and tests Makefiles. LDLIBS -> LIBS. LDFLAGS -> LINKFLAGS. CXX is clang++ or g++, not clang and gcc
2024-02-25 17:23:56 +01:00
Clifford Wolf
5c96982522
Build hotfix in tests/unit/Makefile
2016-12-11 10:58:49 +01:00
rodrigosiqueira
b932e2355d
Improved unit test structure
...
Signed-off-by: rodrigosiqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: chaws <18oliveira.charles@gmail.com>
* Merged run-all-unitest inside unit-test target
* Fixed Makefile dependencies
* Updated documentation about unit test
2016-12-10 18:21:56 -02:00
rodrigosiqueira
e0152319f5
Added required structure to implement unit tests
...
Added modifications inside the main Makefile to refers the unit test Makefile.
Added separated Makefile only for compiling unit tests.
Added simple example of unit test.
Signed-off-by: Charles Oliveira <18oliveira.charles@gmail.com>
Signed-off-by: Pablo Alejandro <pabloabur@usp.br>
Signed-off-by: Rodrigo Siqueira <siqueira@ime.usp.br>
2016-12-04 11:34:27 -02:00