cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
shahid
Participant
Participant
6,072 Views
Registered: ‎03-25-2016

Execution time in HLS for an IP

Hello,

 

I have generated an IP using Vivado HLS. The execution measured from HLS and the execution time which is measured actually differs significantly. Execution calculated by HLS is very small (0.14 ms) but when i measured it in real scenario using AXI timer it shows 3.20 ms. Why there is so much difference? HLS does not tell about actual execution time? 

 

Waiting for kind reply.

 

Regards

 

Tags (2)
0 Kudos
7 Replies
muzaffer
Teacher
Teacher
6,060 Views
Registered: ‎03-31-2012

how much interaction is there between PS & PL for the IP ? Where does the IP get its input?
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
u4223374
Advisor
Advisor
6,044 Views
Registered: ‎04-26-2015

The obvious reasons are:

 

(1) It's waiting on I/O. If it's streaming in from an AXI DMA (or out to an AXI DMA) and the DMA pauses, the block will be forced to pause too. Similar problems if it's streaming to/from any other block, or using an AXI master for RAM access, or anything like that.

 

(2) You've given it incorrect information during synthesis. Almost any block will "complete" (according to HLS) in 100ns if you put "#pragma HLS LOOP_TRIPCOUNT max=1" in the main loop. Of course, if it actually runs 10000000 iterations before reaching a "stop" condition, this number will be completely wrong.

0 Kudos
shahid
Participant
Participant
6,027 Views
Registered: ‎03-25-2016

Hello muzaffer,

 

Thanks for your reply. PS is connected to the IP through GP0 and IP takes matrix as input.  When i start the execution of IP, i also start the AXI timer which counts the clocks taken by IP to complete execution.

 

waiting for your kind reply.

 

Regards

0 Kudos
shahid
Participant
Participant
6,026 Views
Registered: ‎03-25-2016

Hi 

 

 

0 Kudos
muzaffer
Teacher
Teacher
6,024 Views
Registered: ‎03-31-2012

do you count the time of loading data into the IP or do you just start counting when you trigger "start". Also how do you decide when the IP is done? Do you have an interrupt or do you poll the "done" bit?
You should realize that writing through GP0 is extremely slow (20 MB/s max). Make sure that the delay the write is going to introduce is accounted for in your calculations.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
shahid
Participant
Participant
6,023 Views
Registered: ‎03-25-2016

Hello muzaffer,

 

I start counting when i trigger "start" and then i poll done bit. In this way i am measuring the execution time.

 

 

waiting for your kind reply.

 

Regards 

 

0 Kudos
bwaj_ster
Contributor
Contributor
243 Views
Registered: ‎12-04-2020

How is the execution time measured on HLS ?

0 Kudos