Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cmake/hwip.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ endfunction()
# :type [HEADERS]: list
#]]
function(ip_sources IP_LIB LANGUAGE)
cmake_parse_arguments(ARG "PREPEND;REPLACE" "FILE_SET" "HEADERS" ${ARGN})
cmake_parse_arguments(ARG "PREPEND;REPLACE" "FILE_SET" "HEADERS;FILELIST" ${ARGN})
# Delete PREPEND and REPLACE from argument list, so only sources are left
list(REMOVE_ITEM ARGN "PREPEND" "REPLACE")

Expand Down Expand Up @@ -285,6 +285,7 @@ function(ip_sources IP_LIB LANGUAGE)
# Convert all listed files to absolute paths relative to ${CMAKE_CURRENT_SOURCE_DIR}
convert_paths_to_absolute(file_list ${ARGN})
convert_paths_to_absolute(header_list ${ARG_HEADERS})
convert_paths_to_absolute(filelist_list ${ARG_FILELIST})

unset(append_arg)
# If the PREPEND option is passed prepend the new sources to the old ones
Expand All @@ -309,6 +310,9 @@ function(ip_sources IP_LIB LANGUAGE)
ip_include_directories(${IP_LIB} ${LANGUAGE} FILE_SET ${ARG_FILE_SET} ${header_incdir})
endforeach()
endif()
if(ARG_FILELIST)
set_property(TARGET ${_reallib} ${append_arg} PROPERTY FILELIST ${filelist_list})
endif()
endfunction()

#[[[
Expand Down
11 changes: 9 additions & 2 deletions cmake/sim/cadence/xcelium.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ include_guard(GLOBAL)
# :type TOP_MODULE: string
# :keyword LIBRARY: replace the default library name (worklib) to be used for elaboration and simulation.
# :type LIBRARY: string
# :keyword COMPILE_ARGS: Extra arguments to be passed to the compilation step (C, C++).
# :keyword COMPILE_ARGS: Extra arguments to be passed to the compilation step, like filelist files (.f, .flist).
# :type COMPILE_ARGS: string
# :keyword XRUN_COMPILE_ARGS: Extra arguments to be passed to the xrun -compile command
# :type XRUN_COMPILE_ARGS: string
Expand Down Expand Up @@ -102,6 +102,13 @@ function(xcelium IP_LIB)
set(ARG_XRUN_COMPILE_ARGS XRUN_COMPILE_ARGS ${ARG_XRUN_COMPILE_ARGS})
endif()

get_target_property(FILELIST ${IP_LIB} FILELIST)
if(FILELIST AND NOT FILELIST STREQUAL "NOTFOUND")
foreach(file IN LISTS FILELIST)
list(APPEND ARG_COMPILE_ARGS -f "${file}")
endforeach()
endif()

#######################
### Set target names ##
#######################
Expand Down Expand Up @@ -242,7 +249,7 @@ endfunction()
# :type LIBRARY: string
# :keyword TOP_MODULE: Top module name to be used for elaboration and simulation.
# :type TOP_MODULE: string
# :keyword COMPILE_ARGS: Extra arguments to be passed to the compilation step (C, C++).
# :keyword COMPILE_ARGS: Extra arguments to be passed to the compilation step, like filelist files (.f, .flist).
# :type COMPILE_ARGS: string
# :keyword XRUN_COMPILE_ARGS: Extra arguments to be passed to the xrun -compile command
# :type XRUN_COMPILE_ARGS: string
Expand Down
Loading