- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a design implemented in NIOS processor. I am using DE1 board. I want to calculate the performance/clock cycles consumed by my C code from some specified instruction to some specified instruction. How can I do that. Please help.Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Add a performance counter to your system, and instrument your code to acquire the measurements of the critical sections.
http://www.altera.com/support/examples/nios2/exm-profiling-de.html You can also use the NIOS plugin within SignalTap to watch your code as it executes.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please verify my procedure. I added a Interval Timer in Qsys. Regenerated the system and burned the new compiled .sof file. In NIOSII, i enabled hal.enable_gprof, assigned hal.sys_clk_timer & hal.timestamp_timer to timer in Qsys. Included PERF_BEGIN(0x5020,1); & PERF_END(0x5020,1); before and after the part of code I want to examine. Built the project and Run as NIOS II Hardware. But I am not getting anything on my console window. It was built successfully but finally NIOSII console remain all blank. I need to urgently come out of this. Please help- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
None of the changes you listed would have affected the console output. Are you able to single step through your code and see the printf()'s being executed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the code and data is read from tightly coupled memory it is possible to calculate the number of cycles from the object code.
Except the dynamic branch prediction causes significant randomisation. Any data or instruction cache tranfsers will cause significant variations - even if you are counting the actual clock cycles.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
Thank a lot. With all your help and guidance, I successfully implemented my project design. I finally calculated the performance using performance counter in Qsys. Regards, Anuj Agrawal
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page