Commit Graph

1480 Commits

Author SHA1 Message Date
Akash Levy e241c9d513
Merge branch 'YosysHQ:main' into main 2025-04-10 14:28:10 -07:00
N. Engelhardt 3410e10ed5
Merge pull request #5000 from YosysHQ/krys/re_refactor_selections 2025-04-10 16:06:36 +00:00
Akash Levy e391707d0a Merge remote-tracking branch 'upstream/main' 2025-04-10 00:19:00 -07:00
Emil J a5e8f52ce5
Merge pull request #4976 from Logikable/main
Support array ranges for identifiers in the Liberty parser.
2025-04-09 22:49:52 +02:00
Krystine Sherwin cd3b914132
Reinstate #4768
Revert the reversion so that we can fix the bugs that the PR missed.
2025-04-08 11:58:05 +12:00
Akash Levy 06c614a010
Merge branch 'YosysHQ:main' into main 2025-04-07 07:28:06 -07:00
Akash Levy 0dab4308a3 Actual merge here 2025-04-06 18:53:43 -07:00
Akash Levy 809a38a597
Merge pull request #78 from williamzhu17/extract_reduce-tests
extract_reduce tests and removed XNOR functionality from extract_reduce
2025-04-03 15:23:09 -07:00
Akash Levy 439d859bba
Merge branch 'YosysHQ:main' into main 2025-04-03 10:48:42 -07:00
Jannis Harder 0f13b55173 Liberty file caching with new `libcache` command
This adds optional in-memory caching of parsed liberty files to speed up
flows that repeatedly parse the same liberty files. To avoid increasing
the memory overhead by default, the caching is disabled by default. The
caching can be controlled globally or on a per path basis using the new
`libcache` command, which also allows purging cached data.
2025-04-03 13:39:35 +02:00
Sean Luchen 4610889d27 Fix two parsing bugs that were causing private regression tests to fail.
These were introduced by 0a6d9f4.
1) While in a paren "(", don't error on newline.
2) Don't parse an extra token when parsing vector ranges. Let the caller parse the next token as necessary.
2025-04-01 13:01:00 -07:00
williamzhu17 bbd132f6ba updated extract_reduce to not consider xnors 2025-04-01 10:10:06 -07:00
Jannis Harder bc01468c75 read_liberty: Faster std::string construction in the liberty lexer
This extends the `LibertyInputStream` added in the previous commit to
allow arbitrary lookahead. Then this uses the lookahead to find the
total length of the token within the input buffer, instead of consuming
the token byte by byte while appending to a std::string. Constructing
the std::string with the total length is known avoids any reallocations
from growing std::string's buffer.
2025-04-01 14:12:12 +02:00
Jannis Harder 119e998f12 read_liberty: Faster input handling for the liberty lexer
The lexer for liberty files was using istream's `get` and `unget` which
are notorious for bad performance and that showed up during profiling.

