Commit Graph
63 Commits
Author SHA1 Message Date
Emil J. Tywoniak ba74d22f6b rtlil: intern source locations in a per-design SrcPool
Source locations move off the attribute dict into a dedicated SrcRef on
AttrObject, interned in a per-design SrcPool that hash-conses sets of
location twines. Locations share their file prefix with each other through
the twine pool, and objects that fuse (opt_merge, share, ff/mem rewrites)
carry the union of their inputs' locations instead of a '|'-joined string.

write_rtlil emits an `srcs` section of location sets alongside `twines`;
read_rtlil resolves `\src "@N"` back to a handle and still accepts a plain
location string. -readable renders the locations as text.
2026-08-25 11:40:52 +02:00
Emil J. Tywoniak 1168e35394 twine: split Twine into in-memory TwineNode that doesn't support autoidx variants and temporary TwineSpec that does 2026-08-24 15:53:14 +02:00
Emil J. Tywoniak f7d1a491d7 tests: cover twines, name publicity, hashing and sorting 2026-08-13 18:15:58 +02:00
Emil J. Tywoniak 5088e8f6ed tests: trivial twine damage 2026-08-13 18:15:58 +02:00
nella 7defa51862 Merge pull request #6007 from YosysHQ/nella/fix-shift-fold
Fix wide shift count folded as truncated/signed negative count
2026-07-24 08:17:11 +00:00
Miodrag Milanovic 5574994453 Add dependencies to gtests 2026-07-22 15:03:12 +02:00
Michael Baier 086c50763d Tescases for Width Limit, Resize and Overflow 2026-07-09 14:34:56 +02:00
nella 5628dff0bd Fix wide shift count fold. 2026-07-07 15:04:57 +02:00
nella 2b4ec9d57a Fix covers_nothing. 2026-07-06 13:26:00 +02:00
Miodrag Milanovic 247bcfed65 Remove old Makefile and fix documentation 2026-06-15 15:25:58 +02:00
Catherine a727e7f6e7 Migrate build system to CMake
See #5895 for details.

This commit does not include CI or documentation changes.
2026-06-03 08:58:10 +00:00
Emil J. Tywoniak 1c831aa50d threading: whitespace 2026-05-18 16:26:14 +02:00
Emil J. Tywoniak 10bbda93f7 rtlil: extend SigSpec::extract test 2026-04-24 11:04:19 +02:00
Emil J. Tywoniak a2dafce910 unit tests: rename SigSpec::extract test 2026-04-24 11:04:19 +02:00
Emil J. Tywoniak 25b9b796c4 rtlil: complicate extract again for packing 2026-04-24 11:04:19 +02:00
Emil J. Tywoniak 27737c6e2e rtlil: add remove2 unit test 2026-03-18 23:33:35 +01:00
Robert O'Callahan cdfc586f18 Add unit tests for ConcurrentWorkQueue 2026-03-06 02:20:08 +00:00
Robert O'Callahan 1e96328ede Add some tests for ShardedHashSet 2026-03-06 02:20:08 +00:00
Robert O'Callahan 3910d569da Add unit tests for ConcurrentQueue and ThreadPool 2026-03-06 02:20:08 +00:00
Robert O'Callahan ac55935a68 Add unit-tests for ParallelDispatchThread and friends 2026-03-06 02:20:08 +00:00
nella 66bd4716cf rtlil use newcelltypes. 2026-03-04 12:39:45 +01:00
Emil J. Tywoniak 6d4736269b newcelltypes: extend testing 2026-03-04 12:39:45 +01:00
Emil J. Tywoniak f594014bef newcelltypes: proper bounds for unit test 2026-03-04 12:39:45 +01:00
Emil J. Tywoniak d91e1c8607 newcelltypes: test against builtin_ff_cell_types 2026-03-04 12:22:14 +01:00
Emil J. Tywoniak 2d7d6ca10b newcelltypes: unit test 2026-03-04 12:22:14 +01:00
Emil J 53509a9b2a Merge pull request #5692 from YosysHQ/emil/modtools-fix-db-port-deletion
modtools: fix database sanity
2026-02-20 10:49:28 +01:00
Emil J. Tywoniak abc7563a35 modtools: add ModIndex unit test 2026-02-18 22:15:44 +01:00
Miodrag Milanovic cc79c6a761 Support building out of tree, but keep always in tests/unit 2026-02-12 12:17:07 +01:00
nella a3c9716f18 OptDff fix unit tests. 2026-01-26 22:35:25 +01:00
nella a75e0b2e92 opt_dff minor cleanup, added tests for comp var. 2026-01-26 14:24:01 +01:00
nella 210b733555 Add rtlil string getters 2026-01-14 15:37:18 +01:00
Robert O'Callahan df8444c5e7 Optimize IdString operations to avoid calling c_str() 2025-11-12 11:52:04 +01:00
Robert O'Callahan e95ed7bbab Make NEW_ID create IDs whose string allocation is delayed 2025-11-12 11:52:04 +01:00
Robert O'Callahan 54bde15329 Implement IdString garbage collection instead of refcounting. 2025-11-12 11:52:04 +01:00
Emil J a16fc9b4f3 Merge pull request #5467 from YosysHQ/emil/liberty-unquoted-expressions
libparse: support unquoted expressions
2025-11-06 19:45:17 +01:00
Emil J. Tywoniak 2bf7aac9d1 Makefile: clean unit test on clean, ensure prepared to fix parallelism 2025-11-06 13:59:14 +01:00
Emil J. Tywoniak 4fac7a1b20 libparse: fix space before closing paren in expressions 2025-11-05 13:05:56 +01:00
Miodrag MilanovićandKrystine Sherwin 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 <[email protected]>
2025-09-23 17:10:18 +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
Robert O'Callahan c41ba912d8 Support IdString parameters in stringf 2025-09-01 23:34:42 +00:00
Emil J a67a3ca49c Merge pull request #4497 from YosysHQ/emil/bitpattern-comments
bitpattern: comments
2025-08-25 15:25:37 +02:00