mirror of
https://github.com/YosysHQ/yosys
synced 2026-03-23 12:59:15 +00:00
Clean some seed-tests outputs
This commit is contained in:
parent
ede782d7e3
commit
8a6954413f
6 changed files with 23 additions and 23 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
source ../common-env.sh
|
||||
|
||||
set -ex
|
||||
set -e
|
||||
|
||||
run_subtest () {
|
||||
local subtest=$1; shift
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
source ../common-env.sh
|
||||
|
||||
set -ex
|
||||
set -e
|
||||
|
||||
../../yosys -p 'read_verilog initial_display.v' | awk '/<<<BEGIN>>>/,/<<<END>>>/ {print $0}' >yosys-initial_display.log
|
||||
../../yosys -p 'read_verilog initial_display.v' | awk '/<<<BEGIN>>>/,/<<<END>>>/ {print $0}' >yosys-initial_display.log 2>&1
|
||||
iverilog -o iverilog-initial_display initial_display.v
|
||||
./iverilog-initial_display >iverilog-initial_display.log
|
||||
diff yosys-initial_display.log iverilog-initial_display.log
|
||||
|
||||
test_always_display () {
|
||||
local subtest=$1; shift
|
||||
../../yosys -p "read_verilog $* always_display.v; proc; opt_expr -mux_bool; clean" -o yosys-always_display-${subtest}-1.v
|
||||
../../yosys -p "read_verilog yosys-always_display-${subtest}-1.v; proc; opt_expr -mux_bool; clean" -o yosys-always_display-${subtest}-2.v
|
||||
../../yosys -p "read_verilog $* always_display.v; proc; opt_expr -mux_bool; clean" -o yosys-always_display-${subtest}-1.v >/dev/null 2>&1
|
||||
../../yosys -p "read_verilog yosys-always_display-${subtest}-1.v; proc; opt_expr -mux_bool; clean" -o yosys-always_display-${subtest}-2.v >/dev/null 2>&1
|
||||
diff yosys-always_display-${subtest}-1.v yosys-always_display-${subtest}-2.v
|
||||
}
|
||||
|
||||
|
|
@ -25,15 +25,15 @@ test_always_display star_en -DEVENT_STAR -DCOND_EN
|
|||
|
||||
test_roundtrip () {
|
||||
local subtest=$1; shift
|
||||
../../yosys -p "read_verilog $* roundtrip.v; proc; clean" -o yosys-roundtrip-${subtest}-1.v
|
||||
../../yosys -p "read_verilog yosys-roundtrip-${subtest}-1.v; proc; clean" -o yosys-roundtrip-${subtest}-2.v
|
||||
../../yosys -p "read_verilog $* roundtrip.v; proc; clean" -o yosys-roundtrip-${subtest}-1.v >/dev/null 2>&1
|
||||
../../yosys -p "read_verilog yosys-roundtrip-${subtest}-1.v; proc; clean" -o yosys-roundtrip-${subtest}-2.v >/dev/null 2>&1
|
||||
diff yosys-roundtrip-${subtest}-1.v yosys-roundtrip-${subtest}-2.v
|
||||
|
||||
iverilog $* -o iverilog-roundtrip-${subtest} roundtrip.v roundtrip_tb.v
|
||||
iverilog $* -o iverilog-roundtrip-${subtest} roundtrip.v roundtrip_tb.v >/dev/null 2>&1
|
||||
./iverilog-roundtrip-${subtest} >iverilog-roundtrip-${subtest}.log
|
||||
iverilog $* -o iverilog-roundtrip-${subtest}-1 yosys-roundtrip-${subtest}-1.v roundtrip_tb.v
|
||||
iverilog $* -o iverilog-roundtrip-${subtest}-1 yosys-roundtrip-${subtest}-1.v roundtrip_tb.v >/dev/null 2>&1
|
||||
./iverilog-roundtrip-${subtest}-1 >iverilog-roundtrip-${subtest}-1.log
|
||||
iverilog $* -o iverilog-roundtrip-${subtest}-2 yosys-roundtrip-${subtest}-2.v roundtrip_tb.v
|
||||
iverilog $* -o iverilog-roundtrip-${subtest}-2 yosys-roundtrip-${subtest}-2.v roundtrip_tb.v >/dev/null 2>&1
|
||||
./iverilog-roundtrip-${subtest}-1 >iverilog-roundtrip-${subtest}-2.log
|
||||
diff iverilog-roundtrip-${subtest}.log iverilog-roundtrip-${subtest}-1.log
|
||||
diff iverilog-roundtrip-${subtest}-1.log iverilog-roundtrip-${subtest}-2.log
|
||||
|
|
@ -51,10 +51,10 @@ test_roundtrip bin_signed -DBASE_HEX -DSIGN="signed"
|
|||
test_cxxrtl () {
|
||||
local subtest=$1; shift
|
||||
|
||||
../../yosys -p "read_verilog ${subtest}.v; proc; clean; write_cxxrtl -print-output std::cerr yosys-${subtest}.cc"
|
||||
../../yosys -p "read_verilog ${subtest}.v; proc; clean; write_cxxrtl -print-output std::cerr yosys-${subtest}.cc" >/dev/null 2>&1
|
||||
${CXX:-g++} -std=c++11 -o yosys-${subtest} -I../../backends/cxxrtl/runtime ${subtest}_tb.cc -lstdc++
|
||||
./yosys-${subtest} 2>yosys-${subtest}.log
|
||||
iverilog -o iverilog-${subtest} ${subtest}.v ${subtest}_tb.v
|
||||
iverilog -o iverilog-${subtest} ${subtest}.v ${subtest}_tb.v >/dev/null 2>&1
|
||||
./iverilog-${subtest} |grep -v '\$finish called' >iverilog-${subtest}.log
|
||||
diff iverilog-${subtest}.log yosys-${subtest}.log
|
||||
}
|
||||
|
|
@ -63,16 +63,16 @@ test_cxxrtl always_full
|
|||
test_cxxrtl always_comb
|
||||
|
||||
# Ensure Verilog backend preserves behaviour of always block with multiple $displays.
|
||||
../../yosys -p "read_verilog always_full.v; prep; clean" -o yosys-always_full-1.v
|
||||
iverilog -o iverilog-always_full-1 yosys-always_full-1.v always_full_tb.v
|
||||
../../yosys -p "read_verilog always_full.v; prep; clean" -o yosys-always_full-1.v >/dev/null 2>&1
|
||||
iverilog -o iverilog-always_full-1 yosys-always_full-1.v always_full_tb.v >/dev/null 2>&1
|
||||
./iverilog-always_full-1 |grep -v '\$finish called' >iverilog-always_full-1.log
|
||||
diff iverilog-always_full.log iverilog-always_full-1.log
|
||||
|
||||
../../yosys -p "read_verilog display_lm.v" >yosys-display_lm.log
|
||||
../../yosys -p "read_verilog display_lm.v; write_cxxrtl yosys-display_lm.cc"
|
||||
../../yosys -p "read_verilog display_lm.v" >yosys-display_lm.log 2>&1
|
||||
../../yosys -p "read_verilog display_lm.v; write_cxxrtl yosys-display_lm.cc" >/dev/null 2>&1
|
||||
${CXX:-g++} -std=c++11 -o yosys-display_lm_cc -I../../backends/cxxrtl/runtime display_lm_tb.cc -lstdc++
|
||||
./yosys-display_lm_cc >yosys-display_lm_cc.log
|
||||
for log in yosys-display_lm.log yosys-display_lm_cc.log; do
|
||||
grep "^%l: \\\\bot\$" "$log"
|
||||
grep "^%m: \\\\bot\$" "$log"
|
||||
grep "^%l: \\\\bot\$" "$log" >/dev/null 2>&1
|
||||
grep "^%m: \\\\bot\$" "$log" >/dev/null 2>&1
|
||||
done
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ python3 generate.py -c $count $seed
|
|||
idx=$( printf "%05d" $i )
|
||||
echo "temp/uut_${idx}.log: temp/uut_${idx}.ys temp/uut_${idx}.v"
|
||||
echo " @echo -n '[$i]'"
|
||||
echo " @../../yosys -ql temp/uut_${idx}.out temp/uut_${idx}.ys"
|
||||
echo " @../../yosys -ql temp/uut_${idx}.out temp/uut_${idx}.ys >/dev/null 2>&1"
|
||||
echo " @mv temp/uut_${idx}.out temp/uut_${idx}.log"
|
||||
echo " @grep -q 'SAT proof finished' temp/uut_${idx}.log && echo -n K || echo -n T"
|
||||
all_targets="$all_targets temp/uut_${idx}.log"
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ for x in *.lib; do
|
|||
diff $x.filtered $x.filtered.ok
|
||||
diff $x.verilogsim $x.verilogsim.ok
|
||||
if [[ -e ${x%.lib}.log.ok ]]; then
|
||||
../../yosys -p "dfflibmap -info -liberty ${x}" -TqqQl ${x%.lib}.log
|
||||
../../yosys -p "dfflibmap -info -liberty ${x}" -TqqQl ${x%.lib}.log >/dev/null 2>&1
|
||||
diff ${x%.lib}.log ${x%.lib}.log.ok
|
||||
fi
|
||||
done
|
||||
|
||||
for x in *.ys; do
|
||||
echo "Running $x.."
|
||||
../../yosys -q -s $x -l ${x%.ys}.log
|
||||
../../yosys -q -s $x -l ${x%.ys}.log >/dev/null 2>&1
|
||||
done
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ python3 generate.py -c $count $seed
|
|||
echo "test-$idx:"
|
||||
printf "\t@%s\n" \
|
||||
"echo -n [$i]" \
|
||||
"../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys"
|
||||
"../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys >/dev/null 2>&1"
|
||||
done
|
||||
} > temp/makefile
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ echo "running tests.."
|
|||
for i in $( ls temp/*.ys | sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do
|
||||
echo -n "[$i]"
|
||||
idx=$( printf "%05d" $i )
|
||||
../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys
|
||||
../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys >/dev/null 2>&1
|
||||
done
|
||||
echo
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue