#!/usr/bin/env bash # SPDX-License-Identifier: MIT # Rung 4: the hardware numbers' programs. tests/test_rung4.py's write-buffer and CCR-purge # programs, 32xspd's cached-read loop, every runnable DN P2 loop (160, both samples) and # the purge-order values on validation/rung4/dn.py's CPS3-like board: every bus cycle and # step identical to the reference's (whose own tests check those against DN and 32xspd). set -euo pipefail source "$(dirname "$0")/env.sh" require_reference [ -n "${BIN:-}" ] || build DIR="$ROOT/external/scenarios/rung4" [ -d "$DIR" ] || "$REFERENCE_PYTHON" "$ROOT/scripts/make_scenarios.py" "$SH2_PYTHON" "$DIR" --only rung4 > /dev/null exec python3 "$ROOT/scripts/lockstep.py" "$DIR" --rust "${BIN:-$ROOT/target/release/sh2-trace}" --label "${LABEL:-main}" ${EXPLAIN:+--explain}