File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
DirectProgramming/C++SYCL_FPGA/Tutorials/Tools/use_library Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ endif()
161
161
# The RTL file (specified in lib_rtl_spec.xml) must be copied to the CMake working directory for the final stage of FPGA hardware compilation
162
162
configure_file (${CMAKE_CURRENT_SOURCE_DIR} /${RTL_V} ${RTL_V} @ONLY )
163
163
164
- set (FPGA_CROSSGEN_COMMAND fpga_crossgen ${CMAKE_CURRENT_SOURCE_DIR} /${RTL_SPEC} --cpp_model ${CMAKE_CURRENT_SOURCE_DIR} /${RTL_C_MODEL} -o ${RTL_SOURCE_OBJECT} ${USER_FLAGS} )
164
+ set (FPGA_CROSSGEN_COMMAND fpga_crossgen ${CMAKE_CURRENT_SOURCE_DIR} /${RTL_SPEC} --cpp_model ${CMAKE_CURRENT_SOURCE_DIR} /${RTL_C_MODEL} --target sycl - o ${RTL_SOURCE_OBJECT} ${USER_FLAGS} )
165
165
166
166
# Create RTL source object
167
167
add_custom_target (
@@ -171,9 +171,9 @@ add_custom_target(
171
171
172
172
# Create library archive
173
173
# This executes:
174
- # fpga_libtool lib_rtl.o --create lib.a
174
+ # fpga_libtool lib_rtl.o --target sycl -- create lib.a
175
175
add_custom_target (create_library_archive DEPENDS ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} /${LIBRARY_ARCHIVE} )
176
- set (FPGA_LIBTOOL_COMMAND fpga_libtool ${RTL_SOURCE_OBJECT} --create ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} /${LIBRARY_ARCHIVE} )
176
+ set (FPGA_LIBTOOL_COMMAND fpga_libtool ${RTL_SOURCE_OBJECT} --target sycl -- create ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} /${LIBRARY_ARCHIVE} )
177
177
add_custom_command (OUTPUT ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} /${LIBRARY_ARCHIVE}
178
178
COMMAND ${FPGA_LIBTOOL_COMMAND}
179
179
DEPENDS create_rtl_source_object )
Original file line number Diff line number Diff line change @@ -93,10 +93,10 @@ To create a library from source code, use the following steps:
93
93
94
94
``` bash
95
95
# Linux
96
- fpga_crossgen lib_rtl_spec.xml --cpp_model lib_rtl_model.cpp -o lib_rtl.o
96
+ fpga_crossgen lib_rtl_spec.xml --cpp_model lib_rtl_model.cpp --target sycl - o lib_rtl.o
97
97
98
98
# Windows
99
- fpga_crossgen lib_rtl_spec.xml --cpp_model lib_rtl_model.cpp -o lib_rtl.obj
99
+ fpga_crossgen lib_rtl_spec.xml --cpp_model lib_rtl_model.cpp --target sycl - o lib_rtl.obj
100
100
```
101
101
102
102
Note that generating an RTL library requires that an ` xml ` file and a C++ model be provided in addition to the Verilog source code. The RTL is used when compiling for the hardware whereas the C++ model is used when the oneAPI program is run on the FPGA emulator. Examine the tutorial source code and the comments in ` use_library.cpp ` for more details.
@@ -111,10 +111,10 @@ To create a library from source code, use the following steps:
111
111
112
112
` ` ` bash
113
113
# Linux
114
- fpga_libtool lib_rtl.o --create lib_rtl.a
114
+ fpga_libtool lib_rtl.o --target sycl -- create lib_rtl.a
115
115
116
116
# Windows
117
- fpga_libtool lib_rtl.obj --create lib_rtl.lib
117
+ fpga_libtool lib_rtl.obj --target sycl -- create lib_rtl.lib
118
118
119
119
` ` `
120
120
You can’t perform that action at this time.
0 commit comments