Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add resource utilization to Vitis analyzer view #130

Open
enes1994 opened this issue Dec 14, 2022 · 1 comment
Open

Add resource utilization to Vitis analyzer view #130

enes1994 opened this issue Dec 14, 2022 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@enes1994
Copy link

enes1994 commented Dec 14, 2022

Environment

  • OS: Ubuntu 20.04.5 LTS
    
  • Vitis version: 2021.1
    
  • Platform: [xilinx_u280_xdma_201920_3]
    
  • TAPA version: 0.0.20220807.1
    

estimated_resources

I am trying to see the total utilization of the resources(number of FFs,BRAMs etc.) with hw_emu target with vitis analyzer. But as you can see in the picture I cant see any data. Here what I use in my cmake file to build the system:

cmake_minimum_required(VERSION 3.16.3)

set(CMAKE_CXX_STANDARD 17)
project(vadd)

set(PLATFORM
    xilinx_u280_xdma_201920_3
    CACHE STRING "Target FPGA platform")

set(TOP vadd)

set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wno-write-strings")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") 

find_package(gflags REQUIRED)

find_package(Vitis)

include(${CMAKE_CURRENT_SOURCE_DIR}/tapa/cmake/apps.cmake)

include(${CMAKE_CURRENT_SOURCE_DIR}/tapa/cmake/TAPACCConfig.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/tapa/cmake/FindSphinx.cmake)

find_package(TAPA REQUIRED)
find_package(SDx REQUIRED)
add_executable(vadd)

target_sources(vadd PRIVATE host.cpp vadd.cpp)

target_link_libraries(vadd PRIVATE ${TAPA} gflags)
target_link_libraries(vadd PRIVATE tapa::tapa)

target_include_directories(vadd PUBLIC ${Vitis_INCLUDE_DIRS})
include(cmake/CMakeXilinx.cmake)

if(NOT PROJECT_NAME)
  project(tapa-apps-vadd)
endif()



add_test(NAME vadd COMMAND vadd)

if(SDx_FOUND)
  add_tapa_target(
    vadd-hw-xo
    ${TAPA_ARGS}
    INPUT ${CMAKE_CURRENT_SOURCE_DIR}/vadd.cpp
    TOP VecAdd
    CONNECTIVITY ${CMAKE_CURRENT_SOURCE_DIR}/connectivity.ini
    CONSTRAINT ${CMAKE_CURRENT_BINARY_DIR}/constraint.tcl
    PLATFORM ${PLATFORM}
  )

  add_xocc_hw_link_targets(
    ${CMAKE_CURRENT_BINARY_DIR}
    --config=${CMAKE_CURRENT_SOURCE_DIR}/connectivity.ini
    --vivado.synth.jobs 8
    --vivado.prop=run.impl_1.STEPS.OPT_DESIGN.TCL.PRE=${CMAKE_CURRENT_BINARY_DIR}/constraint.tcl
    INPUT vadd-hw-xo
    HW_EMU_XCLBIN hw_emu_xclbin
    HW_XCLBIN hw_xclbin
  )

  add_custom_target(
    vadd-cosim
    COMMAND $<TARGET_FILE:vadd>
            --bitstream=$<TARGET_PROPERTY:${hw_emu_xclbin},FILE_NAME>
    DEPENDS vadd ${hw_emu_xclbin}
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

  add_custom_target(
    vadd-hw
    COMMAND $<TARGET_FILE:vadd>
            --bitstream=$<TARGET_PROPERTY:${hw_xclbin},FILE_NAME>
    DEPENDS vadd ${hw_xclbin}
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

  add_test(NAME vadd-hw COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR}
                                    --target vadd-hw)
endif()

Are there any way to do it like we do it with vitis hls?

Thanks in advance

@Blaok
Copy link
Collaborator

Blaok commented Dec 15, 2022

Sadly, there is no GUI for resource utilization yet. I couldn't find a proper interface to attach the resource utilization information to RTL kernels in Vitis/Vivado either.

If you just want to have some ideas about the resource utilization of your design, there is a text report, available under TAPA's work directory, named report.yaml. It is not as fancy as the Vitis analyzer GUI, but should be sufficiently readable for debugging purposes.

@dotkrnl dotkrnl added the help wanted Extra attention is needed label Sep 19, 2024
@dotkrnl dotkrnl changed the title Resource utilization check Add resource utilization to Vitis analyzer view Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants