Skip to content

Commit d34d013

Browse files
authored
FPGA: Update printf readme and fixed some typos (#1288)
* Added simulation instructions to README for 2023.1 * Corrected for running simulation since windows need multiple commmands to run
1 parent c95cdca commit d34d013

File tree

1 file changed

+21
-2
lines changed
  • DirectProgramming/C++SYCL_FPGA/Tutorials/Features/printf

1 file changed

+21
-2
lines changed

DirectProgramming/C++SYCL_FPGA/Tutorials/Features/printf/README.md

+21-2
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ PRINTF("Hello: %d\n", 123);
124124
```
125125
make fpga_emu
126126
```
127+
* Compile for simulation (medium compile time, targets simulated FPGA device):
128+
```
129+
make fpga_sim
130+
```
127131
* Generate the optimization report:
128132
```
129133
make report
@@ -160,6 +164,10 @@ PRINTF("Hello: %d\n", 123);
160164
```
161165
nmake fpga_emu
162166
```
167+
* Compile for simulation (medium compile time, targets simulated FPGA device):
168+
```
169+
nmake fpga_sim
170+
```
163171
* Generate the optimization report:
164172
```
165173
nmake report
@@ -185,7 +193,18 @@ From the report, you can find the compilation information of the design and the
185193
./printf.fpga_emu (Linux)
186194
printf.fpga_emu.exe (Windows)
187195
```
188-
2. Run the sample on the FPGA device:
196+
2. Run the sample on the FPGA simulator:
197+
* On Linux
198+
```
199+
CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=1 ./printf.fpga_sim
200+
```
201+
* On Windows
202+
```
203+
set CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=1
204+
printf.fpga_sim.exe
205+
set CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=
206+
```
207+
3. Run the sample on the FPGA device:
189208
```
190209
./printf.fpga (Linux)
191210
printf.fpga.exe (Windows)
@@ -208,7 +227,7 @@ Result11: ABCD
208227
209228
## Known issues and limitations
210229
211-
There are some known issues with the `experimental::printf()` and that's why the function is in the experimental namespace. The following limitations exist when using `experimental::printf()` on FPGA hardware:
230+
There are some known issues with the `experimental::printf()` and that's why the function is in the experimental namespace. The following limitations exist when using `experimental::printf()` on FPGA simulation and hardware:
212231
213232
* Printing string literals %s is not supported yet. You can put the string directly in the format as a workaround. For example: `PRINTF("Hello, World!\n")`.
214233
* Printing pointer address %p is not supported yet.

0 commit comments

Comments
 (0)