Commit Graph

13448 Commits

Author SHA1 Message Date
Catherine 6e003e1af6 cxxrtl: minimize stack space consumed by `debug_info()`.
This commit uses parameter packs to sink `debug_item()` construction
into the `debug_info()`-specific `add()` overload. This makes the stack
space use sub-linear in typical case rather than linear (which is still
the worst case). Oddly, the stack slots that get allocated now are all
for the `0` literal for `lsb_offset`. This could be fixed by allocating
numbers statically but the existing reduction in stack use of ~98% for
a representative example (Minerva SoC) should be enough.
2024-05-08 03:37:14 +00:00
Catherine 80798daf53 cxxrtl: reduce stack space consumed by `debug_info()` further.
Before this commit, this function would create a temporary `std::string`
per debug item (and scope). After this commit, an additional overload is
used to push that down the call stack. This reduces stack usage by
about 50% more on top of the previous commit.
2024-05-08 02:55:17 +00:00
Catherine 9134cd1928 cxxrtl: reduce stack space consumed by `debug_info()`.
Before this commit, the creation of (constant) attribute maps caused
`debug_info()` (which is built with `__attribute__((optnone))`) to
consume large amounts of stack space; up to tens of megabytes. This
caused problems particularly on macOS, where the default stack size
is 512 KiB.

After this commit, `std::map` objects are no longer created inline in
the `debug_info()` function, but are compiled to and then expanded from
a string literal in a subroutine call. This reduces stack space usage
by about 50%.
2024-05-08 02:55:17 +00:00
Catherine 43ddd89ba5 cxxrtl: fix `escape_c_string` hex literal fiasco.
In C and C++, a `\x` escape sequence consumes as many hexadecimal digits
as there are available, so it is not composable with arbitrary alnum
characters afterwards. An octal escape sequence like `\000` always has
fixed width, avoiding an issue where `\x01c` and `\x1c` produce the same
string.
2024-05-08 02:55:17 +00:00
Catherine 7294d8b5af cxxrtl: fix close of invalid fd in spool destructor. 2024-05-08 00:46:10 +00:00
github-actions[bot] ce45011275 Bump version 2024-05-08 00:13:52 +00:00
Miodrag Milanović c9d87d5e7b
Merge pull request #4377 from jix/smtbmc-incremental-improvements
smtbmc: Improvements for --incremental and .yw fixes
2024-05-07 21:35:10 +02:00
N. Engelhardt 8735107c60
Merge pull request #4321 from YosysHQ/fix_read_verilog_defaults
read_verilog: Add missing defaults for flags
2024-05-07 21:11:42 +02:00
Krystine Sherwin df95ea824b read_verilog: Add missing defaults for flags
Fix for YosysHQ/sby#103
2024-05-07 20:25:36 +02:00
Jannis Harder a52088b6af smtbmc: Improvements for --incremental and .yw fixes
This extends the experimental incremental JSON API to allow arbitrary
smtlib subexpressions, defining smtlib constants and to allow access of
signals by their .yw path.

It also fixes a bug during .yw writing where values would be re-emitted
in later cycles if they have no newer defined value and a potential
crash when using --track-assumes.
2024-05-07 17:57:37 +02:00
Miodrag Milanovic 71f2540cd8 docs conf.py change Release -> Version 2024-05-07 15:55:52 +02:00
Miodrag Milanovic b4034a881e Keep docs version in conf.py 2024-05-07 15:35:25 +02:00
Miodrag Milanović 90dd508156
Merge pull request #4372 from YosysHQ/krys/docs_version_number
Docs: Set release to YOSYS_VER
2024-05-07 09:15:51 +02:00
Krystine Sherwin 6eb49ee9e8
Makefile: Export YOSYS_VER only for make docs 2024-05-07 10:23:22 +12:00
Emil J 68c7fc4c91
Merge pull request #4300 from YosysHQ/cellmatch
cellmatch: New pass for picking out standard cells automatically
2024-05-06 15:12:37 +02:00
Krystine Sherwin fe27240b3a
Makefile: Export YOSYS_VER 2024-05-04 16:51:38 +12:00
Krystine Sherwin bb0be8c7a2
Docs: Set release to YOSYS_VER
If building from read the docs, and the current build is "latest", add `-dev` to the version string.
Requires `YOSYS_VER` to be exported by .readthedocs.yaml.
2024-05-04 16:51:29 +12:00
github-actions[bot] 0f9ee20ea2 Bump version 2024-05-04 00:16:00 +00:00
Emil J. Tywoniak e939182e68 cellmatch: add comments 2024-05-03 16:42:41 +02:00
Martin Povišer b143e5678f cellmatch: Rename the special design to `$cellmatch` 2024-05-03 16:42:41 +02:00
Martin Povišer 913bc87c44 cellmatch: Add test 2024-05-03 16:42:41 +02:00
Martin Povišer c0e68dcc4d cellmatch: Add debug print 2024-05-03 16:42:41 +02:00
Martin Povišer 6a9858cdad cellmatch: Delegate evaluation to `ConstEval` 2024-05-03 16:42:41 +02:00
Martin Povišer 86e1080f05 cellmatch: New pass 2024-05-03 16:42:41 +02:00
Emil J 2631c7e918
Merge pull request #4365 from widlarizer/techmap-chtype-test
techmap: add dynamic cell type test
2024-05-03 16:25:42 +02:00
Emil J. Tywoniak a833f05036 techmap: add dynamic cell type test 2024-05-03 13:53:49 +02:00
Martin Povišer 6ff4ecb2b4 techmap: Remove `techmap_chtype` from the result 2024-05-03 13:33:28 +02:00
Martin Povišer fc82251105 techmap: Support dynamic cell types 2024-05-03 13:33:28 +02:00
github-actions[bot] dd2195543b Bump version 2024-04-30 00:17:14 +00:00
Martin Povišer 640d6a5127
Merge pull request #4359 from georgerennie/aiger_parse_bug
read_aiger: Fix incorrect read of binary Aiger without outputs
2024-04-29 15:15:43 +02:00
George Rennie 4e6deb53b6 read_aiger: Fix incorrect read of binary Aiger without outputs
* Also makes all ascii parsing finish reading lines and adds a small
  test
