simulavr  1.1.0
RWSreg Class Reference

#include <hwsreg.h>

Inheritance diagram for RWSreg:

Public Member Functions

 RWSreg (TraceValueRegister *registry, HWSreg *s)
 
void trigger_change (void)
 reflect a change, which comes from CPU core More...
 
- 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)
 

Protected Attributes

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

Detailed Description

SREG - ALU status register in IO space

Todo:
Replace the status register with an ordinary byte somewhere and simple inline access functions sN(), gN() to get/set flags. This should also make accesses faster.

Definition at line 65 of file hwsreg.h.

Constructor & Destructor Documentation

◆ RWSreg()

RWSreg::RWSreg ( TraceValueRegister registry,
HWSreg s 
)
inline

Definition at line 68 of file hwsreg.h.

Member Function Documentation

◆ get()

unsigned char RWSreg::get ( ) const
protectedvirtual

This function as the oppposite to get() is expected to read the real byte.

Implements RWMemoryMember.

Definition at line 76 of file hwsreg.cpp.

◆ set()

void RWSreg::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 80 of file hwsreg.cpp.

◆ trigger_change()

void RWSreg::trigger_change ( void  )
inline

reflect a change, which comes from CPU core

Definition at line 70 of file hwsreg.h.

Referenced by AvrDevice::Step().

Member Data Documentation

◆ status

HWSreg* RWSreg::status
protected

Definition at line 73 of file hwsreg.h.


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