mirror of
https://github.com/steve-m/hsdaoh-fpga.git
synced 2026-03-14 21:09:46 +01:00
Replace chained adder in rptr_empty/wptr_full with parallel pre-computation (rbin+1, rbin+2) and mux selection. This reduces the critical path from ~9 to ~5-6 logic levels, improving clk_pixel Fmax from 120.8 to 166.7 MHz (+38%). Add build.sh/build.tcl for headless CLI builds via gw_sh with timing-driven PnR and increased placement/routing effort. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
652 B
Bash
Executable file
23 lines
652 B
Bash
Executable file
#!/bin/bash
|
|
# Build script for hsdaoh FPGA projects
|
|
# Usage: ./build.sh <project_file.gprj>
|
|
# e.g.: ./build.sh hsdaoh_nano20k_test.gprj
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
# Auto-detect Gowin installation
|
|
GOWIN_DIR="${GOWIN_DIR:-$HOME/tools/Gowin_V1.9.11.03_Education_Linux/IDE}"
|
|
|
|
if [ ! -f "$GOWIN_DIR/bin/gw_sh" ]; then
|
|
echo "ERROR: gw_sh not found at $GOWIN_DIR/bin/gw_sh"
|
|
echo "Set GOWIN_DIR to your Gowin IDE directory"
|
|
exit 1
|
|
fi
|
|
|
|
export LD_LIBRARY_PATH="$GOWIN_DIR/lib/:$LD_LIBRARY_PATH"
|
|
export QT_QPA_PLATFORM=offscreen
|
|
|
|
echo "Using Gowin IDE: $GOWIN_DIR"
|
|
exec "$GOWIN_DIR/bin/gw_sh" "$SCRIPT_DIR/build.tcl" "$@"
|