simulavr  1.1.0
InvalidMem Class Reference

Memory on which access should be avoided! :-) More...

#include <rwmem.h>

Inheritance diagram for InvalidMem:

Public Member Functions

 InvalidMem (AvrDevice *core, int addr)
 
- Public Member Functions inherited from RWMemoryMember
 RWMemoryMember (TraceValueRegister *registry, const std::string &tracename="", const int index=-1)
 
 RWMemoryMember (void)
 
 operator unsigned char () const
 Read access on memory. More...
 
unsigned char operator= (unsigned char val)
 Write access on memory. More...
 
unsigned char operator= (const RWMemoryMember &mm)
 Write access on memory. More...
 
virtual ~RWMemoryMember ()
 
virtual void set_bit (unsigned int bitaddr)
 
virtual void clear_bit (unsigned int bitaddr)
 
const std::string & GetTraceName (void)
 
bool IsInvalid (void) const
 

Protected Member Functions

unsigned char get () const
 
void set (unsigned char)
 

Private Attributes

AvrDevicecore
 
int addr
 
unsigned char value
 

Additional Inherited Members

- Protected Attributes inherited from RWMemoryMember
TraceValuetv
 
TraceValueRegisterregistry
 
const std::string tracename
 
const bool isInvalid
 

Detailed Description

Memory on which access should be avoided! :-)

All accesses to this type of memory will produce an error.

Definition at line 221 of file rwmem.h.

Constructor & Destructor Documentation

◆ InvalidMem()

InvalidMem::InvalidMem ( AvrDevice core,
int  addr 
)

Definition at line 208 of file rwmem.cpp.

Member Function Documentation

◆ get()

unsigned char InvalidMem::get ( ) const
protectedvirtual

◆ set()

void InvalidMem::set ( unsigned  nv)
protectedvirtual

This function is the function which will be called by the above access operators and is expected to do the real work when writing a byte.

Implements RWMemoryMember.

Definition at line 227 of file rwmem.cpp.

References AvrDevice::abortOnInvalidAccess, addr, avr_error, avr_warning, core, AvrDevice::dataAddressMask, AvrDevice::GetMemERamSize(), AvrDevice::GetMemIOSize(), AvrDevice::GetMemIRamSize(), AvrDevice::GetMemRegisterSize(), global_suppress_memory_warnings, int2hex(), AvrDevice::PC, and value.

Member Data Documentation

◆ addr

int InvalidMem::addr
private

Definition at line 224 of file rwmem.h.

Referenced by get(), and set().

◆ core

AvrDevice* InvalidMem::core
private

Definition at line 223 of file rwmem.h.

Referenced by get(), and set().

◆ value

unsigned char InvalidMem::value
private

Definition at line 234 of file rwmem.h.

Referenced by get(), and set().


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