mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-03 01:40:23 +00:00
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.
23 lines
416 B
Bash
Executable file
23 lines
416 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
yosys=../../yosys
|
|
log="evalcells.log"
|
|
|
|
bad=
|
|
|
|
$yosys -QTL $log -qp 'test_cell -list all'
|
|
while read line;
|
|
do
|
|
if [[ "$line" =~ ^\$.* ]]; then
|
|
if ! $yosys -qqp test_cell\ -n\ 1\ -s\ 1\ "$line"; then
|
|
bad=1
|
|
fi
|
|
fi
|
|
done <$log
|
|
|
|
if [ $bad ]; then
|
|
echo 'One or more evaluable cells failed testing.'
|
|
exit 1
|
|
else
|
|
echo 'All evaluable cells match behavior.'
|
|
fi
|