mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	tests: use /usr/bin/env for bash.
This commit is contained in:
		
							parent
							
								
									860e3e4056
								
							
						
					
					
						commit
						d130f7fca2
					
				
					 56 changed files with 56 additions and 56 deletions
				
			
		|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -ex | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -ex | ||||
| 
 | ||||
| cd ../../ | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -ex | ||||
| ../../yosys -p 'synth -top test; write_simplec -verbose -i8 test00_uut.c' test00_uut.v | ||||
| clang -o test00_tb test00_tb.c | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -ex | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -ex | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| bad= | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -ex | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -ex | ||||
| 
 | ||||
| for iter in {1..100} | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -ex | ||||
| sed 's/SB_MAC16/SB_MAC16_UUT/; /SB_MAC16_UUT/,/endmodule/ p; d;' < ../cells_sim.v > test_dsp_model_uut.v | ||||
| if [ ! -f "test_dsp_model_ref.v" ]; then | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -ex | ||||
| for CLKPOL in 0 1; do | ||||
| for ENABLE_EN in 0 1; do | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -e | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -ex | ||||
| unisims=/opt/Xilinx/Vivado/2014.4/data/verilog/src/unisims | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -ex | ||||
| if [ -z $ISE_DIR ]; then | ||||
| 	ISE_DIR=/opt/Xilinx/ISE/14.7 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -ex | ||||
| if [ -z $ISE_DIR ]; then | ||||
| 	ISE_DIR=/opt/Xilinx/ISE/14.7 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -ex | ||||
| if [ -z $VIVADO_DIR ]; then | ||||
| 	VIVADO_DIR=/opt/Xilinx/Vivado/2019.1 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -e | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -e | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| OPTIND=1 | ||||
| seed=""    # default to no seed specified | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -e | ||||
| for x in *.ys; do | ||||
|   echo "Running $x.." | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -e | ||||
| ../../yosys -qq -f verilog -p "proc; opt; memory -nomap -bram temp/brams_${2}.txt; opt -fast -full" \ | ||||
| 		-l temp/synth_${1}_${2}.log -o temp/synth_${1}_${2}.v temp/brams_${1}.v | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| # run this test many times: | ||||
| # MAKE="make -j8" time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done' | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -ex | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| # run this test many times: | ||||
| # time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done' | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| OPTIND=1 | ||||
| seed=""    # default to no seed specified | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -e | ||||
| 
 | ||||
| for x in *.lib; do | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -e | ||||
| for x in *.v; do | ||||
|   echo "Running $x.." | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -e | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -eu | ||||
| 
 | ||||
| OPTIND=1 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -e | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -eu | ||||
| source ../gen-tests-makefile.sh | ||||
| run_tests --yosys-scripts | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| # run this test many times: | ||||
| # time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done' | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -e | ||||
| for x in *.ys; do | ||||
|   echo "Running $x.." | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -e | ||||
| 
 | ||||
| OPTIND=1 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -e | ||||
| for x in *.ys; do | ||||
|   echo "Running $x.." | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -e | ||||
| for x in *.ys; do | ||||
|   echo "Running $x.." | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| # run this test many times: | ||||
| # time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done' | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| OPTIND=1 | ||||
| seed=""    # default to no seed specified | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| OPTIND=1 | ||||
| seed=""    # default to no seed specified | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| cat > $1.tpl <<EOT | ||||
| %module main | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -ex | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -ex | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| # Run a simple test with a .ys file | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| 
 | ||||
| TESTNAME=$1 | ||||
|  |  | |||
|  | @ -1,3 +1,3 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| exec ../tools/autotest.sh -G -j $@ -p 'proc; opt; memory -nomap; techmap -map ../mem_simple_4x1_map.v;; techmap; opt; abc;; stat' mem_simple_4x1_uut.v | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -ex | ||||
| ../../yosys -q -o async_syn.v -r uut -p 'synth; rename uut syn' async.v | ||||
| ../../yosys -q -o async_prp.v -r uut -p 'prep; rename uut prp' async.v | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| trap 'echo "ERROR in chparam.sh" >&2; exit 1' ERR | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| fail() { | ||||
| 	echo "$1" >&2 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -ex | ||||
| ../../yosys -q -p 'read_verilog -formal smtlib2_module.v; prep; write_smt2 smtlib2_module.smt2' | ||||
| sed 's/; SMT-LIBv2 description generated by Yosys .*/; SMT-LIBv2 description generated by Yosys $VERSION/;s/  *$//' smtlib2_module.smt2 > smtlib2_module-filtered.smt2 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| trap 'echo "ERROR in sv_implicit_ports.sh" >&2; exit 1' ERR | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| trap 'echo "ERROR in svalways.sh" >&2; exit 1' ERR | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| run() { | ||||
|     alt=$1 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -ex | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -e | ||||
| source common.sh | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -e | ||||
| source common.sh | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| set -e | ||||
| source common.sh | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| set -e | ||||
| 
 | ||||
| python3 generate.py $@ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue