simulavr  1.1.0
AvrDevice Class Reference

Basic AVR device, contains the core functionality. More...

#include <avrdevice.h>

Inheritance diagram for AvrDevice:

Public Member Functions

 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 *)
 
RWMemoryMemberGetMemRegisterInstance (unsigned int offset)
 
void RegisterTerminationSymbol (const char *symbol)
 
PinGetPin (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...
 
- Public Member Functions inherited from SimulationMember
virtual ~SimulationMember ()
 
- Public Member Functions inherited from TraceValueRegister
 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...
 
TraceValueRegisterGetScopeGroupByName (const std::string &name)
 Get a here registered TraceValueRegister by it's name. More...
 
virtual TraceValueGetTraceValueByName (const std::string &name)
 Get a here registered TraceValue by it's name. More...
 
TraceValueRegisterFindScopeGroupByName (const std::string &name)
 Seek for a TraceValueRegister by it's name. More...
 
TraceValueFindTraceValueByName (const std::string &name)
 Seek for a TraceValue by it's name. More...
 
TraceSetGetAllTraceValues (void)
 Get all here registered TraceValue's only (not with descending values) More...
 
TraceSetGetAllTraceValuesRecursive (void)
 Get all here registered TraceValue's with descending values. More...
 

Public Attributes

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...
 
AvrFlashFlash
 
FlashProgrammingspmRegister
 
AvrFusesfuses
 
AvrLockBitslockbits
 
HWEepromeeprom
 
Datadata
 a hack for symbol look-up More...
 
HWIrqSystemirqSystem
 
AddressExtensionRegisterrampz
 RAMPZ address extension register. More...
 
AddressExtensionRegistereind
 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...
 
HWStackstack
 
HWSregstatus
 the status register itself More...
 
RWSregstatusRegister
 the memory interface for status More...
 
HWWadowado
 WDT timer. More...
 
std::vector< Hardware * > hwResetList
 
std::vector< Hardware * > hwCycleList
 
DumpManagerdumpManager
 

Protected Attributes

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...
 

Private Member Functions

void detachDumpManager ()
 

Private Attributes

RWMemoryMember ** invalidRW
 hold invalid RW memory cells created by device More...
 
const unsigned int ioSpaceSize
 
const unsigned int iRamSize
 
const unsigned int eRamSize
 
unsigned int devSignature
 hold the device signature for this core More...
 
std::string devName
 hold the device name, which this core simulate More...
 

Static Private Attributes

static const unsigned int totalIoSpace = 0x10000
 
static const unsigned int registerSpaceSize = 32
 

Friends

class DumpManager
 
void ELFLoad (const AvrDevice *core)
 

Additional Inherited Members

- Protected Member Functions inherited from TraceValueRegister
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...
 

Detailed Description

Basic AVR device, contains the core functionality.

Definition at line 66 of file avrdevice.h.

Constructor & Destructor Documentation

◆ AvrDevice()

AvrDevice::AvrDevice ( unsigned int  ioSpaceSize,
unsigned int  IRamSize,
unsigned int  ERamSize,
unsigned int  flashSize,
unsigned int  pcSize = 2 
)

◆ ~AvrDevice()

AvrDevice::~AvrDevice ( )
virtual

Definition at line 83 of file avrdevice.cpp.

Member Function Documentation

◆ AddToCycleList()

void AvrDevice::AddToCycleList ( Hardware hw)

Adds to the list of parts to cycle per clock tick. If already in that list, does nothing.

Definition at line 51 of file avrdevice.cpp.

Referenced by CLKPRRegister::CLKPRRegister(), FlashProgramming::FlashProgramming(), HWAd::HWAd(), HWPrescaler::HWPrescaler(), HWTimerTinyX5::HWTimerTinyX5(), HWUart::HWUart(), HWWado::HWWado(), BasicTimerUnit::SetClockMode(), and HWEeprom::SetEecr().

◆ AddToResetList()

void AvrDevice::AddToResetList ( Hardware hw)

Adds to the list of parts to reset. If already in that list, does nothing.

Definition at line 46 of file avrdevice.cpp.

Referenced by Hardware::Hardware().

◆ ClearIORegBit()

bool AvrDevice::ClearIORegBit ( unsigned  addr,
unsigned  bitaddr 
)

Clear a bit value to lower IO register (without offset of 0x20!)

Definition at line 487 of file avrdevice.cpp.

References registerSpaceSize, and rw.

Referenced by avr_op_CBI::operator()().

◆ DebugOnJump()

◆ DeleteAllBreakpoints()

void AvrDevice::DeleteAllBreakpoints ( void  )

Clear all breakpoints in device.

Definition at line 403 of file avrdevice.cpp.

References BP.

◆ detachDumpManager()

void AvrDevice::detachDumpManager ( )
inlineprivate

Definition at line 79 of file avrdevice.h.

Referenced by DumpManager::detachAvrDevices().

◆ GetClockFreq()

SystemClockOffset AvrDevice::GetClockFreq ( )

Definition at line 72 of file avrdevice.cpp.

◆ GetCoreReg()

unsigned char AvrDevice::GetCoreReg ( unsigned  addr)

Get a value from core register.

Definition at line 459 of file avrdevice.cpp.

References registerSpaceSize, and rw.

Referenced by ThreadList::OnCall(), avr_op_ADC::operator()(), avr_op_ADD::operator()(), avr_op_ADIW::operator()(), avr_op_AND::operator()(), avr_op_ANDI::operator()(), avr_op_ASR::operator()(), avr_op_BLD::operator()(), avr_op_BST::operator()(), avr_op_COM::operator()(), avr_op_CP::operator()(), avr_op_CPC::operator()(), avr_op_CPI::operator()(), avr_op_CPSE::operator()(), avr_op_DEC::operator()(), avr_op_EOR::operator()(), avr_op_ESPM::operator()(), avr_op_FMUL::operator()(), avr_op_FMULS::operator()(), avr_op_FMULSU::operator()(), avr_op_INC::operator()(), avr_op_LSR::operator()(), avr_op_MOV::operator()(), avr_op_MOVW::operator()(), avr_op_MUL::operator()(), avr_op_MULS::operator()(), avr_op_MULSU::operator()(), avr_op_NEG::operator()(), avr_op_OR::operator()(), avr_op_ORI::operator()(), avr_op_OUT::operator()(), avr_op_PUSH::operator()(), avr_op_ROR::operator()(), avr_op_SBC::operator()(), avr_op_SBCI::operator()(), avr_op_SBIW::operator()(), avr_op_SBRC::operator()(), avr_op_SBRS::operator()(), avr_op_SPM::operator()(), avr_op_STD_Y::operator()(), avr_op_STD_Z::operator()(), avr_op_STS::operator()(), avr_op_ST_X::operator()(), avr_op_ST_X_decr::operator()(), avr_op_ST_X_incr::operator()(), avr_op_ST_Y_decr::operator()(), avr_op_ST_Y_incr::operator()(), avr_op_ST_Z_decr::operator()(), avr_op_ST_Z_incr::operator()(), avr_op_SUB::operator()(), avr_op_SUBI::operator()(), and avr_op_SWAP::operator()().

◆ GetDeviceName()

const std::string& AvrDevice::GetDeviceName ( void  )
inline

Return device name.

Definition at line 181 of file avrdevice.h.

◆ GetDeviceSignature()

unsigned int AvrDevice::GetDeviceSignature ( void  )
inline

Return device signature.

Definition at line 183 of file avrdevice.h.

◆ GetFname()

const std::string& AvrDevice::GetFname ( void  )
inline

Return filename from loaded program.

Definition at line 179 of file avrdevice.h.

Referenced by HWIrqSystem::ClearIrqFlag(), HWIrqSystem::IrqHandlerFinished(), HWIrqSystem::IrqHandlerStarted(), operator<<(), and HWIrqSystem::SetIrqFlag().

◆ GetIOReg()

unsigned char AvrDevice::GetIOReg ( unsigned  addr)

Get a value from IO register (without offset of 0x20!)

Definition at line 470 of file avrdevice.cpp.

References ioSpaceSize, registerSpaceSize, and rw.

Referenced by avr_op_IN::operator()(), avr_op_SBIC::operator()(), and avr_op_SBIS::operator()().

◆ GetMemERamSize()

unsigned int AvrDevice::GetMemERamSize ( void  )
inline

Get configured external RAM size.

Definition at line 196 of file avrdevice.h.

References ELFLoad().

Referenced by InvalidMem::get(), and InvalidMem::set().

◆ GetMemIOSize()

unsigned int AvrDevice::GetMemIOSize ( void  )
inline

Get configured IO memory space size.

Definition at line 190 of file avrdevice.h.

Referenced by InvalidMem::get(), HWStackSram::Reset(), and InvalidMem::set().

◆ GetMemIRamSize()

unsigned int AvrDevice::GetMemIRamSize ( void  )
inline

Get configured internal RAM size.

Definition at line 194 of file avrdevice.h.

Referenced by InvalidMem::get(), HWStackSram::Reset(), and InvalidMem::set().

◆ GetMemRegisterInstance()

RWMemoryMember * AvrDevice::GetMemRegisterInstance ( unsigned int  offset)

Definition at line 426 of file avrdevice.cpp.

References rw, and totalIoSpace.

◆ GetMemRegisterSize()

unsigned int AvrDevice::GetMemRegisterSize ( void  )
inline

Get configured register space size.

Definition at line 192 of file avrdevice.h.

Referenced by InvalidMem::get(), HWStackSram::Reset(), and InvalidMem::set().

◆ GetMemTotalSize()

unsigned int AvrDevice::GetMemTotalSize ( void  )
inline

Get configured total memory space size.

Definition at line 188 of file avrdevice.h.

Referenced by GetRWMem(), and SetRWMem().

◆ GetPin()

◆ GetRegX()

unsigned AvrDevice::GetRegX ( void  )

◆ GetRegY()

unsigned AvrDevice::GetRegY ( void  )

◆ GetRegZ()

◆ GetRWMem()

◆ Load()

void AvrDevice::Load ( const char *  n)

Load flash, eeprom, signature, fuses from elf file, wrapper for LoadBFD or LoadSimpleELF.

Definition at line 63 of file avrdevice.cpp.

References ELFLoad().

Referenced by avr_create_tf().

◆ RegisterPin()

void AvrDevice::RegisterPin ( const std::string &  name,
Pin p 
)
inline

◆ RegisterTerminationSymbol()

void AvrDevice::RegisterTerminationSymbol ( const char *  symbol)

Definition at line 432 of file avrdevice.cpp.

References EP, Flash, and Memory::GetAddressAtSymbol().

◆ RemoveFromCycleList()

void AvrDevice::RemoveFromCycleList ( Hardware hw)

Removes from the cycle list, if possible.

Does nothing if the part is not in the cycle list.

Definition at line 56 of file avrdevice.cpp.

Referenced by HWEeprom::CpuCycle(), and BasicTimerUnit::SetClockMode().

◆ ReplaceIoRegister()

void AvrDevice::ReplaceIoRegister ( unsigned int  offset,
RWMemoryMember newMember 
)

Definition at line 412 of file avrdevice.cpp.

References avr_error, ioSpaceSize, registerSpaceSize, and rw.

◆ ReplaceMemRegister()

bool AvrDevice::ReplaceMemRegister ( unsigned int  offset,
RWMemoryMember newMember 
)

Definition at line 418 of file avrdevice.cpp.

References rw, and totalIoSpace.

◆ Reset()

◆ SetClockFreq()

void AvrDevice::SetClockFreq ( SystemClockOffset  f)

Definition at line 68 of file avrdevice.cpp.

◆ SetCoreReg()

bool AvrDevice::SetCoreReg ( unsigned  addr,
unsigned char  val 
)

Set a value to core register.

Definition at line 464 of file avrdevice.cpp.

References registerSpaceSize, and rw.

Referenced by avr_op_ADC::operator()(), avr_op_ADD::operator()(), avr_op_ADIW::operator()(), avr_op_AND::operator()(), avr_op_ANDI::operator()(), avr_op_ASR::operator()(), avr_op_BLD::operator()(), avr_op_COM::operator()(), avr_op_DEC::operator()(), avr_op_ELPM_Z::operator()(), avr_op_ELPM_Z_incr::operator()(), avr_op_ELPM::operator()(), avr_op_EOR::operator()(), avr_op_ESPM::operator()(), avr_op_FMUL::operator()(), avr_op_FMULS::operator()(), avr_op_FMULSU::operator()(), avr_op_IN::operator()(), avr_op_INC::operator()(), avr_op_LDD_Y::operator()(), avr_op_LDD_Z::operator()(), avr_op_LDI::operator()(), avr_op_LDS::operator()(), avr_op_LD_X::operator()(), avr_op_LD_X_decr::operator()(), avr_op_LD_X_incr::operator()(), avr_op_LD_Y_decr::operator()(), avr_op_LD_Y_incr::operator()(), avr_op_LD_Z_incr::operator()(), avr_op_LD_Z_decr::operator()(), avr_op_LPM_Z::operator()(), avr_op_LPM::operator()(), avr_op_LPM_Z_incr::operator()(), avr_op_LSR::operator()(), avr_op_MOV::operator()(), avr_op_MOVW::operator()(), avr_op_MUL::operator()(), avr_op_MULS::operator()(), avr_op_MULSU::operator()(), avr_op_NEG::operator()(), avr_op_OR::operator()(), avr_op_ORI::operator()(), avr_op_POP::operator()(), avr_op_ROR::operator()(), avr_op_SBC::operator()(), avr_op_SBCI::operator()(), avr_op_SBIW::operator()(), avr_op_ST_X_decr::operator()(), avr_op_ST_X_incr::operator()(), avr_op_ST_Y_decr::operator()(), avr_op_ST_Y_incr::operator()(), avr_op_ST_Z_decr::operator()(), avr_op_ST_Z_incr::operator()(), avr_op_SUB::operator()(), avr_op_SUBI::operator()(), and avr_op_SWAP::operator()().

◆ SetDeviceNameAndSignature()

void AvrDevice::SetDeviceNameAndSignature ( const std::string &  name,
unsigned int  signature 
)

Set device signature and name.

Definition at line 407 of file avrdevice.cpp.

References devName, and devSignature.

◆ SetIOReg()

bool AvrDevice::SetIOReg ( unsigned  addr,
unsigned char  val 
)

Set a value to IO register (without offset of 0x20!)

Definition at line 475 of file avrdevice.cpp.

References ioSpaceSize, registerSpaceSize, and rw.

Referenced by avr_op_OUT::operator()().

◆ SetIORegBit()

bool AvrDevice::SetIORegBit ( unsigned  addr,
unsigned  bitaddr 
)

Set a bit value to lower IO register (without offset of 0x20!)

Definition at line 481 of file avrdevice.cpp.

References registerSpaceSize, and rw.

Referenced by avr_op_SBI::operator()().

◆ SetRWMem()

◆ Step()

Friends And Related Function Documentation

◆ DumpManager

friend class DumpManager
friend

Definition at line 78 of file avrdevice.h.

◆ ELFLoad

void ELFLoad ( const AvrDevice core)
friend

Definition at line 38 of file avrreadelf.cpp.

Member Data Documentation

◆ abortOnInvalidAccess

bool AvrDevice::abortOnInvalidAccess

Flag, that simulation abort if an invalid access occured, default is false.

Definition at line 107 of file avrdevice.h.

Referenced by InvalidMem::get(), and InvalidMem::set().

◆ actualFilename

std::string AvrDevice::actualFilename
protected

Definition at line 84 of file avrdevice.h.

Referenced by ELFLoad(), and Step().

◆ actualIrqVector

unsigned int AvrDevice::actualIrqVector

Definition at line 111 of file avrdevice.h.

Referenced by Step().

◆ allPins

std::map< std::string, Pin *> AvrDevice::allPins
protected

Definition at line 83 of file avrdevice.h.

◆ BP

Breakpoints AvrDevice::BP

Definition at line 91 of file avrdevice.h.

Referenced by DeleteAllBreakpoints(), and Step().

◆ clockFreq

SystemClockOffset AvrDevice::clockFreq
protected

Period of a tick (1/F_OSC) in [ns].

Definition at line 82 of file avrdevice.h.

Referenced by Step().

◆ coreTraceGroup

◆ cPC

unsigned int AvrDevice::cPC

When mupti-cycle instruction is "processed" this holds its address, PC holds the next instruction.

Definition at line 95 of file avrdevice.h.

Referenced by Reset(), and Step().

◆ cpuCycles

int AvrDevice::cpuCycles
protected

Count of cycles before next instruction is executed (i.e. countdown)

Definition at line 87 of file avrdevice.h.

Referenced by Reset(), and Step().

◆ data

Data* AvrDevice::data

a hack for symbol look-up

Definition at line 103 of file avrdevice.h.

Referenced by AvrDevice(), and ELFLoad().

◆ dataAddressMask

unsigned int AvrDevice::dataAddressMask

which bits in address are significant

Definition at line 97 of file avrdevice.h.

Referenced by AvrDevice(), InvalidMem::get(), and InvalidMem::set().

◆ DebugRecentJumps

int AvrDevice::DebugRecentJumps[20]

Addresses of last few 'call' and 'jump' executed. For debugging.

Definition at line 126 of file avrdevice.h.

Referenced by DebugOnJump().

◆ DebugRecentJumpsIndex

int AvrDevice::DebugRecentJumpsIndex

Index to address of the most recent jump.

Definition at line 127 of file avrdevice.h.

Referenced by AvrDevice(), and DebugOnJump().

◆ deferIrq

bool AvrDevice::deferIrq

Almost always false.

Definition at line 109 of file avrdevice.h.

Referenced by Step().

◆ devName

std::string AvrDevice::devName
private

hold the device name, which this core simulate

Definition at line 76 of file avrdevice.h.

Referenced by SetDeviceNameAndSignature().

◆ devSignature

unsigned int AvrDevice::devSignature
private

hold the device signature for this core

Definition at line 75 of file avrdevice.h.

Referenced by ELFLoad(), and SetDeviceNameAndSignature().

◆ dumpManager

DumpManager* AvrDevice::dumpManager

Definition at line 139 of file avrdevice.h.

Referenced by AvrDevice(), and Step().

◆ eeprom

◆ eind

AddressExtensionRegister* AvrDevice::eind

EIND address extension register.

Definition at line 106 of file avrdevice.h.

Referenced by AvrDevice_atmega2560base::AvrDevice_atmega2560base(), avr_op_EICALL::operator()(), and avr_op_EIJMP::operator()().

◆ EP

Exitpoints AvrDevice::EP

Definition at line 92 of file avrdevice.h.

Referenced by RegisterTerminationSymbol(), and Step().

◆ eRamSize

const unsigned int AvrDevice::eRamSize
private

Definition at line 74 of file avrdevice.h.

◆ flagEIJMPInstructions

bool AvrDevice::flagEIJMPInstructions

EICALL and EIJMP instructions are available (only on some devices with bigger flash)

Definition at line 118 of file avrdevice.h.

Referenced by AvrDevice_atmega2560base::AvrDevice_atmega2560base(), and lookup_opcode().

◆ flagELPMInstructions

bool AvrDevice::flagELPMInstructions

◆ flagIJMPInstructions

bool AvrDevice::flagIJMPInstructions

ICALL and IJMP instructions are available (not on attiny1x devices)

Definition at line 117 of file avrdevice.h.

Referenced by lookup_opcode().

◆ flagIWInstructions

bool AvrDevice::flagIWInstructions

ADIW and SBIW instructions are available (not on most tiny's!)

Definition at line 115 of file avrdevice.h.

Referenced by lookup_opcode().

◆ flagJMPInstructions

bool AvrDevice::flagJMPInstructions

CALL and JMP instructions are available (only on devices with bigger flash)

Definition at line 116 of file avrdevice.h.

Referenced by AvrDevice_atmega668base::AvrDevice_atmega668base(), AvrDevice_attiny2313::AvrDevice_attiny2313(), AvrDevice_attinyX5::AvrDevice_attinyX5(), and lookup_opcode().

◆ flagLPMInstructions

bool AvrDevice::flagLPMInstructions

LPM and SPM instructions are available (not on some tiny devices)

Definition at line 119 of file avrdevice.h.

Referenced by lookup_opcode().

◆ flagMOVWInstruction

bool AvrDevice::flagMOVWInstruction

MOVW instruction is available.

Definition at line 122 of file avrdevice.h.

Referenced by lookup_opcode().

◆ flagMULInstructions

bool AvrDevice::flagMULInstructions

(F)MULxx instructions are available

Definition at line 121 of file avrdevice.h.

Referenced by AvrDevice_attiny2313::AvrDevice_attiny2313(), AvrDevice_attinyX5::AvrDevice_attinyX5(), and lookup_opcode().

◆ flagTiny10

◆ flagTiny1x

bool AvrDevice::flagTiny1x

core is a tiny1x (but not tiny10!), change used clocks on some instructions and disables instructions

Definition at line 124 of file avrdevice.h.

Referenced by lookup_opcode().

◆ flagXMega

◆ Flash

◆ fuses

◆ hwCycleList

std::vector<Hardware *> AvrDevice::hwCycleList

Definition at line 137 of file avrdevice.h.

Referenced by Step().

◆ hwResetList

std::vector<Hardware *> AvrDevice::hwResetList

Definition at line 136 of file avrdevice.h.

Referenced by Reset().

◆ invalidRW

RWMemoryMember** AvrDevice::invalidRW
private

hold invalid RW memory cells created by device

Definition at line 69 of file avrdevice.h.

Referenced by AvrDevice().

◆ ioSpaceSize

const unsigned int AvrDevice::ioSpaceSize
private

Definition at line 70 of file avrdevice.h.

Referenced by AvrDevice(), GetIOReg(), ReplaceIoRegister(), and SetIOReg().

◆ iRamSize

const unsigned int AvrDevice::iRamSize
private

Definition at line 73 of file avrdevice.h.

◆ irqSystem

◆ lockbits

AvrLockBits* AvrDevice::lockbits

Definition at line 101 of file avrdevice.h.

Referenced by AvrDevice(), and ELFLoad().

◆ newIrqPc

unsigned int AvrDevice::newIrqPc

Definition at line 110 of file avrdevice.h.

Referenced by Step().

◆ PC

◆ PC_size

◆ rampz

◆ registerSpaceSize

const unsigned int AvrDevice::registerSpaceSize = 32
staticprivate

◆ rw

◆ spmRegister

◆ stack

◆ status

HWSreg* AvrDevice::status

the status register itself

Definition at line 132 of file avrdevice.h.

Referenced by AvrDevice(), Reset(), and Step().

◆ statusRegister

◆ totalIoSpace

const unsigned int AvrDevice::totalIoSpace = 0x10000
staticprivate

Definition at line 71 of file avrdevice.h.

Referenced by AvrDevice(), GetMemRegisterInstance(), and ReplaceMemRegister().

◆ trace_on

◆ v_bandgap

Pin AvrDevice::v_bandgap

represents bandgap (ref) voltage level, needed for analog peripherals

Definition at line 113 of file avrdevice.h.

Referenced by HWARef4::GetRefValue(), HWARef8::GetRefValue(), HWAdmuxM8::GetValue(), HWAdmuxM16::GetValue(), HWAdmuxT25::GetValue(), HWAdmuxM2560::GetValue(), and HWAcomp::HWAcomp().

◆ v_supply

Pin AvrDevice::v_supply

represents supply voltage level, needed for analog peripherals

Definition at line 112 of file avrdevice.h.

Referenced by HWAd::CpuCycle(), and HWAcomp::HWAcomp().

◆ wado


The documentation for this class was generated from the following files: