yosys-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CountBitUsage Struct Reference
+ Collaboration diagram for CountBitUsage:

Public Member Functions

 CountBitUsage (SigMap &sigmap, std::map< RTLIL::SigBit, int > &cache)
 
void operator() (RTLIL::SigSpec &sig)
 

Data Fields

SigMapsigmap
 
std::map< RTLIL::SigBit, int > & cache
 

Detailed Description

Definition at line 57 of file freduce.cc.

Constructor & Destructor Documentation

CountBitUsage::CountBitUsage ( SigMap sigmap,
std::map< RTLIL::SigBit, int > &  cache 
)
inline

Definition at line 62 of file freduce.cc.

62 : sigmap(sigmap), cache(cache) { }
std::map< RTLIL::SigBit, int > & cache
Definition: freduce.cc:60
SigMap & sigmap
Definition: freduce.cc:59

Member Function Documentation

void CountBitUsage::operator() ( RTLIL::SigSpec sig)
inline

Definition at line 64 of file freduce.cc.

64  {
65  std::vector<RTLIL::SigBit> vec = sigmap(sig).to_sigbit_vector();
66  for (auto &bit : vec)
67  cache[bit]++;
68  }
std::map< RTLIL::SigBit, int > & cache
Definition: freduce.cc:60
SigMap & sigmap
Definition: freduce.cc:59

Field Documentation

std::map<RTLIL::SigBit, int>& CountBitUsage::cache

Definition at line 60 of file freduce.cc.

SigMap& CountBitUsage::sigmap

Definition at line 59 of file freduce.cc.


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