UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie mnazemi
Newbie
374 Views
Registered: ‎09-07-2019

How does Vivado schedule nested for loops?

Jump to solution

Hi All,

 

I am thinking of moving from Intel FPGAs to Xilinx but haven't used Vivado since 2013. My knowledge about Vivado is limited and have a basic question about how nested for loops are mapped to hardeware.

 

Let's assume there is a function that gets called once in each iteration of a nested for loop. This function is the only thing that exists in the nested for loop and there is no additional operations performed.

 

I assume that Vivado allows you to implement the function once and use across cycles or implement the function multiple times and use it in parallel.

My question is if I decide to implement the function once and reuse it across cycles, does Vivado perform the scheduling automatically? If yes, is such scheduling done using logic blocks or a code that's generated for the coprocessor?

 

P.S. By scheduling, I mean reading proper data from memory, writing outputs to memory, deciding which iterations to perform first to reuse data, etc.

 

Thank you!

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
319 Views
Registered: ‎09-04-2017

Re: How does Vivado schedule nested for loops?

Jump to solution

Hi,

  HLS by default keeps the loops rolled. So it builds the logic for 1 iteration and reuses across other iterations. Scheduling is taken care by the control stataemachine that HLS generates. So it is transparent to the user

Thanks,

Nithin

3 Replies
Highlighted
Scholar u4223374
Scholar
339 Views
Registered: ‎04-26-2015

Re: How does Vivado schedule nested for loops?

Jump to solution

In Vivado HLS, it's all done in logic blocks - the only thing the processor ever has to do is set up registers at the start and retrieve the results when the block has finished.

 

I'm pretty sure HLS won't do any re-ordering to optimize access; it does everything in the order you tell it to.

Xilinx Employee
Xilinx Employee
320 Views
Registered: ‎09-04-2017

Re: How does Vivado schedule nested for loops?

Jump to solution

Hi,

  HLS by default keeps the loops rolled. So it builds the logic for 1 iteration and reuses across other iterations. Scheduling is taken care by the control stataemachine that HLS generates. So it is transparent to the user

Thanks,

Nithin

Moderator
Moderator
190 Views
Registered: ‎11-21-2018

Re: How does Vivado schedule nested for loops?

Jump to solution

Hi @mnazemi 

If your question is answered or your issue is solved, please kindly mark the response which helped as solution (click on "Accept as solution" button below the reply).
 
If this is not solved/answered, please reply in the topic giving more information on your current status.
 
Thanks and Regards,

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos