cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pmousoul
Explorer
Explorer
1,265 Views
Registered: ‎05-21-2017

Trace does not show results for all accelerator invocations

Jump to solution

Hello,

 

I'm using SDSoC 2017.2 and I'm trying to trace an application which calls my accelerator about 30 times.

 

Sadly, I get results for about 15-20 invocations.

 

I would really like to get results for all the invocations.

 

Any thoughts of what I'm doing wrong or what should I do in case it is a tool problem?

 

 

Cheers,

Panos

Without proper software tools the hardware is unusable no matter how good and well designed it is.
0 Kudos
1 Solution

Accepted Solutions
pmousoul
Explorer
Explorer
1,202 Views
Registered: ‎05-21-2017

Hello,

 

again!

 

I report to whom interested that the

 

#include <unistd.h>
...
sleep(1);
...

 

 

method worked like a charm! :)

 

I tried Sam's method (maybe not correctly) by putting:

-trace-buffer 4096

in

C/C++ Build Settings -> SDS++ Compiler -> Miscellaneous -> Other flags

but saw no difference!


Cheers,

Panos

 

 

Without proper software tools the hardware is unusable no matter how good and well designed it is.

View solution in original post

0 Kudos
8 Replies
pmousoul
Explorer
Explorer
1,244 Views
Registered: ‎05-21-2017

 

Maybe I could introduce some pauses between invocations to give time to FIFO buffers to transfer their result?

 

I will try using something like:

 

#include <unistd.h>
// your code here
sleep(1); // sleep for 1 sec

and report back as usually..

 

 

Cheers,

Panos

Without proper software tools the hardware is unusable no matter how good and well designed it is.
0 Kudos
skalicky
Explorer
Explorer
1,234 Views
Registered: ‎09-19-2017

Hi Panos,

 

You can request more buffer space for trace data using the -trace-buffer option (see page 110 in UG1027: https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_2/ug1027-sdsoc-user-guide.pdf) By setting this option, you can trade off more buffer space for more resources in your design (if you have more resources available). 

 

Typically the readout takes multiple seconds, so you'd have to delay your program a lot in order to get it to read out the data fast enough to not overflow. Better to just use the option above if space permits. 

 

Sam

pmousoul
Explorer
Explorer
1,211 Views
Registered: ‎05-21-2017

Hi Sam,

 

thank you very much for your answer!

 

Is it possible to include this in the GUI, like:

C/C++ Build Settings -> SDS++ Compiler -> Miscellaneous -> Other flags

 

 

Cheers,

Panos

Without proper software tools the hardware is unusable no matter how good and well designed it is.
0 Kudos
pmousoul
Explorer
Explorer
1,203 Views
Registered: ‎05-21-2017

Hello,

 

again!

 

I report to whom interested that the

 

#include <unistd.h>
...
sleep(1);
...

 

 

method worked like a charm! :)

 

I tried Sam's method (maybe not correctly) by putting:

-trace-buffer 4096

in

C/C++ Build Settings -> SDS++ Compiler -> Miscellaneous -> Other flags

but saw no difference!


Cheers,

Panos

 

 

Without proper software tools the hardware is unusable no matter how good and well designed it is.

View solution in original post

0 Kudos
skalicky
Explorer
Explorer
1,193 Views
Registered: ‎09-19-2017

Hi Panos,

 

Great to hear that you got it working and thanks for sharing your solution. 

 

One quick question regarding that -trace-buffer option, when you set it (yes, setting it in the c/c++ build settings in the GUI is fine) did it result in a full rebuild (resynthesizing and running vivado to regenerate the bitstream)? If not, that is why it didnt make any difference. Setting that option configures the sds++ compiler to create a hardware system with a bigger buffer using BRAMs in the FPGA. If you dont do a full rebuild then you dont get the bigger buffer. I know the GUI doenst always do a full rebuild when setting the options. Sometimes you have to manually clean the project and then build again to get it to do a full rebuild.

 

Thanks!
Sam

0 Kudos
pmousoul
Explorer
Explorer
1,188 Views
Registered: ‎05-21-2017

Hi Sam,

 

