No Atmel simulator for AVR-Dx family? Closest alternative?

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

Am I missing something, or is the whole AVR-Dx family not supported by the Atmel simulator? I'm using an AVR128DB. When I open the Device Programming window, and change the tool from nEDBG to Simulator, all of the AVRxxxx entries disappear from the Device dropdown list. 

 

If simulating the AVR128DB isn't possible, then what's the closest cousin that is supported by the simulator? 

 

I'm running Microchip Studio 7.0.2542 with Atmel Kit 7.0.132

 

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

bigmessowires wrote:
or is the whole AVR-Dx family not supported by the Atmel simulator?
Indeed

bigmessowires wrote:
If simulating the AVR128DB isn't possible, then what's the closest cousin that is supported by the simulator? 
Depends on pin count; ATmega1284P is popular along with ATmega128.

 


http://packs.download.atmel.com/#collapse-Atmel-AVR-Dx-DFP-pdsc

 

Relevant Devices | Migration from the megaAVR® to AVR® Dx Microcontroller Families

 

"Dare to be naïve." - Buckminster Fuller

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

I think you can simulate these chips in MPLABX if I remember correctly.  But who wants that?  I've found it difficult to use and interpret but that's on me.

I reserve my right to assemble!
Brawndo's got what plants crave... It's got electrolytes!

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

gchapman wrote:

bigmessowires wrote:
If simulating the AVR128DB isn't possible, then what's the closest cousin that is supported by the simulator? 
Depends on pin count; ATmega1284P is popular along with ATmega128.

 

Don't those two use a slightly different instruction set than the AVR128? I can't remember where I originally read this, but I think the AVR128 uses the newer AVRxt instruction set while ATMEGA1284P and ATMEGA128 use AVRe+. These have slightly different instruction timings. But I can't see to find a list of which chips use which instruction sets.

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

bigmessowires wrote:
Don't those two use a slightly different instruction set than the AVR128?

 

A better analog is the atmega4809.

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

I found what I was looking for section 6.2 of the instruction set manual: https://ww1.microchip.com/downlo...

 

It says AVR128 uses the AVRxm instruction set. This is different than ATMEGA4809 (AVRxt), and ATMEGA1284/ATMEGA128 (AVRe+). From an instruction set viewpoint it's an XMEGA chip and its only cousins are the XMEGAs. The closest match in terms of memory is probably the ATXMEGA192CE or -A3U, but the peripherals are probably fairly different. I don't know much about XMEGA. I'm more interested in studying memory layout and instruction execution than the peripherals, so that might be OK.

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


Not a solution.

Since there is no simulator, I'm testing on a bare device.

 

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

MPLABX seems to be willing to simulate an AVR128DB28...

 

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

bigmessowires wrote:
It says AVR128 uses the AVRxm instruction set. This is different than ATMEGA4809 (AVRxt)

 

Really? In that case you can use a xmega as substitute.

 

Edit: I always assumed the AVR-DA were xtiny devices (AVRxt) like the mega4809, tiny1617 and so on. This will require some experiments.

Last Edited: Sat. Feb 26, 2022 - 11:36 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

They are AVRxt. That particular document version is in error.

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

Plexd wrote:
I think you can simulate these chips in MPLABX if I remember correctly.
Indeed though beta for AVR128DB.

Plexd wrote:
But who wants that?
Operators who are uncertain about the expected lifetime of Microchip Studio 7 (Microchip Studio 8 as a Visual Studio extension?)

 


https://packs.download.microchip.com/#collapse-Microchip-Simulator-TP-pdsc

 

Visual Studio Embedded | AVR Freaks

 

"Dare to be naïve." - Buckminster Fuller

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

bigmessowires wrote:
Don't those two use a slightly different instruction set than the AVR128?
Yes

AVR® Dx Devices | AVR® Instruction Set Manual

 

"Dare to be naïve." - Buckminster Fuller

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

El Tangas wrote:
Edit: I always assumed the AVR-DA were xtiny devices (AVRxt) like the mega4809, tiny1617 and so on
Those share AVRxt though

  • AVR Dx have a core voltage regulator (SOA is wide and deep)
  • AVR Dx may not be wafer fab by Microchip Technology

 

Voltage Regulator | AVR® DB Family

 

"Dare to be naïve." - Buckminster Fuller

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

If it were me I'd forget simulation all together (there's only so much you can achieve in a sim that only simulates internals anyway). Instead I'd track down one of these ("Curiosity Nano") ... 

 

https://www.microchip.com/en-us/development-tool/EV35L43A

 

and you can debug real silicon (which is bound to be accurate and it will respond to externals)

 

For just £14 it's got to be pretty irresistible hasn't it? 

Last Edited: Sat. Feb 26, 2022 - 05:56 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

If it were me I'd forget simulation all together (there's only so much you can achieve in a sim that only simulates internals anyway). Instead I'd track down one of these ("Curiosity Nano")

 

Yes, I have one of those now. But the reason I was interested in the simulator was I thought (maybe incorrectly?) it would still show more information than debugging on a live chip. For example, I think the real chip in the debugger doesn't show cycle counts / elapsed execution time, but the simulator does.

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

It's the same debugger offering the same functionality whether it is real silicon attached via JTAG/dW/PDI/UPDI. I suppose it's true that the simulator can do cycle counting and there is stimuli/logging but some of that is simply to get past some of the deficiencies of a simulated CPU. So, yeah the one thing you might lose is cycle counting but that's only relevant to "internal code", like trying to optimize an Asm u16*u16 or something, as soon as anything "external" is involved you are better off with real silicon and an edbg debugger.