Can I see the processor view when debugging with simulator?

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If so, how?  Or must I hook up my hardware debugger?  I just want to count machine cycles.

This topic has a solution.
Last Edited: Thu. Nov 19, 2020 - 10:04 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

 

 

will get you this:

 

 

And, yes, this ie very commonly used when you want to count cycles. As you may know you can right click "cycle counter" to reset the count before running to a breakpoint at the end of some segment you want to measure.

 

If you set "Frequency" to what your CPU will actually run at it will also tell you in us or ms how long a segment took to execute.

Last Edited: Thu. Nov 19, 2020 - 11:31 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does your time (cycles) depend upon external inputs, or is it pure code?   Certainly inputs (such as polling) could affect the results.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

Does your time (cycles) depend upon external inputs,

No.  I just forgot how to get the processor status window to appear.  Now I got it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

steve17 wrote:
Now I got it.

Jolly Good! Now please mark the solution - see Tip #5 in my signature, below:

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I got it to work just fine.  Apparently it only counts cycles when using the simulator, but that's okay. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Apparently it only counts cycles when using the simulator,

It would take specialized in-chip hardware to do otherwise; since you want the "chip mode" to run in its normal real-time wetting.  In the old days, you had special bond-out emulator chips that might have included extra such goodies.  

Those emulators/debuggers often cost $5000 to $15000 & we had several.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:
It would take specialized in-chip hardware to do otherwise
Yeah, I figured it was something like that.  I probably knew that years ago, but in my old age I forget a lot.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I probably knew that years ago, but in my old age I forget a lot.

Maybe you need someone to flash you & get those neurons moving.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

electroshock therapy seems a bit much.  I'd rather just be stupid.  smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The way you'd usually measure execution time in real hardware is using an IO pin and a scope. ;-)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah.  I don't need it.  I got all I need. Thanks.