OpenASIP
2.0
|
#include <Generatable.hh>
Public Member Functions | |
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 Register & | getRegister (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 |
Generatable * | parent () const noexcept |
Private Attributes | |
std::string | name_ |
Generatable * | parent_ |
std::vector< std::shared_ptr< Generatable > > | components_ |
Base class for all generatable classes.
Definition at line 51 of file Generatable.hh.
|
inline |
Definition at line 53 of file Generatable.hh.
|
virtualdefault |
|
inline |
Definition at line 235 of file Generatable.hh.
References components_.
Referenced by HDLGenerator::Switch::addCase(), HDLGenerator::DefaultCase::operator<<(), and HDLGenerator::Behaviour::operator<<().
|
inlinevirtual |
Reimplemented in HDLGenerator::Synchronous, HDLGenerator::Asynchronous, HDLGenerator::If, HDLGenerator::Switch, HDLGenerator::Assign, HDLGenerator::HDLOperation, and HDLGenerator::Module.
Definition at line 56 of file Generatable.hh.
References forAll().
Referenced by HDLGenerator::HDLOperation::build(), HDLGenerator::Assign::build(), HDLGenerator::Switch::build(), HDLGenerator::If::build(), HDLGenerator::Asynchronous::build(), and HDLGenerator::Synchronous::build().
|
inline |
Definition at line 195 of file Generatable.hh.
References components_.
Referenced by HDLGenerator::Behaviour::behaviour(), build(), and implementAll().
|
inline |
|
inlinevirtual |
Reimplemented in HDLGenerator::Module.
Definition at line 89 of file Generatable.hh.
References getRegister(), name(), and parent().
Referenced by getRegister(), HDLGenerator::Synchronous::hdl(), and HDLGenerator::Synchronous::vhdlReset().
|
inlinevirtual |
Reimplemented in HDLGenerator::Module.
Definition at line 98 of file Generatable.hh.
References hasOption(), name(), and parent().
Referenced by hasOption(), HDLGenerator::Synchronous::hdl(), and HDLGenerator::Synchronous::vhdlReset().
|
inlinevirtual |
Definition at line 178 of file Generatable.hh.
References name().
|
inlinevirtual |
Reimplemented in HDLGenerator::Synchronous, HDLGenerator::Asynchronous, HDLGenerator::CodeBlock, HDLGenerator::If, HDLGenerator::Switch, HDLGenerator::Case, HDLGenerator::DefaultCase, HDLGenerator::Assign, HDLGenerator::DefaultAssign, HDLGenerator::HDLOperation, HDLGenerator::NewLine, HDLGenerator::RawCodeLine, and HDLGenerator::SequentialStatement.
Definition at line 170 of file Generatable.hh.
References name_.
|
inlinevirtual |
Definition at line 183 of file Generatable.hh.
References forAll().
Referenced by HDLGenerator::DefaultCase::hdl(), HDLGenerator::Case::hdl(), HDLGenerator::Switch::hdl(), HDLGenerator::CodeBlock::hdl(), HDLGenerator::Asynchronous::hdl(), and HDLGenerator::Synchronous::hdl().
|
inlinevirtual |
Definition at line 189 of file Generatable.hh.
References forAll().
|
inline |
Definition at line 143 of file Generatable.hh.
References HDLGenerator::Width::intWidth, name(), name_, and width().
|
inlinevirtual |
Reimplemented in HDLGenerator::Module.
Definition at line 125 of file Generatable.hh.
References isConstant(), name(), name_, and parent().
Referenced by HDLGenerator::Asynchronous::hdl(), and isConstant().
|
inlinevirtual |
Reimplemented in HDLGenerator::Module.
Definition at line 107 of file Generatable.hh.
References isRegister(), name(), name_, and parent().
Referenced by HDLGenerator::Synchronous::build(), HDLGenerator::Assign::hdl(), isRegister(), and HDLGenerator::Synchronous::writes().
|
inlinevirtual |
Reimplemented in HDLGenerator::Module.
Definition at line 116 of file Generatable.hh.
References isVariable(), name(), name_, and parent().
Referenced by HDLGenerator::DefaultAssign::hdl(), HDLGenerator::Assign::hdl(), isVariable(), and HDLGenerator::Synchronous::writes().
|
inlinenoexcept |
Definition at line 239 of file Generatable.hh.
References name_.
Referenced by HDLGenerator::Assign::build(), HDLGenerator::Parameter::declare(), HDLGenerator::BinaryConstant::declare(), HDLGenerator::IntegerConstant::declare(), HDLGenerator::Wire::declare(), HDLGenerator::Variable::declare(), HDLGenerator::Module::declare(), getRegister(), hasOption(), hdl(), HDLGenerator::DefaultAssign::hdl(), HDLGenerator::Assign::hdl(), HDLGenerator::Asynchronous::hdl(), HDLGenerator::Synchronous::hdl(), HDLGenerator::Module::implement(), HDLGenerator::Module::instantiate(), integerWidth(), isConstant(), HDLGenerator::Module::isConstant(), isRegister(), HDLGenerator::Module::isRegister(), isVariable(), HDLGenerator::Module::isVariable(), HDLGenerator::Module::Module(), reads(), width(), HDLGenerator::Parameter::width(), HDLGenerator::BinaryConstant::width(), HDLGenerator::IntegerConstant::width(), HDLGenerator::Module::width(), wireType(), HDLGenerator::Module::wireType(), and writes().
|
inlinenoexcept |
Definition at line 242 of file Generatable.hh.
References parent_.
Referenced by getRegister(), hasOption(), isConstant(), isRegister(), isVariable(), parentIs(), parentType(), reads(), HDLGenerator::Asynchronous::reads(), setParent(), width(), wireType(), and writes().
|
inline |
Definition at line 209 of file Generatable.hh.
References parent(), and parentIs().
Referenced by parentIs().
|
inline |
Definition at line 219 of file Generatable.hh.
References parent(), and parentType().
Referenced by parentType().
|
inline |
Definition at line 230 of file Generatable.hh.
References components_.
Referenced by HDLGenerator::CodeBlock::append(), HDLGenerator::Case::operator<<(), HDLGenerator::Asynchronous::operator<<(), and HDLGenerator::Synchronous::operator<<().
|
inlinevirtual |
Definition at line 72 of file Generatable.hh.
References reads(), and HDLGenerator::LHSValue::writeSignals().
|
inlinevirtual |
Reimplemented in HDLGenerator::Asynchronous, and HDLGenerator::Module.
Definition at line 63 of file Generatable.hh.
References name(), parent(), and reads().
Referenced by HDLGenerator::HDLOperation::build(), HDLGenerator::Assign::build(), HDLGenerator::Switch::build(), HDLGenerator::If::build(), reads(), and HDLGenerator::Asynchronous::reads().
|
inlinenoexcept |
|
inlinevirtual |
Reimplemented in HDLGenerator::Variable, HDLGenerator::Wire, HDLGenerator::IntegerConstant, HDLGenerator::BinaryConstant, and HDLGenerator::Parameter.
Definition at line 162 of file Generatable.hh.
Referenced by HDLGenerator::DefaultAssign::hdl(), and integerWidth().
|
inlinevirtual |
Reimplemented in HDLGenerator::Module.
Definition at line 134 of file Generatable.hh.
References name(), name_, parent(), and width().
Referenced by FUGen::createOutputPipeline(), and width().
|
inlinevirtual |
Reimplemented in HDLGenerator::Wire.
Definition at line 166 of file Generatable.hh.
Referenced by HDLGenerator::DefaultAssign::hdl().
|
inlinevirtual |
Reimplemented in HDLGenerator::Module.
Definition at line 153 of file Generatable.hh.
References name(), name_, parent(), and wireType().
Referenced by wireType().
|
inlinevirtual |
Reimplemented in HDLGenerator::Synchronous, and HDLGenerator::Module.
Definition at line 80 of file Generatable.hh.
References name(), parent(), and writes().
Referenced by HDLGenerator::Assign::build(), and writes().
|
private |
Definition at line 247 of file Generatable.hh.
Referenced by addComponent(), forAll(), and pushComponent().
|
private |
Definition at line 245 of file Generatable.hh.
Referenced by hdl(), integerWidth(), isConstant(), isRegister(), isVariable(), name(), width(), and wireType().
|
private |
Definition at line 246 of file Generatable.hh.
Referenced by parent(), and setParent().