wrappers: sh: ql: fixup share path and vpr_common

Signed-off-by: Paweł Czarnecki <pczarnecki@antmicro.com>
This commit is contained in:
Paweł Czarnecki 2022-05-31 16:00:55 +02:00
parent 84dd7bd4b3
commit bc488d3abc
3 changed files with 24 additions and 10 deletions

View File

@ -18,8 +18,8 @@
set -e
MYPATH=`realpath $0`
MYPATH=`dirname ${MYPATH}`
SHARE_DIR_PATH=${SHARE_DIR_PATH:="$F4PGA_ENV_SHARE"}
BIN_DIR_PATH=${BIN_DIR_PATH:="$F4PGA_BIN_SHARE"}
OPTS=d:P:p:b:
LONGOPTS=device:,part:,pcf:,bit:,
@ -70,8 +70,8 @@ fi
# Run fasm2bels
if [[ "$DEVICE" =~ ^(ql-eos-s3|ql-pp3e)$ ]]; then
VPR_DB=`readlink -f ${MYPATH}/../share/symbiflow/arch/${DEVICE}_wlcsp/db_phy.pickle`
FASM2BELS=`readlink -f ${MYPATH}/../bin/python/fasm2bels.py`
VPR_DB=`readlink -f ${SHARE_DIR_PATH}/arch/${DEVICE}_wlcsp/db_phy.pickle`
FASM2BELS=`readlink -f ${BIN_DIR_PATH}/python/fasm2bels.py`
FASM2BELS_DEVICE=${DEVICE/ql-/}
VERILOG_FILE="${BIT}.v"
PCF_FILE="${BIT}.v.pcf"

View File

@ -18,6 +18,7 @@
set -e
SHARE_DIR_PATH=${SHARE_DIR_PATH:="$F4PGA_ENV_SHARE"}
OPTS=d:f:r:b:P:
LONGOPTS=device:,fasm:,format:,bit:,part:
@ -61,7 +62,7 @@ DB_ROOT="$F4PGA_ENV_SHARE"/fasm_database/${DEVICE}
# qlf
if [[ "$DEVICE" =~ ^(qlf_k4n8.*)$ ]]; then
QLF_FASM=`which qlf_fasm`
DB_ROOT=`realpath ${MYPATH}/../share/symbiflow/fasm_database/${DEVICE}`
DB_ROOT=`realpath ${SHARE_DIR_PATH}//fasm_database/${DEVICE}`
${QLF_FASM} --db-root ${DB_ROOT} --format ${BIT_FORMAT} --assemble $FASM $BIT
elif [[ "$DEVICE" =~ ^(ql-eos-s3|ql-pp3e)$ ]]; then
qlfasm --dev-type ${DEVICE} ${FASM} ${BIT}

View File

@ -16,6 +16,8 @@
#
# SPDX-License-Identifier: Apache-2.0
SHARE_DIR_PATH=${SHARE_DIR_PATH:="$F4PGA_ENV_SHARE"}
function parse_args {
OPTS=d:f:e:p:n:P:j:s:t:c:
@ -109,20 +111,31 @@ function parse_args {
export CORNER=$CORNER
if [[ "$DEVICE" == "qlf_k4n8_qlf_k4n8" ]]; then
DEVICE_1="qlf_k4n8-qlf_k4n8_umc22_${CORNER}"
DEVICE_2=${DEVICE_1}
elif [[ "$DEVICE" == "qlf_k6n10_qlf_k6n10" ]];then
DEVICE_1="qlf_k6n10-qlf_k6n10_gf12"
DEVICE_2=${DEVICE_1}
else
DEVICE_1=${DEVICE}
DEVICE_2="wlcsp"
fi
export TOP=$TOP
export ARCH_DIR=`realpath ${MYPATH}/../share/symbiflow/arch/${DEVICE_1}_${DEVICE_1}`
export ARCH_DEF=${ARCH_DIR}/arch_${DEVICE_1}_${DEVICE_1}.xml
export ARCH_DIR=`realpath ${SHARE_DIR_PATH}/arch/${DEVICE_1}_${DEVICE_2}`
export ARCH_DEF=${ARCH_DIR}/arch_${DEVICE_1}_${DEVICE_2}.xml
# qlf* devices use different naming scheme than pp3* ones.
export RR_GRAPH=${ARCH_DIR}/${DEVICE_1}.rr_graph.bin
export PLACE_DELAY=${ARCH_DIR}/rr_graph_${DEVICE_1}_${DEVICE_1}.place_delay.bin
export ROUTE_DELAY=${ARCH_DIR}/rr_graph_${DEVICE_1}_${DEVICE_1}.lookahead.bin
if [ ! -f ${RR_GRAPH} ]; then
export RR_GRAPH=${ARCH_DIR}/rr_graph_${DEVICE_1}_${DEVICE_2}.rr_graph.real.bin
fi
export PLACE_DELAY=${ARCH_DIR}/rr_graph_${DEVICE_1}_${DEVICE_2}.place_delay.bin
export ROUTE_DELAY=${ARCH_DIR}/rr_graph_${DEVICE_1}_${DEVICE_2}.lookahead.bin
export DEVICE_NAME=${DEVICE_1}
export VPR_CONFIG=`realpath ${MYPATH}/../share/symbiflow/scripts/${FAMILY}/vpr_config.sh`
export VPR_CONFIG=`realpath ${SHARE_DIR_PATH}/scripts/${FAMILY}/vpr_config.sh`
}
function run_vpr {