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

#include <PortState.hh>

Inheritance diagram for NullPortState:
Inheritance graph
Collaboration diagram for NullPortState:
Collaboration graph

Public Member Functions

virtual ~NullPortState ()
 
virtual void setValue (const SimValue &value)
 
virtual const SimValuevalue () const
 
virtual FUStateparent () const
 
- Public Member Functions inherited from PortState
 PortState (FUState &parent, int width)
 
 PortState (FUState &parent, SimValue &sharedRegister)
 
virtual ~PortState ()
 
- Public Member Functions inherited from RegisterState
 RegisterState (int width, bool constantZero=false)
 
 RegisterState (SimValue &sharedRegister)
 
virtual ~RegisterState ()
 
- Public Member Functions inherited from StateData
 StateData ()
 
virtual ~StateData ()
 
- Public Member Functions inherited from WritableState
 WritableState ()
 
virtual ~WritableState ()
 
- Public Member Functions inherited from ReadableState
 ReadableState ()
 
virtual ~ReadableState ()
 

Static Public Member Functions

static NullPortStateinstance ()
 

Private Member Functions

 NullPortState ()
 
 NullPortState (const NullPortState &)
 Copying not allowed. More...
 
NullPortStateoperator= (const NullPortState &)
 Assignment not allowed. More...
 

Static Private Attributes

static NullPortStateinstance_ = NULL
 Unique instance of NullPortState class. More...
 

Additional Inherited Members

- Protected Attributes inherited from PortState
FUStateparent_
 Parent of the port. More...
 
- Protected Attributes inherited from RegisterState
SimValuevalue_
 Value of the RegisterState. More...
 

Detailed Description

Models non-existing PortState.

Definition at line 76 of file PortState.hh.

Constructor & Destructor Documentation

◆ ~NullPortState()

NullPortState::~NullPortState ( )
virtual

Destructor.

Definition at line 112 of file PortState.cc.

112  {
113 }

◆ NullPortState() [1/2]

NullPortState::NullPortState ( )
private

Constructor.

Definition at line 106 of file PortState.cc.

107 }

Referenced by instance().

◆ NullPortState() [2/2]

NullPortState::NullPortState ( const NullPortState )
private

Copying not allowed.

Member Function Documentation

◆ instance()

NullPortState & NullPortState::instance ( )
static

Returns the instance of NullPortState.

Returns
The instance of NullPortState.

Definition at line 96 of file PortState.cc.

96  {
97  if (instance_ == NULL) {
98  instance_ = new NullPortState();
99  }
100  return *instance_;
101 }

References instance_, and NullPortState().

Referenced by MachineStateBuilder::addVirtualOpcodeSettingPortsToFU(), MachineStateBuilder::buildMachineState(), SimulatorFrontend::findPort(), FUTestbenchGenerator::parseFuPorts(), MachineState::portState(), and SimProgramBuilder::processBidirTerminal().

Here is the call graph for this function:

◆ operator=()

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

Assignment not allowed.

◆ parent()

FUState & NullPortState::parent ( ) const
virtual

Aborts the program with error message.

Returns
Never returns.

Reimplemented from PortState.

Definition at line 140 of file PortState.cc.

140  {
141  Application::abortWithError("parent()");
142  return NullFUState::instance();
143 }

References abortWithError, and NullFUState::instance().

Here is the call graph for this function:

◆ setValue()

void NullPortState::setValue ( const SimValue value)
virtual

Aborts the program with error message.

Reimplemented from RegisterState.

Definition at line 119 of file PortState.cc.

119  {
120  Application::abortWithError("setValue()");
121 }

References abortWithError.

◆ value()

const SimValue & NullPortState::value ( ) const
virtual

Aborts the program with error message.

Returns
Never returns.

Reimplemented from RegisterState.

Definition at line 129 of file PortState.cc.

129  {
130  Application::abortWithError("value()");
131  return NullSimValue::instance();
132 }

References abortWithError, and NullSimValue::instance().

Here is the call graph for this function:

Member Data Documentation

◆ instance_

NullPortState * NullPortState::instance_ = NULL
staticprivate

Unique instance of NullPortState class.

Definition at line 94 of file PortState.hh.

Referenced by instance().


The documentation for this class was generated from the following files:
NullSimValue::instance
static SimValue & instance()
Definition: SimValue.cc:1642
NullPortState::NullPortState
NullPortState()
Definition: PortState.cc:106
abortWithError
#define abortWithError(message)
Definition: Application.hh:72
NullPortState::instance_
static NullPortState * instance_
Unique instance of NullPortState class.
Definition: PortState.hh:94
NullFUState::instance
static NullFUState & instance()
Definition: FUState.cc:392
PortState::PortState
PortState(FUState &parent, int width)
Definition: PortState.cc:51