sequencing /"time" flow in simulation/debug

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

I want to study the timing on acivities in the simulator/simulation /debug. So I had expected one could step by clock cycle and then (have a) log the output on e.g. two pins (GPIO /TWI) and see what happens

in approximate (need not be exact) time with respect to clock (needent have flanks e.g. just if pin is on or off in clock sykle).  Would be good to have a time-line (simulated CPU clock cycles)

with possibility to assign/show some output pin settings. Cannot see how/if that is possible.

 

/georg

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

If you run your code in the simulator it has a CPU cycle counter (that basically adds up the cycles of each opcode that it simulates). There also an opportunity to have it convert that cycle count into micro/milliseconds if you tell it the CPU frequency.

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

OK, but can I also display like the value of GPIO pins in a sequntial(time-line type) graph ?

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

That's what Logic Analyzers were made for, but you will need real h/w to use one.

 

Jim

 

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

I googled "atmel studio debug script" and hit this: http://www.atmel.com/webdoc/atme...

 

Never tried it myself.

 

Not sure if it's up to date:  following the navigation on that page to the top of its "Atmel Studio" tree gives http://www.atmel.com/webdoc/atme... - with a picture of AS 6 ...

 

 

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

Microchip MPLAB jas a "virtual scope" like this. If Microchip and Atmel are combining AS7 and MPLAB you may well see such a thing in the future. Until then you need to either buy a $10 logic analyzer on eBay or a copy of Proteus

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

OK, or not, well I guess such a tool would be very handy in differnt developments for the microprocessors, I nearly thought someone had actually been thinking the same before.... shouldnt be all that fuzz to make one (as usual everything seem easy before trying it :) )

 

Actually, with some open-ended logging from the Studio, I would nearly be possible to do this with excell (god forbid).

Last Edited: Thu. Oct 5, 2017 - 02:31 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gechxx wrote:
with some open-ended logging from the Studio, I would nearly be possible to do this with excel

That was my thought with the scripting ...

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

Back in the days of AS4 there was an addon ("hack") called Hapsim that was brilliant:

 

http://www.helmix.at/hapsim/

 

It worked by hooking into the DLLs that did the AS4 simulation. It would have been quite possible for that to add simulation features like v-scopes and ultimately end up with something like Proteus.

 

I'm not aware of anything like this for AS7.