Skip to content

Commit

Permalink
Remove unused Jinja2 CMake and refractor Vivado HLS to Vitis HLS CMake.
Browse files Browse the repository at this point in the history
  • Loading branch information
bo3z committed Nov 14, 2024
1 parent db56093 commit e4b8642
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 90 deletions.
8 changes: 4 additions & 4 deletions cmake/FindCoyoteHW.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ if (NOT VIVADO_FOUND)
message(FATAL_ERROR "Vivado not found.")
endif()

find_package(VivadoHLS REQUIRED)
if (NOT VIVADO_HLS_FOUND)
message(FATAL_ERROR "Vivado HLS not found.")
find_package(VITIS_HLS REQUIRED)
if (NOT VITIS_HLS_FOUND)
message(FATAL_ERROR "Vitis HLS not found.")
endif()

if(VITIS_HLS)
Expand Down Expand Up @@ -726,7 +726,7 @@ macro(gen_targets)
endif()

if(LOAD_APPS)
set(HLS_SYNTH_CMD COMMAND ${VIVADO_HLS_BINARY} -f comp_hls.tcl -tclargs ${target})
set(HLS_SYNTH_CMD COMMAND ${VITIS_HLS_BINARY} -f comp_hls.tcl -tclargs ${target})
endif()

# Shell flow
Expand Down
41 changes: 0 additions & 41 deletions cmake/FindJinja2.cmake

This file was deleted.

18 changes: 18 additions & 0 deletions cmake/FindVitisHLS.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.5)

find_path(VITIS_HLS_PATH
NAMES vitis_hls
PATHS ${VITIS_HLS_ROOT_DIR} ENV XILINX_VITIS_HLS ENV XILINX_HLS ENV VITIS_HLS
PATH_SUFFIXES bin
)

if(NOT EXISTS ${VITIS_HLS_PATH})
message(WARNING "Vitis HLS not found. Please install it before building Coyote.")
else()
get_filename_component(VITIS_HLS_ROOT_DIR ${VITIS_HLS_PATH} DIRECTORY)
set(VITIS_HLS 1)
set(VITIS_HLS_FOUND TRUE)
set(VITIS_HLS_BINARY ${VITIS_HLS_ROOT_DIR}/bin/vitis_hls)
set(VITIS_HLS_INCLUDE_DIRS ${VITIS_HLS_ROOT_DIR}/include/)
message(STATUS "Found Vitis HLS at ${VITIS_HLS_ROOT_DIR}.")
endif()
38 changes: 0 additions & 38 deletions cmake/FindVivadoHLS.cmake

This file was deleted.

12 changes: 6 additions & 6 deletions examples_hw/apps/tcp_iperf/hls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.0)
set (PROJECT_NAME send_recv)
project(${PROJECT_NAME})

# Include custom Find<Module>.cmake scripts to enable searching for Vivado HLS
# Include custom Find<Module>.cmake scripts to enable searching for Vivado & Vitis HLS
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake)

# Without this variable set, CMake will build tests when running install
Expand All @@ -31,10 +31,10 @@ set(DATA_WIDTH 64 CACHE STRING "Width of data path in bytes")
set(CLOCK_PERIOD 3.2 CACHE STRING "Target clock period in nanoseconds")


# Find Xilinx Vivado HLS
find_package(VivadoHLS REQUIRED)
if (NOT VIVADO_HLS_FOUND)
message(FATAL_ERROR "Vivado HLS not found.")
# Find Xilinx Vitis HLS
find_package(VitisHLS REQUIRED)
if (NOT VITIS_HLS_FOUND)
message(FATAL_ERROR "Vitis HLS not found.")
endif()


Expand All @@ -60,7 +60,7 @@ foreach (target ${HLS_TARGETS})
endif()

add_custom_target(${target}.${PROJECT_NAME}
COMMAND ${VIVADO_HLS_BINARY} -f make.tcl -tclargs ${target}
COMMAND ${VITIS_HLS_BINARY} -f make.tcl -tclargs ${target}
DEPENDS ${EXAMPLE_HLS_DEPENDS})
add_dependencies(${target} ${target}.${PROJECT_NAME})
endforeach()
Expand Down
2 changes: 1 addition & 1 deletion examples_hw/apps/tcp_iperf/hls/make.tcl.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if {$command == "synthesis"} {
file delete -force ${IPREPO_DIR}/${PROJECT_NAME}
file copy -force ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_prj/solution1/impl/ip ${IPREPO_DIR}/${PROJECT_NAME}/
} else {
puts "No valid command specified. Use vivado_hls -f make.tcl <synthesis|csim|ip> ."
puts "No valid command specified. Use vitis_hls -f make.tcl <synthesis|csim|ip> ."
}


Expand Down

0 comments on commit e4b8642

Please sign in to comment.