OpenASIP  2.0
Public Member Functions | List of all members
HDLGenerator::Behaviour Class Reference

#include <HDLGenerator.hh>

Inheritance diagram for HDLGenerator::Behaviour:
Inheritance graph
Collaboration diagram for HDLGenerator::Behaviour:
Collaboration graph

Public Member Functions

 Behaviour ()
 
virtual ~Behaviour ()=default
 
Behaviouroperator<< (Synchronous &rhs)
 
Behaviouroperator<< (Asynchronous &rhs)
 
Behaviouroperator<< (Synchronous &&rhs)
 
Behaviouroperator<< (NewLine &rhs)
 
Behaviouroperator<< (NewLine &&rhs)
 
Behaviouroperator<< (Assign &assignment)
 
Behaviouroperator<< (Assign &&assignment)
 
void behaviour (std::ostream &stream, Language lang, int level)
 
- Public Member Functions inherited from HDLGenerator::Generatable
 Generatable (std::string name)
 
virtual ~Generatable ()=default
 
virtual void build ()
 
virtual void reads (const std::string &var)
 
virtual void reads (const LHSValue &var)
 
virtual void writes (const std::string &var)
 
virtual RegistergetRegister (const std::string &var)
 
virtual bool hasOption (const std::string &var)
 
virtual bool isRegister (const std::string &name)
 
virtual bool isVariable (const std::string &name)
 
virtual bool isConstant (const std::string &name)
 
virtual Width width (const std::string &name)
 
int integerWidth (const std::string &name)
 
virtual WireType wireType (const std::string &name)
 
virtual Width width ()
 
virtual WireType wireType () const
 
virtual void hdl (std::ostream &stream, Language lang, int indent)
 
virtual void hdl (std::ostream &stream, Language lang)
 
virtual void implementAll (std::ostream &stream, Language lang)
 
virtual void implementAll (std::ostream &stream, Language lang, int indent)
 
template<typename Func >
void forAll (Func func)
 
template<typename Type , typename Func >
void forAll (Func func)
 
template<class Type >
bool parentIs ()
 
template<class Type >
Type * parentType ()
 
void pushComponent (std::shared_ptr< Generatable > c)
 
template<class Component >
void addComponent (Component c)
 
const std::string & name () const noexcept
 
void setParent (Generatable *parent) noexcept
 
Generatableparent () const noexcept
 

Detailed Description

Wrapper for behavioral code constructs.

Definition at line 1110 of file HDLGenerator.hh.

Constructor & Destructor Documentation

◆ Behaviour()

HDLGenerator::Behaviour::Behaviour ( )
inline

Definition at line 1112 of file HDLGenerator.hh.

1112 : Generatable("behaviour") {}

◆ ~Behaviour()

virtual HDLGenerator::Behaviour::~Behaviour ( )
virtualdefault

Member Function Documentation

◆ behaviour()

void HDLGenerator::Behaviour::behaviour ( std::ostream &  stream,
Language  lang,
int  level 
)
inline

Definition at line 1150 of file HDLGenerator.hh.

1151  {
1152  forAll([&](std::shared_ptr<Generatable> c) {
1153  c->hdl(stream, lang, level);
1154  });
1155  }

References HDLGenerator::Generatable::forAll().

Here is the call graph for this function:

◆ operator<<() [1/7]

Behaviour& HDLGenerator::Behaviour::operator<< ( Assign &&  assignment)
inline

Definition at line 1145 of file HDLGenerator.hh.

1145  {
1146  addComponent(assignment);
1147  return *this;
1148  }

References HDLGenerator::Generatable::addComponent().

Here is the call graph for this function:

◆ operator<<() [2/7]

Behaviour& HDLGenerator::Behaviour::operator<< ( Assign assignment)
inline

Definition at line 1140 of file HDLGenerator.hh.

1140  {
1141  addComponent(assignment);
1142  return *this;
1143  }

References HDLGenerator::Generatable::addComponent().

Here is the call graph for this function:

◆ operator<<() [3/7]

Behaviour& HDLGenerator::Behaviour::operator<< ( Asynchronous rhs)
inline

Definition at line 1120 of file HDLGenerator.hh.

1120  {
1121  addComponent(std::forward<Asynchronous>(rhs));
1122  return *this;
1123  }

References HDLGenerator::Generatable::addComponent().

Here is the call graph for this function:

◆ operator<<() [4/7]

Behaviour& HDLGenerator::Behaviour::operator<< ( NewLine &&  rhs)
inline

Definition at line 1135 of file HDLGenerator.hh.

1135  {
1136  addComponent(rhs);
1137  return *this;
1138  }

References HDLGenerator::Generatable::addComponent().

Here is the call graph for this function:

◆ operator<<() [5/7]

Behaviour& HDLGenerator::Behaviour::operator<< ( NewLine rhs)
inline

Definition at line 1130 of file HDLGenerator.hh.

1130  {
1131  addComponent(rhs);
1132  return *this;
1133  }

References HDLGenerator::Generatable::addComponent().

Here is the call graph for this function:

◆ operator<<() [6/7]

Behaviour& HDLGenerator::Behaviour::operator<< ( Synchronous &&  rhs)
inline

Definition at line 1125 of file HDLGenerator.hh.

1125  {
1126  addComponent(rhs);
1127  return *this;
1128  }

References HDLGenerator::Generatable::addComponent().

Here is the call graph for this function:

◆ operator<<() [7/7]

Behaviour& HDLGenerator::Behaviour::operator<< ( Synchronous rhs)
inline

Definition at line 1115 of file HDLGenerator.hh.

1115  {
1116  addComponent(std::forward<Synchronous>(rhs));
1117  return *this;
1118  }

References HDLGenerator::Generatable::addComponent().

Here is the call graph for this function:

The documentation for this class was generated from the following file:
HDLGenerator::Generatable::addComponent
void addComponent(Component c)
Definition: Generatable.hh:235
HDLGenerator::Generatable::forAll
void forAll(Func func)
Definition: Generatable.hh:195
HDLGenerator::Generatable::Generatable
Generatable(std::string name)
Definition: Generatable.hh:53