mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 17:15:33 +00:00
test_cell: Test CellTypes::eval() directly
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.
This commit is contained in:
parent
e7cfb0381c
commit
833721bfc4
2 changed files with 144 additions and 7 deletions
23
tests/various/evaluable.sh
Executable file
23
tests/various/evaluable.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/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
|
Loading…
Add table
Add a link
Reference in a new issue