Skip to content

Rrivera/hw tool cleanup may2026 tk2#302

Open
rrivera747 wants to merge 6 commits into
developfrom
rrivera/hwToolCleanupMay2026_tk2
Open

Rrivera/hw tool cleanup may2026 tk2#302
rrivera747 wants to merge 6 commits into
developfrom
rrivera/hwToolCleanupMay2026_tk2

Conversation

@rrivera747
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh process 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.

Comment thread tools/reset_PCIe_AL9.sh
# 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 thread tools/post_to_ecl.sh
Comment on lines +3 to +4
# Call this logbook posting script with a message (in quotes)
# Usage: ./post_to_ecl.sh "message"
Comment thread tools/post_to_ecl.sh
Comment on lines +15 to +20
SCRIPT_DIR="$(
cd "$(dirname "$(readlink "$0" || printf %s "$0")")"
pwd -P
)"


Comment thread tools/post_to_ecl.sh
Comment on lines +37 to +38

ssh mu2eshift@${HOSTNAME} bash /home/mu2eshift/ecl_post.sh \"$TITLE\" \"$MESSAGE\"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants