Where possible at least, and disable-able with `-nocteval`.
`$lcu` doesn't work because it uses ports `P, G, CI, CO` instead of the standard `A, B, C, Y`.
`$alu` and `$fa` have more than one output so they don't work either (and in the case of `$alu` it has extra inputs too).
`$macc` is at least supported, but `CellTypes::eval()` doesn't have an implementation so it fails (which would also be true for `$lcu`, `$alu`, and `$fa`; if they weren't being rejected based on ports).
Also add `test_cell -list [all|evaluable|missing]` which prints the list of cell types supported by test_cell, cell types marked evaluable, and cell types marked evaluable but not supported by test_cell respectively. Potential for listing cell types supported by test_cell but *not* marked evalulable, though that list is currently empty.
Add `tests/various/evaluable.sh` to exercise this.
celltypes: Extra type props
Now with `is_internal`, `is_metainfo`, and `has_effects`.
Each type property has a comment specifying usage/meaning.
Type properties (sans `is_internal`) get a default value of false.
`CellTypes::setup_*_type()` methods get their own `CellType` struct assignments with named fields being assigned true to improve readability.
Also remove `is_evaluable` from cell types that aren't actually `eval`-able,
instead using `is_combinatorial` which afaict is what the flag was being used as a proxy for.
Now with `is_internal`, `is_metainfo`, and `has_effects`.
Each type property has a comment specifying usage/meaning.
Type properties (sans `is_internal`) get a default value of false.
`CellTypes::setup_*_type()` methods get their own `CellType` struct assignments with named fields being assigned true to improve readability.
Looks up the cell type for each cell in the design, returning the value of `CellType::is_<property>`.
Only works for exact match, and only for internal cells.
Also add a simple test checking a small design with an $add cell and an $sdff cell.
Add `CellTypes::get_cell()` which takes a 'type' `IdString` and returns the corresponding `CellType` if it is in the `cell_types` dict, otherwise returns `nullptr`.
Useful for getting a cell type by name and then checking its attributes.
`python-config --ldflag` includes output of `python-config --libs`; and the `$(CXX)` call in `CHECK_BOOST_PYTHON` still needs those libs.
Move all of the `$(shell $(PYTHON_CONFIG) ..` lines to the top of the block.
`b_width_capped` already exists for preventing arithmetic overflow, limiting the value of `b_width` to 30. This just changes the left shifts to also use it.
The caveat of incorrect results for extremely large values of `a_width` still applies, as does the improbability of that actually happening.
This fixes#4844 (or at least, the floating point exception; the circuit still isn't valid but I think that's fine).