2024-04-29 14:06:58 +01:00
N. Engelhardt 34d9a7451e
Merge pull request #4333 from YosysHQ/fix_hierarchy_generate
fix hierarchy -generate mode handling of cells
2024-04-25 09:56:24 +02:00
KrystalDelusion c3ae33da33
Merge pull request #4285 from YosysHQ/typo_fixup
Typo fixing
2024-04-25 09:54:48 +12:00
Martin Povišer cd1fb8b157
Merge pull request #4350 from jix/read_rtlil_performance
rtlil: Add packed `extract` implementation for `SigSpec`
2024-04-24 14:07:28 +02:00
github-actions[bot] cf02f86c28 Bump version 2024-04-24 00:16:06 +00:00
Martin Povišer 982a22da5e
Merge pull request #4351 from povik/bump-abc
Bump abc
2024-04-23 14:20:54 +02:00
Martin Povišer 67c7062fb8 Bump abc for a fix once more 2024-04-23 13:50:45 +02:00
Martin Povišer c167d9b76e Bump abc for one more fix 2024-04-23 11:41:20 +02:00
Martin Povišer 6d6aa4d35e Bump abc to cherry-pick a WASM build fix 2024-04-22 17:43:41 +02:00
Martin Povišer 4a666d3ba8 Bump abc 2024-04-22 16:39:42 +02:00
Martin Povišer 178eceb32d rtlil: Replace the packed `SigSpec::extract` impl 2024-04-22 16:23:51 +02:00
Jannis Harder 0d30a4d479 rtlil: Add packed `extract` implementation for `SigSpec`
Previously `extract` on a `SigSpec` would always unpack it. Since a
significant amount of `SigSpec`s have one or few chunks, it's worth
having a dedicated implementation.

This is especially true, since the RTLIL frontend calls into this for
every `wire [lhs:rhs]` slice, making this `extract` take up 40% when
profiling `read_rtlil` with one of the largest coarse grained RTLIL
designs I had on hand.

With this change the `read_rtlil` profile looks like I would expect it
to look like, but I noticed that a lot of the other core RTLIL methods
also are a bit too eager with unpacking or implementing
`SigChunk`/`Const` overloads that just convert to a single chunk
`SigSpec` and forward to the implementation for that, when a direct
implementation would avoid temporary std::vector allocations. While not
relevant for `read_rtlil`, to me it looks like there might be a few easy
overall performance gains to be had by addressing this more generally.
2024-04-22 13:26:17 +02:00
Martin Povišer 171577f909
Merge pull request #4340 from gadfort/abc-lib-merge
add support for using ABCs library merging when providing multiple liberty files
2024-04-17 22:01:20 +02:00
github-actions[bot] 4897e89547 Bump version 2024-04-17 00:16:15 +00:00
Miodrag Milanović 52c04f3029
Merge pull request #4341 from YosysHQ/mmicko/ci_update
Add new verific testing environment CI
2024-04-16 08:30:03 +02:00
Miodrag Milanovic c38bbd7824 Add new verific testing environment CI 2024-04-16 07:50:50 +02:00
github-actions[bot] 40e8f5b69d Bump version 2024-04-16 00:15:48 +00:00
Miodrag Milanović e78c38b556
Merge pull request #4339 from YosysHQ/mmicko/lib_as_attribute
verific: expose library name as module attribute
2024-04-15 20:25:49 +02:00
Jannis Harder 1527cc84c4
Merge pull request #4338 from jix/fix-formalff-setundef-srst
formalff -setundef: Fix handling for has_srst FFs
2024-04-15 18:34:07 +02:00
Miodrag Milanovic af94123730 verific: expose library name as module attribute 2024-04-15 17:01:07 +02:00