rapidstream-org / rapidstream-tapa

RapidStream TAPA compiles task-parallel HLS program into high-frequency FPGA accelerators.
https://tapa.rtfd.io
MIT License
155 stars 32 forks source link

Some problem in View Waveform #107

Closed TruNcat3 closed 2 years ago

TruNcat3 commented 2 years ago

I want to know the wave in hardware simulation in shared-vadd. So I use the code in https://tapa.readthedocs.io/en/release/tutorial/fast_cosim.html?highlight=vivado#view-waveform

./vadd -xosim_save_waveform -xosim_start_gui -xosim_work_dir "./cosim" -bitstream ./vadd.xilinx_u280_xdma_201920_3.hw_emu.xclbin 1000

But this code just work once! Here is the log in console.

WARNING: Logging before InitGoogleLogging() is written to STDERR I0621 14:12:09.009833 25752 frt.cpp:18] Loading ./vadd.xilinx_u280_xdma_201920_3.hw_emu.xclbin I0621 14:12:09.882880 25752 xilinx_opencl_device.cpp:183] Running hardware simulation with Xilinx OpenCL I0621 14:12:09.888528 25752 opencl_device.cpp:159] Found platform: Xilinx I0621 14:12:09.888620 25752 opencl_device.cpp:166] Found device: xilinx_u280_xdma_201920_3 I0621 14:12:09.888645 25752 opencl_device.cpp:174] Using xilinx_u280_xdma_201920_3 INFO: [HW-EMU 01] Hardware emulation runs simulation underneath. Using a large data set will result in long simulation times. It is recommended that a small dataset is used for faster execution. The flow uses approximate models for Global memories and interconnect and hence the performance data generated is approximate. configuring embedded scheduler mode scheduler config ert(1), dataflow(0), slots(16), cudma(0), cuisr(0), cdma(0), cus(1) XRT build version: 2.12.427 Build hash: 2719b6027e185000fc49783171631db03fc0ef79 Build date: 2021-10-08 22:06:50 Git branch: 2021.2 PID: 25752 UID: 1000 [Tue Jun 21 06:12:31 2022 GMT] HOST: ubuntu EXE: /home/gg/work/tapa/tapa/apps/shared-vadd/vadd [XRT] WARNING: unaligned host pointer '0x559c9ab2c030' detected, this leads to extra memcpy INFO: [HW-EMU 06-0] Waiting for the simulator process to exit INFO: [HW-EMU 06-1] All the simulator processes exited successfully kernel time: 4.00232 s PASS!

TruNcat3 commented 2 years ago

In other apps, the code also could not work for generating the wave.

Licheng-Guo commented 2 years ago

Hello @TruNcat3, the -xosim_save_waveform and -xosim_start_gui option only works for our customized simulation, where you provide the ".xo" file instead of the "_hw_emu.xclbin" file. If you provide the "_hw_emu.xclbin" file, Vitis simulation will be invoked, and you need to add a Vitis configuration file to save the waveform.

TruNcat3 commented 2 years ago

Thank you @Licheng-Guo ! It works!