ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
giaTransduction.cpp File Reference
#include "giaTransduction.h"
#include "giaNewBdd.h"
#include "giaNewTt.h"
Include dependency graph for giaTransduction.cpp:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START Gia_Man_tGia_ManTransductionBdd (Gia_Man_t *pGia, int nType, int fMspf, int nRandom, int nSortType, int nPiShuffle, int nParameter, int fLevel, Gia_Man_t *pExdc, int fNewLine, int nVerbose)
 
Gia_Man_tGia_ManTransductionTt (Gia_Man_t *pGia, int nType, int fMspf, int nRandom, int nSortType, int nPiShuffle, int nParameter, int fLevel, Gia_Man_t *pExdc, int fNewLine, int nVerbose)
 

Function Documentation

◆ Gia_ManTransductionBdd()

ABC_NAMESPACE_IMPL_START Gia_Man_t * Gia_ManTransductionBdd ( Gia_Man_t * pGia,
int nType,
int fMspf,
int nRandom,
int nSortType,
int nPiShuffle,
int nParameter,
int fLevel,
Gia_Man_t * pExdc,
int fNewLine,
int nVerbose )

CFile****************************************************************

FileName [giaTransduction.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Scalable AIG package.]

Synopsis [Implementation of transduction method.]

Author [Yukio Miyasaka]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - May 2023.]

Revision [

Id
giaTransduction.c,v 1.00 2023/05/10 00:00:00 Exp

]

Definition at line 35 of file giaTransduction.cpp.

35 {
36 if(nRandom) {
37 srand(nRandom);
38 nSortType = rand() % 4;
39 nPiShuffle = rand();
40 nParameter = rand() % 16;
41 }
43 Transduction::Transduction<NewBdd::Man, NewBdd::Param, NewBdd::lit, 0xffffffff> t(pGia, nVerbose, fNewLine, nSortType, nPiShuffle, fLevel, pExdc, p);
44 int count = t.CountWires();
45 switch(nType) {
46 case 0:
47 count -= fMspf? t.Mspf(): t.Cspf();
48 break;
49 case 1:
50 count -= t.Resub(fMspf);
51 break;
52 case 2:
53 count -= t.ResubMono(fMspf);
54 break;
55 case 3:
56 count -= t.ResubShared(fMspf);
57 break;
58 case 4:
59 count -= t.RepeatResub(false, fMspf);
60 break;
61 case 5:
62 count -= t.RepeatResub(true, fMspf);
63 break;
64 case 6: {
65 bool fInner = (nParameter / 4) % 2;
66 count -= t.RepeatInner(fMspf, fInner);
67 break;
68 }
69 case 7: {
70 bool fInner = (nParameter / 4) % 2;
71 bool fOuter = (nParameter / 8) % 2;
72 count -= t.RepeatOuter(fMspf, fInner, fOuter);
73 break;
74 }
75 case 8: {
76 bool fFirstMerge = nParameter % 2;
77 bool fMspfMerge = fMspf? (nParameter / 2) % 2: false;
78 bool fInner = (nParameter / 4) % 2;
79 bool fOuter = (nParameter / 8) % 2;
80 count -= t.RepeatAll(fFirstMerge, fMspfMerge, fMspf, fInner, fOuter);
81 break;
82 }
83 default:
84 std::cout << "Unknown transduction type " << nType << std::endl;
85 }
86 assert(t.Verify());
87 assert(count == t.CountWires());
88 return t.GenerateAig();
89}
Cube * p
Definition exorList.c:222
#define false
Definition place_base.h:29
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManTransductionTt()

Gia_Man_t * Gia_ManTransductionTt ( Gia_Man_t * pGia,
int nType,
int fMspf,
int nRandom,
int nSortType,
int nPiShuffle,
int nParameter,
int fLevel,
Gia_Man_t * pExdc,
int fNewLine,
int nVerbose )

Definition at line 91 of file giaTransduction.cpp.

91 {
92 if(nRandom) {
93 srand(nRandom);
94 nSortType = rand() % 4;
95 nPiShuffle = rand();
96 nParameter = rand() % 16;
97 }
99 Transduction::Transduction<NewTt::Man, NewTt::Param, NewTt::lit, 0xffffffff> t(pGia, nVerbose, fNewLine, nSortType, nPiShuffle, fLevel, pExdc, p);
100 int count = t.CountWires();
101 switch(nType) {
102 case 0:
103 count -= fMspf? t.Mspf(): t.Cspf();
104 break;
105 case 1:
106 count -= t.Resub(fMspf);
107 break;
108 case 2:
109 count -= t.ResubMono(fMspf);
110 break;
111 case 3:
112 count -= t.ResubShared(fMspf);
113 break;
114 case 4:
115 count -= t.RepeatResub(false, fMspf);
116 break;
117 case 5:
118 count -= t.RepeatResub(true, fMspf);
119 break;
120 case 6: {
121 bool fInner = (nParameter / 4) % 2;
122 count -= t.RepeatInner(fMspf, fInner);
123 break;
124 }
125 case 7: {
126 bool fInner = (nParameter / 4) % 2;
127 bool fOuter = (nParameter / 8) % 2;
128 count -= t.RepeatOuter(fMspf, fInner, fOuter);
129 break;
130 }
131 case 8: {
132 bool fFirstMerge = nParameter % 2;
133 bool fMspfMerge = fMspf? (nParameter / 2) % 2: false;
134 bool fInner = (nParameter / 4) % 2;
135 bool fOuter = (nParameter / 8) % 2;
136 count -= t.RepeatAll(fFirstMerge, fMspfMerge, fMspf, fInner, fOuter);
137 break;
138 }
139 default:
140 std::cout << "Unknown transduction type " << nType << std::endl;
141 }
142 assert(t.Verify());
143 assert(count == t.CountWires());
144 return t.GenerateAig();
145}
Here is the call graph for this function:
Here is the caller graph for this function: