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
81086552
Commit
81086552
authored
Jun 04, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrating new MFS package with GIA manager.
parent
90a88462
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
91 additions
and
9 deletions
+91
-9
abclib.dsp
+4
-0
src/aig/gia/gia.h
+1
-0
src/aig/gia/giaMfs.c
+0
-0
src/aig/gia/giaTruth.c
+47
-8
src/aig/gia/module.make
+1
-0
src/opt/sfm/sfm.h
+2
-1
src/opt/sfm/sfmInt.h
+2
-0
src/opt/sfm/sfmWin.c
+34
-0
No files found.
abclib.dsp
View file @
81086552
...
...
@@ -3591,6 +3591,10 @@ SOURCE=.\src\aig\gia\giaMem.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaMfs.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaMini.c
# End Source File
# Begin Source File
...
...
src/aig/gia/gia.h
View file @
81086552
...
...
@@ -1112,6 +1112,7 @@ extern int Gia_ManVerifyWithBoxes( Gia_Man_t * pGia, void * pPar
extern
void
*
Gia_ManUpdateTimMan
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vBoxPres
);
extern
Gia_Man_t
*
Gia_ManUpdateExtraAig
(
void
*
pTime
,
Gia_Man_t
*
pAig
,
Vec_Int_t
*
vBoxPres
);
/*=== giaTruth.c ===========================================================*/
extern
word
Gia_ObjComputeTruthTable6Lut
(
Gia_Man_t
*
p
,
int
iObj
,
Vec_Wrd_t
*
vTemp
);
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
word
*
Gia_ObjComputeTruthTable
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
);
...
...
src/aig/gia/giaMfs.c
0 → 100644
View file @
81086552
This diff is collapsed.
Click to expand it.
src/aig/gia/giaTruth.c
View file @
81086552
...
...
@@ -27,6 +27,15 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
static
word
s_Truth6
[
6
]
=
{
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
),
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
),
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
),
ABC_CONST
(
0xFF00FF00FF00FF00
),
ABC_CONST
(
0xFFFF0000FFFF0000
),
ABC_CONST
(
0xFFFFFFFF00000000
)
};
static
inline
word
*
Gla_ObjTruthElem
(
Gia_Man_t
*
p
,
int
i
)
{
return
(
word
*
)
Vec_PtrEntry
(
p
->
vTtInputs
,
i
);
}
static
inline
word
*
Gla_ObjTruthNode
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
return
Vec_WrdArray
(
p
->
vTtMemory
)
+
p
->
nTtWords
*
Gia_ObjNum
(
p
,
pObj
);
}
static
inline
word
*
Gla_ObjTruthFree1
(
Gia_Man_t
*
p
)
{
return
Vec_WrdArray
(
p
->
vTtMemory
)
+
p
->
nTtWords
*
254
;
}
...
...
@@ -40,6 +49,44 @@ static inline word * Gla_ObjTruthDup( Gia_Man_t * p, word * pDst, word * pSrc, i
/**Function*************************************************************
Synopsis [Computes truth table of a 6-LUT.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Gia_ObjComputeTruthTable6Lut_rec
(
Gia_Man_t
*
p
,
int
iObj
,
Vec_Wrd_t
*
vTemp
)
{
word
uTruth0
,
uTruth1
;
Gia_Obj_t
*
pObj
=
Gia_ManObj
(
p
,
iObj
);
if
(
!
Gia_ObjIsAnd
(
pObj
)
)
return
;
Gia_ObjComputeTruthTable6Lut_rec
(
p
,
Gia_ObjFaninId0p
(
p
,
pObj
),
vTemp
);
Gia_ObjComputeTruthTable6Lut_rec
(
p
,
Gia_ObjFaninId1p
(
p
,
pObj
),
vTemp
);
uTruth0
=
Vec_WrdEntry
(
vTemp
,
Gia_ObjFanin0
(
pObj
)
->
Value
);
uTruth0
=
Gia_ObjFaninC0
(
pObj
)
?
~
uTruth0
:
uTruth0
;
uTruth1
=
Vec_WrdEntry
(
vTemp
,
Gia_ObjFanin1
(
pObj
)
->
Value
);
uTruth1
=
Gia_ObjFaninC1
(
pObj
)
?
~
uTruth1
:
uTruth1
;
Vec_WrdWriteEntry
(
vTemp
,
iObj
,
uTruth0
&
uTruth1
);
}
word
Gia_ObjComputeTruthTable6Lut
(
Gia_Man_t
*
p
,
int
iObj
,
Vec_Wrd_t
*
vTemp
)
{
Gia_Obj_t
*
pObj
=
Gia_ManObj
(
p
,
iObj
);
int
i
,
Fanin
;
assert
(
Vec_WrdSize
(
vTemp
)
==
Gia_ManObjNum
(
p
)
);
assert
(
Gia_ObjIsLut
(
p
,
iObj
)
);
Gia_LutForEachFanin
(
p
,
iObj
,
Fanin
,
i
)
Vec_WrdWriteEntry
(
vTemp
,
Fanin
,
s_Truth6
[
i
]
);
assert
(
i
<=
6
);
Gia_ObjComputeTruthTable6Lut_rec
(
p
,
iObj
,
vTemp
);
return
Vec_WrdEntry
(
vTemp
,
iObj
);
}
/**Function*************************************************************
Synopsis [Computes truth table up to 6 inputs.]
Description []
...
...
@@ -68,14 +115,6 @@ void Gia_ObjComputeTruthTable6_rec( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Wrd_t *
}
word
Gia_ObjComputeTruthTable6
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
Vec_Int_t
*
vSupp
,
Vec_Wrd_t
*
vTruths
)
{
static
word
s_Truth6
[
6
]
=
{
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
),
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
),
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
),
ABC_CONST
(
0xFF00FF00FF00FF00
),
ABC_CONST
(
0xFFFF0000FFFF0000
),
ABC_CONST
(
0xFFFFFFFF00000000
)
};
Gia_Obj_t
*
pLeaf
;
int
i
;
assert
(
Vec_IntSize
(
vSupp
)
<=
6
);
...
...
src/aig/gia/module.make
View file @
81086552
...
...
@@ -28,6 +28,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaIso2.c
\
src/aig/gia/giaMan.c
\
src/aig/gia/giaMem.c
\
src/aig/gia/giaMfs.c
\
src/aig/gia/giaMini.c
\
src/aig/gia/giaMuxes.c
\
src/aig/gia/giaPat.c
\
...
...
src/opt/sfm/sfm.h
View file @
81086552
...
...
@@ -75,7 +75,8 @@ extern Vec_Int_t * Sfm_NodeReadFanins( Sfm_Ntk_t * p, int i );
extern
word
*
Sfm_NodeReadTruth
(
Sfm_Ntk_t
*
p
,
int
i
);
extern
int
Sfm_NodeReadFixed
(
Sfm_Ntk_t
*
p
,
int
i
);
extern
int
Sfm_NodeReadUsed
(
Sfm_Ntk_t
*
p
,
int
i
);
/*=== sfmSat.c ==========================================================*/
/*=== sfmWin.c ==========================================================*/
extern
Vec_Int_t
*
Sfm_NtkDfs
(
Sfm_Ntk_t
*
p
);
ABC_NAMESPACE_HEADER_END
...
...
src/opt/sfm/sfmInt.h
View file @
81086552
...
...
@@ -162,6 +162,8 @@ extern void Kit_DsdPrintFromTruth( unsigned * pTruth, int nVars );
/// MACRO DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
#define Sfm_NtkForEachPi( p, i ) for ( i = 0; i < p->nPis; i++ )
#define Sfm_NtkForEachPo( p, i ) for ( i = p->nObjs - p->nPos; i < p->nObjs; i++ )
#define Sfm_NtkForEachNode( p, i ) for ( i = p->nPis; i + p->nPos < p->nObjs; i++ )
#define Sfm_NtkForEachNodeReverse( p, i ) for ( i = p->nObjs - p->nPos - 1; i >= p->nPis; i-- )
#define Sfm_ObjForEachFanin( p, Node, Fan, i ) for ( i = 0; i < Sfm_ObjFaninNum(p, Node) && ((Fan = Sfm_ObjFanin(p, Node, i)), 1); i++ )
...
...
src/opt/sfm/sfmWin.c
View file @
81086552
...
...
@@ -123,6 +123,40 @@ static inline int Sfm_ObjIsTravIdCurrent2( Sfm_Ntk_t * p, int Id ) { return
/**Function*************************************************************
Synopsis [Collects used internal nodes in a topological order.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Sfm_NtkDfs_rec
(
Sfm_Ntk_t
*
p
,
int
iNode
,
Vec_Int_t
*
vNodes
)
{
int
i
,
iFanin
;
if
(
Sfm_ObjIsPi
(
p
,
iNode
)
)
return
;
if
(
Sfm_ObjIsTravIdCurrent
(
p
,
iNode
)
)
return
;
Sfm_ObjSetTravIdCurrent
(
p
,
iNode
);
Sfm_ObjForEachFanin
(
p
,
iNode
,
iFanin
,
i
)
Sfm_NtkDfs_rec
(
p
,
iFanin
,
vNodes
);
Vec_IntPush
(
vNodes
,
iNode
);
}
Vec_Int_t
*
Sfm_NtkDfs
(
Sfm_Ntk_t
*
p
)
{
Vec_Int_t
*
vNodes
;
int
i
;
vNodes
=
Vec_IntAlloc
(
p
->
nObjs
);
Sfm_NtkIncrementTravId
(
p
);
Sfm_NtkForEachPo
(
p
,
i
)
Sfm_NtkDfs_rec
(
p
,
Sfm_ObjFanin
(
p
,
i
,
0
),
vNodes
);
return
vNodes
;
}
/**Function*************************************************************
Synopsis [Check if this fanout overlaps with TFI cone of the node.]
Description []
...
...
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