Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ makefile-tests: $(MK_TEST_DIRS:%=makefile-tests/%)
+cd $(dir $*) && bash run-test.sh
# this one spawns submake on each
makefile-tests/%: %/run-test.mk $(TARGETS) $(EXTRA_TARGETS)
$(MAKE) -C $* -f run-test.mk
stdbuf -oL -eL $(MAKE) -C $* -f run-test.mk
+@echo "...passed tests in $*"

test: makefile-tests abcopt-tests seed-tests
Expand Down
1 change: 0 additions & 1 deletion backends/blif/blif.cc
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,6 @@ struct BlifBackend : public Backend {

std::vector<RTLIL::Module*> mod_list;

design->sort();
for (auto module : design->modules())
{
if (module->get_blackbox_attribute() && !config.blackbox_mode)
Expand Down
1 change: 0 additions & 1 deletion backends/jny/jny.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ struct JnyWriter
{
log_assert(design != nullptr);

design->sort();

f << "{\n";
f << " \"$schema\": \"https://raw.githubusercontent.com/YosysHQ/yosys/main/misc/jny.schema.json\",\n";
Expand Down
1 change: 0 additions & 1 deletion backends/json/json.cc
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ struct JsonWriter
void write_design(Design *design_)
{
design = design_;
design->sort();

f << stringf("{\n");
f << stringf(" \"creator\": %s,\n", get_string(yosys_maybe_version()));
Expand Down
1 change: 0 additions & 1 deletion backends/table/table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ struct TableBackend : public Backend {
}
extra_args(f, filename, args, argidx);

design->sort();

for (auto module : design->modules())
{
Expand Down
2 changes: 1 addition & 1 deletion backends/verilog/verilog_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2672,7 +2672,7 @@ struct VerilogBackend : public Backend {
Pass::call(design, "clean_zerowidth");
log_pop();

design->sort_modules();
// design->sort_modules();

*f << stringf("/* Generated by %s */\n", yosys_maybe_version());

Expand Down
1 change: 0 additions & 1 deletion passes/opt/opt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ struct OptPass : public Pass {
}

design->optimize();
design->sort();
design->check();

log_header(design, "Finished fast OPT passes.%s\n", fast_mode ? "" : " (There is nothing left to do.)");
Expand Down
2 changes: 0 additions & 2 deletions passes/opt/opt_clean.cc
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,6 @@ struct OptCleanPass : public Pass {
log("Removed %d unused cells and %d unused wires.\n", count_rm_cells, count_rm_wires);

design->optimize();
design->sort();
design->check();

keep_cache.reset();
Expand Down Expand Up @@ -778,7 +777,6 @@ struct CleanPass : public Pass {
log("Removed %d unused cells and %d unused wires.\n", count_rm_cells, count_rm_wires);

design->optimize();
design->sort();
design->check();

keep_cache.reset();
Expand Down
1 change: 0 additions & 1 deletion techlibs/ice40/ice40_opt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ struct Ice40OptPass : public Pass {
}

design->optimize();
design->sort();
design->check();

log_header(design, "Finished OPT passes. (There is nothing left to do.)\n");
Expand Down
2 changes: 1 addition & 1 deletion techlibs/xilinx/tests/bram1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ for dbits in $dbits_list; do
{
echo "bram1_$id/ok:"
echo " @cd bram1_$id && bash run.sh"
echo " @echo -n '[$id]'"
echo " @echo '[$id]'"
echo " @touch \$@"
} >> bram1.mk
all_list="$all_list bram1_$id/ok"
Expand Down
6 changes: 3 additions & 3 deletions tests/arch/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ for arch in ../../techlibs/*; do
arch_name=$(basename -- $arch)
if [ "${defines[$arch_name]}" ]; then
for def in ${defines[$arch_name]}; do
echo -n "Test $path -D$def ->"
echo "Test $path -D$def ->"
iverilog -t null -I$arch -D$def -DNO_ICE40_DEFAULT_ASSIGNMENTS $path
echo " ok"
done
else
echo -n "Test $path ->"
echo "Test $path ->"
iverilog -t null -I$arch -g2005-sv $path
echo " ok"
fi
done
done

for path in "../../techlibs/common/simcells.v" "../../techlibs/common/simlib.v"; do
echo -n "Test $path ->"
echo "Test $path ->"
iverilog -t null $path
echo " ok"
done
2 changes: 1 addition & 1 deletion tests/arch/xilinx/dsp_cascade.ys
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ equiv_opt -assert -map +/xilinx/cells_sim.v synth_xilinx -family xc6s -noiopad
design -load postopt
cd cascade
select -assert-count 3 t:DSP48A1
select -assert-count 5 t:FDRE # No cascade for A input
select -assert-count 10 t:FDRE # No cascade for A input
select -assert-none t:DSP48A1 t:BUFG t:FDRE %% t:* %D
# Very crude method of checking that DSP48E1.PCOUT -> DSP48E1.PCIN
# (see above for explanation)
Expand Down
3 changes: 1 addition & 2 deletions tests/fsm/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ python3 generate.py -c $count $seed
for i in $( ls temp/*.ys | sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do
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 " @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"
echo " @grep -q 'SAT proof finished' temp/uut_${idx}.log && echo K || echo T"
all_targets="$all_targets temp/uut_${idx}.log"
done
echo "$all_targets"
Expand Down
3 changes: 1 addition & 2 deletions tests/gen-tests-makefile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ generate_target() {
echo "all: $target_name"
echo ".PHONY: $target_name"
echo "$target_name:"
printf "\t@%s\n" "$test_command"
printf "\t@echo 'Passed %s'\n" "$target_name"
printf "\t@/usr/bin/env time -f \"Test $target_name took %%e\" $test_command >/dev/null 2>/dev/null\n"
}

# $ generate_ys_test ys_file [yosys_args]
Expand Down
2 changes: 1 addition & 1 deletion tests/memories/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ shift "$((OPTIND-1))"
${MAKE:-make} -f ../tools/autotest.mk SEED="$seed" EXTRA_FLAGS="$abcopt" *.v

for f in `egrep -l 'expect-(wr-ports|rd-ports|rd-clk)' *.v`; do
echo -n "Testing expectations for $f .."
echo "Testing expectations for $f .."
../../yosys -f verilog -qp "proc; opt; memory -nomap;; dump -outfile ${f%.v}.dmp t:\$mem_v2" $f
if grep -q expect-wr-ports $f; then
grep -q "parameter \\\\WR_PORTS $(gawk '/expect-wr-ports/ { print $3; }' $f)\$" ${f%.v}.dmp ||
Expand Down
1 change: 0 additions & 1 deletion tests/opt_share/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ python3 generate.py -c $count $seed
echo "all: test-$idx"
echo "test-$idx:"
printf "\t@%s\n" \
"echo -n [$i]" \
"../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys"
done
} > temp/makefile
Expand Down
1 change: 0 additions & 1 deletion tests/realmath/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ python3 generate.py -c $count $seed
cd temp
echo "running tests.."
for ((i = 0; i < $count; i++)); do
echo -n "[$i]"
idx=$( printf "%05d" $i )
../../../yosys -qq uut_${idx}.ys
iverilog -o uut_${idx}_tb uut_${idx}_tb.v uut_${idx}.v uut_${idx}_syn.v
Expand Down
1 change: 0 additions & 1 deletion tests/share/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ python3 generate.py -c $count $seed

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
done
Expand Down
2 changes: 1 addition & 1 deletion tests/svinterfaces/run_simple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [ $# != 1 ]; then
exit 1
fi

echo -n "Test: $1 ->"
echo "Test: $1 ->"
../../yosys $1.ys >$1.log_stdout 2>$1.log_stderr || {
echo "ERROR!"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion tests/svinterfaces/runone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ STDERRFILE=${TESTNAME}.log_stderr
echo "" > $STDOUTFILE
echo "" > $STDERRFILE

echo -n "Test: ${TESTNAME} -> "
echo "Test: ${TESTNAME} -> "

set -e

Expand Down
2 changes: 1 addition & 1 deletion tests/tools/autotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ do
status_prefix="Test: $bn "
else
status_prefix=""
echo -n "Test: $bn "
echo "Test: $bn "
fi

if [ "$ext" == sv ]; then
Expand Down
6 changes: 3 additions & 3 deletions tests/various/hierarchy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

set -e

echo -n " TOP first - "
echo " TOP first - "
../../yosys -s - <<- EOY | grep "Automatically selected TOP as design top module"
read_verilog << EOV
module TOP(a, y);
Expand All @@ -22,7 +22,7 @@ echo -n " TOP first - "
hierarchy -auto-top
EOY

echo -n " TOP last - "
echo " TOP last - "
../../yosys -s - <<- EOY | grep "Automatically selected TOP as design top module"
read_verilog << EOV
module aoi12(a, y);
Expand All @@ -41,7 +41,7 @@ echo -n " TOP last - "
hierarchy -auto-top
EOY

echo -n " no explicit top - "
echo " no explicit top - "
../../yosys -s - <<- EOY | grep "Automatically selected noTop as design top module."
read_verilog << EOV
module aoi12(a, y);
Expand Down
Loading