|
| Assign (std::string var, LHSValue value) |
|
| Assign (std::string var, LHSValue value, int idx) |
|
| Assign (std::string var, LHSValue value, int ub, int lb) |
|
void | build () override |
|
void | hdl (std::ostream &stream, Language lang, int level) override |
|
| SequentialStatement (std::string name) |
|
| Generatable (std::string name) |
|
virtual | ~Generatable ()=default |
|
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) |
|
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 |
|
Assignment.
Definition at line 539 of file HDLGenerator.hh.
void HDLGenerator::Assign::hdl |
( |
std::ostream & |
stream, |
|
|
Language |
lang, |
|
|
int |
level |
|
) |
| |
|
inlineoverridevirtual |
Reimplemented from HDLGenerator::SequentialStatement.
Definition at line 557 of file HDLGenerator.hh.
559 throw std::runtime_error(
560 "assigning to register '" +
name() +
561 "' is only allowed in synchronous context");
563 !parentIs<Asynchronous>())) {
564 throw std::runtime_error(
"Not allowed to assign to '" +
565 name() +
"' in this context.");
573 stream <<
"(" <<
index_ <<
")";
581 if (!(parentIs<Synchronous>() || parentIs<Asynchronous>())) {
590 stream <<
"[" <<
index_ <<
"]";
598 throw std::runtime_error(__PRETTY_FUNCTION__);
References HDLGenerator::LHSValue::hdl(), StringTools::indent(), index_, HDLGenerator::Generatable::isRegister(), HDLGenerator::Generatable::isVariable(), lowerBound_, HDLGenerator::Generatable::name(), upperBound_, value_, HDLGenerator::Verilog, and HDLGenerator::VHDL.