This replaces the direct `istream` use with a custom LibertyInputStream
that does its own buffering to provide `get` and `unget` that behave the
same way but are implemented with a fast path that is easy to inline and
optimize.
2025-04-01 14:12:12 +02:00
Akash Levy d743a18ea3 Fix extract_reduce infinite loop 2025-03-31 12:36:43 -07:00
Sean Luchen 23f59e0196 Support array ranges for identifiers in the Liberty parser.
This change only handles the case `id : id[range] ;`.
2025-03-31 10:54:00 -07:00
Sean Luchen ac1033ecd5 Factor parse_vector_range out into its own function.
This also fixes the parsing a bit. It was consuming 1 fewer token than
required.
2025-03-31 10:46:18 -07:00
Sean Luchen 0a6d9f4dc9 Factor report_unexpected_token out into its own function. 2025-03-31 10:44:23 -07:00
Akash Levy f72d27fae0 Robustness fixes 2025-03-30 22:23:21 -07:00
Akash Levy 984c6357ba Add -word mode to lut2mux and improve the naming 2025-03-30 17:54:35 -07:00
Akash Levy cded9861dd Add muxpacking to extract_reduce 2025-03-21 02:54:39 -07:00
Akash Levy 95f489beec Merge nice gzip refactor 2025-03-20 16:47:12 -07:00
Emil J. Tywoniak 7aefd4b226 gzip: back to pointers 2025-03-19 13:43:44 +01:00
Emil J. Tywoniak 0877798e18 dfflibmap: allow gzipped liberty files 2025-03-19 13:43:44 +01:00
Emil J. Tywoniak d00259081d gzip: simplify uncompressed interface 2025-03-19 13:43:44 +01:00
Emil J. Tywoniak 218ec3fc05 dfflibmap: allow gzipped liberty files 2025-03-19 13:43:44 +01:00
Akash Levy ecd289b996 Small simplemap rename 2025-03-17 00:38:32 -07:00
Akash Levy e4066b784d Merge remote-tracking branch 'upstream/main' 2025-03-12 19:21:32 -07:00
Martin Povišer 6da543a61a
Merge pull request #4818 from povik/macc_v2
Add `$macc_v2`
2025-03-12 22:55:40 +01:00
Akash Levy e360511339
Merge branch 'YosysHQ:main' into main 2025-03-10 14:21:49 -07:00
Akash Levy 2679e1d458 Undo the changes to muxcover so that Yosys tests can pass 2025-03-10 00:41:52 -07:00
Akash Levy 73417368b4 Add muxcover changes 2025-03-09 22:08:19 -07:00
Martin Povišer 557047fe1e opt_clean, simplemap: Add `$buf` handling 2025-03-07 16:08:38 +01:00
Akash Levy 27c0fd9905 Fix pmuxtree naming 2025-03-05 06:36:17 -08:00
Akash Levy 8117ab228e Use set for strpool_attribute to maintain ordering, but keep some backwards compatibility 2025-03-05 03:28:19 -08:00
Akash Levy 3a67468860 Use ordered set for src attrs when flattening 2025-03-04 23:47:48 -08:00
Akash Levy 1b1855353d Reduce verbosity of some key things 2025-03-04 22:58:56 -08:00
Akash Levy ba09c6c173 Better reduce_* message 2025-02-18 04:34:54 -08:00
Akash Levy ef9645990e Reduce pass verbosity 2025-02-18 04:05:40 -08:00
Akash Levy fd811ddaee Cleanup 2025-02-14 08:48:27 -08:00
Akash Levy 8369792e03 Improve extract_reduce further 2025-02-13 21:40:04 -08:00
Akash Levy 610d4cc716 Allow extract_reduce to operate on xnors and single-bit word-wide operators 2025-02-12 15:57:28 -08:00
Akash Levy 00a37bb318
Merge branch 'YosysHQ:main' into main 2025-02-07 14:25:02 -08:00
Martin Povišer fc88ea360e
Merge pull request #4876 from gadfort/segfault-lexer
liberty expression lexer check if characters are found and use size if not for `pin()`
2025-02-07 20:24:08 +01:00
Akash Levy 4e45a86e12
Merge branch 'YosysHQ:main' into main 2025-02-06 12:29:43 -08:00
Martin Povišer 772b9c0cfd
Merge pull request #4691 from hovind/experiments/extract-fa-fix
extract_fa: Fix `xor3`/`xnor3` inversion bug
2025-02-06 21:12:32 +01:00
Akash Levy 20c358bce2
Merge branch 'YosysHQ:main' into main 2025-02-04 10:27:16 -08:00
Martin Povišer b5752dfe16 alumacc: Fix missing signedness check 2025-02-04 13:05:53 +01:00
Adrian Parvin Ouano 23b3638c1e alumacc: alternative cmp unification implementation 2025-02-04 11:52:37 +01:00
Øystein Hovind ed076bc168 extract_fa: Invert xor3/xnor3 output when inverting majority3 input 2025-01-30 18:45:07 +01:00