Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7891107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:32:00+00:00 2026-06-03T06:32:00+00:00

Can we have loop unrolling in Microblaze C programming using EDK? This is required

  • 0

Can we have loop unrolling in Microblaze C programming using EDK?

This is required because
I need more performance. Traditionally my C code will run serially, so having loop unrolling using some compiler directive can accelerate my application.
(e.g as we do using openMP).

#pragma Unroll 
for (i = 0; i < 100; i++ ) {
    a[i] = fetch_data(i);
}

Is this possible for Microblaze? If yes is there any example on the same?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T06:32:01+00:00Added an answer on June 3, 2026 at 6:32 am

    No, there isn’t any automatic loop unrolling like that. For tight loops like that the common recommendation on the Xilinx forums is to manually unroll 10-20 times and see if the performance is acceptable or write the looping code in assembly.

    You are typically losing 3 or 4 clock cycles on every one of the loop branches so depending on how long fetch_data takes to execute you could figure out how much unrolling you want to do.

    for (i = 0; i < 100; i+=10 ) { 
        a[i] = fetch_data(i); 
        a[i+1] = fetch_data(i+1); 
        a[i+2] = fetch_data(i+2); 
        a[i+3] = fetch_data(i+3); 
        a[i+4] = fetch_data(i+4); 
        a[i+5] = fetch_data(i+5); 
        a[i+6] = fetch_data(i+6); 
        a[i+7] = fetch_data(i+7); 
        a[i+8] = fetch_data(i+8); 
        a[i+9] = fetch_data(i+9); 
    } 
    

    Make sure to heed the standard loop unrolling caveats like watching for interval sizes that aren’t a multiple of your increment steps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a loop that can look like this: For Each article In artAll
In wordpress, I have the loop.php file. There I can see the 'read more'
Inside of HAML, can we have a loop inside the :javascript region? This will
Does loop unrolling effect data cache performance in any way? This is related to
I have a loop that finds duplicate lines in a .ini file. I can
I have a loop pulling information from my database. How can I add a
I have a php loop that is echoing out geolocation values. How can I
As you can see below, I have Parallel.For loop. If run the program while
I have a blog that has a redirect loop, and I can't understand htaccess
In PHP I can use a foreach loop such that I have access to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.