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

#include <BusState.hh>

Inheritance diagram for BusState:
Inheritance graph
Collaboration diagram for BusState:
Collaboration graph

Public Member Functions

 BusState (int width)
 
virtual ~BusState ()
 
virtual void setValue (const SimValue &value)
 
void setValueInlined (const SimValue &value)
 
void clear ()
 
void setSquashed (bool isSquashed)
 
bool isSquashed () const
 
int width () const
 
- Public Member Functions inherited from RegisterState
 RegisterState (int width, bool constantZero=false)
 
 RegisterState (SimValue &sharedRegister)
 
virtual ~RegisterState ()
 
virtual const SimValuevalue () const
 
- 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 ()
 

Private Member Functions

 BusState (const BusState &)
 Copying not allowed. More...
 
BusStateoperator= (const BusState &)
 Assignment not allowed. More...
 

Private Attributes

std::string name_
 Name of the bus. More...
 
int width_
 Width of the bus. More...
 
bool squashed_
 True in case this bus was squashed the last time a move was executed in this bus. More...
 

Additional Inherited Members

- Protected Attributes inherited from RegisterState
SimValuevalue_
 Value of the RegisterState. More...
 

Detailed Description

Models the state of the bus.

Definition at line 48 of file BusState.hh.

Constructor & Destructor Documentation

◆ BusState() [1/2]

BusState::BusState ( int  width)

Constructor.

Parameters
widthBit width of the bus.

Definition at line 50 of file BusState.cc.

50  :
51  RegisterState(width), squashed_(false) {
52 }

◆ ~BusState()

BusState::~BusState ( )
virtual

Destructor.

Definition at line 57 of file BusState.cc.

57  {
58 }

◆ BusState() [2/2]

BusState::BusState ( const BusState )
private

Copying not allowed.

Member Function Documentation

◆ clear()

void BusState::clear ( )

◆ isSquashed()

bool BusState::isSquashed ( ) const

Returns true if the last executed move scheduled to this bus was squashed.

Parameters
isSquashedTrue in case this bus was squashed.

Definition at line 88 of file BusState.cc.

88  {
89  return squashed_;
90 }

References squashed_.

Referenced by BusTracker::handleEvent(), and setSquashed().

◆ operator=()

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

Assignment not allowed.

◆ setSquashed()

void BusState::setSquashed ( bool  isSquashed)

Sets whether the last executed move scheduled to this bus was squashed.

Parameters
isSquashedTrue in case this bus was squashed.

Definition at line 78 of file BusState.cc.

78  {
80 }

References isSquashed(), and squashed_.

Referenced by ExecutableMove::evaluateGuard().

Here is the call graph for this function:

◆ setValue()

void BusState::setValue ( const SimValue value)
virtual

Sets the value of the bus.

Does not extend the value.

Parameters
valueNew value.

Reimplemented from RegisterState.

Reimplemented in NullBusState.

Definition at line 68 of file BusState.cc.

68  {
70 }

References RegisterState::setValue(), and RegisterState::value().

Here is the call graph for this function:

◆ setValueInlined()

void BusState::setValueInlined ( const SimValue value)

◆ width()

int BusState::width ( ) const

Returns width of the modeled bus.

Definition at line 96 of file BusState.cc.

96  {
97  return value().width();
98 }

References RegisterState::value(), and SimValue::width().

Referenced by BusTracker::handleEvent().

Here is the call graph for this function:

Member Data Documentation

◆ name_

std::string BusState::name_
private

Name of the bus.

Definition at line 70 of file BusState.hh.

◆ squashed_

bool BusState::squashed_
private

True in case this bus was squashed the last time a move was executed in this bus.

Definition at line 75 of file BusState.hh.

Referenced by isSquashed(), and setSquashed().

◆ width_

int BusState::width_
private

Width of the bus.

Definition at line 72 of file BusState.hh.


The documentation for this class was generated from the following files:
BusState::width
int width() const
Definition: BusState.cc:96
BusState::isSquashed
bool isSquashed() const
Definition: BusState.cc:88
RegisterState::RegisterState
RegisterState(int width, bool constantZero=false)
Definition: RegisterState.cc:50
RegisterState::value
virtual const SimValue & value() const
Definition: RegisterState.cc:92
BusState::squashed_
bool squashed_
True in case this bus was squashed the last time a move was executed in this bus.
Definition: BusState.hh:75
SimValue::width
int width() const
Definition: SimValue.cc:103
RegisterState::setValue
virtual void setValue(const SimValue &value)
Definition: RegisterState.cc:80