#
###########################################################################################
#
#cd $TRAINING_PATH/hlsSys_flow/support;chmod 777 hlsSys_flow_QemuRun.sh;./hlsSys_flow_QemuRun.sh
# 
# History:
#    2024/08/26 - SB    - 2024.1 - Created this file based on MigrateToVUIDE lab 
###########################################################################################
#
##############             Modify below this         ########################
#Only the next two lines need to be modified if using this file for another lab. 
TC_NAME=hlsSys_flow
APP_NAME=fir_test_application
# the VITIS_PATH variable points to the installation directory for the current version of Vitis. 
# the following paths are valid for the CustEd VM and CloudShare environments. If you are using
# this on another platform, you will need to modify the following line of code to point to the installation
VITIS_PATH=/opt/amd/2025.2/Vitis
TOOLS=$TRAINING_PATH/tools

##############              No need to modify below this              ########################

# in case this is a new terminal, we need to load the settings64 script
source $VITIS_PATH/settings64.sh
# point to the location of the QEMU binaries
QEMU_ZYNQMP=$VITIS_PATH/data/emulation/qemu/comp/qemu/sysroots/x86_64-petalinux-linux/usr/bin/qemu-system-aarch64
# point to the executable
ELF=$TRAINING_PATH/$TC_NAME/lab/$APP_NAME/build/$APP_NAME.elf


$QEMU_ZYNQMP -M arm-generic-fdt -nographic \
-dtb $TOOLS/zynqmp-qemu-arm.dtb \
-device loader,file=$ELF,cpu-num=1 \
-device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4

# run the emulator with the arguments

# DONE

#<copyright-disclaimer-start>
#  **************************************************************************************************************
#  * © 2026 Advanced Micro Devices, Inc. All rights reserved.                                                  *
#  * DISCLAIMER                                                                                                 *
#  * The information contained herein is for informational purposes only, and is subject to change              *
#  * without notice. While every precaution has been taken in the preparation of this document, it              *
#  * may contain technical inaccuracies, omissions and typographical errors, and AMD is under no                *
#  * obligation to update or otherwise correct this information.  Advanced Micro Devices, Inc. makes            *
#  * no representations or warranties with respect to the accuracy or completeness of the contents of           *
#  * this document, and assumes no liability of any kind, including the implied warranties of noninfringement,  *
#  * merchantability or fitness for particular purposes, with respect to the operation or use of AMD            *
#  * hardware, software or other products described herein.  No license, including implied or                   *
#  * arising by estoppel, to any intellectual property rights is granted by this document.  Terms and           *
#  * limitations applicable to the purchase or use of AMD’s products are as set forth in a signed agreement   *
#  * between the parties or in AMD's Standard Terms and Conditions of Sale. GD-18                               *
#  *                                                                                                            *
#  **************************************************************************************************************
#<copyright-disclaimer-end>
