- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello,
Does everyone know how to count the time of calling a custom insruction to run C program? http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/huh.gifLink Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to know the time of calling a custom instruction. thx!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi allen01,
I think u can use the "performance counter" that is a Nios II peripheral available in SOPC builder under extra utilities. There is also a documentation that explains its usage...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I used Nois I, does Nios I can also use "performance counter"? THX!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry,
the drivers for the performance counter are defined for the HAL of Nios II. I think u can calculate your timing using a simple timer: starting it before your call, stoping at return of the call and reading the value of timer. You could also calculate first the offset timing for these operation: starting-stoping-reading timer, and subtract this value from the timing above...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Allen,
I would suggest that the cycle count of the custom instruction is pretty much what the field "cycle count" in the custom instruction tab of th SOPC cpu wizard says. I verified this using a timer for the hw division in a NIOS I cpu.
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