nightly_cgate.sh 2.74 KB
#!/bin/sh -f
#
# For each incoming arg, generate file names by appending appropriate suffixes,
# use iclr to strip out garbage from the image file header, then use cmp to
# compare the resulting binary data.
#

    for fprefix do

	../../tools/iclr OutData/${fprefix}_cf_0.rgb
	../../tools/iclr OutData/${fprefix}_c_0.cov
	../../tools/iclr OutData/${fprefix}_c_0.z

	../../tools/iclr OutData/${fprefix}_gatef_0.rgb
	../../tools/iclr OutData/${fprefix}_gate_0.cov
	../../tools/iclr OutData/${fprefix}_gate_0.z


#
# Compare RGB pixel values, rdp_c vs gate level sim.
#

	if cmp -s OutData/${fprefix}_cf_0.rgb OutData/${fprefix}_gatef_0.rgb
	then
	    echo "INFO:  Image files ${fprefix}_cf_0.rgb and ${fprefix}_gatef_0.rgb equate."
	else
	    echo "ERROR: Image files ${fprefix}_cf_0.rgb and ${fprefix}_gatef_0.rgb differ."
	    idf OutData/${fprefix}_cf_0.rgb OutData/${fprefix}_gatef_0.rgb OutData/${fprefix}_idf_c_gate.rgb
	    echo "       difference file generated as ${fprefix}_idf_c_gate.rgb"
	fi


#
# Compare z buffer values, rdp_c vs gatesim.
#

	if cmp -s OutData/${fprefix}_c_0.z OutData/${fprefix}_gate_0.z
	then
	    echo "INFO:  Image files ${fprefix}_c_0.z and ${fprefix}_gate_0.z equate."
	else
	    echo "ERROR: Image files ${fprefix}_c_0.z and ${fprefix}_gate_0.z differ."
	fi

#
# Compare filter program's coverage values, rdp_c vs gatesim.
#

	if cmp -s OutData/${fprefix}_c_0.cov OutData/${fprefix}_gate_0.cov
	then
	    echo "INFO:  Image files ${fprefix}_c_0.cov and ${fprefix}_gate_0.cov equate."
	else
	    echo "ERROR: Image files ${fprefix}_c_0.cov and ${fprefix}_gate_0.cov differ."
	fi

# Don't do this until raw coverage files compare (need to clear the header).
####
#### Compare raw coverage values, rdp_c vs rdp_cv.
####
###
###	if cmp -s OutData/${fprefix}_c_0.cvg OutData/${fprefix}_cv_0.cvg
###	then
###	    echo "INFO:  Coverage files ${fprefix}_c_0.cvg and ${fprefix}_cv_0.cvg equate."
###	else
###	    echo "ERROR: Coverage files ${fprefix}_c_0.cvg and ${fprefix}_cv_0.cvg differ."
###	fi
###
####
#### Compare raw coverage values, rdp_c vs gatesim.
####
###
###	if cmp -s OutData/${fprefix}_c_0.cvg OutData/${fprefix}_gate_0.cvg
###	then
###	    echo "INFO:  Coverage files ${fprefix}_c_0.cvg and ${fprefix}_gate_0.cvg equate."
###	else
###	    echo "ERROR: Coverage files ${fprefix}_c_0.cvg and ${fprefix}_gate_0.cvg differ."
###	fi
###
###
####
#### Compare raw coverage values, rdp_cv vs gatesim.
####
###
###	if cmp -s OutData/${fprefix}_cv_0.cvg OutData/${fprefix}_gate_0.cvg
###	then
###	    echo "INFO:  Coverage files ${fprefix}_cv_0.cvg and ${fprefix}_gate_0.cvg equate."
###	else
###	    echo "ERROR: Coverage files ${fprefix}_cv_0.cvg and ${fprefix}_gate_0.cvg differ."
###	fi

#
# Print a space between each prefix for readability.
#
	echo ""
    done