Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
137a7662
Commit
137a7662
authored
Sep 07, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to the new technology mapper.
parent
23879f92
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
188 additions
and
22 deletions
+188
-22
abclib.dsp
+4
-0
src/aig/gia/gia.h
+46
-12
src/aig/gia/giaJf.c
+0
-0
src/aig/gia/giaMan.c
+6
-6
src/aig/gia/module.make
+1
-0
src/base/abci/abc.c
+123
-2
src/map/if/ifMap.c
+6
-0
src/sat/bmc/bmcBmcAnd.c
+2
-2
No files found.
abclib.dsp
View file @
137a7662
...
...
@@ -3679,6 +3679,10 @@ SOURCE=.\src\aig\gia\giaIso2.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaJf.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaMan.c
# End Source File
# Begin Source File
...
...
src/aig/gia/gia.h
View file @
137a7662
...
...
@@ -104,6 +104,7 @@ struct Gia_Man_t_
unsigned
*
pMuxes
;
// control signals of MUXes
int
nXors
;
// the number of XORs
int
nMuxes
;
// the number of MUXes
int
nBufs
;
// the number of buffers
Vec_Int_t
*
vCis
;
// the vector of CIs (PIs + LOs)
Vec_Int_t
*
vCos
;
// the vector of COs (POs + LIs)
int
*
pHTable
;
// hash table
...
...
@@ -232,6 +233,23 @@ struct Gia_ParSim_t_
int
iOutFail
;
// index of the failed output
};
typedef
struct
Jf_Par_t_
Jf_Par_t
;
struct
Jf_Par_t_
{
int
nLutSize
;
int
nCutNum
;
int
nRounds
;
int
DelayTarget
;
int
fAreaOnly
;
int
fVerbose
;
int
fVeryVerbose
;
int
nLutSizeMax
;
int
nCutNumMax
;
int
Delay
;
int
Area
;
int
Edge
;
};
static
inline
unsigned
Gia_ObjCutSign
(
unsigned
ObjId
)
{
return
(
1
<<
(
ObjId
&
31
));
}
static
inline
int
Gia_WordHasOneBit
(
unsigned
uWord
)
{
return
(
uWord
&
(
uWord
-
1
))
==
0
;
}
static
inline
int
Gia_WordHasOnePair
(
unsigned
uWord
)
{
return
Gia_WordHasOneBit
(
uWord
&
(
uWord
>>
1
)
&
0x55555555
);
}
...
...
@@ -314,6 +332,7 @@ static inline int Gia_ManObjNum( Gia_Man_t * p ) { return p->nObjs
static
inline
int
Gia_ManAndNum
(
Gia_Man_t
*
p
)
{
return
p
->
nObjs
-
Vec_IntSize
(
p
->
vCis
)
-
Vec_IntSize
(
p
->
vCos
)
-
1
;
}
static
inline
int
Gia_ManXorNum
(
Gia_Man_t
*
p
)
{
return
p
->
nXors
;
}
static
inline
int
Gia_ManMuxNum
(
Gia_Man_t
*
p
)
{
return
p
->
nMuxes
;
}
static
inline
int
Gia_ManBufNum
(
Gia_Man_t
*
p
)
{
return
p
->
nBufs
;
}
static
inline
int
Gia_ManCandNum
(
Gia_Man_t
*
p
)
{
return
Gia_ManCiNum
(
p
)
+
Gia_ManAndNum
(
p
);
}
static
inline
int
Gia_ManConstrNum
(
Gia_Man_t
*
p
)
{
return
p
->
nConstrs
;
}
static
inline
void
Gia_ManFlipVerbose
(
Gia_Man_t
*
p
)
{
p
->
fVerbose
^=
1
;
}
...
...
@@ -344,8 +363,9 @@ static inline int Gia_ObjIsCo( Gia_Obj_t * pObj ) {
static
inline
int
Gia_ObjIsAnd
(
Gia_Obj_t
*
pObj
)
{
return
!
pObj
->
fTerm
&&
pObj
->
iDiff0
!=
GIA_NONE
;
}
static
inline
int
Gia_ObjIsXor
(
Gia_Obj_t
*
pObj
)
{
return
Gia_ObjIsAnd
(
pObj
)
&&
pObj
->
iDiff0
<
pObj
->
iDiff1
;
}
static
inline
int
Gia_ObjIsMux
(
Gia_Man_t
*
p
,
int
iObj
)
{
return
p
->
pMuxes
&&
p
->
pMuxes
[
iObj
]
>
0
;
}
static
inline
int
Gia_ObjIsBuf
(
Gia_Obj_t
*
pObj
)
{
return
pObj
->
iDiff0
==
pObj
->
iDiff1
&&
pObj
->
iDiff0
!=
GIA_NONE
;
}
static
inline
int
Gia_ObjIsCand
(
Gia_Obj_t
*
pObj
)
{
return
Gia_ObjIsAnd
(
pObj
)
||
Gia_ObjIsCi
(
pObj
);
}
static
inline
int
Gia_ObjIsConst0
(
Gia_Obj_t
*
pObj
)
{
return
pObj
->
iDiff0
==
GIA_NONE
&&
pObj
->
iDiff1
==
GIA_NONE
;
}
static
inline
int
Gia_ObjIsConst0
(
Gia_Obj_t
*
pObj
)
{
return
pObj
->
iDiff0
==
GIA_NONE
&&
pObj
->
iDiff1
==
GIA_NONE
;
}
static
inline
int
Gia_ManObjIsConst0
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
return
pObj
==
p
->
pObjs
;
}
static
inline
int
Gia_Obj2Lit
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
return
Abc_Var2Lit
(
Gia_ObjId
(
p
,
Gia_Regular
(
pObj
)),
Gia_IsComplement
(
pObj
));
}
...
...
@@ -420,16 +440,18 @@ static inline void Gia_ObjSetAndLevel( Gia_Man_t * p, Gia_Obj_t * pObj )
static
inline
int
Gia_ObjNum
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
return
(
int
)(
unsigned
char
)
Vec_StrGetEntry
(
p
->
vTtNums
,
Gia_ObjId
(
p
,
pObj
));
}
static
inline
void
Gia_ObjSetNum
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
int
n
)
{
assert
(
n
>=
0
&&
n
<
254
);
Vec_StrSetEntry
(
p
->
vTtNums
,
Gia_ObjId
(
p
,
pObj
),
(
char
)
n
);
}
static
inline
int
Gia_ObjRefNumId
(
Gia_Man_t
*
p
,
int
Id
)
{
assert
(
p
->
pRefs
);
return
p
->
pRefs
[
Id
];
}
static
inline
int
Gia_ObjRefNum
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
assert
(
p
->
pRefs
);
return
p
->
pRefs
[
Gia_ObjId
(
p
,
pObj
)];
}
static
inline
int
Gia_ObjRefInc
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
assert
(
p
->
pRefs
);
return
p
->
pRefs
[
Gia_ObjId
(
p
,
pObj
)]
++
;
}
static
inline
int
Gia_ObjRefDec
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
assert
(
p
->
pRefs
);
return
--
p
->
pRefs
[
Gia_ObjId
(
p
,
pObj
)];
}
static
inline
void
Gia_ObjRefFanin0Inc
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
assert
(
p
->
pRefs
);
Gia_ObjRefInc
(
p
,
Gia_ObjFanin0
(
pObj
));
}
static
inline
void
Gia_ObjRefFanin1Inc
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
assert
(
p
->
pRefs
);
Gia_ObjRefInc
(
p
,
Gia_ObjFanin1
(
pObj
));
}
static
inline
void
Gia_ObjRefFanin2Inc
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
assert
(
p
->
pRefs
);
Gia_ObjRefInc
(
p
,
Gia_ObjFanin2
(
p
,
pObj
));
}
static
inline
void
Gia_ObjRefFanin0Dec
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
assert
(
p
->
pRefs
);
Gia_ObjRefDec
(
p
,
Gia_ObjFanin0
(
pObj
));
}
static
inline
void
Gia_ObjRefFanin1Dec
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
assert
(
p
->
pRefs
);
Gia_ObjRefDec
(
p
,
Gia_ObjFanin1
(
pObj
));
}
static
inline
void
Gia_ObjRefFanin2Dec
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
assert
(
p
->
pRefs
);
Gia_ObjRefDec
(
p
,
Gia_ObjFanin2
(
p
,
pObj
));
}
static
inline
int
Gia_ObjRefNumId
(
Gia_Man_t
*
p
,
int
Id
)
{
return
p
->
pRefs
[
Id
];
}
static
inline
int
Gia_ObjRefIncId
(
Gia_Man_t
*
p
,
int
Id
)
{
return
p
->
pRefs
[
Id
]
++
;
}
static
inline
int
Gia_ObjRefDecId
(
Gia_Man_t
*
p
,
int
Id
)
{
return
--
p
->
pRefs
[
Id
];
}
static
inline
int
Gia_ObjRefNum
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
return
Gia_ObjRefNumId
(
p
,
Gia_ObjId
(
p
,
pObj
)
);
}
static
inline
int
Gia_ObjRefInc
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
return
Gia_ObjRefIncId
(
p
,
Gia_ObjId
(
p
,
pObj
)
);
}
static
inline
int
Gia_ObjRefDec
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
return
Gia_ObjRefDecId
(
p
,
Gia_ObjId
(
p
,
pObj
)
);
}
static
inline
void
Gia_ObjRefFanin0Inc
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
Gia_ObjRefInc
(
p
,
Gia_ObjFanin0
(
pObj
));
}
static
inline
void
Gia_ObjRefFanin1Inc
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
Gia_ObjRefInc
(
p
,
Gia_ObjFanin1
(
pObj
));
}
static
inline
void
Gia_ObjRefFanin2Inc
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
Gia_ObjRefInc
(
p
,
Gia_ObjFanin2
(
p
,
pObj
));
}
static
inline
void
Gia_ObjRefFanin0Dec
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
Gia_ObjRefDec
(
p
,
Gia_ObjFanin0
(
pObj
));
}
static
inline
void
Gia_ObjRefFanin1Dec
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
Gia_ObjRefDec
(
p
,
Gia_ObjFanin1
(
pObj
));
}
static
inline
void
Gia_ObjRefFanin2Dec
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
Gia_ObjRefDec
(
p
,
Gia_ObjFanin2
(
p
,
pObj
));
}
static
inline
void
Gia_ObjSetTravIdCurrent
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
assert
(
Gia_ObjId
(
p
,
pObj
)
<
p
->
nTravIdsAlloc
);
p
->
pTravIds
[
Gia_ObjId
(
p
,
pObj
)]
=
p
->
nTravIds
;
}
static
inline
void
Gia_ObjSetTravIdPrevious
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
assert
(
Gia_ObjId
(
p
,
pObj
)
<
p
->
nTravIdsAlloc
);
p
->
pTravIds
[
Gia_ObjId
(
p
,
pObj
)]
=
p
->
nTravIds
-
1
;
}
...
...
@@ -573,6 +595,15 @@ static inline int Gia_ManAppendMuxReal( Gia_Man_t * p, int iLitC, int iLit1, int
p
->
nMuxes
++
;
return
Gia_ObjId
(
p
,
pObj
)
<<
1
;
}
static
inline
int
Gia_ManAppendBuf
(
Gia_Man_t
*
p
,
int
iLit
)
{
Gia_Obj_t
*
pObj
=
Gia_ManAppendObj
(
p
);
assert
(
iLit
>=
0
&&
Abc_Lit2Var
(
iLit
)
<
Gia_ManObjNum
(
p
)
);
pObj
->
iDiff0
=
pObj
->
iDiff1
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit
);
pObj
->
fCompl0
=
pObj
->
fCompl1
=
Abc_LitIsCompl
(
iLit
);
p
->
nBufs
++
;
return
Gia_ObjId
(
p
,
pObj
)
<<
1
;
}
static
inline
int
Gia_ManAppendCo
(
Gia_Man_t
*
p
,
int
iLit0
)
{
Gia_Obj_t
*
pObj
;
...
...
@@ -1016,6 +1047,9 @@ extern int Gia_ManLutLevel( Gia_Man_t * p );
extern
void
Gia_ManSetRefsMapped
(
Gia_Man_t
*
p
);
extern
void
Gia_ManSetIfParsDefault
(
void
*
pIfPars
);
extern
Gia_Man_t
*
Gia_ManPerformMapping
(
Gia_Man_t
*
p
,
void
*
pIfPars
,
int
fNormalized
);
/*=== giaJf.c ===========================================================*/
extern
void
Jf_ManSetDefaultPars
(
Jf_Par_t
*
pPars
);
extern
Gia_Man_t
*
Jf_ManPerformMapping
(
Gia_Man_t
*
pGia
,
Jf_Par_t
*
pPars
);
/*=== giaIso.c ===========================================================*/
extern
Gia_Man_t
*
Gia_ManIsoCanonicize
(
Gia_Man_t
*
p
,
int
fVerbose
);
extern
Gia_Man_t
*
Gia_ManIsoReduce
(
Gia_Man_t
*
p
,
Vec_Ptr_t
**
pvPosEquivs
,
Vec_Ptr_t
**
pvPiPerms
,
int
fEstimate
,
int
fDualOut
,
int
fVerbose
,
int
fVeryVerbose
);
...
...
@@ -1027,7 +1061,7 @@ extern void Gia_ManSolveProblem( Gia_Man_t * pGia, Emb_Par_t * pP
extern
Gia_Man_t
*
Gia_ManStart
(
int
nObjsMax
);
extern
void
Gia_ManStop
(
Gia_Man_t
*
p
);
extern
void
Gia_ManStopP
(
Gia_Man_t
**
p
);
extern
float
Gia_ManMemory
(
Gia_Man_t
*
p
);
extern
double
Gia_ManMemory
(
Gia_Man_t
*
p
);
extern
void
Gia_ManPrintStats
(
Gia_Man_t
*
p
,
Gps_Par_t
*
pPars
);
extern
void
Gia_ManPrintStatsShort
(
Gia_Man_t
*
p
);
extern
void
Gia_ManPrintMiterStatus
(
Gia_Man_t
*
p
);
...
...
src/aig/gia/giaJf.c
0 → 100644
View file @
137a7662
This diff is collapsed.
Click to expand it.
src/aig/gia/giaMan.c
View file @
137a7662
...
...
@@ -138,14 +138,14 @@ void Gia_ManStop( Gia_Man_t * p )
SeeAlso []
***********************************************************************/
float
Gia_ManMemory
(
Gia_Man_t
*
p
)
double
Gia_ManMemory
(
Gia_Man_t
*
p
)
{
word
Memory
=
sizeof
(
Gia_Man_t
);
double
Memory
=
sizeof
(
Gia_Man_t
);
Memory
+=
sizeof
(
Gia_Obj_t
)
*
Gia_ManObjNum
(
p
);
Memory
+=
sizeof
(
int
)
*
Gia_ManCiNum
(
p
);
Memory
+=
sizeof
(
int
)
*
Gia_ManCoNum
(
p
);
Memory
+=
sizeof
(
int
)
*
p
->
nHTable
*
(
p
->
pHTable
!=
NULL
);
return
(
float
)(
int
)(
Memory
/
(
1
<<
20
))
+
(
float
)(
1e-6
*
(
int
)(
Memory
%
(
1
<<
20
)))
;
return
Memory
;
}
/**Function*************************************************************
...
...
@@ -339,7 +339,7 @@ void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars )
printf
(
" lev =%5d"
,
Gia_ManLevelNum
(
p
)
);
Vec_IntFreeP
(
&
p
->
vLevels
);
if
(
pPars
&&
pPars
->
fCut
)
printf
(
" cut = %d(%d)"
,
Gia_ManCrossCut
(
p
,
0
),
Gia_ManCrossCut
(
p
,
1
)
);
printf
(
" mem =%5.2f MB"
,
Gia_ManMemory
(
p
)
);
printf
(
" mem =%5.2f MB"
,
Gia_ManMemory
(
p
)
/
(
1
<<
20
)
);
if
(
Gia_ManHasDangling
(
p
)
)
printf
(
" ch =%5d"
,
Gia_ManEquivCountClasses
(
p
)
);
if
(
pPars
&&
pPars
->
fSwitch
)
...
...
@@ -554,8 +554,8 @@ void Gia_ManPrintNpnClasses( Gia_Man_t * p )
{
if
(
ClassCounts
[
i
]
==
0
)
continue
;
if
(
100
.
0
*
ClassCounts
[
i
]
/
(
nTotal
+
1
)
<
0
.
1
)
// do not show anything below 0.1 percent
continue
;
//
if ( 100.0 * ClassCounts[i] / (nTotal+1) < 0.1 ) // do not show anything below 0.1 percent
//
continue;
OtherClasses
+=
ClassCounts
[
i
];
Abc_Print
(
1
,
"Class %3d : Count = %6d (%7.2f %%) %s
\n
"
,
i
,
ClassCounts
[
i
],
100
.
0
*
ClassCounts
[
i
]
/
(
nTotal
+
1
),
pNames
[
i
]
);
...
...
src/aig/gia/module.make
View file @
137a7662
...
...
@@ -25,6 +25,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaIf.c
\
src/aig/gia/giaIso.c
\
src/aig/gia/giaIso2.c
\
src/aig/gia/giaJf.c
\
src/aig/gia/giaMan.c
\
src/aig/gia/giaMem.c
\
src/aig/gia/giaMfs.c
\
...
...
src/base/abci/abc.c
View file @
137a7662
...
...
@@ -373,6 +373,7 @@ static int Abc_CommandAbc9Force ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9Embed
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9If
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9If2
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Jf
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Trace
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Speedup
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Era
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
...
@@ -568,6 +569,8 @@ void Abc_FrameUpdateGia( Abc_Frame_t * pAbc, Gia_Man_t * pNew )
Abc_Print
(
-
1
,
"Abc_FrameUpdateGia(): Tranformation has failed.
\n
"
);
return
;
}
if
(
pNew
==
pAbc
->
pGia
)
return
;
// transfer names
if
(
!
pNew
->
vNamesIn
&&
pAbc
->
pGia
&&
pAbc
->
pGia
->
vNamesIn
&&
Gia_ManCiNum
(
pNew
)
==
Vec_PtrSize
(
pAbc
->
pGia
->
vNamesIn
))
{
...
...
@@ -925,6 +928,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&embed"
,
Abc_CommandAbc9Embed
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&if"
,
Abc_CommandAbc9If
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&if2"
,
Abc_CommandAbc9If2
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&jf"
,
Abc_CommandAbc9Jf
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&trace"
,
Abc_CommandAbc9Trace
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&speedup"
,
Abc_CommandAbc9Speedup
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&era"
,
Abc_CommandAbc9Era
,
0
);
...
...
@@ -29801,6 +29805,123 @@ usage:
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Jf
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
char
Buffer
[
200
];
Jf_Par_t
Pars
,
*
pPars
=
&
Pars
;
Gia_Man_t
*
pNew
;
int
c
;
Jf_ManSetDefaultPars
(
pPars
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCRDavwh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'K'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-K
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
pPars
->
nLutSize
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nLutSize
<
2
||
pPars
->
nLutSize
>
pPars
->
nLutSizeMax
)
{
Abc_Print
(
-
1
,
"LUT size %d is not supported.
\n
"
,
pPars
->
nLutSize
);
goto
usage
;
}
break
;
case
'C'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-C
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
pPars
->
nCutNum
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nCutNum
<
1
||
pPars
->
nCutNum
>
pPars
->
nCutNumMax
)
{
Abc_Print
(
-
1
,
"This number of cuts (%d) is not supported.
\n
"
,
pPars
->
nCutNum
);
goto
usage
;
}
break
;
case
'R'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-R
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
pPars
->
nRounds
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nRounds
<
0
)
goto
usage
;
break
;
case
'D'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-D
\"
should be followed by a floating point number.
\n
"
);
goto
usage
;
}
pPars
->
DelayTarget
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
DelayTarget
<=
0
.
0
)
goto
usage
;
break
;
case
'a'
:
pPars
->
fAreaOnly
^=
1
;
break
;
case
'v'
:
pPars
->
fVerbose
^=
1
;
break
;
case
'w'
:
pPars
->
fVeryVerbose
^=
1
;
break
;
case
'h'
:
default:
goto
usage
;
}
}
pNew
=
Jf_ManPerformMapping
(
pAbc
->
pGia
,
pPars
);
if
(
pNew
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9If2(): Mapping into LUTs has failed.
\n
"
);
return
1
;
}
Abc_FrameUpdateGia
(
pAbc
,
pNew
);
return
0
;
usage:
if
(
pPars
->
DelayTarget
==
-
1
)
sprintf
(
Buffer
,
"best possible"
);
else
sprintf
(
Buffer
,
"%d"
,
pPars
->
DelayTarget
);
Abc_Print
(
-
2
,
"usage: &jf [-KCRD num] [-avwh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs technology mapping of the network
\n
"
);
Abc_Print
(
-
2
,
"
\t
-K num : LUT size for the mapping (2 <= K <= %d) [default = %d]
\n
"
,
pPars
->
nLutSizeMax
,
pPars
->
nLutSize
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of priority cuts (1 <= C <= %d) [default = %d]
\n
"
,
pPars
->
nCutNumMax
,
pPars
->
nCutNum
);
Abc_Print
(
-
2
,
"
\t
-R num : the number of mapping rounds [default = %d]
\n
"
,
pPars
->
nRounds
);
Abc_Print
(
-
2
,
"
\t
-D num : sets the delay constraint for the mapping [default = %s]
\n
"
,
Buffer
);
Abc_Print
(
-
2
,
"
\t
-a : toggles area-oriented mapping [default = %s]
\n
"
,
pPars
->
fAreaOnly
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggles verbose output [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggles very verbose output [default = %s]
\n
"
,
pPars
->
fVeryVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : prints the command usage
\n
"
);
return
1
;
}
/**Function*************************************************************
Synopsis []
...
...
@@ -32985,7 +33106,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// extern void Ga2_ManComputeTest( Gia_Man_t * p );
// extern void Bmc_CexTest( Gia_Man_t * p, Abc_Cex_t * pCex, int fVerbose );
// extern void Gia_IsoTest( Gia_Man_t * p, Abc_Cex_t * pCex, int fVerbose );
extern
void
Unr_ManTest
(
Gia_Man_t
*
pGia
,
int
nFrames
);
//
extern void Unr_ManTest( Gia_Man_t * pGia, int nFrames );
// extern int Gia_ManVerify( Gia_Man_t * pGia );
// extern Gia_Man_t * Gia_ManOptimizeRing( Gia_Man_t * p );
// extern void Gia_ManCollectSeqTest( Gia_Man_t * p );
...
...
@@ -33054,7 +33175,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// Ga2_ManComputeTest( pAbc->pGia );
// Bmc_CexTest( pAbc->pGia, pAbc->pCex, fVerbose );
// Gia_IsoTest( pAbc->pGia, pAbc->pCex, 0 );
Unr_ManTest
(
pAbc
->
pGia
,
nFrames
);
//
Unr_ManTest( pAbc->pGia, nFrames );
// Gia_ManVerifyWithBoxes( pAbc->pGia );
// Gia_ManCollectSeqTest( pAbc->pGia );
// pTemp = Gia_ManOptimizeRing( pAbc->pGia );
src/map/if/ifMap.c
View file @
137a7662
...
...
@@ -333,6 +333,12 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
If_CutSort
(
p
,
pCutSet
,
pCut
);
// If_CutTraverse( p, pObj, pCut );
}
/*
printf( "Node %d\n", pObj->Id );
for ( i = 0; i < pCutSet->nCuts; i++ )
If_CutPrint( pCutSet->ppCuts[i] );
printf( "\n" );
*/
assert
(
pCutSet
->
nCuts
>
0
);
// add the trivial cut to the set
...
...
src/sat/bmc/bmcBmcAnd.c
View file @
137a7662
...
...
@@ -314,7 +314,7 @@ int Gia_ManBmcPerform( Gia_Man_t * pGia, Bmc_AndPar_t * pPars )
Unr_Man_t
*
pUnroll
;
Bmc_Mna_t
*
p
=
Bmc_MnaAlloc
();
int
nFramesMax
=
pPars
->
nFramesMax
?
pPars
->
nFramesMax
:
ABC_INFINITY
;
int
f
,
i
,
Lit
,
status
,
RetValue
=
-
2
;
int
f
,
i
=
0
,
Lit
,
status
,
RetValue
=
-
2
;
pUnroll
=
Unr_ManUnrollStart
(
pGia
,
pPars
->
fVeryVerbose
);
for
(
f
=
0
;
f
<
nFramesMax
;
f
++
)
{
...
...
@@ -348,7 +348,7 @@ int Gia_ManBmcPerform( Gia_Man_t * pGia, Bmc_AndPar_t * pPars )
printf
(
"%4d : PI =%9d. AIG =%9d. Var =%8d. In =%6d. And =%9d. Cla =%9d. Conf =%9d. Mem =%7.1f MB "
,
f
,
Gia_ManPiNum
(
p
->
pFrames
),
Gia_ManAndNum
(
p
->
pFrames
),
p
->
nSatVars
-
1
,
Vec_IntSize
(
p
->
vInputs
),
Vec_IntSize
(
p
->
vNodes
),
sat_solver_nclauses
(
p
->
pSat
),
sat_solver_nconflicts
(
p
->
pSat
),
Gia_ManMemory
(
p
->
pFrames
)
);
sat_solver_nclauses
(
p
->
pSat
),
sat_solver_nconflicts
(
p
->
pSat
),
Gia_ManMemory
(
p
->
pFrames
)
/
(
1
<<
20
)
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
p
->
clkStart
);
}
if
(
RetValue
!=
-
2
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment