simulavr
1.1.0
|
#include <atmega1284abase.h>
Public Member Functions | |
AvrDevice_atmega1284Abase (unsigned ram_bytes, unsigned flash_bytes, unsigned ee_bytes, unsigned nrww_start) | |
~AvrDevice_atmega1284Abase () | |
![]() | |
AvrDevice (unsigned int ioSpaceSize, unsigned int IRamSize, unsigned int ERamSize, unsigned int flashSize, unsigned int pcSize=2) | |
virtual | ~AvrDevice () |
void | AddToResetList (Hardware *hw) |
void | AddToCycleList (Hardware *hw) |
void | RemoveFromCycleList (Hardware *hw) |
Removes from the cycle list, if possible. More... | |
void | Load (const char *n) |
Load flash, eeprom, signature, fuses from elf file, wrapper for LoadBFD or LoadSimpleELF. More... | |
void | ReplaceIoRegister (unsigned int offset, RWMemoryMember *) |
bool | ReplaceMemRegister (unsigned int offset, RWMemoryMember *) |
RWMemoryMember * | GetMemRegisterInstance (unsigned int offset) |
void | RegisterTerminationSymbol (const char *symbol) |
Pin * | GetPin (const char *name) |
int | Step (bool &untilCoreStepFinished, SystemClockOffset *nextStepIn_ns=0) |
void | Reset () |
void | SetClockFreq (SystemClockOffset f) |
SystemClockOffset | GetClockFreq () |
void | RegisterPin (const std::string &name, Pin *p) |
void | DeleteAllBreakpoints (void) |
Clear all breakpoints in device. More... | |
const std::string & | GetFname (void) |
Return filename from loaded program. More... | |
const std::string & | GetDeviceName (void) |
Return device name. More... | |
unsigned int | GetDeviceSignature (void) |
Return device signature. More... | |
void | SetDeviceNameAndSignature (const std::string &name, unsigned int signature) |
Set device signature and name. More... | |
unsigned int | GetMemTotalSize (void) |
Get configured total memory space size. More... | |
unsigned int | GetMemIOSize (void) |
Get configured IO memory space size. More... | |
unsigned int | GetMemRegisterSize (void) |
Get configured register space size. More... | |
unsigned int | GetMemIRamSize (void) |
Get configured internal RAM size. More... | |
unsigned int | GetMemERamSize (void) |
Get configured external RAM size. More... | |
unsigned char | GetRWMem (unsigned addr) |
Get a value of RW memory cell. More... | |
bool | SetRWMem (unsigned addr, unsigned char val) |
Set a value to RW memory cell. More... | |
unsigned char | GetCoreReg (unsigned addr) |
Get a value from core register. More... | |
bool | SetCoreReg (unsigned addr, unsigned char val) |
Set a value to core register. More... | |
unsigned char | GetIOReg (unsigned addr) |
Get a value from IO register (without offset of 0x20!) More... | |
bool | SetIOReg (unsigned addr, unsigned char val) |
Set a value to IO register (without offset of 0x20!) More... | |
bool | SetIORegBit (unsigned addr, unsigned bitaddr) |
Set a bit value to lower IO register (without offset of 0x20!) More... | |
bool | ClearIORegBit (unsigned addr, unsigned bitaddr) |
Clear a bit value to lower IO register (without offset of 0x20!) More... | |
unsigned | GetRegX (void) |
Get value of X register (16bit) More... | |
unsigned | GetRegY (void) |
Get value of Y register (16bit) More... | |
unsigned | GetRegZ (void) |
Get value of Z register (16bit) More... | |
void | DebugOnJump () |
When a call/jump/cond-jump instruction was executed. For debugging. More... | |
![]() | |
virtual | ~SimulationMember () |
![]() | |
TraceValueRegister (TraceValueRegister *parent, const std::string &name) | |
Create a TraceValueRegister, with a scope prefix built on parent scope + name. More... | |
TraceValueRegister () | |
Create a TraceValueRegister, with a empty scope name, single device application. More... | |
virtual | ~TraceValueRegister () |
const std::string | GetTraceValuePrefix (void) |
Returns the scope prefix. More... | |
const std::string | GetScopeName (void) |
Returns the scope name. More... | |
void | RegisterTraceValue (TraceValue *t) |
Registers a TraceValue for this register. More... | |
void | UnregisterTraceValue (TraceValue *t) |
Unregisters a TraceValue, remove it from register. More... | |
TraceValueRegister * | GetScopeGroupByName (const std::string &name) |
Get a here registered TraceValueRegister by it's name. More... | |
virtual TraceValue * | GetTraceValueByName (const std::string &name) |
Get a here registered TraceValue by it's name. More... | |
TraceValueRegister * | FindScopeGroupByName (const std::string &name) |
Seek for a TraceValueRegister by it's name. More... | |
TraceValue * | FindTraceValueByName (const std::string &name) |
Seek for a TraceValue by it's name. More... | |
TraceSet * | GetAllTraceValues (void) |
Get all here registered TraceValue's only (not with descending values) More... | |
TraceSet * | GetAllTraceValuesRecursive (void) |
Get all here registered TraceValue's with descending values. More... | |
Protected Attributes | |
HWPort | porta |
port A More... | |
HWPort | portb |
port B More... | |
HWPort | portc |
port C More... | |
HWPort | portd |
port D More... | |
IOSpecialReg | gtccr_reg |
GTCCR IO register. More... | |
IOSpecialReg | assr_reg |
ASSR IO register. More... | |
HWPrescaler | prescaler01 |
prescaler unit for timer 0 and 1 More... | |
HWPrescalerAsync | prescaler2 |
prescaler unit for timer 2 More... | |
PrescalerMultiplexerExt | premux0 |
prescaler multiplexer for timer 0 More... | |
PrescalerMultiplexerExt | premux1 |
prescaler multiplexer for timer 1 More... | |
PrescalerMultiplexer | premux2 |
prescaler multiplexer for timer 2 More... | |
ExternalIRQHandler * | extirq012 |
external interrupt support for INT0, INT1, INT2 More... | |
IOSpecialReg * | eicra_reg |
EICRA IO register. More... | |
IOSpecialReg * | eimsk_reg |
EIMSK IO register. More... | |
IOSpecialReg * | eifr_reg |
EIFR IO register. More... | |
ExternalIRQHandler * | extirqpc |
external interrupt support for PCINT[0-2] More... | |
IOSpecialReg * | pcicr_reg |
PCICR IO register. More... | |
IOSpecialReg * | pcifr_reg |
PCIFR IO register. More... | |
IOSpecialReg * | pcmsk0_reg |
PCIMSK0 IO register. More... | |
IOSpecialReg * | pcmsk1_reg |
PCIMSK1 IO register. More... | |
IOSpecialReg * | pcmsk2_reg |
PCIMSK2 IO register. More... | |
IOSpecialReg * | pcmsk3_reg |
PCIMSK3 IO register. More... | |
HWAdmux * | admux |
adc multiplexer unit More... | |
HWARef * | aref |
adc reference unit More... | |
HWAd * | ad |
adc unit More... | |
HWAcomp * | acomp |
analog compare unit More... | |
HWSpi * | spi |
spi unit More... | |
HWUsart * | usart0 |
usart 0 unit More... | |
HWUsart * | usart1 |
usart 1 unit More... | |
TimerIRQRegister * | timerIrq0 |
timer interrupt unit for timer 0 More... | |
HWTimer8_2C * | timer0 |
timer 0 unit More... | |
ICaptureSource * | inputCapture1 |
input capture source for timer1 More... | |
TimerIRQRegister * | timerIrq1 |
timer interrupt unit for timer 1 More... | |
HWTimer16_2C3 * | timer1 |
timer 1 unit More... | |
TimerIRQRegister * | timerIrq2 |
timer interrupt unit for timer 2 More... | |
HWTimer8_2C * | timer2 |
timer 2 unit More... | |
GPIORegister * | gpior0_reg |
general purpose IO register More... | |
GPIORegister * | gpior1_reg |
general purpose IO register More... | |
GPIORegister * | gpior2_reg |
general purpose IO register More... | |
CLKPRRegister * | clkpr_reg |
CLKPR IO register. More... | |
OSCCALRegister * | osccal_reg |
OSCCAL IO register. More... | |
![]() | |
SystemClockOffset | clockFreq |
Period of a tick (1/F_OSC) in [ns]. More... | |
std::map< std::string, Pin * > | allPins |
std::string | actualFilename |
int | cpuCycles |
Count of cycles before next instruction is executed (i.e. countdown) More... | |
Additional Inherited Members | |
![]() | |
int | trace_on |
Breakpoints | BP |
Exitpoints | EP |
unsigned int | PC |
unsigned int | cPC |
When mupti-cycle instruction is "processed" this holds its address, PC holds the next instruction. More... | |
const unsigned int | PC_size |
unsigned int | dataAddressMask |
which bits in address are significant More... | |
AvrFlash * | Flash |
FlashProgramming * | spmRegister |
AvrFuses * | fuses |
AvrLockBits * | lockbits |
HWEeprom * | eeprom |
Data * | data |
a hack for symbol look-up More... | |
HWIrqSystem * | irqSystem |
AddressExtensionRegister * | rampz |
RAMPZ address extension register. More... | |
AddressExtensionRegister * | eind |
EIND address extension register. More... | |
bool | abortOnInvalidAccess |
Flag, that simulation abort if an invalid access occured, default is false. More... | |
TraceValueCoreRegister | coreTraceGroup |
bool | deferIrq |
Almost always false. More... | |
unsigned int | newIrqPc |
unsigned int | actualIrqVector |
Pin | v_supply |
represents supply voltage level, needed for analog peripherals More... | |
Pin | v_bandgap |
represents bandgap (ref) voltage level, needed for analog peripherals More... | |
bool | flagIWInstructions |
ADIW and SBIW instructions are available (not on most tiny's!) More... | |
bool | flagJMPInstructions |
CALL and JMP instructions are available (only on devices with bigger flash) More... | |
bool | flagIJMPInstructions |
ICALL and IJMP instructions are available (not on attiny1x devices) More... | |
bool | flagEIJMPInstructions |
EICALL and EIJMP instructions are available (only on some devices with bigger flash) More... | |
bool | flagLPMInstructions |
LPM and SPM instructions are available (not on some tiny devices) More... | |
bool | flagELPMInstructions |
ELPM instructions are available (only on devices with bigger flash) More... | |
bool | flagMULInstructions |
(F)MULxx instructions are available More... | |
bool | flagMOVWInstruction |
MOVW instruction is available. More... | |
bool | flagTiny10 |
core is a tiny4/5/9/10, change used clocks on some instructions and disables instructions More... | |
bool | flagTiny1x |
core is a tiny1x (but not tiny10!), change used clocks on some instructions and disables instructions More... | |
bool | flagXMega |
core is a XMEGA device, change used clocks on some instructions More... | |
int | DebugRecentJumps [20] |
Addresses of last few 'call' and 'jump' executed. For debugging. More... | |
int | DebugRecentJumpsIndex |
Index to address of the most recent jump. More... | |
RWMemoryMember ** | rw |
The whole memory: R0-R31, IO, Internal RAM. More... | |
HWStack * | stack |
HWSreg * | status |
the status register itself More... | |
RWSreg * | statusRegister |
the memory interface for status More... | |
HWWado * | wado |
WDT timer. More... | |
std::vector< Hardware * > | hwResetList |
std::vector< Hardware * > | hwCycleList |
DumpManager * | dumpManager |
![]() | |
virtual size_t | _tvr_getValuesCount (void) |
Get the count of all TraceValues, that are registered here and descending. More... | |
virtual void | _tvr_insertTraceValuesToSet (TraceSet &t) |
Insert all TraceValues into TraceSet, that registered here and descending. More... | |
AvrDevice class for ATmega164A/164PA/324A/324PA/644A/644PA/1284/1284P. The only difference of ATmega164PA/324PA/644PA/1284P flavor is it has a BODS bit in MCUCR. (We do not simulate the register anyway.)
Definition at line 44 of file atmega1284abase.h.
AvrDevice_atmega1284Abase::AvrDevice_atmega1284Abase | ( | unsigned | ram_bytes, |
unsigned | flash_bytes, | ||
unsigned | ee_bytes, | ||
unsigned | nrww_start | ||
) |
Definition at line 87 of file atmega1284abase.cpp.
References acomp, HWAcomp::acsr_reg, ad, HWAd::AD_M164, NotSimulatedRegister::ADC_DIDR0, NotSimulatedRegister::ADC_DIDR1, HWAd::adch_reg, HWAd::adcl_reg, HWAd::adcsra_reg, HWAd::adcsrb_reg, admux, HWAd::admux_reg, aref, assr_reg, clkpr_reg, AvrDevice::coreTraceGroup, HWPort::ddr_reg, HWEeprom::DEVMODE_EXTENDED, HWEeprom::eearh_reg, HWEeprom::eearl_reg, HWEeprom::eecr_reg, HWEeprom::eedr_reg, AvrDevice::eeprom, eicra_reg, eifr_reg, eimsk_reg, AddressExtensionRegister::ext_reg, extirq012, extirqpc, AvrDevice::flagELPMInstructions, AvrDevice::fuses, TimerIRQRegister::getLine(), HWPort::GetPin(), AvrDevice::GetPin(), NotSimulatedRegister::getRegister(), gpior0_reg, gpior1_reg, gpior2_reg, gtccr_reg, HWTimer16::icr_h_reg, HWTimer16::icr_l_reg, inputCapture1, AvrDevice::irqSystem, NotSimulatedRegister::MCU_MCUCR, NotSimulatedRegister::MCU_MCUSR, NotSimulatedRegister::MCU_PRR, NotSimulatedRegister::MCU_SMCR, NotSimulatedRegister::MCU_WDTCSR, NotSimulatedRegister::OCD_OCDR, HWTimer16::ocra_h_reg, HWTimer16::ocra_l_reg, HWTimer8::ocra_reg, HWTimer16::ocrb_h_reg, HWTimer16::ocrb_l_reg, HWTimer8::ocrb_reg, osccal_reg, OSCCALRegister::OSCCAL_V5, pcicr_reg, pcifr_reg, pcmsk0_reg, pcmsk1_reg, pcmsk2_reg, pcmsk3_reg, HWPort::pin_reg, HWPort::port_reg, porta, portb, portc, portd, premux0, premux1, premux2, AvrDevice::rampz, HWARef4::REFTYPE_BG3, ExternalIRQHandler::registerIrq(), TimerIRQRegister::registerLine(), AvrDevice::Reset(), AvrDevice::rw, AvrFuses::SetBootloaderConfig(), AvrFuses::SetFuseConfiguration(), HWSpi::spcr_reg, HWSpi::spdr_reg, spi, FlashProgramming::SPM_MEGA_MODE, FlashProgramming::spmcr_reg, AvrDevice::spmRegister, HWSpi::spsr_reg, AvrDevice::stack, AvrDevice::statusRegister, HWTimer8_2C::tccra_reg, HWTimer16_2C3::tccra_reg, HWTimer8_2C::tccrb_reg, HWTimer16_2C3::tccrb_reg, HWTimer16_2C3::tccrc_reg, HWTimer16::tcnt_h_reg, HWTimer16::tcnt_l_reg, HWTimer8::tcnt_reg, TimerIRQRegister::tifr_reg, timer0, timer1, timer2, timerIrq0, timerIrq1, timerIrq2, TimerIRQRegister::timsk_reg, NotSimulatedRegister::TWI_TWAMR, NotSimulatedRegister::TWI_TWAR, NotSimulatedRegister::TWI_TWBR, NotSimulatedRegister::TWI_TWCR, NotSimulatedRegister::TWI_TWDR, NotSimulatedRegister::TWI_TWSR, HWUart::ubrr_reg, HWUart::ubrrhi_reg, HWUart::ucsra_reg, HWUart::ucsrb_reg, HWUsart::ucsrc_reg, HWUart::udr_reg, usart0, usart1, and AvrDevice::wado.
AvrDevice_atmega1284Abase::~AvrDevice_atmega1284Abase | ( | ) |
Definition at line 48 of file atmega1284abase.cpp.
|
protected |
analog compare unit
Definition at line 72 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
adc unit
Definition at line 71 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
adc multiplexer unit
Definition at line 69 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
adc reference unit
Definition at line 70 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
ASSR IO register.
Definition at line 52 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
CLKPR IO register.
Definition at line 86 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
EICRA IO register.
Definition at line 59 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
EIFR IO register.
Definition at line 61 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
EIMSK IO register.
Definition at line 60 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
external interrupt support for INT0, INT1, INT2
Definition at line 58 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
external interrupt support for PCINT[0-2]
Definition at line 62 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
general purpose IO register
Definition at line 83 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
general purpose IO register
Definition at line 84 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
general purpose IO register
Definition at line 85 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
GTCCR IO register.
Definition at line 51 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
input capture source for timer1
Definition at line 78 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
OSCCAL IO register.
Definition at line 87 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
PCICR IO register.
Definition at line 63 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
PCIFR IO register.
Definition at line 64 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
PCIMSK0 IO register.
Definition at line 65 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
PCIMSK1 IO register.
Definition at line 66 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
PCIMSK2 IO register.
Definition at line 67 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
PCIMSK3 IO register.
Definition at line 68 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
prescaler multiplexer for timer 0
Definition at line 55 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
prescaler multiplexer for timer 1
Definition at line 56 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
prescaler multiplexer for timer 2
Definition at line 57 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
prescaler unit for timer 0 and 1
Definition at line 53 of file atmega1284abase.h.
|
protected |
prescaler unit for timer 2
Definition at line 54 of file atmega1284abase.h.
|
protected |
spi unit
Definition at line 73 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
timer 0 unit
Definition at line 77 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
timer 1 unit
Definition at line 80 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
timer 2 unit
Definition at line 82 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
timer interrupt unit for timer 0
Definition at line 76 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
timer interrupt unit for timer 1
Definition at line 79 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
timer interrupt unit for timer 2
Definition at line 81 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
usart 0 unit
Definition at line 74 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().
|
protected |
usart 1 unit
Definition at line 75 of file atmega1284abase.h.
Referenced by AvrDevice_atmega1284Abase().