AVR studio port stimuli

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

Hi all,
i'm having trouble getting AVR studio 3.22 to read my port stimuli files.
I keep getting "error in stimuli file" messages.
My file format is like this:

000000000:00
000000001:01

Anyone know what's going on here?
- stewart

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

never mind, I have answered my own problem.

The "error in stimuli file" always occurs when the simulator runs past
the end of the stimuli file, and in my case i only had two entries in my
stimuli file.
Furthermore, my clock ticks were way too close together (1 cycle apart)
so my stimuli file was all used up after the first instruction in my program
was executed. Thus the "error in stimuli file" immediately after my program
began.

This file works better:
00000000:0F
00000010:FF
00000020:00
00000030:FF
00000040:00
00000050:FF
00000060:00

Hope this can help someone else in future.
- stewart

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

Hi Stewart,

If you just define a very high address at the end of your stimuli file, this problem shoud go away. You don't have to provide consecutive addresses, so you can just define 00, 10, 20, ff :)

Morten, AVR tech. support, Atmel FAE

admin's test signature
 

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

Morten,

It seems that this could be considered a "Bug" in AVRStudio. In my past life programming PICs with MPLAB I generated many stimulus files and there was never an issue of "running out of stimulus" (basically the error seen above). I would expect that you just specify what cycle you want a stimulus applied at and once the program counter gets above that cycle count it just maintains the last stimulated values.

Regards,

Erick

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

Hi Erick,

I'll pass the suggestion on to the AVR Studio development team. Thank you for the observation.

Best regards,

Morten, AVR tech. support, Atmel FAE

admin's test signature
 

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

The last line must be
999999999:FF

I found the note at
http://support.atmel.no/bin/cust...
http://support.atmel.no/knowledg...
http://support.atmel.no/knowledg...

Stimuli and Log File Format

The stimuli file specifies values to be applied to the PIN register of an I/O port at certain times. The log file describes changes to the PORT register of an I/O port.

Stimuli and log files use the same format. A stimuli/log file consists of multiple lines of colon-separated cycle number/value pairs. For instance, the following stimuli file causes the values 00, AB, AC to be set at cycles 0, 9 and 14, respectably.

000000000:00
000000009:AB
000000014:AC
999999999:FF

Cycle numbers are decimal value, while values are hexadecimal. The cycle number can be from 1 to 9 digits. The value must be between 0 and FF.

The last line must be
999999999:FF

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

You just replied to a post in March 2001 !

(nice try for the award but I'm afraid it's already been handed out as someone (Lee?) previously found the very oldest thread on this board)

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

Sorry. :oops: I am a newcomer to this forum and I do not understand the rules.

I was searching the forum to learn more about using a stimulus file, and during the two hours I spent trying to understand the issue, I stumbled across a note in the help function of AVR tools, for simulation, that answered my question, and answered this question as well. Since the forum post said "Hope this can help someone else in future. ", and I stumbled onto this post early in the search, while I was looking for just this type of info, it seems like a good place to put the update.

Where should I have been looking for this info?

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

Quote:

I do not understand the rules.

You didn't break any rule.

Clawson merely pointed out that you answered to a very (as in VERY!) old post.

Answering very old posts might create some static, but this should not be a big problem. In rare cases it might create confusion bringing very old threads to life, as the information in them might not be valid anymore. A note like Clawsons highlighting this should make it clear to readers that this risk is present.

If I understand things correctly you have 1) read the documentation, and 2) done searches here on AVRfreaks (how else could such an old post be dug out). Both are good habits, so you should pat yourself on the back for that!

By the way, Welcome to AVRfreaks!

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

Oh yeah I wasn't having a go - simply saying that you probably don't want to waste too much of your precious time having an eight year old conversation. (or triggering other people too).

I did this simply because (in my other "clawson" ID) I act as a moderator here.

Sorry for not making it clearer.

Cliff