Tracing Modes

By default, the simulator does not produce any output when it is running a program. However, command line options are provided that allow status information about the progress of the simulation to be printed out while it is executing.


Trace Monitor

The first and most primitive option is to specify -monitors=trace which will print out each instruction as it is executed, as well as the total number of instructions executed when the simulation terminates. For more information on the trace monitor, see the online help.


Call Monitor

Tracing the program's execution instruction by instruction is likely to generate a lot of output that is not very useful. A better approach is to use the -monitors=calls option that will print out the call and return behavior (including interrupts) of the program as it executes. For more information on the calls monitor, see the online help.


Verbose Modes

For more detailed information, relating to various parts of simulation, such as devices, interrupts, or events, the -verbose option enables the printing of diagnostic messages from the simulator and attached devices, as well as other parts of Avrora. To enable a list of verbose "channels", simply specify them as a comma-separated list to the -verbose option.

Some examples of verbose channels are:

  • loader -- parsing and loading of programs.
  • sim.event -- event queue of simulator.
  • sim.global -- global clock for multi-node simulation.
  • atmel.adc -- ADC (analog to digital) converter unit on Atmel models.
  • atmel.spi -- SPI (serial peripheral interface) on Atmel models.
  • atmel.eeprom -- EEPROM on Atmel models.
  • atmel.flash -- Reprogrammable flash on Atmel models.
  • atmel.timer0 -- Timer0 on Atmel models.
  • atmel.timer1 -- Timer1 on Atmel models.
  • atmel.timer2 -- Timer2 on Atmel models.
  • atmel.timer3 -- Timer3 on Atmel models.
  • atmel.usart0 -- USART0 on Atmel models.
  • atmel.usart1 -- USART1 on Atmel models.
  • atmel.usart.printer -- data sent and received over serial line.
  • mcu.pin -- external pin configurations and activity on Atmel models.
  • radio.cc1000 -- CC1000 radio on mica2 platform.
  • radio.cc1000.data -- CC1000 radio data transmitted.
  • radio.cc1000.pinconfig -- CC1000 configuration.

Verbose channels are created dynamically in Avrora, so unfortunately there is no one command to list all possible verbose channels. However, in order to get a list of the various verbose channels that can be enabled for the run that you are interested in, specify -verbose=verbose, and the verbose system will report every verbose channel registered. To enable all verbose printing, specify -verbose=all. Multiple channels can be specified with one command line argument. For example, -verbose=sim.event,sim.interrupt.

Beginning with Avrora Beta 1.4.0, printers associated with simulation now print the node ID (a unique integer) and the time in clock cycles when the event being reported happens. This helps in debugging time issues, and keeping track of what node performs what event in sensor network simulations.

Note: Verbose modes are being phased out of Avrora in favor of more powerful and extensible monitoring techniques and as the codebase matures.


Monitors

For more complicated forms of monitoring, see the page on monitoring.