Forum Discussion
Altera_Forum
Honored Contributor
21 years agoIs that chunk of code modular (as in can it be moved to hardware?)
If that's the case you could make a custom peripheral that you send values to and have it cycle through memory doing the compares. I see this being 4 counters, a comparator, and some sync. logic. After you find that you have to modify memory <div class='quotetop'>QUOTE </div> --- Quote Start --- *--vmem = *mem; mem--;[/b] --- Quote End --- then you can either fire those pointers back to the Nios and let it do the transfer, or have your hardware do it for you. If that sounds like overkill you could try speeding up that bottleneck doing optimization (your image size of 800x600 doesn't get used by the for structure so you can make that a looping structure of up to 600 times 800 iterations (i.e. one loop)). However to hit your goal of 25/30 fps I don't think any optimization will help you that much (assembly might but you would need to look at the objdump file to make that decision).