diff options
author | Tim Edwards <tim@opencircuitdesign.com> | 2015-10-28 09:57:49 -0400 |
---|---|---|
committer | Tim Edwards <tim@opencircuitdesign.com> | 2015-10-28 09:57:49 -0400 |
commit | 6f3ae687e4a5eff2ed0dfd6bbb62a9c63a3bf8cf (patch) | |
tree | a25d6403c9be22ff6f43cfe971dcfba6463765b0 /scripts | |
parent | f42a1cdfbc0c6fcb965561089487042c802afa08 (diff) |
Extended the absolute path handling capability to all the major
synthesis flow scripts.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/createGDS.sh | 20 | ||||
-rwxr-xr-x | scripts/display.sh | 32 | ||||
-rwxr-xr-x | scripts/placement.sh | 46 | ||||
-rwxr-xr-x | scripts/router.sh | 10 | ||||
-rwxr-xr-x | scripts/synthesize.sh | 48 | ||||
-rwxr-xr-x | scripts/vesta.sh | 10 |
6 files changed, 123 insertions, 43 deletions
diff --git a/scripts/createGDS.sh b/scripts/createGDS.sh index 1b38c2d..4815041 100755 --- a/scripts/createGDS.sh +++ b/scripts/createGDS.sh @@ -46,6 +46,22 @@ source ${projectpath}/qflow_vars.sh source ${techdir}/${techname}.sh cd ${projectpath} +# Prepend techdir to gdsfile unless gdsfile begins with "/" +set abspath=`echo ${gdsfile} | cut -c1` +if ( "${abspath}" == "/" ) then + set gdspath=${gdsfile} +else + set gdspath=${techdir}/${gdsfile} +endif + +# Prepend techdir to techfile unless techfile begins with "/" +set abspath=`echo ${techfile} | cut -c1` +if ( "${abspath}" == "/" ) then + set techpath=${techfile} +else + set techpath=${techdir}/${techfile} +endif + #---------------------------------------------------------- # Done with initialization #---------------------------------------------------------- @@ -61,13 +77,13 @@ cd ${layoutdir} # Use magic version 8.0 to make nice labels #--------------------------------------------------- -${bindir}/magic -dnull -noconsole -T ${techfile} <<EOF +${bindir}/magic -dnull -noconsole -T ${techpath} <<EOF drc off box 0 0 0 0 snap int gds readonly true gds rescale false -gds read ${gdsfile} +gds read ${gdspath} def read ${rootname} gds write ${rootname} quit -noprompt diff --git a/scripts/display.sh b/scripts/display.sh index 94fd954..934412e 100755 --- a/scripts/display.sh +++ b/scripts/display.sh @@ -51,6 +51,30 @@ source ${projectpath}/qflow_vars.sh source ${techdir}/${techname}.sh cd ${projectpath} +# Prepend techdir to magicrc unless magicrc begins with "/" +set abspath=`echo ${magicrc} | cut -c1` +if ( "${abspath}" == "/" ) then + set magicrcpath=${magicrc} +else + set magicrcpath=${techdir}/${magicrc} +endif + +# Prepend techdir to leffile unless leffile begins with "/" +set abspath=`echo ${leffile} | cut -c1` +if ( "${abspath}" == "/" ) then + set lefpath=${leffile} +else + set lefpath=${techdir}/${leffile} +endif + +# Prepend techdir to techleffile unless techleffile begins with "/" +set abspath=`echo ${techleffile} | cut -c1` +if ( "${abspath}" == "/" ) then + set techlefpath=${techleffile} +else + set techlefpath=${techdir}/${techleffile} +endif + #---------------------------------------------------------- # Copy the .magicrc file from the tech directory to the # layout directory, if it does not have one. This file @@ -58,8 +82,8 @@ cd ${projectpath} #---------------------------------------------------------- if (! -f ${layoutdir}/.magicrc ) then - if ( -f ${techdir}/${magicrc} ) then - cp ${techdir}/${magicrc} ${layoutdir}/.magicrc + if ( -f ${magicrcpath} ) then + cp ${magicrcpath} ${layoutdir}/.magicrc endif endif @@ -76,9 +100,9 @@ cd ${layoutdir} #--------------------------------------------------- if ($techleffile == "") then - set lefcmd="lef read ${techdir}/${leffile}" + set lefcmd="lef read ${lefpath}" else - set lefcmd="lef read ${techdir}/${techleffile}\nlef read ${techdir}/${techleffile}" + set lefcmd="lef read ${techlefpath}\nlef read ${lefpath}" endif # Timestamp handling: If the .mag file is more recent diff --git a/scripts/placement.sh b/scripts/placement.sh index c8f44fb..220d5f8 100755 --- a/scripts/placement.sh +++ b/scripts/placement.sh @@ -79,6 +79,30 @@ source ${projectpath}/qflow_vars.sh source ${techdir}/${techname}.sh cd ${projectpath} +# Prepend techdir to leffile unless leffile begins with "/" +set abspath=`echo ${leffile} | cut -c1` +if ( "${abspath}" == "/" ) then + set lefpath=${leffile} +else + set lefpath=${techdir}/${leffile} +endif + +# Prepend techdir to techleffile unless techleffile begins with "/" +set abspath=`echo ${techleffile} | cut -c1` +if ( "${abspath}" == "/" ) then + set techlefpath=${techleffile} +else + set techlefpath=${techdir}/${techleffile} +endif + +# Prepend techdir to spicefile unless spicefile begins with "/" +set abspath=`echo ${spicefile} | cut -c1` +if ( "${abspath}" == "/" ) then + set spicepath=${spicefile} +else + set spicepath=${techdir}/${spicefile} +endif + #---------------------------------------------------------- # Done with initialization #---------------------------------------------------------- @@ -172,15 +196,15 @@ if ($makedef == 1) then if ( $scripting == "T" ) then if ( "$techleffile" == "" ) then - echo "read_lef ${techdir}/$leffile" > ${rootname}.cfg + echo "read_lef ${lefpath}" > ${rootname}.cfg else - echo "read_lef ${techdir}/$techleffile" > ${rootname}.cfg + echo "read_lef ${techlefpath}" > ${rootname}.cfg endif else if ( "$techleffile" == "" ) then - echo "lef ${techdir}/$leffile" > ${rootname}.cfg + echo "lef ${lefpath}" > ${rootname}.cfg else - echo "lef ${techdir}/$techleffile" > ${rootname}.cfg + echo "lef ${techlefpath}" > ${rootname}.cfg endif endif @@ -205,7 +229,7 @@ if ($makedef == 1) then echo "Running getfillcell.tcl" |& tee -a ${synthlog} set usefillcell = `${scriptdir}/getfillcell.tcl $rootname \ - ${techdir}/$leffile $fillcell | grep fill= | cut -d= -f2` + ${lefpath} $fillcell | grep fill= | cut -d= -f2` if ( "${usefillcell}" == "" ) then set usefillcell = $fillcell @@ -253,9 +277,9 @@ if ($makedef == 1) then echo "" >> ${rootname}.cfg echo "verbose 1" >> ${rootname}.cfg if ( "$techleffile" != "" ) then - echo "read_lef ${techdir}/${techleffile}" >> ${rootname}.cfg + echo "read_lef ${techlefpath}" >> ${rootname}.cfg endif - echo "read_lef ${techdir}/${leffile}" >> ${rootname}.cfg + echo "read_lef ${lefpath}" >> ${rootname}.cfg echo "layers ${route_layers}" >> ${rootname}.cfg if ( ${?via_pattern} ) then echo "" >> ${rootname}.cfg @@ -276,9 +300,9 @@ if ($makedef == 1) then echo "# qrouter configuration for project ${rootname}" > ${rootname}.cfg echo "" >> ${rootname}.cfg if ( "$techleffile" != "" ) then - echo "lef ${techdir}/${techleffile}" >> ${rootname}.cfg + echo "lef ${techlefpath}" >> ${rootname}.cfg endif - echo "lef ${techdir}/${leffile}" >> ${rootname}.cfg + echo "lef ${lefpath}" >> ${rootname}.cfg echo "num_layers ${route_layers}" >> ${rootname}.cfg if ( ${?via_pattern} ) then echo "" >> ${rootname}.cfg @@ -367,7 +391,7 @@ if ($makedef == 1) then echo "Running blif2BSpice." |& tee -a ${synthlog} ${bindir}/blif2BSpice -p ${vddnet} -g ${gndnet} -l \ - ${techdir}/${spicefile} ${rootname}_anno.blif \ + ${spicepath} ${rootname}_anno.blif \ > ${rootname}.spc #------------------------------------------------------------------ @@ -406,7 +430,7 @@ endif if ($makedef == 1) then if ( -f ${scriptdir}/addspacers.tcl ) then echo "Running addspacers.tcl" - ${scriptdir}/addspacers.tcl ${rootname} ${techdir}/$leffile \ + ${scriptdir}/addspacers.tcl ${rootname} ${lefpath} \ $fillcell >>& ${synthlog} if ( -f ${rootname}_filled.def ) then mv ${rootname}_filled.def ${rootname}.def diff --git a/scripts/router.sh b/scripts/router.sh index a48bcf1..2b8e2e0 100755 --- a/scripts/router.sh +++ b/scripts/router.sh @@ -66,6 +66,14 @@ if ( ${errcond} == 1 ) then exit 1 endif +# Prepend techdir to leffile unless leffile begins with "/" +set abspath=`echo ${leffile} | cut -c1` +if ( "${abspath}" == "/" ) then + set lefpath=${leffile} +else + set lefpath=${techdir}/${leffile} +endif + #---------------------------------------------------------- # Done with initialization #---------------------------------------------------------- @@ -132,7 +140,7 @@ endif if (${scripting} == "T") then if ( -f ${rootname}.cinfo && ( -M ${rootname}.cinfo \ > -M ${rootname}.def )) then - ${scriptdir}/decongest.tcl ${rootname} ${techdir}/${leffile} \ + ${scriptdir}/decongest.tcl ${rootname} ${lefpath} \ ${fillcell} |& tee -a ${synthlog} endif endif diff --git a/scripts/synthesize.sh b/scripts/synthesize.sh index aa21496..2438215 100755 --- a/scripts/synthesize.sh +++ b/scripts/synthesize.sh @@ -58,6 +58,30 @@ cd ${projectpath} rm -f ${synthlog} >& /dev/null touch ${synthlog} +# Prepend techdir to libertyfile unless libertyfile begins with "/" +set abspath=`echo ${libertyfile} | cut -c1` +if ( "${abspath}" == "/" ) then + set libertypath=${libertyfile} +else + set libertypath=${techdir}/${libertyfile} +endif + +# Prepend techdir to spicefile unless spicefile begins with "/" +set abspath=`echo ${spicefile} | cut -c1` +if ( "${abspath}" == "/" ) then + set spicepath=${spicefile} +else + set spicepath=${techdir}/${spicefile} +endif + +# Prepend techdir to leffile unless leffile begins with "/" +set abspath=`echo ${leffile} | cut -c1` +if ( "${abspath}" == "/" ) then + set lefpath=${leffile} +else + set lefpath=${techdir}/${leffile} +endif + #--------------------------------------------------------------------- # Determine hierarchy by running yosys with a simple script to check # hierarchy. Add files until yosys no longer reports an error. @@ -82,30 +106,6 @@ if ( !( -f ${rootname}.v )) then |& tee -a ${synthlog} endif -# Prepend techdir to libertyfile unless libertyfile begins with "/" -set abspath=`echo ${libertyfile} | cut -c1` -if ( "${abspath}" == "/" ) then - set ${libertypath}=${libertyfile} -else - set ${libertypath}=${techdir}/${libertyfile} -endif - -# Prepend techdir to spicefile unless spicefile begins with "/" -set abspath=`echo ${spicefile} | cut -c1` -if ( "${abspath}" == "/" ) then - set ${spicepath}=${spicefile} -else - set ${spicepath}=${techdir}/${spicefile} -endif - -# Prepend techdir to leffile unless leffile begins with "/" -set abspath=`echo ${leffile} | cut -c1` -if ( "${abspath}" == "/" ) then - set ${lefpath}=${leffile} -else - set ${lefpath}=${techdir}/${leffile} -endif - cat > ${rootname}.ys << EOF # Synthesis script for yosys created by qflow read_liberty -lib -ignore_miss_dir -setattr blackbox ${libertypath} diff --git a/scripts/vesta.sh b/scripts/vesta.sh index f7ceb1b..531bdff 100755 --- a/scripts/vesta.sh +++ b/scripts/vesta.sh @@ -58,6 +58,14 @@ if ( ${errcond} == 1 ) then exit 1 endif +# Prepend techdir to libertyfile unless libertyfile begins with "/" +set abspath=`echo ${libertyfile} | cut -c1` +if ( "${abspath}" == "/" ) then + set libertypath=${libertyfile} +else + set libertypath=${techdir}/${libertyfile} +endif + #---------------------------------------------------------- # Done with initialization #---------------------------------------------------------- @@ -72,7 +80,7 @@ echo "" echo "Running vesta static timing analysis" echo "" ${bindir}/vesta ${vesta_options} ${rootname}.rtlnopwr.v \ - ${techdir}/${libertyfile} |& tee -a ${synthlog} + ${libertypath} |& tee -a ${synthlog} echo "" #------------------------------------------------------------ |