Files
Palladium-Z3-demo_ice_top/ice/scripts/compile_ice.sh
T

43 lines
1.7 KiB
Bash

#!/bin/sh
# =============================================================================
# compile_ice.sh -- Palladium Z3 ICE 模式硬件编译脚本
# =============================================================================
set -e
cd "$(dirname "$0")/../.."
ROOT="$(pwd)"
export XE_HOST="${XE_HOST:-z7f1x8c-5k9p3m}"
echo "======================================================================"
echo " [Palladium Z3 ICE] 开始硬件全逻辑编译"
echo " Target Host : $XE_HOST"
echo " Top Module : z3_demo_ice_top"
echo " 当前使用 ixcom : $(which ixcom 2>/dev/null || echo '未检测到')"
echo " 当前使用 xeCompile : $(which xeCompile 2>/dev/null || echo '未检测到,请 export PATH')"
echo "======================================================================"
set +e
ixcom -clean -ua +dut+z3_demo_ice_top \
-z3 \
-ignoreSimSetupCheck \
-ignoreHWPlatformSetupCheck \
-ignoreVersionCheck \
"$ROOT/ice/rtl/z3_demo_top.v" \
"$ROOT/ice/rtl/z3_demo_ice_top.v" \
> compile_ice.log 2>&1
rc=$?
set -e
cat compile_ice.log
if [ $rc -ne 0 ] || grep -q -E '\*E,|ERROR|FATAL|FLOW_FAILED' compile_ice.log; then
echo "======================================================================"
echo " [FAIL] IXCOM ICE 编译失败 (rc=$rc)!请查看日志: compile_ice.log"
echo "======================================================================"
exit 1
fi
echo "======================================================================"
echo " [SUCCESS] Palladium Z3 ICE 硬件编译成功!"
echo " 下一步: 执行 xeDebug 进行上机运行与状态机自检"
echo "======================================================================"