feat: complete Palladium Z2 demo for both SA and ICE emulation flows
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
# =============================================================================
|
||||
# compile_sa.sh -- IXCOM compile for Palladium Z2, SA (Simulation Acceleration)
|
||||
#
|
||||
# . ./scripts/env_z2.sh # XE_HOST / XE_BOARDS must be set first
|
||||
# ./scripts/compile_sa.sh
|
||||
#
|
||||
# What IXCOM does here:
|
||||
# -ua unified acceleration compile (design + testbench)
|
||||
# +dut+z2_demo_top the DUT partition that is mapped into the emulator;
|
||||
# everything else (the TB) stays on the host simulator
|
||||
# The compile runs inside ./ixcom_db (AxisWork and the design database land
|
||||
# there) -- run xeDebug from that directory afterwards.
|
||||
#
|
||||
# FIX (2026-10-19): the file lists rtl.f/tb.f contain paths relative to the
|
||||
# PACKAGE ROOT, but vlan resolves them against the compile working directory
|
||||
# (ixcom_db/), which produced:
|
||||
# Error! [FILE_OPEN_ERR] Could not open file (rtl/z2_demo_top.v)
|
||||
# This script therefore generates ABSOLUTE-path file lists for the compile.
|
||||
# It also checks the ixcom exit status / log explicitly, because piping to
|
||||
# tee would otherwise mask a failed compile behind a "finished" message.
|
||||
# =============================================================================
|
||||
set -e
|
||||
cd "$(dirname "$0")/.."
|
||||
ROOT="$PWD"
|
||||
|
||||
: "${XE_HOST:?set XE_HOST first: . ./scripts/env_z2.sh}"
|
||||
: "${XE_BOARDS:?set XE_BOARDS first: . ./scripts/env_z2.sh}"
|
||||
|
||||
mkdir -p ixcom_db
|
||||
|
||||
# Build absolute-path file lists (relative entries are prefixed with $ROOT;
|
||||
# entries that are already absolute, blank lines and comments pass through).
|
||||
for f in rtl tb; do
|
||||
out="ixcom_db/${f}_abs.f"
|
||||
: > "$out"
|
||||
while IFS= read -r line || [ -n "$line" ]; do
|
||||
case "$line" in
|
||||
/*) echo "$line" >> "$out" ;;
|
||||
""|\#*) [ -n "$line" ] && echo "$line" >> "$out" ;;
|
||||
*) echo "$ROOT/$line" >> "$out" ;;
|
||||
esac
|
||||
done < "${f}.f"
|
||||
done
|
||||
|
||||
cd ixcom_db
|
||||
|
||||
set +e
|
||||
ixcom -ua +dut+z2_demo_top \
|
||||
-f ./rtl_abs.f -f ./tb_abs.f \
|
||||
> compile_sa.log 2>&1
|
||||
rc=$?
|
||||
set -e
|
||||
cat compile_sa.log
|
||||
|
||||
if [ "$rc" -ne 0 ] || grep -q "FLOW_FAILED" compile_sa.log; then
|
||||
echo "== IXCOM compile FAILED (rc=$rc) -- see ixcom_db/compile_sa.log =="
|
||||
exit 1
|
||||
fi
|
||||
echo "== IXCOM compile finished OK, log: ixcom_db/compile_sa.log =="
|
||||
Reference in New Issue
Block a user