Skip to content

Commit

Permalink
Merge pull request #498 from byuccl/database_script
Browse files Browse the repository at this point in the history
database script
  • Loading branch information
reillymck authored Jul 26, 2024
2 parents e98c6c6 + 15f3a98 commit e2e12fa
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
21 changes: 21 additions & 0 deletions scripts/database.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

if [ "$#" -ne 2 ]; then
echo "Usage: $0 <family> <part>"
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"
5 changes: 3 additions & 2 deletions scripts/install-fasm2bels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e2e12fa

Please sign in to comment.