ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
Ttopt::TruthTableLevelTSM Class Reference
Inheritance diagram for Ttopt::TruthTableLevelTSM:
Collaboration diagram for Ttopt::TruthTableLevelTSM:

Public Member Functions

 TruthTableLevelTSM (int nInputs, int nOutputs)
 
int BDDFindTSM (int index, int lev)
 
int BDDBuildOne (int index, int lev)
 
int BDDBuild ()
 
void BDDRebuildByMerge (int lev)
 
int BDDRebuild (int lev)
 
- Public Member Functions inherited from Ttopt::TruthTableCare
 TruthTableCare (int nInputs, int nOutputs)
 
void Save (unsigned i)
 
void Load (unsigned i)
 
void SaveIndices (unsigned i)
 
void LoadIndices (unsigned i)
 
void Swap (int lev)
 
void RestoreCare ()
 
word GetCare (int index_lev, int lev)
 
void CopyFuncMasked (int index1, int index2, int lev, bool fCompl)
 
bool IsDC (int index, int lev)
 
int Include (int index1, int index2, int lev, bool fCompl)
 
int Intersect (int index1, int index2, int lev, bool fCompl, bool fEq=true)
 
void MergeCare (int index1, int index2, int lev)
 
void Merge (int index1, int index2, int lev, bool fCompl)
 
void CompleteMerge ()
 
void BDDBuildStartup ()
 
int BDDSwap (int lev)
 
void OptimizationStartup ()
 
virtual void Optimize ()
 
- Public Member Functions inherited from Ttopt::TruthTableRewrite
 TruthTableRewrite (int nInputs, int nOutputs)
 
void SetValue (int index_lev, int lev, word value)
 
void CopyFunc (int index1, int index2, int lev, bool fCompl)
 
void ShiftToMajority (int index, int lev)
 
- Public Member Functions inherited from Ttopt::TruthTable
 TruthTable (int nInputs, int nOutputs)
 
word GetValue (int index_lev, int lev)
 
int IsEq (int index1, int index2, int lev, bool fCompl=false)
 
bool Imply (int index1, int index2, int lev)
 
int BDDNodeCountLevel (int lev)
 
int BDDNodeCount ()
 
int BDDFind (int index, int lev)
 
virtual void BDDBuildLevel (int lev)
 
void SwapIndex (int &index, int d)
 
int SiftReo ()
 
void Reo (std::vector< int > vLevelsNew)
 
int RandomSiftReo (int nRound)
 
int BDDGenerateAigRec (Gia_Man_t *pNew, std::vector< int > const &vInputs, std::vector< std::vector< int > > &vvNodes, int index, int lev)
 
virtual void BDDGenerateAig (Gia_Man_t *pNew, Vec_Int_t *vSupp)
 

Additional Inherited Members

- Public Types inherited from Ttopt::TruthTable
typedef std::bitset< 64 > bsw
 
- Public Attributes inherited from Ttopt::TruthTableCare
std::vector< wordoriginalt
 
std::vector< wordcaret
 
std::vector< wordcare
 
std::vector< std::vector< std::pair< int, int > > > vvMergedIndices
 
std::vector< std::vector< word > > savedcare
 
std::vector< std::vector< std::vector< std::pair< int, int > > > > vvMergedIndicesSaved
 
- Public Attributes inherited from Ttopt::TruthTable
int nInputs
 
int nSize
 
int nTotalSize
 
int nOutputs
 
std::vector< wordt
 
std::vector< std::vector< int > > vvIndices
 
std::vector< std::vector< int > > vvRedundantIndices
 
std::vector< int > vLevels
 
std::vector< std::vector< word > > savedt
 
std::vector< std::vector< std::vector< int > > > vvIndicesSaved
 
std::vector< std::vector< std::vector< int > > > vvRedundantIndicesSaved
 
std::vector< std::vector< int > > vLevelsSaved
 
- Static Public Attributes inherited from Ttopt::TruthTable
static const int ww = 64
 
static const int lww = 6
 
static const word ones []
 
static const word swapmask []
 

Detailed Description

Definition at line 1009 of file giaTtopt.cpp.

Constructor & Destructor Documentation

◆ TruthTableLevelTSM()

Ttopt::TruthTableLevelTSM::TruthTableLevelTSM ( int nInputs,
int nOutputs )
inline

Definition at line 1011 of file giaTtopt.cpp.

TruthTableCare(int nInputs, int nOutputs)
Definition giaTtopt.cpp:708
Here is the call graph for this function:

Member Function Documentation

◆ BDDBuild()

int Ttopt::TruthTableLevelTSM::BDDBuild ( )
inlinevirtual

Reimplemented from Ttopt::TruthTable.

Definition at line 1082 of file giaTtopt.cpp.

1082 {
1084 int r = TruthTable::BDDBuild();
1086 return r;
1087 }
virtual int BDDBuild()
Definition giaTtopt.cpp:243
virtual void Save(unsigned i)
Definition giaTtopt.cpp:80
virtual void Load(unsigned i)
Definition giaTtopt.cpp:89
Here is the call graph for this function:

◆ BDDBuildOne()

int Ttopt::TruthTableLevelTSM::BDDBuildOne ( int index,
int lev )
inlinevirtual

Reimplemented from Ttopt::TruthTableCare.

