#!/usr/bin/env bash # SPDX-License-Identifier: MIT # Rung 3: the pipeline. Every figure of sh2-python's tests/test_pipeline.py on its board, # as drawn and with real fetches, and the programs of that file's other tests (table 7.2's # states, C18, SLEEP, load-use, overrun fetches, waits, state round trips): every bus # cycle, every step and every pipeline_log event identical (scripts/lockstep.py). # BIN: another build of sh2-trace; LABEL: where its traces go. set -euo pipefail source "$(dirname "$0")/env.sh" require_reference [ -n "${BIN:-}" ] || build DIR="$ROOT/external/scenarios/pipeline" [ -d "$DIR" ] || "$REFERENCE_PYTHON" "$ROOT/scripts/make_scenarios.py" "$SH2_PYTHON" "$DIR" --only pipeline --only bench > /dev/null exec python3 "$ROOT/scripts/lockstep.py" "$DIR" --rust "${BIN:-$ROOT/target/release/sh2-trace}" --label "${LABEL:-main}" ${EXPLAIN:+--explain}