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
db7852bb
Commit
db7852bb
authored
Nov 06, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to LMS code.
parent
3f7f4973
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
14 deletions
+31
-14
src/aig/gia/gia.h
+3
-2
src/aig/gia/giaTruth.c
+5
-5
src/aig/gia/giaUtil.c
+16
-0
src/base/abci/abcRec2.c
+4
-4
src/base/abci/abcRec3.c
+0
-0
src/base/io/io.c
+2
-2
src/proof/abs/absRpm.c
+1
-1
No files found.
src/aig/gia/gia.h
View file @
db7852bb
...
@@ -890,10 +890,10 @@ extern float Gia_ManComputeSwitching( Gia_Man_t * p, int nFrames,
...
@@ -890,10 +890,10 @@ extern float Gia_ManComputeSwitching( Gia_Man_t * p, int nFrames,
/*=== giaTruth.c ===========================================================*/
/*=== giaTruth.c ===========================================================*/
extern
word
Gia_ObjComputeTruthTable6
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
Vec_Int_t
*
vSupp
,
Vec_Wrd_t
*
vTruths
);
extern
word
Gia_ObjComputeTruthTable6
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
Vec_Int_t
*
vSupp
,
Vec_Wrd_t
*
vTruths
);
extern
int
Gia_ObjCollectInternal
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
);
extern
int
Gia_ObjCollectInternal
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
);
extern
unsigned
*
Gia_ObjComputeTruthTable
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
);
extern
word
*
Gia_ObjComputeTruthTable
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
);
extern
void
Gia_ObjComputeTruthTableStart
(
Gia_Man_t
*
p
,
int
nVarsMax
);
extern
void
Gia_ObjComputeTruthTableStart
(
Gia_Man_t
*
p
,
int
nVarsMax
);
extern
void
Gia_ObjComputeTruthTableStop
(
Gia_Man_t
*
p
);
extern
void
Gia_ObjComputeTruthTableStop
(
Gia_Man_t
*
p
);
extern
unsigned
*
Gia_ObjComputeTruthTableCut
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
Vec_Int_t
*
vLeaves
);
extern
word
*
Gia_ObjComputeTruthTableCut
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
Vec_Int_t
*
vLeaves
);
/*=== giaTsim.c ============================================================*/
/*=== giaTsim.c ============================================================*/
extern
Gia_Man_t
*
Gia_ManReduceConst
(
Gia_Man_t
*
pAig
,
int
fVerbose
);
extern
Gia_Man_t
*
Gia_ManReduceConst
(
Gia_Man_t
*
pAig
,
int
fVerbose
);
/*=== giaUtil.c ===========================================================*/
/*=== giaUtil.c ===========================================================*/
...
@@ -932,6 +932,7 @@ extern int Gia_ManMarkDangling( Gia_Man_t * p );
...
@@ -932,6 +932,7 @@ extern int Gia_ManMarkDangling( Gia_Man_t * p );
extern
Vec_Int_t
*
Gia_ManGetDangling
(
Gia_Man_t
*
p
);
extern
Vec_Int_t
*
Gia_ManGetDangling
(
Gia_Man_t
*
p
);
extern
void
Gia_ObjPrint
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
);
extern
void
Gia_ObjPrint
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
);
extern
void
Gia_ManPrint
(
Gia_Man_t
*
p
);
extern
void
Gia_ManPrint
(
Gia_Man_t
*
p
);
extern
void
Gia_ManPrintCo
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
);
extern
void
Gia_ManInvertConstraints
(
Gia_Man_t
*
pAig
);
extern
void
Gia_ManInvertConstraints
(
Gia_Man_t
*
pAig
);
extern
int
Gia_ManCompare
(
Gia_Man_t
*
p1
,
Gia_Man_t
*
p2
);
extern
int
Gia_ManCompare
(
Gia_Man_t
*
p1
,
Gia_Man_t
*
p2
);
extern
void
Gia_ManMarkFanoutDrivers
(
Gia_Man_t
*
p
);
extern
void
Gia_ManMarkFanoutDrivers
(
Gia_Man_t
*
p
);
...
...
src/aig/gia/giaTruth.c
View file @
db7852bb
...
@@ -141,7 +141,7 @@ int Gia_ObjCollectInternal( Gia_Man_t * p, Gia_Obj_t * pObj )
...
@@ -141,7 +141,7 @@ int Gia_ObjCollectInternal( Gia_Man_t * p, Gia_Obj_t * pObj )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
unsigne
d
*
Gia_ObjComputeTruthTable
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
wor
d
*
Gia_ObjComputeTruthTable
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
{
Gia_Obj_t
*
pTemp
,
*
pRoot
;
Gia_Obj_t
*
pTemp
,
*
pRoot
;
word
*
pTruth
,
*
pTruthL
,
*
pTruth0
,
*
pTruth1
;
word
*
pTruth
,
*
pTruthL
,
*
pTruth0
,
*
pTruth1
;
...
@@ -205,7 +205,7 @@ unsigned * Gia_ObjComputeTruthTable( Gia_Man_t * p, Gia_Obj_t * pObj )
...
@@ -205,7 +205,7 @@ unsigned * Gia_ObjComputeTruthTable( Gia_Man_t * p, Gia_Obj_t * pObj )
pTruth
=
Gla_ObjTruthNode
(
p
,
pRoot
);
pTruth
=
Gla_ObjTruthNode
(
p
,
pRoot
);
else
else
pTruth
=
NULL
;
pTruth
=
NULL
;
return
(
unsigned
*
)
Gla_ObjTruthDup
(
p
,
Gla_ObjTruthFree2
(
p
),
pTruth
,
Gia_ObjIsCo
(
pObj
)
&&
Gia_ObjFaninC0
(
pObj
)
);
return
Gla_ObjTruthDup
(
p
,
Gla_ObjTruthFree2
(
p
),
pTruth
,
Gia_ObjIsCo
(
pObj
)
&&
Gia_ObjFaninC0
(
pObj
)
);
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -227,7 +227,7 @@ void Gia_ObjComputeTruthTableTest( Gia_Man_t * p )
...
@@ -227,7 +227,7 @@ void Gia_ObjComputeTruthTableTest( Gia_Man_t * p )
int
i
;
int
i
;
Gia_ManForEachPo
(
p
,
pObj
,
i
)
Gia_ManForEachPo
(
p
,
pObj
,
i
)
{
{
pTruth
=
Gia_ObjComputeTruthTable
(
p
,
pObj
);
pTruth
=
(
unsigned
*
)
Gia_ObjComputeTruthTable
(
p
,
pObj
);
// Extra_PrintHex( stdout, pTruth, Gia_ManPiNum(p) ); printf( "\n" );
// Extra_PrintHex( stdout, pTruth, Gia_ManPiNum(p) ); printf( "\n" );
}
}
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
...
@@ -316,7 +316,7 @@ void Gia_ObjComputeTruthTableStop( Gia_Man_t * p )
...
@@ -316,7 +316,7 @@ void Gia_ObjComputeTruthTableStop( Gia_Man_t * p )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
unsigne
d
*
Gia_ObjComputeTruthTableCut
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pRoot
,
Vec_Int_t
*
vLeaves
)
wor
d
*
Gia_ObjComputeTruthTableCut
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pRoot
,
Vec_Int_t
*
vLeaves
)
{
{
Gia_Obj_t
*
pTemp
;
Gia_Obj_t
*
pTemp
;
word
*
pTruth
,
*
pTruthL
,
*
pTruth0
,
*
pTruth1
;
word
*
pTruth
,
*
pTruthL
,
*
pTruth0
,
*
pTruth1
;
...
@@ -358,7 +358,7 @@ unsigned * Gia_ObjComputeTruthTableCut( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_In
...
@@ -358,7 +358,7 @@ unsigned * Gia_ObjComputeTruthTableCut( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_In
assert
(
pTemp
->
fMark0
==
1
);
assert
(
pTemp
->
fMark0
==
1
);
pTemp
->
fMark0
=
0
;
pTemp
->
fMark0
=
0
;
}
}
return
(
unsigned
*
)
Gla_ObjTruthNode
(
p
,
pRoot
);
return
Gla_ObjTruthNode
(
p
,
pRoot
);
}
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
...
src/aig/gia/giaUtil.c
View file @
db7852bb
...
@@ -1109,6 +1109,22 @@ void Gia_ManPrint( Gia_Man_t * p )
...
@@ -1109,6 +1109,22 @@ void Gia_ManPrint( Gia_Man_t * p )
Gia_ManForEachObj
(
p
,
pObj
,
i
)
Gia_ManForEachObj
(
p
,
pObj
,
i
)
Gia_ObjPrint
(
p
,
pObj
);
Gia_ObjPrint
(
p
,
pObj
);
}
}
void
Gia_ManPrintCo_rec
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
if
(
Gia_ObjIsAnd
(
pObj
)
)
{
Gia_ManPrintCo_rec
(
p
,
Gia_ObjFanin0
(
pObj
)
);
Gia_ManPrintCo_rec
(
p
,
Gia_ObjFanin1
(
pObj
)
);
}
Gia_ObjPrint
(
p
,
pObj
);
}
void
Gia_ManPrintCo
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
assert
(
Gia_ObjIsCo
(
pObj
)
);
printf
(
"TFI cone of CO number %d:
\n
"
,
Gia_ObjCioId
(
pObj
)
);
Gia_ManPrintCo_rec
(
p
,
Gia_ObjFanin0
(
pObj
)
);
Gia_ObjPrint
(
p
,
pObj
);
}
/**Function*************************************************************
/**Function*************************************************************
...
...
src/base/abci/abcRec2.c
View file @
db7852bb
...
@@ -1107,7 +1107,7 @@ void Abc_NtkRecStart2( Gia_Man_t * pGia, int nVars, int nCuts, int fTrim )
...
@@ -1107,7 +1107,7 @@ void Abc_NtkRecStart2( Gia_Man_t * pGia, int nVars, int nCuts, int fTrim )
clk
=
clock
();
clk
=
clock
();
// Gia_ManForEachPo( pGia, pObj, i )
// Gia_ManForEachPo( pGia, pObj, i )
// {
// {
// pTruthSrc = Gia_ObjComputeTruthTable(pGia, pObj);
// pTruthSrc =
(unsigned *)
Gia_ObjComputeTruthTable(pGia, pObj);
// // pTruthDst = (unsigned *)Vec_PtrEntry( p->vTtNodes, Gia_ObjCioId(pObj) );
// // pTruthDst = (unsigned *)Vec_PtrEntry( p->vTtNodes, Gia_ObjCioId(pObj) );
// // Kit_TruthCopy(pTruthDst, pTruthSrc, p->nVars);
// // Kit_TruthCopy(pTruthDst, pTruthSrc, p->nVars);
// Rec_MemSetEntry( p, Gia_ObjCioId(pObj), pTruthSrc );
// Rec_MemSetEntry( p, Gia_ObjCioId(pObj), pTruthSrc );
...
@@ -1125,7 +1125,7 @@ timeInsert = clock();
...
@@ -1125,7 +1125,7 @@ timeInsert = clock();
assert
(
pFanin
->
fMark1
==
0
);
assert
(
pFanin
->
fMark1
==
0
);
pFanin
->
fMark1
=
1
;
pFanin
->
fMark1
=
1
;
// pTruth = (unsigned *)Vec_PtrEntry( p->vTtNodes, Gia_ObjCioId(pObj) );
// pTruth = (unsigned *)Vec_PtrEntry( p->vTtNodes, Gia_ObjCioId(pObj) );
pTruth
=
Gia_ObjComputeTruthTable
(
pGia
,
pObj
);
pTruth
=
(
unsigned
*
)
Gia_ObjComputeTruthTable
(
pGia
,
pObj
);
//pTruth = Rec_MemReadEntry( p, Gia_ObjCioId(pObj) );
//pTruth = Rec_MemReadEntry( p, Gia_ObjCioId(pObj) );
// add the resulting truth table to the hash table
// add the resulting truth table to the hash table
...
@@ -1569,7 +1569,7 @@ timeBuild = clock();
...
@@ -1569,7 +1569,7 @@ timeBuild = clock();
}
}
//assert(pObj);
//assert(pObj);
pObj
=
Gia_ManObj
(
pAig
,
Abc_Lit2Var
(
iRecObj
));
pObj
=
Gia_ManObj
(
pAig
,
Abc_Lit2Var
(
iRecObj
));
pTruth
=
Gia_ObjComputeTruthTable
(
pAig
,
pObj
);
pTruth
=
(
unsigned
*
)
Gia_ObjComputeTruthTable
(
pAig
,
pObj
);
s_pMan
->
timeBuild
+=
clock
()
-
timeBuild
;
s_pMan
->
timeBuild
+=
clock
()
-
timeBuild
;
if
(
Kit_TruthSupport
(
pTruth
,
nInputs
)
!=
Kit_BitMask
(
nLeaves
)
)
if
(
Kit_TruthSupport
(
pTruth
,
nInputs
)
!=
Kit_BitMask
(
nLeaves
)
)
...
@@ -2349,7 +2349,7 @@ void Abc_NtkRecAddFromLib2( Gia_Man_t * pGia2, Gia_Obj_t * pRoot, int nVars )
...
@@ -2349,7 +2349,7 @@ void Abc_NtkRecAddFromLib2( Gia_Man_t * pGia2, Gia_Obj_t * pRoot, int nVars )
Gia_ObjSetCopyF
(
pGia2
,
0
,
pAbcObj
,
Gia_ObjId
(
pGia
,
pObj
));
Gia_ObjSetCopyF
(
pGia2
,
0
,
pAbcObj
,
Gia_ObjId
(
pGia
,
pObj
));
}
}
assert
(
pObj
);
assert
(
pObj
);
pTruth
=
Gia_ObjComputeTruthTable
(
pGia
,
pObj
);
pTruth
=
(
unsigned
*
)
Gia_ObjComputeTruthTable
(
pGia
,
pObj
);
//pTruth = (unsigned *)Vec_PtrEntry( s_pMan->vTtNodes, Gia_ObjId(pGia, pObj) );
//pTruth = (unsigned *)Vec_PtrEntry( s_pMan->vTtNodes, Gia_ObjId(pGia, pObj) );
assert
(
Kit_TruthSupport
(
pTruth
,
nInputs
)
==
Kit_BitMask
(
nLeaves
)
);
assert
(
Kit_TruthSupport
(
pTruth
,
nInputs
)
==
Kit_BitMask
(
nLeaves
)
);
// compare the truth tables
// compare the truth tables
...
...
src/base/abci/abcRec3.c
View file @
db7852bb
This diff is collapsed.
Click to expand it.
src/base/io/io.c
View file @
db7852bb
...
@@ -2738,7 +2738,7 @@ int IoCommandWriteTruths( Abc_Frame_t * pAbc, int argc, char **argv )
...
@@ -2738,7 +2738,7 @@ int IoCommandWriteTruths( Abc_Frame_t * pAbc, int argc, char **argv )
Gia_Obj_t
*
pObj
;
Gia_Obj_t
*
pObj
;
char
*
pFileName
;
char
*
pFileName
;
FILE
*
pFile
;
FILE
*
pFile
;
unsigne
d
*
pTruth
;
wor
d
*
pTruth
;
int
nBytes
;
int
nBytes
;
int
fReverse
=
0
;
int
fReverse
=
0
;
int
fBinary
=
0
;
int
fBinary
=
0
;
...
@@ -2794,7 +2794,7 @@ int IoCommandWriteTruths( Abc_Frame_t * pAbc, int argc, char **argv )
...
@@ -2794,7 +2794,7 @@ int IoCommandWriteTruths( Abc_Frame_t * pAbc, int argc, char **argv )
if
(
fBinary
)
if
(
fBinary
)
fwrite
(
pTruth
,
nBytes
,
1
,
pFile
);
fwrite
(
pTruth
,
nBytes
,
1
,
pFile
);
else
else
Extra_PrintHex
(
pFile
,
pTruth
,
Gia_ManPiNum
(
pAbc
->
pGia
)
),
fprintf
(
pFile
,
"
\n
"
);
Extra_PrintHex
(
pFile
,
(
unsigned
*
)
pTruth
,
Gia_ManPiNum
(
pAbc
->
pGia
)
),
fprintf
(
pFile
,
"
\n
"
);
}
}
fclose
(
pFile
);
fclose
(
pFile
);
return
0
;
return
0
;
...
...
src/proof/abs/absRpm.c
View file @
db7852bb
...
@@ -665,7 +665,7 @@ void Abs_RpmPerformMark( Gia_Man_t * p, int nCutMax, int fVerbose, int fVeryVerb
...
@@ -665,7 +665,7 @@ void Abs_RpmPerformMark( Gia_Man_t * p, int nCutMax, int fVerbose, int fVeryVerb
nSize0
=
Abs_GiaSortNodes
(
p
,
vSupp
);
nSize0
=
Abs_GiaSortNodes
(
p
,
vSupp
);
assert
(
nSize0
>
0
&&
nSize0
<=
nCutMax
);
assert
(
nSize0
>
0
&&
nSize0
<=
nCutMax
);
// check if truth table has const cofs
// check if truth table has const cofs
pTruth
=
(
word
*
)
Gia_ObjComputeTruthTableCut
(
p
,
pObj
,
vSupp
);
pTruth
=
Gia_ObjComputeTruthTableCut
(
p
,
pObj
,
vSupp
);
fHasConst
=
!
Abs_GiaCheckTruth
(
pTruth
,
Vec_IntSize
(
vSupp
),
nSize0
);
fHasConst
=
!
Abs_GiaCheckTruth
(
pTruth
,
Vec_IntSize
(
vSupp
),
nSize0
);
if
(
fVeryVerbose
)
if
(
fVeryVerbose
)
{
{
...
...
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