OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
HDLGenerator::DefaultCase Class Reference

#include <HDLGenerator.hh>

Inheritance diagram for HDLGenerator::DefaultCase:
Inheritance graph
Collaboration diagram for HDLGenerator::DefaultCase:
Collaboration graph

Public Member Functions

 DefaultCase ()
 
DefaultCaseoperator<< (DefaultAssign &&rhs)
 
DefaultCaseoperator<< (DefaultAssign &rhs)
 
void hdl (std::ostream &stream, Language lang, int level) override
 
- 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)
 
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

When others/default.

Definition at line 615 of file HDLGenerator.hh.

Constructor & Destructor Documentation

◆ DefaultCase()

HDLGenerator::DefaultCase::DefaultCase ( )
inline

Definition at line 617 of file HDLGenerator.hh.

617: Generatable("defaultCase") {}
Generatable(std::string name)

Member Function Documentation

◆ hdl()

void HDLGenerator::DefaultCase::hdl ( std::ostream &  stream,
Language  lang,
int  level 
)
inlineoverridevirtual

Reimplemented from HDLGenerator::Generatable.

Definition at line 629 of file HDLGenerator.hh.

629 {
630 if (lang == Language::VHDL) {
631 stream << StringTools::indent(level) << "when others =>\n";
632 implementAll(stream, lang, level);
633 } else if (lang == Language::Verilog) {
634 stream << StringTools::indent(level) << "default: begin\n";
635 implementAll(stream, lang, level);
636 stream << StringTools::indent(level) << "end\n";
637 } else {
638 throw std::runtime_error(__PRETTY_FUNCTION__);
639 }
640 }
virtual void implementAll(std::ostream &stream, Language lang)
static std::string indent(int level)

References HDLGenerator::Generatable::implementAll(), StringTools::indent(), HDLGenerator::Verilog, and HDLGenerator::VHDL.

Here is the call graph for this function:

◆ operator<<() [1/2]

DefaultCase & HDLGenerator::DefaultCase::operator<< ( DefaultAssign &&  rhs)
inline

Definition at line 619 of file HDLGenerator.hh.

619 {
620 addComponent(rhs);
621 return *this;
622 }
void addComponent(Component c)

References HDLGenerator::Generatable::addComponent().

Here is the call graph for this function:

◆ operator<<() [2/2]

DefaultCase & HDLGenerator::DefaultCase::operator<< ( DefaultAssign rhs)
inline

Definition at line 624 of file HDLGenerator.hh.

624 {
625 addComponent(rhs);
626 return *this;
627 }

References HDLGenerator::Generatable::addComponent().

Here is the call graph for this function:

The documentation for this class was generated from the following file: