Files
arti 1d8656ca10 udpstream: PIXBLT L,XY blit primitive (vram.asm) and a 256 KB .bss
vram_blit_ copies a 1-bpp rectangle from RAM to VRAM.  The manual has no L,L
variant, so the destination is XY and the hardware forms the address:
  B0=SADDR  B1=SPTCH  B2=DADDR(XY)  B3=DPTCH=0x800  B4=OFFSET=0x04000000
  B7=DYDX   PSIZE=1  PMASK=0  CONVSP=CONVDP=0x14  CONTROL raster-op=0
SPTCH is a parameter because 0 makes every row read the same source address,
which is how one expanded row can be stamped eight times down the screen.

The .bss region in the linker command grows from 0x40000 to 0x200000 address
units (32 KB -> 256 KB) so a 1280x1024 1-bpp frame buffer (163840 B) fits; the
previous .coff had been built from sources that were not yet committed.

bench-sweep.sh gains its executable bit.
2026-10-30 17:44:27 +02:00

38 lines
1.4 KiB
Bash
Executable File

#!/bin/sh
# bench-sweep.sh -- measure the receive path of the LANCE command payload
# (harness/udpstream/lance_cmd.c) across frame sizes and offered rates.
#
# ./bench-sweep.sh vt1200 # MAME (tap interface)
# sudo ./bench-sweep.sh enp197s0f3u1 08:00:2b:16:4b:5a # real unit
#
# Output is one CSV line per run:
#
# size,rate,seconds,sent,frames,bytes,fps,KiB/s,Mbit/s,delivery%,csr0_err,txfull,chained
#
# "delivery" below 100% means frames were offered and not received. csr0_err
# tells you which side lost them: MISS (0x1000) = the chip had no descriptor
# (ring too small or the loop too slow); no MISS = they never reached the chip
# (wire, switch, or the sender).
#
# The unpaced runs are deliberately last and slowest-to-recover: a 60-byte
# flood is far above both the wire and the loop, and it exists only to show
# where the ceiling is.
set -e
IFACE=${1:-vt1200}
DST=${2:-ff:ff:ff:ff:ff:ff}
SECS=${SECS:-2}
HERE=$(cd "$(dirname "$0")" && pwd)
echo "size,rate,seconds,sent,frames,bytes,fps,KiB/s,Mbit/s,delivery%,csr0_err,txfull,chained"
for size in 60 200 500 1000 1514; do
for rate in 500 1000 2000 4000; do
python3 "$HERE/vtcmd.py" bench --iface "$IFACE" --dst "$DST" \
--size "$size" --rate "$rate" --seconds "$SECS" --terse || break
done
# as fast as the host can send
python3 "$HERE/vtcmd.py" bench --iface "$IFACE" --dst "$DST" \
--size "$size" --seconds "$SECS" --terse || break
done