#!/usr/bin/env bash # run_hello.sh - compile + run the ML-KEM hello_world hardware testbench. set -e cd "$(dirname "$0")" source /opt/Xilinx/Vivado/2019.2/settings64.sh >/dev/null 2>&1 export LD_PRELOAD="/usr/lib64/libtinfo.so.5" rm -rf xsim.dir .Xil # compile the RTL (every non-TB xvlog line from the shared tcl) grep -E '^xvlog ' sync_rtl/top/TB/xsim_run.tcl | grep -v 'TB/tb_' | while read -r cmd; do eval "$cmd" >/dev/null done xvlog -sv --relax sync_rtl/top/TB/tb_mlkem_hello_world_xsim.v >/dev/null xelab tb_mlkem_hello_world_xsim -s mlkem_hello --timescale 1ns/1ps >/dev/null 2>&1 xsim mlkem_hello -R 2>/dev/null | grep -vE '^(#|INFO|Time resolution|run -all|exit|xsim|Vivado|====.*Simulator|SW Build|IP Build|Copyright|Tool Version|Start of|source |## )' | sed '/^$/N;/^\n$/D'