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
8bd19a27
Commit
8bd19a27
authored
Mar 05, 2008
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Version abc80305
parent
320c429b
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
124 additions
and
51 deletions
+124
-51
src/aig/aig/aigInter.c
+15
-14
src/aig/fra/fraClass.c
+4
-4
src/aig/fra/fraClaus.c
+4
-7
src/aig/fra/fraCore.c
+4
-0
src/aig/fra/fraInd.c
+3
-7
src/aig/ioa/ioa.h
+1
-0
src/aig/ioa/ioaUtil.c
+35
-0
src/base/abci/abc.c
+14
-2
src/base/abci/abcDar.c
+12
-0
src/map/if/if.h
+1
-0
src/map/if/ifMan.c
+1
-1
src/misc/extra/extraUtilUtil.c
+28
-16
src/opt/fret/fretMain.c
+2
-0
No files found.
src/aig/aig/aigInter.c
View file @
8bd19a27
...
@@ -26,6 +26,10 @@
...
@@ -26,6 +26,10 @@
/// DECLARATIONS ///
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
extern
int
timeCnf
;
extern
int
timeSat
;
extern
int
timeInt
;
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
@@ -51,17 +55,20 @@ Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose
...
@@ -51,17 +55,20 @@ Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose
Vec_Int_t
*
vVarsAB
;
Vec_Int_t
*
vVarsAB
;
Aig_Obj_t
*
pObj
,
*
pObj2
;
Aig_Obj_t
*
pObj
,
*
pObj2
;
int
Lits
[
3
],
status
,
i
;
int
Lits
[
3
],
status
,
i
;
int
clk
=
clock
()
;
int
clk
;
assert
(
Aig_ManPiNum
(
pManOn
)
==
Aig_ManPiNum
(
pManOff
)
);
assert
(
Aig_ManPiNum
(
pManOn
)
==
Aig_ManPiNum
(
pManOff
)
);
clk
=
clock
();
// derive CNFs
// derive CNFs
pCnfOn
=
Cnf_Derive
(
pManOn
,
0
);
//
pCnfOn = Cnf_Derive( pManOn, 0 );
pCnfOff
=
Cnf_Derive
(
pManOff
,
0
);
//
pCnfOff = Cnf_Derive( pManOff, 0 );
//
pCnfOn = Cnf_DeriveSimple( pManOn, 0 );
pCnfOn
=
Cnf_DeriveSimple
(
pManOn
,
0
);
//
pCnfOff = Cnf_DeriveSimple( pManOff, 0 );
pCnfOff
=
Cnf_DeriveSimple
(
pManOff
,
0
);
Cnf_DataLift
(
pCnfOff
,
pCnfOn
->
nVars
);
Cnf_DataLift
(
pCnfOff
,
pCnfOn
->
nVars
);
timeCnf
+=
clock
()
-
clk
;
clk
=
clock
();
// start the solver
// start the solver
pSat
=
sat_solver_new
();
pSat
=
sat_solver_new
();
sat_solver_store_alloc
(
pSat
);
sat_solver_store_alloc
(
pSat
);
...
@@ -112,10 +119,6 @@ Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose
...
@@ -112,10 +119,6 @@ Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose
Cnf_DataFree
(
pCnfOn
);
Cnf_DataFree
(
pCnfOn
);
Cnf_DataFree
(
pCnfOff
);
Cnf_DataFree
(
pCnfOff
);
sat_solver_store_mark_roots
(
pSat
);
sat_solver_store_mark_roots
(
pSat
);
if
(
fVerbose
)
{
PRT
(
"Prepare"
,
clock
()
-
clk
);
}
/*
/*
status = sat_solver_simplify(pSat);
status = sat_solver_simplify(pSat);
...
@@ -130,12 +133,8 @@ Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose
...
@@ -130,12 +133,8 @@ Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose
*/
*/
// solve the problem
// solve the problem
clk
=
clock
();
status
=
sat_solver_solve
(
pSat
,
NULL
,
NULL
,
(
sint64
)
0
,
(
sint64
)
0
,
(
sint64
)
0
,
(
sint64
)
0
);
status
=
sat_solver_solve
(
pSat
,
NULL
,
NULL
,
(
sint64
)
0
,
(
sint64
)
0
,
(
sint64
)
0
,
(
sint64
)
0
);
if
(
fVerbose
)
timeSat
+=
clock
()
-
clk
;
{
PRT
(
"Solving"
,
clock
()
-
clk
);
}
if
(
status
==
l_False
)
if
(
status
==
l_False
)
{
{
pSatCnf
=
sat_solver_store_release
(
pSat
);
pSatCnf
=
sat_solver_store_release
(
pSat
);
...
@@ -158,9 +157,11 @@ Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose
...
@@ -158,9 +157,11 @@ Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose
}
}
// create the resulting manager
// create the resulting manager
clk
=
clock
();
pManInter
=
Inta_ManAlloc
();
pManInter
=
Inta_ManAlloc
();
pRes
=
Inta_ManInterpolate
(
pManInter
,
pSatCnf
,
vVarsAB
,
fVerbose
);
pRes
=
Inta_ManInterpolate
(
pManInter
,
pSatCnf
,
vVarsAB
,
fVerbose
);
Inta_ManFree
(
pManInter
);
Inta_ManFree
(
pManInter
);
timeInt
+=
clock
()
-
clk
;
Vec_IntFree
(
vVarsAB
);
Vec_IntFree
(
vVarsAB
);
Sto_ManFree
(
pSatCnf
);
Sto_ManFree
(
pSatCnf
);
...
...
src/aig/fra/fraClass.c
View file @
8bd19a27
...
@@ -207,7 +207,7 @@ int Fra_ClassesCountPairs( Fra_Cla_t * p )
...
@@ -207,7 +207,7 @@ int Fra_ClassesCountPairs( Fra_Cla_t * p )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Fra_PrintClass
(
Aig_Obj_t
**
pClass
)
void
Fra_PrintClass
(
Fra_Cla_t
*
p
,
Aig_Obj_t
**
pClass
)
{
{
Aig_Obj_t
*
pTemp
;
Aig_Obj_t
*
pTemp
;
int
i
;
int
i
;
...
@@ -215,7 +215,7 @@ void Fra_PrintClass( Aig_Obj_t ** pClass )
...
@@ -215,7 +215,7 @@ void Fra_PrintClass( Aig_Obj_t ** pClass )
assert
(
Fra_ClassObjRepr
(
pTemp
)
==
pClass
[
0
]
);
assert
(
Fra_ClassObjRepr
(
pTemp
)
==
pClass
[
0
]
);
printf
(
"{ "
);
printf
(
"{ "
);
for
(
i
=
0
;
(
pTemp
=
pClass
[
i
]);
i
++
)
for
(
i
=
0
;
(
pTemp
=
pClass
[
i
]);
i
++
)
printf
(
"%d(%d
) "
,
pTemp
->
Id
,
pTemp
->
Level
);
printf
(
"%d(%d
,%d) "
,
pTemp
->
Id
,
pTemp
->
Level
,
Aig_SupportSize
(
p
->
pAig
,
pTemp
)
);
printf
(
"}
\n
"
);
printf
(
"}
\n
"
);
}
}
...
@@ -248,12 +248,12 @@ void Fra_ClassesPrint( Fra_Cla_t * p, int fVeryVerbose )
...
@@ -248,12 +248,12 @@ void Fra_ClassesPrint( Fra_Cla_t * p, int fVeryVerbose )
assert
(
Fra_ClassObjRepr
(
pObj
)
==
Aig_ManConst1
(
p
->
pAig
)
);
assert
(
Fra_ClassObjRepr
(
pObj
)
==
Aig_ManConst1
(
p
->
pAig
)
);
printf
(
"Constants { "
);
printf
(
"Constants { "
);
Vec_PtrForEachEntry
(
p
->
vClasses1
,
pObj
,
i
)
Vec_PtrForEachEntry
(
p
->
vClasses1
,
pObj
,
i
)
printf
(
"%d
"
,
pObj
->
Id
);
printf
(
"%d
(%d,%d) "
,
pObj
->
Id
,
pObj
->
Level
,
Aig_SupportSize
(
p
->
pAig
,
pObj
)
);
printf
(
"}
\n
"
);
printf
(
"}
\n
"
);
Vec_PtrForEachEntry
(
p
->
vClasses
,
pClass
,
i
)
Vec_PtrForEachEntry
(
p
->
vClasses
,
pClass
,
i
)
{
{
printf
(
"%3d (%3d) : "
,
i
,
Fra_ClassCount
(
pClass
)
);
printf
(
"%3d (%3d) : "
,
i
,
Fra_ClassCount
(
pClass
)
);
Fra_PrintClass
(
pClass
);
Fra_PrintClass
(
p
,
p
Class
);
}
}
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
}
...
...
src/aig/fra/fraClaus.c
View file @
8bd19a27
...
@@ -1530,7 +1530,7 @@ void Fra_ClausWriteIndClauses( Clu_Man_t * p )
...
@@ -1530,7 +1530,7 @@ void Fra_ClausWriteIndClauses( Clu_Man_t * p )
extern
void
Ioa_WriteAiger
(
Aig_Man_t
*
pMan
,
char
*
pFileName
,
int
fWriteSymbols
,
int
fCompact
);
extern
void
Ioa_WriteAiger
(
Aig_Man_t
*
pMan
,
char
*
pFileName
,
int
fWriteSymbols
,
int
fCompact
);
Aig_Man_t
*
pNew
;
Aig_Man_t
*
pNew
;
Aig_Obj_t
*
pClause
,
*
pLiteral
;
Aig_Obj_t
*
pClause
,
*
pLiteral
;
char
Buffer
[
500
],
*
pName
;
char
*
pName
;
int
*
pStart
,
*
pVar2Id
;
int
*
pStart
,
*
pVar2Id
;
int
Beg
,
End
,
i
,
k
;
int
Beg
,
End
,
i
,
k
;
// create mapping from SAT vars to node IDs
// create mapping from SAT vars to node IDs
...
@@ -1560,12 +1560,9 @@ void Fra_ClausWriteIndClauses( Clu_Man_t * p )
...
@@ -1560,12 +1560,9 @@ void Fra_ClausWriteIndClauses( Clu_Man_t * p )
}
}
free
(
pVar2Id
);
free
(
pVar2Id
);
Aig_ManCleanup
(
pNew
);
Aig_ManCleanup
(
pNew
);
// write the manager into a file
pName
=
Ioa_FileNameGenericAppend
(
p
->
pAig
->
pName
,
"_care.aig"
);
pName
=
Ioa_FileNameGeneric
(
p
->
pAig
->
pName
);
printf
(
"Care one-hotness clauses will be written into file
\"
%s
\"
.
\n
"
,
pName
);
sprintf
(
Buffer
,
"%s_care.aig"
,
pName
);
Ioa_WriteAiger
(
pNew
,
pName
,
0
,
1
);
free
(
pName
);
printf
(
"Care clauses are written into file
\"
%s
\"
.
\n
"
,
Buffer
);
Ioa_WriteAiger
(
pNew
,
Buffer
,
0
,
1
);
Aig_ManStop
(
pNew
);
Aig_ManStop
(
pNew
);
}
}
...
...
src/aig/fra/fraCore.c
View file @
8bd19a27
...
@@ -328,6 +328,8 @@ void Fra_FraigSweep( Fra_Man_t * p )
...
@@ -328,6 +328,8 @@ void Fra_FraigSweep( Fra_Man_t * p )
// quit if simulation detected a counter-example for a PO
// quit if simulation detected a counter-example for a PO
if
(
p
->
pManFraig
->
pData
)
if
(
p
->
pManFraig
->
pData
)
continue
;
continue
;
// if ( Aig_SupportSize(p->pManAig,pObj) > 16 )
// continue;
// perform fraiging
// perform fraiging
if
(
p
->
pPars
->
nLevelMax
&&
(
int
)
pObj
->
Level
>
p
->
pPars
->
nLevelMax
)
if
(
p
->
pPars
->
nLevelMax
&&
(
int
)
pObj
->
Level
>
p
->
pPars
->
nLevelMax
)
p
->
pPars
->
nBTLimitNode
=
5
;
p
->
pPars
->
nBTLimitNode
=
5
;
...
@@ -381,6 +383,8 @@ clk = clock();
...
@@ -381,6 +383,8 @@ clk = clock();
p
->
nNodesBeg
=
Aig_ManNodeNum
(
pManAig
);
p
->
nNodesBeg
=
Aig_ManNodeNum
(
pManAig
);
p
->
nRegsBeg
=
Aig_ManRegNum
(
pManAig
);
p
->
nRegsBeg
=
Aig_ManRegNum
(
pManAig
);
// perform fraig sweep
// perform fraig sweep
if
(
p
->
pPars
->
fVerbose
)
Fra_ClassesPrint
(
p
->
pCla
,
1
);
Fra_FraigSweep
(
p
);
Fra_FraigSweep
(
p
);
// call back the procedure to check implications
// call back the procedure to check implications
if
(
pManAig
->
pImpFunc
)
if
(
pManAig
->
pImpFunc
)
...
...
src/aig/fra/fraInd.c
View file @
8bd19a27
...
@@ -560,16 +560,12 @@ clk2 = clock();
...
@@ -560,16 +560,12 @@ clk2 = clock();
if
(
p
->
pPars
->
fWriteImps
&&
p
->
vOneHots
&&
Fra_OneHotCount
(
p
,
p
->
vOneHots
)
)
if
(
p
->
pPars
->
fWriteImps
&&
p
->
vOneHots
&&
Fra_OneHotCount
(
p
,
p
->
vOneHots
)
)
{
{
extern
void
Ioa_WriteAiger
(
Aig_Man_t
*
pMan
,
char
*
pFileName
,
int
fWriteSymbols
,
int
fCompact
);
extern
void
Ioa_WriteAiger
(
Aig_Man_t
*
pMan
,
char
*
pFileName
,
int
fWriteSymbols
,
int
fCompact
);
char
Buffer
[
500
],
*
pStart
;
Aig_Man_t
*
pNew
;
Aig_Man_t
*
pNew
;
char
*
pFileName
=
Ioa_FileNameGenericAppend
(
p
->
pManAig
->
pName
,
"_care.aig"
);
printf
(
"Care one-hotness clauses will be written into file
\"
%s
\"
.
\n
"
,
pFileName
);
pManAigNew
=
Aig_ManDup
(
pManAig
,
1
);
pManAigNew
=
Aig_ManDup
(
pManAig
,
1
);
// pManAigNew->pManExdc = Fra_OneHotCreateExdc( p, p->vOneHots );
pNew
=
Fra_OneHotCreateExdc
(
p
,
p
->
vOneHots
);
pNew
=
Fra_OneHotCreateExdc
(
p
,
p
->
vOneHots
);
pStart
=
Ioa_FileNameGeneric
(
p
->
pManAig
->
pName
);
Ioa_WriteAiger
(
pNew
,
pFileName
,
0
,
1
);
sprintf
(
Buffer
,
"%s_care.aig"
,
pStart
);
free
(
pStart
);
printf
(
"Care one-hotness clauses are written into file
\"
%s
\"
.
\n
"
,
Buffer
);
Ioa_WriteAiger
(
pNew
,
Buffer
,
0
,
1
);
Aig_ManStop
(
pNew
);
Aig_ManStop
(
pNew
);
}
}
else
else
...
...
src/aig/ioa/ioa.h
View file @
8bd19a27
...
@@ -66,6 +66,7 @@ extern void Ioa_WriteAiger( Aig_Man_t * pMan, char * pFileName, int fW
...
@@ -66,6 +66,7 @@ extern void Ioa_WriteAiger( Aig_Man_t * pMan, char * pFileName, int fW
/*=== ioaUtil.c =======================================================*/
/*=== ioaUtil.c =======================================================*/
extern
int
Ioa_FileSize
(
char
*
pFileName
);
extern
int
Ioa_FileSize
(
char
*
pFileName
);
extern
char
*
Ioa_FileNameGeneric
(
char
*
FileName
);
extern
char
*
Ioa_FileNameGeneric
(
char
*
FileName
);
extern
char
*
Ioa_FileNameGenericAppend
(
char
*
pBase
,
char
*
pSuffix
);
extern
char
*
Ioa_TimeStamp
();
extern
char
*
Ioa_TimeStamp
();
#ifdef __cplusplus
#ifdef __cplusplus
...
...
src/aig/ioa/ioaUtil.c
View file @
8bd19a27
...
@@ -88,6 +88,41 @@ char * Ioa_FileNameGeneric( char * FileName )
...
@@ -88,6 +88,41 @@ char * Ioa_FileNameGeneric( char * FileName )
/**Function*************************************************************
/**Function*************************************************************
Synopsis [Returns the composite name of the file.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
char
*
Ioa_FileNameGenericAppend
(
char
*
pBase
,
char
*
pSuffix
)
{
static
char
Buffer
[
1000
];
char
*
pDot
;
if
(
pBase
==
NULL
)
{
strcpy
(
Buffer
,
pSuffix
);
return
Buffer
;
}
strcpy
(
Buffer
,
pBase
);
pDot
=
strstr
(
Buffer
,
"."
);
if
(
pDot
)
*
pDot
=
0
;
strcat
(
Buffer
,
pSuffix
);
// find the last occurrance of slash
for
(
pDot
=
Buffer
+
strlen
(
Buffer
)
-
1
;
pDot
>=
Buffer
;
pDot
--
)
if
(
!
((
*
pDot
>=
'0'
&&
*
pDot
<=
'9'
)
||
(
*
pDot
>=
'a'
&&
*
pDot
<=
'z'
)
||
(
*
pDot
>=
'A'
&&
*
pDot
<=
'Z'
)
||
*
pDot
==
'_'
||
*
pDot
==
'.'
)
)
break
;
return
pDot
+
1
;
}
/**Function*************************************************************
Synopsis [Returns the time stamp.]
Synopsis [Returns the time stamp.]
Description [The file should be closed.]
Description [The file should be closed.]
...
...
src/base/abci/abc.c
View file @
8bd19a27
...
@@ -10749,6 +10749,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -10749,6 +10749,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars
->
nFlowIters
=
1
;
pPars
->
nFlowIters
=
1
;
pPars
->
nAreaIters
=
2
;
pPars
->
nAreaIters
=
2
;
pPars
->
DelayTarget
=
-
1
;
pPars
->
DelayTarget
=
-
1
;
pPars
->
Epsilon
=
(
float
)
0
.
001
;
pPars
->
fPreprocess
=
1
;
pPars
->
fPreprocess
=
1
;
pPars
->
fArea
=
0
;
pPars
->
fArea
=
0
;
pPars
->
fFancy
=
0
;
pPars
->
fFancy
=
0
;
...
@@ -10768,7 +10769,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -10768,7 +10769,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars
->
pFuncCost
=
NULL
;
pPars
->
pFuncCost
=
NULL
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCFADpaflemrstvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCFAD
E
paflemrstvh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -10828,6 +10829,16 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -10828,6 +10829,16 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
globalUtilOptind
++
;
globalUtilOptind
++
;
if
(
pPars
->
DelayTarget
<=
0
.
0
)
if
(
pPars
->
DelayTarget
<=
0
.
0
)
goto
usage
;
goto
usage
;
case
'E'
:
if
(
globalUtilOptind
>=
argc
)
{
fprintf
(
pErr
,
"Command line switch
\"
-E
\"
should be followed by a floating point number.
\n
"
);
goto
usage
;
}
pPars
->
Epsilon
=
(
float
)
atof
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
Epsilon
<
0
.
0
||
pPars
->
Epsilon
>
1
.
0
)
goto
usage
;
break
;
break
;
case
'p'
:
case
'p'
:
pPars
->
fPreprocess
^=
1
;
pPars
->
fPreprocess
^=
1
;
...
@@ -10980,13 +10991,14 @@ usage:
...
@@ -10980,13 +10991,14 @@ usage:
sprintf
(
LutSize
,
"library"
);
sprintf
(
LutSize
,
"library"
);
else
else
sprintf
(
LutSize
,
"%d"
,
pPars
->
nLutSize
);
sprintf
(
LutSize
,
"%d"
,
pPars
->
nLutSize
);
fprintf
(
pErr
,
"usage: if [-K
num] [-C num] [-F num] [-A num] [-D
float] [-parlemsvh]
\n
"
);
fprintf
(
pErr
,
"usage: if [-K
CFA num] [-DE
float] [-parlemsvh]
\n
"
);
fprintf
(
pErr
,
"
\t
performs FPGA technology mapping of the network
\n
"
);
fprintf
(
pErr
,
"
\t
performs FPGA technology mapping of the network
\n
"
);
fprintf
(
pErr
,
"
\t
-K num : the number of LUT inputs (2 < num < %d) [default = %s]
\n
"
,
IF_MAX_LUTSIZE
+
1
,
LutSize
);
fprintf
(
pErr
,
"
\t
-K num : the number of LUT inputs (2 < num < %d) [default = %s]
\n
"
,
IF_MAX_LUTSIZE
+
1
,
LutSize
);
fprintf
(
pErr
,
"
\t
-C num : the max number of priority cuts (0 < num < 2^12) [default = %d]
\n
"
,
pPars
->
nCutsMax
);
fprintf
(
pErr
,
"
\t
-C num : the max number of priority cuts (0 < num < 2^12) [default = %d]
\n
"
,
pPars
->
nCutsMax
);
fprintf
(
pErr
,
"
\t
-F num : the number of area flow recovery iterations (num >= 0) [default = %d]
\n
"
,
pPars
->
nFlowIters
);
fprintf
(
pErr
,
"
\t
-F num : the number of area flow recovery iterations (num >= 0) [default = %d]
\n
"
,
pPars
->
nFlowIters
);
fprintf
(
pErr
,
"
\t
-A num : the number of exact area recovery iterations (num >= 0) [default = %d]
\n
"
,
pPars
->
nAreaIters
);
fprintf
(
pErr
,
"
\t
-A num : the number of exact area recovery iterations (num >= 0) [default = %d]
\n
"
,
pPars
->
nAreaIters
);
fprintf
(
pErr
,
"
\t
-D float : sets the delay constraint for the mapping [default = %s]
\n
"
,
Buffer
);
fprintf
(
pErr
,
"
\t
-D float : sets the delay constraint for the mapping [default = %s]
\n
"
,
Buffer
);
fprintf
(
pErr
,
"
\t
-E float : sets epsilon used for tie-breaking [default = %f]
\n
"
,
pPars
->
Epsilon
);
fprintf
(
pErr
,
"
\t
-p : toggles preprocessing using several starting points [default = %s]
\n
"
,
pPars
->
fPreprocess
?
"yes"
:
"no"
);
fprintf
(
pErr
,
"
\t
-p : toggles preprocessing using several starting points [default = %s]
\n
"
,
pPars
->
fPreprocess
?
"yes"
:
"no"
);
fprintf
(
pErr
,
"
\t
-a : toggles area-oriented mapping [default = %s]
\n
"
,
pPars
->
fArea
?
"yes"
:
"no"
);
fprintf
(
pErr
,
"
\t
-a : toggles area-oriented mapping [default = %s]
\n
"
,
pPars
->
fArea
?
"yes"
:
"no"
);
// fprintf( pErr, "\t-f : toggles one fancy feature [default = %s]\n", pPars->fFancy? "yes": "no" );
// fprintf( pErr, "\t-f : toggles one fancy feature [default = %s]\n", pPars->fFancy? "yes": "no" );
...
...
src/base/abci/abcDar.c
View file @
8bd19a27
...
@@ -1565,6 +1565,11 @@ Abc_Ntk_t * Abc_NtkInterOne( Abc_Ntk_t * pNtkOn, Abc_Ntk_t * pNtkOff, int fVerbo
...
@@ -1565,6 +1565,11 @@ Abc_Ntk_t * Abc_NtkInterOne( Abc_Ntk_t * pNtkOn, Abc_Ntk_t * pNtkOff, int fVerbo
return
pNtkAig
;
return
pNtkAig
;
}
}
int
timeCnf
;
int
timeSat
;
int
timeInt
;
/**Function*************************************************************
/**Function*************************************************************
Synopsis [Interplates two networks.]
Synopsis [Interplates two networks.]
...
@@ -1594,6 +1599,9 @@ Abc_Ntk_t * Abc_NtkInter( Abc_Ntk_t * pNtkOn, Abc_Ntk_t * pNtkOff, int fVerbose
...
@@ -1594,6 +1599,9 @@ Abc_Ntk_t * Abc_NtkInter( Abc_Ntk_t * pNtkOn, Abc_Ntk_t * pNtkOff, int fVerbose
Abc_NtkForEachPi
(
pNtkOn
,
pObj
,
i
)
Abc_NtkForEachPi
(
pNtkOn
,
pObj
,
i
)
Abc_NtkDupObj
(
pNtkInter
,
pObj
,
1
);
Abc_NtkDupObj
(
pNtkInter
,
pObj
,
1
);
// process each POs separately
// process each POs separately
timeCnf
=
0
;
timeSat
=
0
;
timeInt
=
0
;
Abc_NtkForEachCo
(
pNtkOn
,
pObj
,
i
)
Abc_NtkForEachCo
(
pNtkOn
,
pObj
,
i
)
{
{
pNtkOn1
=
Abc_NtkCreateCone
(
pNtkOn
,
Abc_ObjFanin0
(
pObj
),
Abc_ObjName
(
pObj
),
1
);
pNtkOn1
=
Abc_NtkCreateCone
(
pNtkOn
,
Abc_ObjFanin0
(
pObj
),
Abc_ObjName
(
pObj
),
1
);
...
@@ -1620,6 +1628,10 @@ Abc_Ntk_t * Abc_NtkInter( Abc_Ntk_t * pNtkOn, Abc_Ntk_t * pNtkOff, int fVerbose
...
@@ -1620,6 +1628,10 @@ Abc_Ntk_t * Abc_NtkInter( Abc_Ntk_t * pNtkOn, Abc_Ntk_t * pNtkOff, int fVerbose
Abc_NtkDelete
(
pNtkOff1
);
Abc_NtkDelete
(
pNtkOff1
);
Abc_NtkDelete
(
pNtkInter1
);
Abc_NtkDelete
(
pNtkInter1
);
}
}
// PRT( "CNF", timeCnf );
// PRT( "SAT", timeSat );
// PRT( "Int", timeInt );
// return the network
// return the network
if
(
!
Abc_NtkCheck
(
pNtkInter
)
)
if
(
!
Abc_NtkCheck
(
pNtkInter
)
)
fprintf
(
stdout
,
"Abc_NtkAttachBottom(): Network check has failed.
\n
"
);
fprintf
(
stdout
,
"Abc_NtkAttachBottom(): Network check has failed.
\n
"
);
...
...
src/map/if/if.h
View file @
8bd19a27
...
@@ -81,6 +81,7 @@ struct If_Par_t_
...
@@ -81,6 +81,7 @@ struct If_Par_t_
int
nFlowIters
;
// the number of iterations of area recovery
int
nFlowIters
;
// the number of iterations of area recovery
int
nAreaIters
;
// the number of iterations of area recovery
int
nAreaIters
;
// the number of iterations of area recovery
float
DelayTarget
;
// delay target
float
DelayTarget
;
// delay target
float
Epsilon
;
// value used in comparison floating point numbers
int
fPreprocess
;
// preprossing
int
fPreprocess
;
// preprossing
int
fArea
;
// area-oriented mapping
int
fArea
;
// area-oriented mapping
int
fFancy
;
// a fancy feature
int
fFancy
;
// a fancy feature
...
...
src/map/if/ifMan.c
View file @
8bd19a27
...
@@ -51,7 +51,7 @@ If_Man_t * If_ManStart( If_Par_t * pPars )
...
@@ -51,7 +51,7 @@ If_Man_t * If_ManStart( If_Par_t * pPars )
p
=
ALLOC
(
If_Man_t
,
1
);
p
=
ALLOC
(
If_Man_t
,
1
);
memset
(
p
,
0
,
sizeof
(
If_Man_t
)
);
memset
(
p
,
0
,
sizeof
(
If_Man_t
)
);
p
->
pPars
=
pPars
;
p
->
pPars
=
pPars
;
p
->
fEpsilon
=
(
float
)
0
.
001
;
p
->
fEpsilon
=
pPars
->
Epsilon
;
// allocate arrays for nodes
// allocate arrays for nodes
p
->
vCis
=
Vec_PtrAlloc
(
100
);
p
->
vCis
=
Vec_PtrAlloc
(
100
);
p
->
vCos
=
Vec_PtrAlloc
(
100
);
p
->
vCos
=
Vec_PtrAlloc
(
100
);
...
...
src/misc/extra/extraUtilUtil.c
View file @
8bd19a27
...
@@ -49,22 +49,6 @@ static char *pScanStr;
...
@@ -49,22 +49,6 @@ static char *pScanStr;
/**Function*************************************************************
/**Function*************************************************************
Synopsis [util_cpu_time()]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
long
Extra_CpuTime
()
{
return
clock
();
}
/**Function*************************************************************
Synopsis [getSoftDataLimit()]
Synopsis [getSoftDataLimit()]
Description []
Description []
...
@@ -349,6 +333,34 @@ void Extra_UtilMMout_Of_Memory( long size )
...
@@ -349,6 +333,34 @@ void Extra_UtilMMout_Of_Memory( long size )
void
(
*
Extra_UtilMMoutOfMemory
)()
=
Extra_UtilMMout_Of_Memory
;
void
(
*
Extra_UtilMMoutOfMemory
)()
=
Extra_UtilMMout_Of_Memory
;
/**Function*************************************************************
Synopsis [util_cpu_time()]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
#if defined(NT) || defined(NT64) || defined(WIN32)
long
Extra_CpuTime
()
{
return
clock
();
}
#else
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
long
Extra_CpuTime
()
{
struct
rusage
ru
;
getrusage
(
RUSAGE_SELF
,
&
ru
);
return
(
long
)(
CLOCKS_PER_SEC
*
((
double
)
ru
.
ru_utime
.
tv_sec
+
(
double
)
ru
.
ru_utime
.
tv_usec
/
1000000
));
}
#endif
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
...
src/opt/fret/fretMain.c
View file @
8bd19a27
...
@@ -1115,6 +1115,8 @@ static Abc_Ntk_t* Abc_FlowRetime_NtkDup( Abc_Ntk_t * pNtk ) {
...
@@ -1115,6 +1115,8 @@ static Abc_Ntk_t* Abc_FlowRetime_NtkDup( Abc_Ntk_t * pNtk ) {
int
i
,
j
;
int
i
,
j
;
pNtkCopy
=
Abc_NtkAlloc
(
pNtk
->
ntkType
,
pNtk
->
ntkFunc
,
1
);
pNtkCopy
=
Abc_NtkAlloc
(
pNtk
->
ntkType
,
pNtk
->
ntkFunc
,
1
);
pNtkCopy
->
pName
=
Extra_UtilStrsav
(
pNtk
->
pName
);
pNtkCopy
->
pSpec
=
Extra_UtilStrsav
(
pNtk
->
pSpec
);
// copy each object
// copy each object
Abc_NtkForEachObj
(
pNtk
,
pObj
,
i
)
{
Abc_NtkForEachObj
(
pNtk
,
pObj
,
i
)
{
...
...
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