OpenASIP  2.0
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
NullLongImmediateUnitState Class Reference

#include <LongImmediateUnitState.hh>

Inheritance diagram for NullLongImmediateUnitState:
Inheritance graph
Collaboration diagram for NullLongImmediateUnitState:
Collaboration graph

Public Member Functions

virtual ~NullLongImmediateUnitState ()
 
virtual SimValueregisterValue (int index)
 
virtual void setRegisterValue (int index, const SimValue &value)
 
virtual LongImmediateRegisterStateimmediateRegister (int i)
 
virtual int immediateRegisterCount () const
 
virtual void endClock ()
 
virtual void advanceClock ()
 
- Public Member Functions inherited from LongImmediateUnitState
 LongImmediateUnitState (int size, int latency, const std::string &name, int width, bool signExtend)
 
virtual ~LongImmediateUnitState ()
 
- Public Member Functions inherited from ClockedState
 ClockedState ()
 
virtual ~ClockedState ()
 
virtual void reset ()
 this is called at (re)initialization of the simulation More...
 

Static Public Member Functions

static NullLongImmediateUnitStateinstance ()
 

Private Member Functions

 NullLongImmediateUnitState ()
 
 NullLongImmediateUnitState (const NullLongImmediateUnitState &)
 Copying not allowed. More...
 
NullLongImmediateUnitStateoperator= (const NullLongImmediateUnitState &)
 Assignment not allowed. More...
 

Static Private Attributes

static NullLongImmediateUnitStateinstance_ = NULL
 Unique instance of NullLongImmediateUnitState. More...
 

Detailed Description

Models non-existing LongImmediateUnitState.

Definition at line 128 of file LongImmediateUnitState.hh.

Constructor & Destructor Documentation

◆ ~NullLongImmediateUnitState()

NullLongImmediateUnitState::~NullLongImmediateUnitState ( )
virtual

Destructor.

Definition at line 208 of file LongImmediateUnitState.cc.

208  {
209 }

◆ NullLongImmediateUnitState() [1/2]

NullLongImmediateUnitState::NullLongImmediateUnitState ( )
private

Constructor.

Definition at line 201 of file LongImmediateUnitState.cc.

201  :
202  LongImmediateUnitState(0, 0, "<NULL>", 0, false) {
203 }

Referenced by instance().

◆ NullLongImmediateUnitState() [2/2]

NullLongImmediateUnitState::NullLongImmediateUnitState ( const NullLongImmediateUnitState )
private

Copying not allowed.

Member Function Documentation

◆ advanceClock()

void NullLongImmediateUnitState::advanceClock ( )
virtual

Aborts the program with error message.

Reimplemented from LongImmediateUnitState.

Definition at line 245 of file LongImmediateUnitState.cc.

245  {
246  Application::abortWithError("advanceClock()");
247 }

References abortWithError.

◆ endClock()

void NullLongImmediateUnitState::endClock ( )
virtual

Aborts the program with error message.

Reimplemented from LongImmediateUnitState.

Definition at line 237 of file LongImmediateUnitState.cc.

237  {
238  Application::abortWithError("endClock()");
239 }

References abortWithError.

◆ immediateRegister()

LongImmediateRegisterState & NullLongImmediateUnitState::immediateRegister ( int  i)
virtual

Aborts the program with error message.

Returns
Never returns.

Reimplemented from LongImmediateUnitState.

Definition at line 255 of file LongImmediateUnitState.cc.

255  {
256  Application::abortWithError("immediateRegister()");
257  return *(new LongImmediateRegisterState(NULL, 0, 0, false));
258 }

References abortWithError.

◆ immediateRegisterCount()

int NullLongImmediateUnitState::immediateRegisterCount ( ) const
virtual

Aborts the program with error message.

Returns
Never returns.

Reimplemented from LongImmediateUnitState.

Definition at line 266 of file LongImmediateUnitState.cc.

266  {
267  Application::abortWithError("immediateRegisterCount()");
268  return 0;
269 }

References abortWithError.

◆ instance()

NullLongImmediateUnitState & NullLongImmediateUnitState::instance ( )
static

Returns NullLongImmediateUnitState instance.

Returns
NullLongImmediateUnitState instance.

Definition at line 191 of file LongImmediateUnitState.cc.

191  {
192  if (instance_ == NULL) {
194  }
195  return *instance_;
196 }

References instance_, and NullLongImmediateUnitState().

Referenced by MachineState::longImmediateUnitState(), SimProgramBuilder::processInstruction(), and SimProgramBuilder::processSourceTerminal().

Here is the call graph for this function:

◆ operator=()

NullLongImmediateUnitState& NullLongImmediateUnitState::operator= ( const NullLongImmediateUnitState )
private

Assignment not allowed.

◆ registerValue()

SimValue & NullLongImmediateUnitState::registerValue ( int  index)
virtual

Aborts the program with error message.

Returns
Never returns.
Exceptions
OutOfRangeNever throws.

Reimplemented from LongImmediateUnitState.

Definition at line 218 of file LongImmediateUnitState.cc.

218  {
219  Application::abortWithError("registerValue()");
220  return NullSimValue::instance();
221 }

References abortWithError, and NullSimValue::instance().

Here is the call graph for this function:

◆ setRegisterValue()

void NullLongImmediateUnitState::setRegisterValue ( int  index,
const SimValue value 
)
virtual

Aborts the program with error message.

Exceptions
OutOfRangeNever throws.

Reimplemented from LongImmediateUnitState.

Definition at line 229 of file LongImmediateUnitState.cc.

229  {
230  Application::abortWithError("setRegisterValue()");
231 }

References abortWithError.

Member Data Documentation

◆ instance_

NullLongImmediateUnitState * NullLongImmediateUnitState::instance_ = NULL
staticprivate

Unique instance of NullLongImmediateUnitState.

Definition at line 151 of file LongImmediateUnitState.hh.

Referenced by instance().


The documentation for this class was generated from the following files:
LongImmediateUnitState::LongImmediateUnitState
LongImmediateUnitState(int size, int latency, const std::string &name, int width, bool signExtend)
Definition: LongImmediateUnitState.cc:58
NullSimValue::instance
static SimValue & instance()
Definition: SimValue.cc:1642
NullLongImmediateUnitState::NullLongImmediateUnitState
NullLongImmediateUnitState()
Definition: LongImmediateUnitState.cc:201
LongImmediateRegisterState
Definition: LongImmediateRegisterState.hh:47
abortWithError
#define abortWithError(message)
Definition: Application.hh:72
NullLongImmediateUnitState::instance_
static NullLongImmediateUnitState * instance_
Unique instance of NullLongImmediateUnitState.
Definition: LongImmediateUnitState.hh:151