Created
August 8, 2025 11:04
-
-
Save Sfinx/9b4005f3bf5d11648c6a77aacf2ae74c to your computer and use it in GitHub Desktop.
Convert quartus pin file to qsf format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| FILE_PATH="$1" | |
| count=0 | |
| if [[ -f "$FILE_PATH" ]]; then | |
| while IFS= read -r line; do | |
| ((++count)) | |
| # Current pin file format starts data from 66 line | |
| if [ $count -ge 66 ]; then | |
| pin_data=($line) | |
| if [ "${pin_data[0]}" != "GND" ] && [[ "${pin_data[0]}" != "RESERVED"* ]] && [[ "${pin_data[0]}" != "VCC"* ]] && [ "${pin_data[0]}" != "TMS" ] && [ "${pin_data[0]}" != "TDI" ] && [ "${pin_data[0]}" != "TCK" ] && [ "${pin_data[0]}" != "TDO" ]; then | |
| echo set_location_assignment PIN_"${pin_data[2]}" -to "${pin_data[0]}" | |
| fi | |
| fi | |
| done < "$FILE_PATH" | |
| else | |
| echo "Error: File not found: '$FILE_PATH'" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment