From fb1359c3d65cce356ceba0597aa6f2f9ee8f932b Mon Sep 17 00:00:00 2001 From: Dean Liu Date: Tue, 21 Feb 2023 13:23:29 -0500 Subject: [PATCH 1/3] Remove Windows simulator command for memory_attributes Signed-off-by: Dean Liu --- .../Tutorials/Features/memory_attributes/README.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/memory_attributes/README.md b/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/memory_attributes/README.md index a80da65199..955fc30d86 100755 --- a/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/memory_attributes/README.md +++ b/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/memory_attributes/README.md @@ -249,10 +249,6 @@ The choice of attributes will be further discussed in the [Examining the Reports ``` nmake fpga_emu ``` - * Compile for simulation (fast compile time, targets simulated FPGA device, reduced data size): - ``` - nmake fpga_sim - ``` * Generate the optimization report: ``` nmake report @@ -321,12 +317,6 @@ There are often many ways to generate a stall-free memory system. As a programme ```bash CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=1 ./memory_attributes.fpga_sim ``` - * On Windows - ```bash - set CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=1 - memory_attributes.fpga_sim.exe - set CL_CONTEXT_MPSIM_DEVICE_INTELFPGA= - ``` 3. Run the sample on the FPGA device (only if you ran `cmake` with `-DFPGA_DEVICE=:`): ``` ./memory_attributes.fpga (Linux) From 97db946536fb1a13ddc4016cf37a3fa9cab8a73d Mon Sep 17 00:00:00 2001 From: Dean Liu Date: Wed, 22 Feb 2023 10:13:27 -0500 Subject: [PATCH 2/3] Prevent Windows to run simulator target --- .../Tutorials/Features/memory_attributes/src/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/memory_attributes/src/CMakeLists.txt b/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/memory_attributes/src/CMakeLists.txt index fca2b87415..e368b4ee47 100755 --- a/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/memory_attributes/src/CMakeLists.txt +++ b/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/memory_attributes/src/CMakeLists.txt @@ -1,9 +1,12 @@ set(SOURCE_FILE memory_attributes.cpp) set(TARGET_NAME memory_attributes) set(EMULATOR_TARGET ${TARGET_NAME}.fpga_emu) -set(SIMULATOR_TARGET ${TARGET_NAME}.fpga_sim) set(FPGA_TARGET ${TARGET_NAME}.fpga) +if(UNIX) + set(SIMULATOR_TARGET ${TARGET_NAME}.fpga_sim) +endif() + # FPGA board selection if(NOT DEFINED FPGA_DEVICE) set(FPGA_DEVICE "Agilex") From f49bbe646e3a438c4d0cc1ea11597f97e0357510 Mon Sep 17 00:00:00 2001 From: Dean Liu Date: Wed, 22 Feb 2023 10:46:19 -0500 Subject: [PATCH 3/3] Prevent Windows to run simulator target step 2 --- .../Features/memory_attributes/src/CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/memory_attributes/src/CMakeLists.txt b/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/memory_attributes/src/CMakeLists.txt index e368b4ee47..eb9bfed599 100755 --- a/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/memory_attributes/src/CMakeLists.txt +++ b/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/memory_attributes/src/CMakeLists.txt @@ -49,18 +49,20 @@ set_target_properties(${EMULATOR_TARGET} PROPERTIES LINK_FLAGS "${EMULATOR_LINK_ add_custom_target(fpga_emu DEPENDS ${EMULATOR_TARGET}) ############################################################################### -### FPGA Simulator +### FPGA Simulator (for UNIX) ############################################################################### # To compile in a single command: # icpx -fsycl -fintelfpga -Xssimulation -DFPGA_SIMULATOR mem_channel.cpp -o mem_channel.fpga_sim # CMake executes: # [compile] icpx -fsycl -fintelfpga -Xssimulation -DFPGA_SIMULATOR -o mem_channel.cpp.o -c mem_channel.cpp # [link] icpx -fsycl -fintelfpga -Xssimulation mem_channel.cpp.o -o mem_channel.fpga_sim -add_executable(${SIMULATOR_TARGET} ${SOURCE_FILE}) -target_include_directories(${SIMULATOR_TARGET} PRIVATE ../../../../include) -set_target_properties(${SIMULATOR_TARGET} PROPERTIES COMPILE_FLAGS "${SIMULATOR_COMPILE_FLAGS}") -set_target_properties(${SIMULATOR_TARGET} PROPERTIES LINK_FLAGS "${SIMULATOR_LINK_FLAGS}") -add_custom_target(fpga_sim DEPENDS ${SIMULATOR_TARGET}) +if(UNIX) + add_executable(${SIMULATOR_TARGET} ${SOURCE_FILE}) + target_include_directories(${SIMULATOR_TARGET} PRIVATE ../../../../include) + set_target_properties(${SIMULATOR_TARGET} PROPERTIES COMPILE_FLAGS "${SIMULATOR_COMPILE_FLAGS}") + set_target_properties(${SIMULATOR_TARGET} PROPERTIES LINK_FLAGS "${SIMULATOR_LINK_FLAGS}") + add_custom_target(fpga_sim DEPENDS ${SIMULATOR_TARGET}) +endif() ############################################################################### ### Generate Report