- Terminal engine rewritten for VT220: scroll regions, IL/DL/ICH/DCH/ECH, SU/SD, origin mode, insert mode, tab stops, DEC special graphics with G0/G1 and SO/SI, DECSC/DECRC, DECSTR, RIS, DECALN, DECLL LEDs - Replies to DA, secondary DA, DSR and CPR over the UART - 16-colour SGR (256-colour and RGB approximated), bold, underline, blink, reverse and conceal; cells are now 18 bits - Smooth scrolling (SW8 or DECSCLM): the region slides per frame and rows are moved during vertical blanking; XON/XOFF holds the host back - Keyboard: DECCKM, keypad application mode, F5-F12, VT220 Home/End, Alt as ESC prefix - basys3 terminfo entry (vt220 + 16 colours, 30 lines) - Flash script reboots the FPGA from flash after programming - Testbench covers replies, modes, attributes, editing and smooth scroll Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
586 B
Bash
Executable File
18 lines
586 B
Bash
Executable File
#!/bin/bash
|
|
# Run the testbench in Vivado's simulator; output lands in sim/work.
|
|
set -e
|
|
cd "$(dirname "$0")/.."
|
|
ROOT=$(pwd)
|
|
source scripts/vivado_env.sh
|
|
mkdir -p sim/work
|
|
cd sim/work
|
|
xvlog -d FONT_FILE="\"$ROOT/font/font.mem\"" "$ROOT"/rtl/*.v "$ROOT"/sim/tb_terminal.v
|
|
xelab -debug off tb_terminal -s tb_terminal
|
|
xsim tb_terminal -R
|
|
if command -v python3 >/dev/null; then
|
|
for f in frame_*.ppm; do
|
|
python3 -c "import sys; from PIL import Image; Image.open(sys.argv[1]).save(sys.argv[2])" \
|
|
"$f" "${f%.ppm}.png" && echo "wrote sim/work/${f%.ppm}.png"
|
|
done
|
|
fi
|