Skip to content

Commit

Permalink
Xcelium, do not create elaboration target if already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Risto97 committed Jan 9, 2025
1 parent 0f796ff commit f74814a
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions cmake/sim/cadence/xcelium.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,26 @@ function(xcelium IP_LIB)
${OUTDIR}/xcelium.d
)

set(DESCRIPTION "Compile testbench ${IP_LIB} with ${CMAKE_CURRENT_FUNCTION} xmelab")
set(STAMP_FILE "${BINARY_DIR}/${IP_LIB}_${CMAKE_CURRENT_FUNCTION}.stamp")
add_custom_command(
# OUTPUT ${SIM_EXEC_PATH} ${STAMP_FILE}
OUTPUT ${STAMP_FILE}
COMMAND ${__xmelab_cmd}
COMMAND touch ${STAMP_FILE}
COMMENT ${DESCRIPTION}
BYPRODUCTS ${__clean_files}
WORKING_DIRECTORY ${OUTDIR}
DEPENDS ${__comp_tgts} ${SOURCES}
COMMAND_EXPAND_LISTS
)

add_custom_target(${IP_LIB}_xcelium
DEPENDS ${STAMP_FILE} ${IP_LIB}
)
set_property(TARGET ${IP_LIB}_xcelium PROPERTY DESCRIPTION ${DESCRIPTION})

if(NOT TARGET ${IP_LIB}_xcelium)
set(DESCRIPTION "Compile testbench ${IP_LIB} with ${CMAKE_CURRENT_FUNCTION} xmelab")
set(STAMP_FILE "${BINARY_DIR}/${IP_LIB}_${CMAKE_CURRENT_FUNCTION}.stamp")
add_custom_command(
# OUTPUT ${SIM_EXEC_PATH} ${STAMP_FILE}
OUTPUT ${STAMP_FILE}
COMMAND ${__xmelab_cmd}
COMMAND touch ${STAMP_FILE}
COMMENT ${DESCRIPTION}
BYPRODUCTS ${__clean_files}
WORKING_DIRECTORY ${OUTDIR}
DEPENDS ${__comp_tgts} ${SOURCES}
COMMAND_EXPAND_LISTS
)

add_custom_target(${IP_LIB}_xcelium
DEPENDS ${STAMP_FILE} ${IP_LIB}
)
set_property(TARGET ${IP_LIB}_xcelium PROPERTY DESCRIPTION ${DESCRIPTION})
endif()

## XMSIM command for running simulation

Expand Down

0 comments on commit f74814a

Please sign in to comment.