|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectavrora.sim.mcu.MicrocontrollerProperties
The MicrocontrollerProperties class is simply a wrapper class around several
properties of a microcontroller including the size of the IO registers, the size of SRAM,
flash, and EEPROM, as well as the mapping between names of pins and their physical pin
number.
| Field Summary | |
CodeSegment.Factory |
codeSegmentFactory
|
int |
eeprom_size
The eeprom_size field stores the size of the EEPROM on this microcontroller. |
int |
flash_size
The flash_size field stores the size of the code segment (flash) on this microcontroller. |
protected java.lang.String[] |
interrupt_name
|
protected java.util.HashMap |
interruptAssignments
|
protected java.lang.String[] |
ioreg_name
|
int |
ioreg_size
The ioreg_size field stores the number of IO registers on this microcontroller. |
protected RegisterLayout |
layout
|
int |
num_interrupts
The num_interrupts field stores the number of interrupts supported on this
microcontroller. |
int |
num_pins
The num_pins field stores the number of physical pins on this microcontroller. |
protected java.util.HashMap |
pinAssignments
|
int |
sram_size
The sram_size field stores the size of the SRAM (excluding the general purpose
registers and IO registers) on this microcontroller. |
| Constructor Summary | |
MicrocontrollerProperties(int is,
int ss,
int fs,
int es,
int np,
int ni,
CodeSegment.Factory csf,
java.util.HashMap pa,
RegisterLayout rl,
java.util.HashMap inta)
The constructor for the MicrocontrollerProperties class creates a new
instance with the specified register size, flash size, etc. |
|
| Method Summary | |
int |
getInterrupt(java.lang.String n)
The getInterrupt() method retrieves the interrupt number for the given interrupt
name for this microcontroller |
java.lang.String |
getInterruptName(int inum)
The getInterruptName() method returns the name of an interrupt specified by
the given number. |
int |
getIOReg(java.lang.String n)
The getIOReg() method retrieves the IO register number for the given IO
Register name for this microcontroller. |
java.lang.String |
getIORegName(int ioreg)
The getIORegName() method returns the name of the IO register specified by
the given number. |
int |
getPin(java.lang.String n)
The getPin() method retrieves the pin number for the given pin name for this
microcontroller. |
RegisterLayout |
getRegisterLayout()
|
boolean |
hasIOReg(java.lang.String n)
The hasIOReg() method queries whether the IO register exists on this device. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final int ioreg_size
ioreg_size field stores the number of IO registers on this microcontroller.
public final int sram_size
sram_size field stores the size of the SRAM (excluding the general purpose
registers and IO registers) on this microcontroller.
public final int flash_size
flash_size field stores the size of the code segment (flash) on this microcontroller.
public final int eeprom_size
eeprom_size field stores the size of the EEPROM on this microcontroller.
public final int num_pins
num_pins field stores the number of physical pins on this microcontroller.
public final int num_interrupts
num_interrupts field stores the number of interrupts supported on this
microcontroller.
public final CodeSegment.Factory codeSegmentFactory
protected final java.util.HashMap pinAssignments
protected final RegisterLayout layout
protected final java.util.HashMap interruptAssignments
protected final java.lang.String[] ioreg_name
protected final java.lang.String[] interrupt_name
| Constructor Detail |
public MicrocontrollerProperties(int is,
int ss,
int fs,
int es,
int np,
int ni,
CodeSegment.Factory csf,
java.util.HashMap pa,
RegisterLayout rl,
java.util.HashMap inta)
MicrocontrollerProperties class creates a new
instance with the specified register size, flash size, etc. All such fields are immutable,
and the pin assignments and IO register assignments cannot be changed.
is - the number of IO registers on this microcontrollerss - the size of the SRAM in bytesfs - the size of the flash in byteses - the size of the EEPROM in bytesnp - the number of physical pins on the microcontrollerni - the number of interrupts on the microcontrollerpa - a HashMap instance mapping string names to Integer
indexes for the pinsrl - a RegisterLayout instance mapping string names to IO register addressesinta - a HashMap instance mapping string names to Integer
indexes for each type of interrupt| Method Detail |
public RegisterLayout getRegisterLayout()
public int getPin(java.lang.String n)
getPin() method retrieves the pin number for the given pin name for this
microcontroller.
n - the name of the pin such as "OC0"
java.util.NoSuchElementException - if the specified pin name does not have an assignmentpublic int getIOReg(java.lang.String n)
getIOReg() method retrieves the IO register number for the given IO
Register name for this microcontroller.
n - the name of the IO register such as "TCNT0"
java.util.NoSuchElementException - if the specified IO register name does not have an assignmentpublic boolean hasIOReg(java.lang.String n)
hasIOReg() method queries whether the IO register exists on this device.
n - the name of the IO register
public int getInterrupt(java.lang.String n)
getInterrupt() method retrieves the interrupt number for the given interrupt
name for this microcontroller
n - the name of the interrupt such as "RESET"
java.util.NoSuchElementException - if the specified interrupt name does not have an assignmentpublic java.lang.String getIORegName(int ioreg)
getIORegName() method returns the name of the IO register specified by
the given number.
ioreg - the io register number for which to get a string name
public java.lang.String getInterruptName(int inum)
getInterruptName() method returns the name of an interrupt specified by
the given number.
inum - the interrupt number for which to get a string name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||