Skip to content

Commit

Permalink
Merge pull request f4pga#1682 from antmicro/additional_vpr_options
Browse files Browse the repository at this point in the history
toolchain_wrappers: add additional_vpr_options option
  • Loading branch information
acomodi committed Sep 30, 2020
2 parents ff5f9ad + b24699f commit 32b5476
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 14 deletions.
9 changes: 5 additions & 4 deletions xc/xc7/tests/install_test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ VERILOG:=${current_dir}/counter_${BOARD}.v
PCF=${current_dir}/${BOARD}.pcf
XDC=${current_dir}/counter_${BOARD}.xdc
BUILDDIR:=build
ADDITIONAL_VPR_OPTIONS="--seed 1024 --astar_fac 1.3"

all: ${BUILDDIR}/${TOP}.bit

Expand All @@ -23,16 +24,16 @@ else
endif

${BUILDDIR}/${TOP}.net: ${BUILDDIR}/${TOP}.eblif
cd ${BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE}
cd ${BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} -a ${ADDITIONAL_VPR_OPTIONS}

${BUILDDIR}/${TOP}.place: ${BUILDDIR}/${TOP}.net
cd ${BUILDDIR} && symbiflow_place -e ${TOP}.eblif -d ${DEVICE} -p ${PCF} -n ${TOP}.net -P ${PARTNAME}
cd ${BUILDDIR} && symbiflow_place -e ${TOP}.eblif -d ${DEVICE} -p ${PCF} -n ${TOP}.net -P ${PARTNAME} -a ${ADDITIONAL_VPR_OPTIONS}

${BUILDDIR}/${TOP}.route: ${BUILDDIR}/${TOP}.place
cd ${BUILDDIR} && symbiflow_route -e ${TOP}.eblif -d ${DEVICE}
cd ${BUILDDIR} && symbiflow_route -e ${TOP}.eblif -d ${DEVICE} -a ${ADDITIONAL_VPR_OPTIONS}

${BUILDDIR}/${TOP}.fasm: ${BUILDDIR}/${TOP}.route
cd ${BUILDDIR} && symbiflow_write_fasm -e ${TOP}.eblif -d ${DEVICE}
cd ${BUILDDIR} && symbiflow_write_fasm -e ${TOP}.eblif -d ${DEVICE} --additional_vpr_options ${ADDITIONAL_VPR_OPTIONS}

${BUILDDIR}/${TOP}.bit: ${BUILDDIR}/${TOP}.fasm
cd ${BUILDDIR} && symbiflow_write_bitstream -d ${BITSTREAM_DEVICE} -f ${TOP}.fasm -p ${PARTNAME} -b ${TOP}.bit
Expand Down
2 changes: 1 addition & 1 deletion xc/xc7/toolchain_wrappers/symbiflow_pack
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MYPATH=`dirname ${MYPATH}`
source ${MYPATH}/env
source ${VPRPATH}/vpr_common

parse_args $@
parse_args "$@"

export OUT_NOISY_WARNINGS=noisy_warnings-${DEVICE}_pack.log

Expand Down
2 changes: 1 addition & 1 deletion xc/xc7/toolchain_wrappers/symbiflow_place
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MYPATH=`dirname ${MYPATH}`
source ${MYPATH}/env
source ${MYPATH}/vpr_common

parse_args $@
parse_args "$@"

if [ -z $PCF ]; then
PCF=""
Expand Down
2 changes: 1 addition & 1 deletion xc/xc7/toolchain_wrappers/symbiflow_route
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MYPATH=`dirname ${MYPATH}`
source ${MYPATH}/env
source ${VPRPATH}/vpr_common

parse_args $@
parse_args "$@"

export OUR_NOISY_WARNINGS=noisy_warnings-${DEVICE}_pack.log

Expand Down
2 changes: 1 addition & 1 deletion xc/xc7/toolchain_wrappers/symbiflow_write_fasm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MYPATH=`dirname ${MYPATH}`
source ${MYPATH}/env
source ${VPRPATH}/vpr_common

parse_args $@
parse_args "$@"

TOP="${EBLIF%.*}"
FASM_EXTRA=${TOP}_fasm_extra.fasm
Expand Down
2 changes: 1 addition & 1 deletion xc/xc7/toolchain_wrappers/symbiflow_write_xml_rr_graph
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MYPATH=`dirname ${MYPATH}`
source ${MYPATH}/env
source ${MYPATH}/vpr_common

parse_args $@
parse_args "$@"

OUT_NOISY_WARNINGS=noisy_warnings-${DEVICE}_place.log

Expand Down
15 changes: 10 additions & 5 deletions xc/xc7/toolchain_wrappers/vpr_common
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ fi

function parse_args {

OPTS=d:e:p:n:P:s:
LONGOPTS=device:,eblif:,pcf:,net:,part:,sdc:
OPTS=d:e:p:n:P:s:a:
LONGOPTS=device:,eblif:,pcf:,net:,part:,sdc:,additional_vpr_options:

PARSED_OPTS=`getopt --options=${OPTS} --longoptions=${LONGOPTS} --name $0 -- $@`
eval set -- ${PARSED_OPTS}
PARSED_OPTS=`getopt --options=${OPTS} --longoptions=${LONGOPTS} --name $0 -- "$@"`
eval set -- "${PARSED_OPTS}"

DEVICE=""
DEVICE_NAME=""
Expand All @@ -20,6 +20,7 @@ function parse_args {
PCF=""
NET=""
SDC=""
ADDITIONAL_VPR_OPTIONS=""

while true; do
case "$1" in
Expand Down Expand Up @@ -47,6 +48,10 @@ function parse_args {
SDC=$2
shift 2
;;
-a|--additional_vpr_options)
ADDITIONAL_VPR_OPTIONS="$2"
shift 2
;;
--)
break
;;
Expand Down Expand Up @@ -75,6 +80,7 @@ function parse_args {
export PCF=$PCF
export NET=$NET
export SDC=$SDC
export VPR_OPTIONS="$VPR_OPTIONS $ADDITIONAL_VPR_OPTIONS"

export ARCH_DIR=`realpath ${MYPATH}/../share/symbiflow/arch/$DEVICE`
export ARCH_DEF=${ARCH_DIR}/arch.timing.xml
Expand All @@ -98,7 +104,6 @@ function run_vpr {
${EBLIF} \
--device ${DEVICE_NAME} \
${VPR_OPTIONS} \
${VPR_SEED} \
--read_rr_graph ${RR_GRAPH} \
--read_router_lookahead ${LOOKAHEAD} \
--read_placement_delay_lookup ${PLACE_DELAY} \
Expand Down

0 comments on commit 32b5476

Please sign in to comment.