set(XILINX_ISE_ROOT "/opt/xilinx-ise/14.7/ISE_DS/ISE/bin/lin64")

# set target system
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR xilinx-fpga)

# toolchain paths
find_program(XIL_TCLSH NAMES xtclsh PATHS ${XILINX_ISE_ROOT}
    ENV XILINX_ISE_LOC NO_DEFAULT_PATH)
find_program(XIL_COREGEN NAMES coregen PATHS ${XILINX_ISE_ROOT}
    ENV XILINX_ISE_LOC NO_DEFAULT_PATH)
find_program(XIL_XST NAMES xst PATHS ${XILINX_ISE_ROOT}
    ENV XILINX_ISE_LOC NO_DEFAULT_PATH)
find_program(XIL_NGDBUILD NAMES ngdbuild PATHS ${XILINX_ISE_ROOT}
    ENV XILINX_ISE_LOC NO_DEFAULT_PATH)
find_program(XIL_MAP NAMES map PATHS ${XILINX_ISE_ROOT}
    ENV XILINX_ISE_LOC NO_DEFAULT_PATH)
find_program(XIL_PAR NAMES par PATHS ${XILINX_ISE_ROOT}
    ENV XILINX_ISE_LOC NO_DEFAULT_PATH)
find_program(XIL_TRCE NAMES trce PATHS ${XILINX_ISE_ROOT}
    ENV XILINX_ISE_LOC NO_DEFAULT_PATH)
find_program(XIL_BITGEN NAMES bitgen PATHS ${XILINX_ISE_ROOT}
    ENV XILINX_ISE_LOC NO_DEFAULT_PATH)
find_program(XIL_PROMGEN NAMES promgen PATHS ${XILINX_ISE_ROOT}
    ENV XILINX_ISE_LOC NO_DEFAULT_PATH)
find_program(XIL_IMPACT NAMES impact PATHS ${XILINX_ISE_ROOT}
    ENV XILINX_ISE_LOC NO_DEFAULT_PATH)

set(TOOLCHAIN_ID "xilinx-ise")
set(COMPILER_API "xilinx-ise")