Definition at line 1067 of file giaTtopt.cpp.

1067 {
1068 int r = BDDFindTSM(index, lev);
1069 if(r >= -2) {
1070 if(r >= 0) {
1071 CopyFuncMasked(r >> 1, index, lev, r & 1);
1072 Merge(r >> 1, index, lev, r & 1);
1073 } else {
1074 vvMergedIndices[lev].push_back(std::make_pair(r, index));
1075 }
1076 return r;
1077 }
1078 vvIndices[lev].push_back(index);
1079 return index << 1;
1080 }
void CopyFuncMasked(int index1, int index2, int lev, bool fCompl)
Definition giaTtopt.cpp:792
std::vector< std::vector< std::pair< int, int > > > vvMergedIndices
Definition giaTtopt.cpp:703
void Merge(int index1, int index2, int lev, bool fCompl)
Definition giaTtopt.cpp:901
int BDDFindTSM(int index, int lev)
std::vector< std::vector< int > > vvIndices
Definition giaTtopt.cpp:51
Here is the call graph for this function:

◆ BDDFindTSM()

int Ttopt::TruthTableLevelTSM::BDDFindTSM ( int index,
int lev )
inline

Definition at line 1013 of file giaTtopt.cpp.

1013 {
1014 int logwidth = nInputs - lev;
1015 if(logwidth > lww) {
1016 int nScopeSize = 1 << (logwidth - lww);
1017 bool fZero = true;
1018 bool fOne = true;
1019 for(int i = 0; i < nScopeSize && (fZero || fOne); i++) {
1020 word value = t[nScopeSize * index + i];
1021 word cvalue = caret[nScopeSize * index + i];
1022 fZero &= !(value & cvalue);
1023 fOne &= !(~value & cvalue);
1024 }
1025 if(fZero || fOne) {
1026 return -2 ^ (int)fOne;
1027 }
1028 for(unsigned j = 0; j < vvIndices[lev].size(); j++) {
1029 int index2 = vvIndices[lev][j];
1030 bool fEq = true;
1031 bool fCompl = true;
1032 for(int i = 0; i < nScopeSize && (fEq || fCompl); i++) {
1033 word value = t[nScopeSize * index + i] ^ t[nScopeSize * index2 + i];
1034 word cvalue = caret[nScopeSize * index + i] & caret[nScopeSize * index2 + i];
1035 fEq &= !(value & cvalue);
1036 fCompl &= !(~value & cvalue);
1037 }
1038 if(fEq || fCompl) {
1039 return (index2 << 1) ^ (int)!fEq;
1040 }
1041 }
1042 } else {
1043 word one = ones[logwidth];
1044 word value = GetValue(index, lev);
1045 word cvalue = GetCare(index, lev);
1046 if(!(value & cvalue)) {
1047 return -2;
1048 }
1049 if(!((value ^ one) & cvalue)) {
1050 return -1;
1051 }
1052 for(unsigned j = 0; j < vvIndices[lev].size(); j++) {
1053 int index2 = vvIndices[lev][j];
1054 word value2 = value ^ GetValue(index2, lev);
1055 word cvalue2 = cvalue & GetCare(index2, lev);
1056 if(!(value2 & cvalue2)) {
1057 return index2 << 1;
1058 }
1059 if(!((value2 ^ one) & cvalue2)) {
1060 return (index2 << 1) ^ 1;
1061 }
1062 }
1063 }
1064 return -3;
1065 }
ABC_NAMESPACE_IMPL_START typedef signed char value
word GetCare(int index_lev, int lev)
Definition giaTtopt.cpp:783
std::vector< word > caret
Definition giaTtopt.cpp:700
word GetValue(int index_lev, int lev)
Definition giaTtopt.cpp:109
std::vector< word > t
Definition giaTtopt.cpp:49
static const int lww
Definition giaTtopt.cpp:42
static const word ones[]
Definition giaTtopt.cpp:60
unsigned __int64 word
DECLARATIONS ///.
Definition kitPerm.c:36
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BDDRebuild()

int Ttopt::TruthTableLevelTSM::BDDRebuild ( int lev)
inlinevirtual

Reimplemented from Ttopt::TruthTableCare.

Definition at line 1099 of file giaTtopt.cpp.

1099 {
1101 int r = TruthTableCare::BDDRebuild(lev);
1103 return r;
1104 }
int BDDRebuild(int lev)
Definition giaTtopt.cpp:948
Here is the call graph for this function:

◆ BDDRebuildByMerge()

void Ttopt::TruthTableLevelTSM::BDDRebuildByMerge ( int lev)
inlinevirtual

Reimplemented from Ttopt::TruthTableCare.

Definition at line 1089 of file giaTtopt.cpp.

1089 {
1090 for(unsigned i = 0; i < vvMergedIndices[lev].size(); i++) {
1091 std::pair<int, int> &p = vvMergedIndices[lev][i];
1092 if(p.first >= 0) {
1093 CopyFuncMasked(p.first >> 1, p.second, lev, p.first & 1);
1094 MergeCare(p.first >> 1, p.second, lev);
1095 }
1096 }
1097 }
void MergeCare(int index1, int index2, int lev)
Definition giaTtopt.cpp:884
Cube * p
Definition exorList.c:222
Here is the call graph for this function:

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