mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-27 10:55:51 +00:00
Because all objects in C++ must have non-zero size, a `value<0>` has a size of 4 despite consisting of a `uint32_t chunks[0]`. The debug item assertions were not written expecting that and prevent any debug items for such values from compiling. The C API does not define exactly what happens for a zero-width debug item, but it seems OK to say that they should refer to some unique pointer that cannot be, in actuality, read or written. This allows some techniques or optimizations that use `curr` pointers as keys and assume they correspond 1-to-1 to simulation objects. |
||
---|---|---|
.. | ||
cxxrtl | ||
README.txt |
This directory contains the runtime components of CXXRTL and should be placed on the include path when building the simulation using the `-I${YOSYS}/backends/cxxrtl/runtime` option. These components are not used in the Yosys binary; they are only built as a part of the simulation binary. The interfaces declared in `cxxrtl_capi*.h` contain the stable C API. These interfaces will not be changed in backward-incompatible ways unless no other option is available, and any breaking changes will be made in a way that causes the downstream code to fail in a visible way. The ABI of these interfaces is considered stable as well, and it will not use features complicating its use via libraries such as libffi or ctypes. The implementations in `cxxrtl_capi*.cc` are considered private; they are still placed in the include path to enable build-system-less builds (where the CXXRTL runtime component is included in the C++ file of the simulation toplevel). The interfaces declared in `cxxrtl*.h` (without `capi`) are unstable and may change without notice. For clarity, all of the files in this directory and its subdirectories have unique names regardless of the directory where they are placed.