Rrivera/hw tool cleanup may2026 tk2#302
Open
rrivera747 wants to merge 6 commits into
Open
Conversation
…but someone might look for script by firmware tools
Contributor
There was a problem hiding this comment.
Pull request overview
This PR cleans up and extends the AL9 hardware tooling around FPGA flash programming, boot-from-flash, PCIe reset coordination, and operator helper utilities.
Changes:
- Updates
reset_PCIe_AL9.shprocess detection to include boot-from-flash AL9 scripts. - Adds new “all devices” wrappers for flash programming and boot-from-flash, plus helper scripts for JA reset and ECL posting.
- Simplifies parts of the Vivado TCL flow and aligns the boot-from-flash path with the new helper scripts.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/reset_PCIe_AL9.sh | Adjusts lock/process detection to recognize additional AL9 wrapper scripts. |
| tools/reset_both_JAs_AL9.sh | Replaces local JA reset steps with an ssh call to the mu2eshift JA setup script. |
| tools/program_flash_both_DTCs.tcl | Comments out device-selection calls near open_hw_target for a more generic device workflow. |
| tools/program_flash_all_FPGA_AL9.sh | New wrapper to program flash for each detected JTAG and optionally reset PCIe. |
| tools/post_to_ecl.sh | New helper to post a titled message to the ECL via mu2eshift. |
| tools/boot_from_flash_one_DTC.tcl | New TCL script to boot a single JTAG target from flash by index. |
| tools/boot_from_flash_both_DTCs_AL9.sh | Switches to bash and invokes PCIe reset via sudo rather than sourcing the script. |
| tools/boot_from_flash_all_DTCs_AL9.sh | New wrapper to boot-from-flash for each detected JTAG and optionally reset PCIe. |
| # Look for others possibly running already, ignoring the program_all script that makes underlying program calls | ||
| possible_parent=`echo "$ps" | grep -E ':[0-9]* [a-z/]*bash .*([p]rogram_.*AL9\.sh|[b]oot_from_flash.*AP\.sh)'|grep -v program_all_FPGA|awk '{print$2}'` | ||
| # Look for others possibly running already, ignoring the program_all and boot_from_flash scripts that make underlying program calls | ||
| possible_parent=`echo "$ps" | grep -E ':[0-9]* [a-z/]*sh .*([p]rogram_.*AL9\.sh|[b]oot_from_flash.*AL9\.sh)'|grep -v program_all_FPGA|awk '{print$2}'` |
Comment on lines
+13
to
+16
| SCRIPT_DIR="$( | ||
| cd "$(dirname "$(readlink "$0" || printf %s "$0")")" | ||
| pwd -P | ||
| )" |
| #!/bin/bash | ||
|
|
||
| # Call the FPGA programming script for each JTAG found | ||
| # Usage: ./program_flash all_FPGA_AL9.sh <mcs file> [<optional d for dryrun>] |
|
|
||
| MCSFILE=$1 | ||
| DRYRUN=$2 | ||
| if [ ! -f $MCSFILE ]; then |
Comment on lines
+39
to
+43
| # For dry run, only print the JTAGs found | ||
| COMMANDHEAD="" | ||
| if [[ "${DRYRUN}" != "" ]]; then | ||
| echo -e "$(date +%d%b%y.%T) program_flash_all_FPGA_AL9.sh:${LINENO} | \t DRYRUN $DRYRUN" | ||
| COMMANDHEAD="echo -e program_flash_all_FPGA_AL9.sh | \t " |
Comment on lines
+34
to
+42
| # For dry run, only print the JTAGs found | ||
| COMMANDHEAD="" | ||
| if [[ "${DRYRUN}" != "" ]]; then | ||
| echo -e "$(date +%d%b%y.%T) boot_from_flash_all_DTCs_AL9.sh:${LINENO} | \t DRYRUN $DRYRUN" | ||
| COMMANDHEAD="echo -e boot_from_flash_all_DTCs_AL9.sh | \t " | ||
| fi | ||
|
|
||
| ${COMMANDHEAD} source /home/xilinx/Vivado_Lab/2021.2/settings64.sh | ||
|
|
Comment on lines
+63
to
+64
| return >/dev/null 2>&1 #return is used if script is sourced | ||
| exit #exit is used if script is run |
Comment on lines
+3
to
+4
| # Call this logbook posting script with a message (in quotes) | ||
| # Usage: ./post_to_ecl.sh "message" |
Comment on lines
+15
to
+20
| SCRIPT_DIR="$( | ||
| cd "$(dirname "$(readlink "$0" || printf %s "$0")")" | ||
| pwd -P | ||
| )" | ||
|
|
||
|
|
Comment on lines
+37
to
+38
|
|
||
| ssh mu2eshift@${HOSTNAME} bash /home/mu2eshift/ecl_post.sh \"$TITLE\" \"$MESSAGE\" |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.