diff --git a/scripts/database.sh b/scripts/database.sh new file mode 100755 index 00000000..549beabb --- /dev/null +++ b/scripts/database.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " + exit 1 +fi + +family=$1 +part=$2 + +# If not set, then set it +if [ -z "${BFASST_PATH_FASM2BELS}" ]; then + BFASST_PATH_FASM2BELS=third_party/fasm2bels +fi + +if [ -z "${FASM2BELS_PYTHON_PATH}" ]; then + FASM2BELS_PYTHON_PATH="${BFASST_PATH_FASM2BELS}/env/conda/envs/f4pga_xc_fasm2bels/bin/python3" +fi + +# Run the Python script with the provided family and part +"${FASM2BELS_PYTHON_PATH}" "${BFASST_PATH_FASM2BELS}/fasm2bels/database/create_channels.py" --db-root "${BFASST_PATH_FASM2BELS}/third_party/prjxray-db/${family}" --part "${part}" --connection-database-output "${BFASST_PATH_FASM2BELS}/${part}_db" diff --git a/scripts/install-fasm2bels.sh b/scripts/install-fasm2bels.sh index 5438aa27..2832b12e 100755 --- a/scripts/install-fasm2bels.sh +++ b/scripts/install-fasm2bels.sh @@ -57,8 +57,9 @@ else make test-py cd - - # Generate the part db to cache - "${FASM2BELS_PYTHON_PATH}" "${BFASST_PATH_FASM2BELS}/fasm2bels/database/create_channels.py" --db-root "${BFASST_PATH_FASM2BELS}/third_party/prjxray-db/artix7" --part "xc7a200tsbg484-1" --connection-database-output "${BFASST_PATH_FASM2BELS}/xc7a200tsbg484-1_db" + # Generate the part database to cache for future use + # If you need the database for another part, run the script below with the family and part as arguments + ./scripts/database.sh artix7 xc7a200tsbg484-1 echo "${FASM2BELS_COMMIT}" > "${BFASST_PATH_FASM2BELS}/fasm2bels_commit.txt" fi