cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
BradleyB9
Observer
Observer
431 Views
Registered: ‎09-25-2020

Approximate how long a hw_emu run will take?

Hello! I am trying to run hardware emulation on a kernel. The kernel compiles for both hw_emu and sw_emu. For sw_emu the run is almost instant.

I understand that hw_emu takes a lot longer but it's been going for a few hours now and is only at an emulation time of 25ms. I was wondering if there was a way to get an approximate of how long the kernel will take? (Just a smaller range, right now I have no sense of how long the kernel will take).

Please let me know if you have any ideas!

0 Kudos
5 Replies
ViratAgarwal
Xilinx Employee
Xilinx Employee
419 Views
Registered: ‎06-24-2020

Hi @BradleyB9,

Hw_emu takes much more time when compared to hw or sw_emu. While for the same data set (For ex - 1GB) the board run might take a few seconds, the hw_emu can take hours (I have even seen it running for 12 hours). That's why most of our examples have a very small data size for hw_emu and a large one for hw. You may refer to the following example for the same -

https://github.com/Xilinx/Vitis_Accel_Examples/blob/master/host/streaming_k2k_mm/src/host.cpp#L60https://github.com/Xilinx/Vitis_Accel_Examples/tree/master/host/hbm_bandwidth

 

BradleyB9
Observer
Observer
415 Views
Registered: ‎09-25-2020

So is there any way to actually get a sense of how the emulation will take? Fo my case, I cannot decrease the data size.

 

EDIT: also, I am only transferring 8.5 kB of data

0 Kudos
ViratAgarwal
Xilinx Employee
Xilinx Employee
332 Views
Registered: ‎06-24-2020

Hi @BradleyB9 ,

8.5 KB is a fairly small size . It shouldn't take more than an hour to work(Although it totally depends on the case). Are you sure the example hasn't gone into a hang state? Can you please share your hw_emu running logs. Also, can you please try running the example for hw as well?

0 Kudos
BradleyB9
Observer
Observer
279 Views
Registered: ‎09-25-2020

Which logs should I attach. The only ones I can see are the print outs of the emulation time.

I am guessing that my program went into a hang state. Is there any way to debug during hardware emulation with breaks/print statements etc? Right now, running and stopping at different points is very costly.

0 Kudos
ViratAgarwal
Xilinx Employee
Xilinx Employee
240 Views
Registered: ‎06-24-2020

Hi @BradleyB9,

You may share the vitis_hls.log of the run. The print outs of the emulation time is actually the feature added to notify the user about the progress of the hw_emu. It tells you how much data transfer has taken place in every 5 minutes (If it is consistently coming for you as 0KB it means its definitely a hang).

The issue can be because of a deadlock occurring somewhere in your code. You may analyze the hw_emu waveform to monitor the various data transfers involved. The same can be done by adding the following the xrt.ini file -

[Emulation]

launch_waveform=GUI

0 Kudos