yosys-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RTLIL::CaseRule Struct Reference

#include <rtlil.h>

Public Member Functions

 ~CaseRule ()
 
void optimize ()
 
template<typename T >
void rewrite_sigspecs (T functor)
 
RTLIL::CaseRuleclone () const
 

Data Fields

std::vector< RTLIL::SigSpeccompare
 
std::vector< RTLIL::SigSigactions
 
std::vector< RTLIL::SwitchRule * > switches
 

Detailed Description

Definition at line 1117 of file rtlil.h.

Constructor & Destructor Documentation

RTLIL::CaseRule::~CaseRule ( )

Definition at line 3105 of file rtlil.cc.

3106 {
3107  for (auto it = switches.begin(); it != switches.end(); it++)
3108  delete *it;
3109 }
std::vector< RTLIL::SwitchRule * > switches
Definition: rtlil.h:1121

Member Function Documentation

RTLIL::CaseRule * RTLIL::CaseRule::clone ( ) const

Definition at line 3111 of file rtlil.cc.

3112 {
3113  RTLIL::CaseRule *new_caserule = new RTLIL::CaseRule;
3114  new_caserule->compare = compare;
3115  new_caserule->actions = actions;
3116  for (auto &it : switches)
3117  new_caserule->switches.push_back(it->clone());
3118  return new_caserule;
3119 }
std::vector< RTLIL::SigSpec > compare
Definition: rtlil.h:1119
std::vector< RTLIL::SigSig > actions
Definition: rtlil.h:1120
std::vector< RTLIL::SwitchRule * > switches
Definition: rtlil.h:1121

+ Here is the caller graph for this function:

void RTLIL::CaseRule::optimize ( )
template<typename T >
void RTLIL::CaseRule::rewrite_sigspecs ( functor)

Definition at line 1185 of file rtlil.h.

1185  {
1186  for (auto &it : compare)
1187  functor(it);
1188  for (auto &it : actions) {
1189  functor(it.first);
1190  functor(it.second);
1191  }
1192  for (auto it : switches)
1193  it->rewrite_sigspecs(functor);
1194 }
std::vector< RTLIL::SigSpec > compare
Definition: rtlil.h:1119
std::vector< RTLIL::SigSig > actions
Definition: rtlil.h:1120
std::vector< RTLIL::SwitchRule * > switches
Definition: rtlil.h:1121

Field Documentation

std::vector<RTLIL::SigSig> RTLIL::CaseRule::actions

Definition at line 1120 of file rtlil.h.

std::vector<RTLIL::SigSpec> RTLIL::CaseRule::compare

Definition at line 1119 of file rtlil.h.

std::vector<RTLIL::SwitchRule*> RTLIL::CaseRule::switches

Definition at line 1121 of file rtlil.h.


The documentation for this struct was generated from the following files: