kaiserhaz Posted July 22, 2015 Report Share Posted July 22, 2015 Hello, I've recently completed a design but I'm not convinced that it is an optimal one. How would you modify this to give optimal speed? EDIT: I've attached it in a file. vga_controller_edit.txt Quote Link to comment Share on other sites More sharing options...
matteodc Posted July 22, 2015 Report Share Posted July 22, 2015 Have you run a benchmark or profiled your code? Quote Link to comment Share on other sites More sharing options...
kaiserhaz Posted July 22, 2015 Author Report Share Posted July 22, 2015 I don't really know how to in MSVC. Is there a tool that I can use? Quote Link to comment Share on other sites More sharing options...
kaiserhaz Posted July 22, 2015 Author Report Share Posted July 22, 2015 I did a bit of reading on the subject of profiling in MSVC. Turns out for VS2010 Professional, there are no tools available Though they did mention a standalone tool. I'm checking that out at the moment. Are there other alternatives? Quote Link to comment Share on other sites More sharing options...
ruchir.bharti Posted July 23, 2015 Report Share Posted July 23, 2015 Well c/thread is always performance killer... so i would request to you if possible use method with static or dynamic sensitivity. Like : if(!vga_controller::fetch_done) { wait(vga_controller::vga_done_trig); } and wait(delay); Quote Link to comment Share on other sites More sharing options...
matteodc Posted July 23, 2015 Report Share Posted July 23, 2015 Hi, http://www.microsoft.com/en-us/download/details.aspx?id=23205 This is the standalone profiler for VS2010 Professional. Quote Link to comment Share on other sites More sharing options...
kaiserhaz Posted July 23, 2015 Author Report Share Posted July 23, 2015 @Matteo Thanks. I'll have a look at that. @Ruchir In your opinion, would the many 'if's affect the performance? I was specifically concerned with that because at almost each loop, there are a minimum of 4 conditions to test. In hardware terms, I'd have to use comparator blocks, and I'd rather save cost than using 4 of them. Quote Link to comment Share on other sites More sharing options...
ruchir.bharti Posted July 24, 2015 Report Share Posted July 24, 2015 my initial suggestion was if you could eliminate use of "wait" statement, that would definitely increase your run time performance and secondly 'if`s ' statement doesn't affect much in model activity, but yes, if you ask for this to embedded programmer. As every `if`s' break down to branches in assembly code and each "branch True" and "branch false" will have different cycle consume by CORE. So to improve performance programmer should predict flow in terms of utilization and provide condition in IF statement. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.