I always clean manually the project before issue another build just to be sure.

 

From what I can recall, the build took exactly the same time as always - about half an hour - and I didn't notice any difference in resources estimation. I did not check the implemented project in Vivado though. Just to be sure, I will give another try and get back to you.

 

Cheers,

Panos

Without proper software tools the hardware is unusable no matter how good and well designed it is.
0 Kudos
pmousoul
Explorer
Explorer
1,176 Views
Registered: ‎05-21-2017

Hi Sam,

 

as I said there is no much difference:

 

without '-trace-buffer 4096'

================================================================
== Utilization Estimates - Vivado HLS
================================================================
* Summary: 
+-----------------+---------+-------+--------+-------+
|       Name      | BRAM_18K| DSP48E|   FF   |  LUT  |
+-----------------+---------+-------+--------+-------+
|DSP              |        -|      -|       -|      -|
|Expression       |        -|      -|       0|     96|
|FIFO             |        0|      -|       0|     26|
|Instance         |      168|     74|   29383|  67220|
|Memory           |        -|      -|       -|      -|
|Multiplexer      |        -|      -|       -|     36|
|Register         |        -|      -|       6|      -|
+-----------------+---------+-------+--------+-------+
|Total            |      168|     74|   29389|  67378|
+-----------------+---------+-------+--------+-------+
|Available        |      280|    220|  106400|  53200|
+-----------------+---------+-------+--------+-------+
|Utilization (%)  |       60|     33|      27|    126|
+-----------------+---------+-------+--------+-------+



Utilization Summary - Vivado :
----------------------------------------------------
Resource | Utilization | Available | Utilization % |
LUT      |      37192    |    53200  |   69.909775 |
LUTRAM   |       3446    |    17400  |   19.804598 |
FF       |      27141    |   106400  |   25.508457 |
BRAM     |      102.5    |      140  |    73.21429 |
DSP      |        170    |      220  |    77.27273 |
----------------------------------------------------




with '-trace-buffer 4096'

================================================================
== Utilization Estimates - Vivado HLS
================================================================
* Summary: 
+-----------------+---------+-------+--------+-------+
|       Name      | BRAM_18K| DSP48E|   FF   |  LUT  |
+-----------------+---------+-------+--------+-------+
|DSP              |        -|      -|       -|      -|
|Expression       |        -|      -|       0|     96|
|FIFO             |        0|      -|       0|     26|
|Instance         |      168|     74|   29383|  67238|
|Memory           |        -|      -|       -|      -|
|Multiplexer      |        -|      -|       -|     36|
|Register         |        -|      -|       6|      -|
+-----------------+---------+-------+--------+-------+
|Total            |      168|     74|   29389|  67396|
+-----------------+---------+-------+--------+-------+
|Available        |      280|    220|  106400|  53200|
+-----------------+---------+-------+--------+-------+
|Utilization (%)  |       60|     33|      27|    126|
+-----------------+---------+-------+--------+-------+



Utilization Summary - Vivado :
----------------------------------------------------
Resource | Utilization | Available | Utilization % |
LUT      |      37203    |    53200  |   69.93045  |
LUTRAM   |       3446    |    17400  |   19.804598 |
FF       |      27141    |   106400  |   25.508457 |
BRAM     |      102.5    |      140  |    73.21429 |
DSP      |        170    |      220  |    77.27273 |
----------------------------------------------------



I have no idea why it is not working - my SDSoC version is 2017.2.


Cheers,

Panos

Without proper software tools the hardware is unusable no matter how good and well designed it is.
0 Kudos
skalicky
Explorer
Explorer
1,165 Views
Registered: ‎09-19-2017

Hi Panos,

 

Thanks for checking. Those reports you show are for the HLS generated accelerator, not for the whole hardware system. That would come from Vivado. The trace buffer is inserted into the system in Vivado (not HLS). When adding the -trace-buffer option, you would have to do it in the sds++ linker: https://www.xilinx.com/html_docs/xilinx2018_2/sdsoc_doc/hfp1528663907086.html not the compiler. The linking is when the actual hardware system is generated. 

 

Sam

0 Kudos