HWStackSram Class Reference

Implements a stack with stack register using RAM as stackarea. More...

#include <hwstack.h>

Inheritance diagram for HWStackSram:
Inheritance graph
[legend]
Collaboration diagram for HWStackSram:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 HWStackSram (AvrDevice *core, int bitsize, bool initRAMEND=false)
 Creates a stack instance.
virtual void Push (unsigned char val)
 Pushs one byte to stack.
virtual unsigned char Pop ()
 Pops one byte from stack.
virtual void PushAddr (unsigned long addr)
 Pushs a address to stack.
virtual unsigned long PopAddr ()
 Pops a address from stack.
virtual void Reset ()
 Resets stack pointer and listener table.

Public Attributes

IOReg< HWStackSramsph_reg
IOReg< HWStackSramspl_reg

Protected Member Functions

void SetSpl (unsigned char)
void SetSph (unsigned char)
unsigned char GetSpl ()
unsigned char GetSph ()
void OnSPReadByTarget ()

Protected Attributes

unsigned long stackCeil
bool initRAMEND

Detailed Description

Implements a stack with stack register using RAM as stackarea.

Definition at line 131 of file hwstack.h.


Constructor & Destructor Documentation

HWStackSram::HWStackSram ( AvrDevice core,
int  bitsize,
bool  initRAMEND = false 
)

Creates a stack instance.

Definition at line 62 of file hwstack.cpp.

References Reset(), and stackCeil.

Here is the call graph for this function:


Member Function Documentation

unsigned char HWStackSram::GetSph (  )  [protected]

Definition at line 172 of file hwstack.cpp.

References OnSPReadByTarget(), and HWStack::stackPointer.

Here is the call graph for this function:

unsigned char HWStackSram::GetSpl (  )  [protected]

Definition at line 177 of file hwstack.cpp.

References OnSPReadByTarget(), and HWStack::stackPointer.

Here is the call graph for this function:

void HWStackSram::OnSPReadByTarget (  )  [protected]

Definition at line 181 of file hwstack.cpp.

References HWStack::m_ThreadList, ThreadList::OnSPRead(), and HWStack::stackPointer.

Referenced by GetSph(), and GetSpl().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char HWStackSram::Pop (  )  [virtual]

Pops one byte from stack.

Implements HWStack.

Definition at line 103 of file hwstack.cpp.

References HWStack::CheckReturnPoints(), HWStack::core, AvrDevice::GetRWMem(), IOReg< P >::hardwareChange(), HWStack::m_ThreadList, ThreadList::OnPop(), sph_reg, spl_reg, stackCeil, HWStack::stackPointer, AvrDevice::trace_on, and traceOut.

Referenced by PopAddr().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned long HWStackSram::PopAddr (  )  [virtual]

Pops a address from stack.

Implements HWStack.

Definition at line 128 of file hwstack.cpp.

References HWStack::core, AvrDevice::PC_size, and Pop().

Here is the call graph for this function:

void HWStackSram::Push ( unsigned char  val  )  [virtual]

Pushs one byte to stack.

Implements HWStack.

Definition at line 85 of file hwstack.cpp.

References HWStack::CheckReturnPoints(), HWStack::core, IOReg< P >::hardwareChange(), HWStack::lowestStackPointer, HWStack::m_ThreadList, ThreadList::OnPush(), AvrDevice::SetRWMem(), sph_reg, spl_reg, stackCeil, HWStack::stackPointer, AvrDevice::trace_on, and traceOut.

Referenced by PushAddr().

Here is the call graph for this function:

Here is the caller graph for this function:

void HWStackSram::PushAddr ( unsigned long  addr  )  [virtual]

Pushs a address to stack.

Implements HWStack.

Definition at line 117 of file hwstack.cpp.

References HWStack::core, AvrDevice::PC_size, and Push().

Here is the call graph for this function:

void HWStackSram::Reset ( void   )  [virtual]

Resets stack pointer and listener table.

Reimplemented from HWStack.

Definition at line 74 of file hwstack.cpp.

References HWStack::core, AvrDevice::GetMemIOSize(), AvrDevice::GetMemIRamSize(), AvrDevice::GetMemRegisterSize(), initRAMEND, HWStack::lowestStackPointer, HWStack::returnPointList, and HWStack::stackPointer.

Referenced by HWStackSram().

Here is the call graph for this function:

Here is the caller graph for this function:

void HWStackSram::SetSph ( unsigned char  val  )  [protected]
void HWStackSram::SetSpl ( unsigned char  val  )  [protected]

Member Data Documentation

bool HWStackSram::initRAMEND [protected]

Definition at line 135 of file hwstack.h.

Referenced by Reset().

Definition at line 154 of file hwstack.h.

Referenced by AvrDevice_atmega8::AvrDevice_atmega8(), Pop(), Push(), and SetSph().

Definition at line 155 of file hwstack.h.

Referenced by AvrDevice_atmega8::AvrDevice_atmega8(), Pop(), Push(), and SetSpl().

unsigned long HWStackSram::stackCeil [protected]

Definition at line 134 of file hwstack.h.

Referenced by HWStackSram(), Pop(), Push(), SetSph(), and SetSpl().


The documentation for this class was generated from the following files:
Generated on Sun Feb 12 16:51:56 2012 for Simulavr by  doxygen 1.6.3