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
e04ded56
Commit
e04ded56
authored
May 17, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Undoing commit from Nov 12, 2012: Extending GIA to represent pintypes and pins.
parent
760c1f60
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
32 deletions
+8
-32
src/aig/gia/gia.h
+0
-20
src/aig/gia/giaAiger.c
+2
-7
src/aig/gia/giaDup.c
+1
-3
src/aig/gia/giaHash.c
+1
-1
src/aig/gia/giaMan.c
+1
-1
src/base/abci/abcTim.c
+3
-0
No files found.
src/aig/gia/gia.h
View file @
e04ded56
...
@@ -115,8 +115,6 @@ struct Gia_Man_t_
...
@@ -115,8 +115,6 @@ struct Gia_Man_t_
int
nConstrs
;
// the number of constraints
int
nConstrs
;
// the number of constraints
int
nTravIds
;
// the current traversal ID
int
nTravIds
;
// the current traversal ID
int
nFront
;
// frontier size
int
nFront
;
// frontier size
int
nPinTypes
;
// the number of pintypes
int
nPins
;
// the number of pins
int
*
pReprsOld
;
// representatives (for CIs and ANDs)
int
*
pReprsOld
;
// representatives (for CIs and ANDs)
Gia_Rpr_t
*
pReprs
;
// representatives (for CIs and ANDs)
Gia_Rpr_t
*
pReprs
;
// representatives (for CIs and ANDs)
int
*
pNexts
;
// next nodes in the equivalence classes
int
*
pNexts
;
// next nodes in the equivalence classes
...
@@ -324,8 +322,6 @@ static inline int Gia_ObjIsAndOrConst0( Gia_Obj_t * pObj ) {
...
@@ -324,8 +322,6 @@ static inline int Gia_ObjIsAndOrConst0( Gia_Obj_t * pObj ) {
static
inline
int
Gia_ObjIsCi
(
Gia_Obj_t
*
pObj
)
{
return
pObj
->
fTerm
&&
pObj
->
iDiff0
==
GIA_NONE
;
}
static
inline
int
Gia_ObjIsCi
(
Gia_Obj_t
*
pObj
)
{
return
pObj
->
fTerm
&&
pObj
->
iDiff0
==
GIA_NONE
;
}
static
inline
int
Gia_ObjIsCo
(
Gia_Obj_t
*
pObj
)
{
return
pObj
->
fTerm
&&
pObj
->
iDiff0
!=
GIA_NONE
;
}
static
inline
int
Gia_ObjIsCo
(
Gia_Obj_t
*
pObj
)
{
return
pObj
->
fTerm
&&
pObj
->
iDiff0
!=
GIA_NONE
;
}
static
inline
int
Gia_ObjIsAnd
(
Gia_Obj_t
*
pObj
)
{
return
!
pObj
->
fTerm
&&
pObj
->
iDiff0
!=
GIA_NONE
;
}
static
inline
int
Gia_ObjIsAnd
(
Gia_Obj_t
*
pObj
)
{
return
!
pObj
->
fTerm
&&
pObj
->
iDiff0
!=
GIA_NONE
;
}
static
inline
int
Gia_ObjIsPinType
(
Gia_Obj_t
*
pObj
)
{
return
Gia_ObjIsAnd
(
pObj
)
&&
pObj
->
iDiff0
==
pObj
->
iDiff1
;
}
static
inline
int
Gia_ObjIsPin
(
Gia_Obj_t
*
pObj
)
{
return
Gia_ObjIsAnd
(
pObj
)
&&
(
Gia_ObjIsPinType
(
pObj
-
pObj
->
iDiff0
)
||
Gia_ObjIsPinType
(
pObj
-
pObj
->
iDiff1
));
}
static
inline
int
Gia_ObjIsCand
(
Gia_Obj_t
*
pObj
)
{
return
Gia_ObjIsAnd
(
pObj
)
||
Gia_ObjIsCi
(
pObj
);
}
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_ManObjIsConst0
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
){
return
pObj
==
p
->
pObjs
;
}
...
@@ -498,22 +494,6 @@ static inline int Gia_ManAppendAnd( Gia_Man_t * p, int iLit0, int iLit1 )
...
@@ -498,22 +494,6 @@ static inline int Gia_ManAppendAnd( Gia_Man_t * p, int iLit0, int iLit1 )
}
}
return
Gia_ObjId
(
p
,
pObj
)
<<
1
;
return
Gia_ObjId
(
p
,
pObj
)
<<
1
;
}
}
static
inline
int
Gia_ManAppendPinType
(
Gia_Man_t
*
p
,
int
iLit
)
{
Gia_Obj_t
*
pObj
=
Gia_ManAppendObj
(
p
);
assert
(
iLit
>=
0
&&
Abc_Lit2Var
(
iLit
)
<
Gia_ManObjNum
(
p
)
);
pObj
->
iDiff0
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit
);
pObj
->
fCompl0
=
Abc_LitIsCompl
(
iLit
);
pObj
->
iDiff1
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit
);
pObj
->
fCompl1
=
Abc_LitIsCompl
(
iLit
);
if
(
p
->
pFanData
)
{
Gia_ObjAddFanout
(
p
,
Gia_ObjFanin0
(
pObj
),
pObj
);
Gia_ObjAddFanout
(
p
,
Gia_ObjFanin1
(
pObj
),
pObj
);
}
p
->
nPinTypes
++
;
return
Gia_ObjId
(
p
,
pObj
)
<<
1
;
}
static
inline
int
Gia_ManAppendCo
(
Gia_Man_t
*
p
,
int
iLit0
)
static
inline
int
Gia_ManAppendCo
(
Gia_Man_t
*
p
,
int
iLit0
)
{
{
Gia_Obj_t
*
pObj
;
Gia_Obj_t
*
pObj
;
...
...
src/aig/gia/giaAiger.c
View file @
e04ded56
...
@@ -294,12 +294,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fSkipS
...
@@ -294,12 +294,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fSkipS
iNode1
=
Abc_LitNotCond
(
Vec_IntEntry
(
vNodes
,
uLit1
>>
1
),
uLit1
&
1
);
iNode1
=
Abc_LitNotCond
(
Vec_IntEntry
(
vNodes
,
uLit1
>>
1
),
uLit1
&
1
);
assert
(
Vec_IntSize
(
vNodes
)
==
i
+
1
+
nInputs
+
nLatches
);
assert
(
Vec_IntSize
(
vNodes
)
==
i
+
1
+
nInputs
+
nLatches
);
if
(
fSkipStrash
)
if
(
fSkipStrash
)
{
Vec_IntPush
(
vNodes
,
Gia_ManAppendAnd
(
pNew
,
iNode0
,
iNode1
)
);
if
(
iNode0
==
1
&&
iNode1
==
1
)
Vec_IntPush
(
vNodes
,
Gia_ManAppendPinType
(
pNew
,
1
)
);
else
Vec_IntPush
(
vNodes
,
Gia_ManAppendAnd
(
pNew
,
iNode0
,
iNode1
)
);
}
else
else
Vec_IntPush
(
vNodes
,
Gia_ManHashAnd
(
pNew
,
iNode0
,
iNode1
)
);
Vec_IntPush
(
vNodes
,
Gia_ManHashAnd
(
pNew
,
iNode0
,
iNode1
)
);
}
}
...
@@ -1091,7 +1086,7 @@ void Gia_AigerWrite( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, int
...
@@ -1091,7 +1086,7 @@ void Gia_AigerWrite( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, int
uLit
=
Abc_Var2Lit
(
i
,
0
);
uLit
=
Abc_Var2Lit
(
i
,
0
);
uLit0
=
Gia_ObjFaninLit0
(
pObj
,
i
);
uLit0
=
Gia_ObjFaninLit0
(
pObj
,
i
);
uLit1
=
Gia_ObjFaninLit1
(
pObj
,
i
);
uLit1
=
Gia_ObjFaninLit1
(
pObj
,
i
);
assert
(
p
->
nPinTypes
||
uLit0
<
uLit1
);
assert
(
uLit0
<
uLit1
);
Pos
=
Gia_AigerWriteUnsignedBuffer
(
pBuffer
,
Pos
,
uLit
-
uLit1
);
Pos
=
Gia_AigerWriteUnsignedBuffer
(
pBuffer
,
Pos
,
uLit
-
uLit1
);
Pos
=
Gia_AigerWriteUnsignedBuffer
(
pBuffer
,
Pos
,
uLit1
-
uLit0
);
Pos
=
Gia_AigerWriteUnsignedBuffer
(
pBuffer
,
Pos
,
uLit1
-
uLit0
);
if
(
Pos
>
nBufferSize
-
10
)
if
(
Pos
>
nBufferSize
-
10
)
...
...
src/aig/gia/giaDup.c
View file @
e04ded56
...
@@ -761,9 +761,7 @@ Gia_Man_t * Gia_ManDupMarked( Gia_Man_t * p )
...
@@ -761,9 +761,7 @@ Gia_Man_t * Gia_ManDupMarked( Gia_Man_t * p )
if
(
pObj
->
fMark0
)
if
(
pObj
->
fMark0
)
continue
;
continue
;
pObj
->
fMark0
=
0
;
pObj
->
fMark0
=
0
;
if
(
p
->
nPinTypes
&&
Gia_ObjIsPinType
(
pObj
)
)
if
(
Gia_ObjIsAnd
(
pObj
)
)
pObj
->
Value
=
Gia_ManAppendPinType
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
)
);
else
if
(
Gia_ObjIsAnd
(
pObj
)
)
pObj
->
Value
=
Gia_ManAppendAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
pObj
->
Value
=
Gia_ManAppendAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
else
if
(
Gia_ObjIsCi
(
pObj
)
)
else
if
(
Gia_ObjIsCi
(
pObj
)
)
{
{
...
...
src/aig/gia/giaHash.c
View file @
e04ded56
...
@@ -193,7 +193,7 @@ void Gia_ManHashResize( Gia_Man_t * p )
...
@@ -193,7 +193,7 @@ void Gia_ManHashResize( Gia_Man_t * p )
Counter
++
;
Counter
++
;
}
}
Counter2
=
Gia_ManAndNum
(
p
);
Counter2
=
Gia_ManAndNum
(
p
);
assert
(
p
->
nPinTypes
||
Counter
==
Counter2
);
assert
(
Counter
==
Counter2
);
ABC_FREE
(
pHTableOld
);
ABC_FREE
(
pHTableOld
);
// if ( p->fVerbose )
// if ( p->fVerbose )
// printf( "Resizing GIA hash table: %d -> %d.\n", nHTableOld, p->nHTable );
// printf( "Resizing GIA hash table: %d -> %d.\n", nHTableOld, p->nHTable );
...
...
src/aig/gia/giaMan.c
View file @
e04ded56
...
@@ -311,7 +311,7 @@ void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut )
...
@@ -311,7 +311,7 @@ void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut )
printf
(
" ff =%7d"
,
Gia_ManRegNum
(
p
)
);
printf
(
" ff =%7d"
,
Gia_ManRegNum
(
p
)
);
printf
(
" and =%8d"
,
Gia_ManAndNum
(
p
)
);
printf
(
" and =%8d"
,
Gia_ManAndNum
(
p
)
);
printf
(
" lev =%5d"
,
Gia_ManLevelNum
(
p
)
);
Vec_IntFreeP
(
&
p
->
vLevels
);
printf
(
" lev =%5d"
,
Gia_ManLevelNum
(
p
)
);
Vec_IntFreeP
(
&
p
->
vLevels
);
if
(
fCut
&&
p
->
nPinTypes
==
0
)
if
(
fCut
)
printf
(
" cut = %d(%d)"
,
Gia_ManCrossCut
(
p
,
0
),
Gia_ManCrossCut
(
p
,
1
)
);
printf
(
" cut = %d(%d)"
,
Gia_ManCrossCut
(
p
,
0
),
Gia_ManCrossCut
(
p
,
1
)
);
// printf( " mem =%5.2f MB", 1.0*(sizeof(Gia_Obj_t)*p->nObjs + sizeof(int)*(Vec_IntSize(p->vCis) + Vec_IntSize(p->vCos)))/(1<<20) );
// printf( " mem =%5.2f MB", 1.0*(sizeof(Gia_Obj_t)*p->nObjs + sizeof(int)*(Vec_IntSize(p->vCis) + Vec_IntSize(p->vCos)))/(1<<20) );
printf
(
" mem =%5.2f MB"
,
1
.
0
*
(
sizeof
(
Gia_Obj_t
)
*
p
->
nObjsAlloc
+
sizeof
(
int
)
*
(
Vec_IntCap
(
p
->
vCis
)
+
Vec_IntCap
(
p
->
vCos
)))
/
(
1
<<
20
)
);
printf
(
" mem =%5.2f MB"
,
1
.
0
*
(
sizeof
(
Gia_Obj_t
)
*
p
->
nObjsAlloc
+
sizeof
(
int
)
*
(
Vec_IntCap
(
p
->
vCis
)
+
Vec_IntCap
(
p
->
vCos
)))
/
(
1
<<
20
)
);
...
...
src/base/abci/abcTim.c
View file @
e04ded56
...
@@ -87,6 +87,8 @@ int Abc_NtkTestTimNodeStrash( Gia_Man_t * pGia, Abc_Obj_t * pNode )
...
@@ -87,6 +87,8 @@ int Abc_NtkTestTimNodeStrash( Gia_Man_t * pGia, Abc_Obj_t * pNode )
}
}
#if 0
/**Function*************************************************************
/**Function*************************************************************
Synopsis [Derives GIA manager using special pins to denote box boundaries.]
Synopsis [Derives GIA manager using special pins to denote box boundaries.]
...
@@ -174,6 +176,7 @@ void Abc_NtkTestPinGia( Abc_Ntk_t * pNtk, int fWhiteBoxOnly, int fVerbose )
...
@@ -174,6 +176,7 @@ void Abc_NtkTestPinGia( Abc_Ntk_t * pNtk, int fWhiteBoxOnly, int fVerbose )
Abc_NtkName(pNtk), pFileName );
Abc_NtkName(pNtk), pFileName );
}
}
#endif
/**Function*************************************************************
/**Function*************************************************************
...
...
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