#!/usr/bin/env bash # SPDX-License-Identifier: MIT # Rung 5 (this crate's; the reference's rung 5, a second per-cycle emulator, is not built # there yet): the trace lockstep. Every scenario runs on both cores and the two boundary # traces (kind, cycles, instruction bytes, the state before and after, every cycle with # its kind, address, value and dummy flag) must be identical byte for byte: random 64 KiB # memories under resets and jumps (conformance/scenarios/), spctest's first program with # its S-CPU side scripted, to its end, and PeterLemon's tests' first 300,000 boundaries # in both forms (external/scenarios/, made from $SPC700_PYTHON's reference/). The # reference's digests are cached per pin. PROGRAMS=0 skips the programs. set -euo pipefail source "$(dirname "$0")/env.sh" require_reference python3 "$ROOT/scripts/make_scenarios.py" --programs scenarios=("$ROOT"/conformance/scenarios/*.json) if [ "${PROGRAMS:-1}" = 1 ]; then scenarios+=("$ROOT"/external/scenarios/program-*.json) fi python3 "$ROOT/scripts/lockstep.py" "${scenarios[@]}" --python "$REFERENCE_PYTHON" \ --reference-cache "$REFERENCE_CACHE/traces" --jobs "${JOBS:-3}" echo "rung 5: passed"