mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 19:52:31 +00:00 
			
		
		
		
	Fixed autotest.sh handling of `timescale
This commit is contained in:
		
							parent
							
								
									080f95f933
								
							
						
					
					
						commit
						e420412043
					
				
					 1 changed files with 10 additions and 14 deletions
				
			
		|  | @ -56,10 +56,6 @@ while getopts xmGl:wkjvref:s:p:n: opt; do | |||
| 	esac | ||||
| done | ||||
| 
 | ||||
| create_ref() { | ||||
| 	cp "$1" "$2.v" | ||||
| } | ||||
| 
 | ||||
| compile_and_run() { | ||||
| 	exe="$1"; output="$2"; shift 2 | ||||
| 	if $use_modelsim; then | ||||
|  | @ -108,14 +104,14 @@ do | |||
| 		fn=$(basename $fn) | ||||
| 		bn=$(basename $bn) | ||||
| 
 | ||||
| 		cp ../$fn $fn | ||||
| 		egrep -v '^\s*`timescale' ../$fn > ${bn}_ref.v | ||||
| 
 | ||||
| 		if [ ! -f ../${bn}_tb.v ]; then | ||||
| 			"$toolsdir"/../../yosys -b "test_autotb $autotb_opts" -o ${bn}_tb.v $fn | ||||
| 			"$toolsdir"/../../yosys -b "test_autotb $autotb_opts" -o ${bn}_tb.v ${bn}_ref.v | ||||
| 		else | ||||
| 			cp ../${bn}_tb.v ${bn}_tb.v | ||||
| 		fi | ||||
| 		if $genvcd; then sed -i 's,// \$dump,$dump,g' ${bn}_tb.v; fi | ||||
| 		create_ref $fn ${bn}_ref | ||||
| 		compile_and_run ${bn}_tb_ref ${bn}_out_ref ${bn}_tb.v ${bn}_ref.v $libs | ||||
| 		if $genvcd; then mv testbench.vcd ${bn}_ref.vcd; fi | ||||
| 
 | ||||
|  | @ -131,22 +127,22 @@ do | |||
| 			test_count=$(( test_count + 1 )) | ||||
| 		} | ||||
| 
 | ||||
| 		if [ "$frontend" = "verific" -o "$frontend" = "verific_gates" ] && grep -q VERIFIC-SKIP $fn; then | ||||
| 		if [ "$frontend" = "verific" -o "$frontend" = "verific_gates" ] && grep -q VERIFIC-SKIP ${bn}_ref.v; then | ||||
| 			touch ../${bn}.skip | ||||
| 			return | ||||
| 		fi | ||||
| 
 | ||||
| 		if [ -n "$scriptfiles" ]; then | ||||
| 			test_passes $fn $scriptfiles | ||||
| 			test_passes ${bn}_ref.v $scriptfiles | ||||
| 		elif [ -n "$scriptopt" ]; then | ||||
| 			test_passes -f "$frontend" -p "$scriptopt" $fn | ||||
| 			test_passes -f "$frontend" -p "$scriptopt" ${bn}_ref.v | ||||
| 		elif [ "$frontend" = "verific" ]; then | ||||
| 			test_passes -p "verific -vlog2k $fn; verific -import -all; opt; memory;;" | ||||
| 			test_passes -p "verific -vlog2k ${bn}_ref.v; verific -import -all; opt; memory;;" | ||||
| 		elif [ "$frontend" = "verific_gates" ]; then | ||||
| 			test_passes -p "verific -vlog2k $fn; verific -import -gates -all; opt; memory;;" | ||||
| 			test_passes -p "verific -vlog2k ${bn}_ref.v; verific -import -gates -all; opt; memory;;" | ||||
| 		else | ||||
| 			test_passes -f "$frontend" -p "hierarchy; proc; opt; memory; opt; fsm; opt -full -fine" $fn | ||||
| 			test_passes -f "$frontend" -p "hierarchy; synth -run coarse; techmap; opt; abc -dff" $fn | ||||
| 			test_passes -f "$frontend" -p "hierarchy; proc; opt; memory; opt; fsm; opt -full -fine" ${bn}_ref.v | ||||
| 			test_passes -f "$frontend" -p "hierarchy; synth -run coarse; techmap; opt; abc -dff" ${bn}_ref.v | ||||
| 		fi | ||||
| 		touch ../${bn}.log | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue