avrora.sim.mcu
Class ATMega128

java.lang.Object
  extended byavrora.sim.mcu.AtmelMicrocontroller
      extended byavrora.sim.mcu.ATMegaFamily
          extended byavrora.sim.mcu.ATMega128
All Implemented Interfaces:
Microcontroller

public class ATMega128
extends ATMegaFamily

The ATMega128 class represents the ATMega128 microcontroller from Atmel. This microcontroller has 128Kb code, 4KB SRAM, 4KB EEPROM, and a host of internal devices such as ADC, SPI, and timers.


Nested Class Summary
static class ATMega128.Factory
           
 
Nested classes inherited from class avrora.sim.mcu.ATMegaFamily
ATMegaFamily.DirectionRegister, ATMegaFamily.FlagBit, ATMegaFamily.FlagRegister, ATMegaFamily.MaskRegister, ATMegaFamily.PinRegister, ATMegaFamily.PortRegister, ATMegaFamily.Timer0, ATMegaFamily.Timer1, ATMegaFamily.Timer2, ATMegaFamily.Timer3
 
Nested classes inherited from class avrora.sim.mcu.AtmelMicrocontroller
AtmelMicrocontroller.Pin
 
Nested classes inherited from class avrora.sim.mcu.Microcontroller
Microcontroller.InputPin, Microcontroller.OutputPin
 
Field Summary
static int _1kb
           
static int ATMEGA128_EEPROM_SIZE
           
static int ATMEGA128_FLASH_SIZE
           
static int ATMEGA128_IOREG_SIZE
           
static int ATMEGA128_NUM_INTS
           
static int ATMEGA128_NUM_PINS
           
static int ATMEGA128_SRAM_SIZE
           
protected static java.lang.String[] idleModeNames
           
protected  ActiveRegister MCUCR_reg
           
static int MODE_ADCNRED
           
static int MODE_EXTSTANDBY
           
static int MODE_IDLE
           
static int MODE_POWERDOWN
           
static int MODE_POWERSAVE
           
static int MODE_RESERVED1
           
static int MODE_RESERVED2
           
static int MODE_STANDBY
           
static MicrocontrollerProperties props
          The props field stores a static reference to a properties object shared by all of the instances of this microcontroller.
protected static int[] wakeupTimes
           
 
Fields inherited from class avrora.sim.mcu.ATMegaFamily
EIFR_reg, ETIFR_reg, ETIMSK_reg, periods0, periods1, periods2, periods3, TIFR_reg, TIMSK_reg
 
Fields inherited from class avrora.sim.mcu.AtmelMicrocontroller
clockDomain, devices, HZ, interpreter, mainClock, MODE_ACTIVE, pinPrinter, pins, platform, properties, registers, simulator, sleepState
 
Constructor Summary
ATMega128(int id, ClockDomain cd, InterpreterFactory f, Program p)
           
 
Method Summary
protected  int getSleepMode()
           
protected  void installDevices()
           
protected  void installPins()
           
 boolean isSupported(InstrPrototype i)
          The isSupported() method allows a client to query whether a particular instruction is implemented on this hardware device.
 
Methods inherited from class avrora.sim.mcu.ATMegaFamily
buildInterruptRange, buildPort, getEIFR_reg, getHZ
 
Methods inherited from class avrora.sim.mcu.AtmelMicrocontroller
addDevice, addInterrupt, addPin, addPin, addPin, cyclesToMillis, getClock, getClockDomain, getDevice, getFSM, getIOReg, getMode, getModeName, getPin, getPin, getPinNumber, getPlatform, getProperties, getRegisterSet, getSimulator, installIOReg, millisToCycles, setPlatform, sleep, wakeup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_1kb

public static final int _1kb
See Also:
Constant Field Values

ATMEGA128_IOREG_SIZE

public static final int ATMEGA128_IOREG_SIZE
See Also:
Constant Field Values

ATMEGA128_SRAM_SIZE

public static final int ATMEGA128_SRAM_SIZE
See Also:
Constant Field Values

ATMEGA128_FLASH_SIZE

public static final int ATMEGA128_FLASH_SIZE
See Also:
Constant Field Values

ATMEGA128_EEPROM_SIZE

public static final int ATMEGA128_EEPROM_SIZE
See Also:
Constant Field Values

ATMEGA128_NUM_PINS

public static final int ATMEGA128_NUM_PINS
See Also:
Constant Field Values

ATMEGA128_NUM_INTS

public static final int ATMEGA128_NUM_INTS
See Also:
Constant Field Values

MODE_IDLE

public static final int MODE_IDLE
See Also:
Constant Field Values

MODE_RESERVED1

public static final int MODE_RESERVED1
See Also:
Constant Field Values

MODE_ADCNRED

public static final int MODE_ADCNRED
See Also:
Constant Field Values

MODE_RESERVED2

public static final int MODE_RESERVED2
See Also:
Constant Field Values

MODE_POWERDOWN

public static final int MODE_POWERDOWN
See Also:
Constant Field Values

MODE_STANDBY

public static final int MODE_STANDBY
See Also:
Constant Field Values

MODE_POWERSAVE

public static final int MODE_POWERSAVE
See Also:
Constant Field Values

MODE_EXTSTANDBY

public static final int MODE_EXTSTANDBY
See Also:
Constant Field Values

idleModeNames

protected static final java.lang.String[] idleModeNames

wakeupTimes

protected static final int[] wakeupTimes

MCUCR_reg

protected final ActiveRegister MCUCR_reg

props

public static final MicrocontrollerProperties props
The props field stores a static reference to a properties object shared by all of the instances of this microcontroller. This object stores the IO register size, SRAM size, pin assignments, etc.

Constructor Detail

ATMega128

public ATMega128(int id,
                 ClockDomain cd,
                 InterpreterFactory f,
                 Program p)
Method Detail

isSupported

public boolean isSupported(InstrPrototype i)
Description copied from interface: Microcontroller
The isSupported() method allows a client to query whether a particular instruction is implemented on this hardware device. Older implementations of the AVR instruction set preceded the introduction of certain instructions, and therefore did not support the new instructions.

Parameters:
i - the instruction prototype of the instruction
Returns:
true if the specified instruction is supported on this device; false otherwise

installPins

protected void installPins()

installDevices

protected void installDevices()

getSleepMode

protected int getSleepMode()
Specified by:
getSleepMode in class AtmelMicrocontroller