| 123456789101112131415161718192021 |
- #!/bin/bash
- set -euo pipefail
- PROJECT="$(cd "$(dirname "$0")/.." && pwd)"
- TD_DEFAULT="$(cd "$PROJECT/../.." && pwd)/TD_4.6.7_Linux/bin/td"
- TD="${TD_BIN:-$TD_DEFAULT}"
- BIT="$PROJECT/build/td/fpga_pwm_trace.bit"
- if [ ! -x "$TD" ]; then
- echo "ERROR: TD executable not found: $TD" >&2
- exit 1
- fi
- if [ ! -s "$BIT" ]; then
- echo "ERROR: bitstream not found: $BIT" >&2
- echo "Run ./scripts/build.sh first." >&2
- exit 1
- fi
- # These are the exact low-level parameters previously verified on the real
- # EF2L45 board: jtag_burst + cable 0 + SVF speed 4.
- printf 'bit_to_vec -chip EF2L45B -m jtag_burst -bit %s\nprogram -cable 0 -mode svf -spd 4 -p\nexit\n' "$BIT" | "$TD"
|