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
edf3622c
Commit
edf3622c
authored
Feb 13, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Several improvements to CBA data-structure.
parent
ea2d82ab
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
54 additions
and
54 deletions
+54
-54
src/base/abc/abcFunc.c
+1
-1
src/base/cba/cba.h
+37
-12
src/base/cba/cbaBlast.c
+3
-12
src/base/cba/cbaNtk.c
+4
-22
src/base/cba/cbaPrsBuild.c
+4
-4
src/base/cba/cbaPtrAbc.c
+2
-2
src/base/cba/cbaWriteVer.c
+2
-0
src/base/wlc/wlcReadSmt.c
+0
-1
src/misc/extra/extraBddMisc.c
+1
-0
No files found.
src/base/abc/abcFunc.c
View file @
edf3622c
...
...
@@ -370,7 +370,7 @@ int Abc_NtkBddToSop( Abc_Ntk_t * pNtk, int fDirect, int nCubeLimit )
{
// collect all BDDs into one array
Vec_Ptr_t
*
vFuncs
=
Vec_PtrAlloc
(
Abc_NtkNodeNum
(
pNtk
)
);
assert
(
!
Cudd_ReorderingStatus
(
dd
,
&
nCubes
)
);
assert
(
!
Cudd_ReorderingStatus
(
dd
,
(
Cudd_ReorderingType
*
)
&
nCubes
)
);
Abc_NtkForEachNode
(
pNtk
,
pNode
,
i
)
if
(
!
Abc_ObjIsBarBuf
(
pNode
)
)
Vec_PtrPush
(
vFuncs
,
pNode
->
pData
);
...
...
src/base/cba/cba.h
View file @
edf3622c
...
...
@@ -241,14 +241,15 @@ static inline int Cba_ObjIsCio( Cba_Ntk_t * p, int i ) { r
static
inline
int
Cba_ObjFanin
(
Cba_Ntk_t
*
p
,
int
i
)
{
assert
(
Cba_ObjIsCo
(
p
,
i
));
return
Vec_IntEntry
(
&
p
->
vFanin
,
i
);
}
static
inline
int
Cba_ObjIndex
(
Cba_Ntk_t
*
p
,
int
i
)
{
assert
(
Cba_ObjIsCio
(
p
,
i
));
return
Vec_IntEntry
(
&
p
->
vIndex
,
i
);
}
static
inline
int
Cba_ObjFaninTwo
(
Cba_Ntk_t
*
p
,
int
i
)
{
return
Cba_ObjFanin
(
p
,
Cba_ObjFanin
(
p
,
i
));
}
static
inline
int
Cba_ObjName
(
Cba_Ntk_t
*
p
,
int
i
)
{
return
Vec_IntEntry
(
&
p
->
vName
,
i
);
}
static
inline
int
Cba_ObjNameInt
(
Cba_Ntk_t
*
p
,
int
i
)
{
assert
(
!
Cba_ObjIsCo
(
p
,
i
));
return
Vec_IntEntry
(
&
p
->
vName
,
i
);
}
static
inline
int
Cba_ObjName
(
Cba_Ntk_t
*
p
,
int
i
)
{
return
Cba_ObjIsCo
(
p
,
i
)
?
Cba_ObjNameInt
(
p
,
Cba_ObjFanin
(
p
,
i
))
:
Cba_ObjNameInt
(
p
,
i
);
}
static
inline
int
Cba_ObjRange
(
Cba_Ntk_t
*
p
,
int
i
)
{
return
Vec_IntEntry
(
&
p
->
vRange
,
i
);
}
static
inline
int
Cba_ObjCopy
(
Cba_Ntk_t
*
p
,
int
i
)
{
return
Vec_IntEntry
(
&
p
->
vCopy
,
i
);
}
static
inline
char
*
Cba_ObjNameStr
(
Cba_Ntk_t
*
p
,
int
i
)
{
return
Cba_NtkStr
(
p
,
Cba_ObjName
(
p
,
i
));
}
static
inline
char
*
Cba_ObjRangeStr
(
Cba_Ntk_t
*
p
,
int
i
)
{
return
Cba_NtkStr
(
p
,
Cba_ObjRange
(
p
,
i
));
}
static
inline
void
Cba_ObjSetFanin
(
Cba_Ntk_t
*
p
,
int
i
,
int
x
)
{
assert
(
Cba_ObjFanin
(
p
,
i
)
==
-
1
);
Vec_IntWriteEntry
(
&
p
->
vFanin
,
i
,
x
);
}
static
inline
void
Cba_ObjSetFanin
(
Cba_Ntk_t
*
p
,
int
i
,
int
x
)
{
assert
(
Cba_ObjFanin
(
p
,
i
)
==
-
1
&&
Cba_ObjIsCo
(
p
,
i
));
Vec_IntWriteEntry
(
&
p
->
vFanin
,
i
,
x
);
}
static
inline
void
Cba_ObjSetIndex
(
Cba_Ntk_t
*
p
,
int
i
,
int
x
)
{
assert
(
Cba_ObjIndex
(
p
,
i
)
==
-
1
);
Vec_IntWriteEntry
(
&
p
->
vIndex
,
i
,
x
);
}
static
inline
void
Cba_ObjSetName
(
Cba_Ntk_t
*
p
,
int
i
,
int
x
)
{
assert
(
Cba_ObjName
(
p
,
i
)
==
0
);
Vec_IntWriteEntry
(
&
p
->
vName
,
i
,
x
);
}
static
inline
void
Cba_ObjSetName
(
Cba_Ntk_t
*
p
,
int
i
,
int
x
)
{
assert
(
Cba_ObjName
(
p
,
i
)
==
0
&&
!
Cba_ObjIsCo
(
p
,
i
));
Vec_IntWriteEntry
(
&
p
->
vName
,
i
,
x
);
}
static
inline
void
Cba_ObjSetRange
(
Cba_Ntk_t
*
p
,
int
i
,
int
x
)
{
assert
(
Cba_ObjRange
(
p
,
i
)
==
0
);
Vec_IntWriteEntry
(
&
p
->
vRange
,
i
,
x
);
}
static
inline
void
Cba_ObjSetCopy
(
Cba_Ntk_t
*
p
,
int
i
,
int
x
)
{
assert
(
Cba_ObjCopy
(
p
,
i
)
==
-
1
);
Vec_IntWriteEntry
(
&
p
->
vCopy
,
i
,
x
);
}
...
...
@@ -324,9 +325,11 @@ static inline int Cba_NtkNameRanges( char * pName, int * pRanges, char * pSymbs
for ( i = 0; (i < Cba_ManNtkNum(p)) && (((pNtk) = Cba_ManNtk(p, i)), 1); i++ )
#define Cba_NtkForEachPi( p, iObj, i ) \
for ( i = 0; (i < Cba_NtkPiNum(p)) && (((iObj) =
Vec_IntEntry(&p->vInputs
, i)), 1); i++ )
for ( i = 0; (i < Cba_NtkPiNum(p)) && (((iObj) =
Cba_NtkPi(p
, i)), 1); i++ )
#define Cba_NtkForEachPo( p, iObj, i ) \
for ( i = 0; (i < Cba_NtkPoNum(p)) && (((iObj) = Vec_IntEntry(&p->vOutputs, i)), 1); i++ )
for ( i = 0; (i < Cba_NtkPoNum(p)) && (((iObj) = Cba_NtkPo(p, i)), 1); i++ )
#define Cba_NtkForEachPoDriver( p, iObj, i ) \
for ( i = 0; (i < Cba_NtkPoNum(p)) && (((iObj) = Cba_ObjFanin(p, Cba_NtkPo(p, i))), 1); i++ )
#define Cba_NtkForEachObj( p, i ) \
for ( i = 0; (i < Cba_NtkObjNum(p)); i++ )
...
...
@@ -394,7 +397,7 @@ static inline int Cba_ObjAlloc( Cba_Ntk_t * p, Cba_ObjType_t Type, int Fanin )
static
inline
int
Cba_ObjDup
(
Cba_Ntk_t
*
pNew
,
Cba_Ntk_t
*
p
,
int
i
)
{
int
iObj
=
Cba_ObjAlloc
(
pNew
,
Cba_ObjType
(
p
,
i
),
Cba_ObjIsBox
(
p
,
i
)
?
Cba_BoxNtkId
(
p
,
i
)
:
-
1
);
if
(
Cba_NtkHasNames
(
p
)
&&
Cba_NtkHasNames
(
pNew
)
)
if
(
Cba_NtkHasNames
(
p
)
&&
Cba_NtkHasNames
(
pNew
)
&&
!
Cba_ObjIsCo
(
p
,
i
)
)
Cba_ObjSetName
(
pNew
,
iObj
,
Cba_ObjName
(
p
,
i
)
);
if
(
Cba_NtkHasRanges
(
p
)
&&
Cba_NtkHasRanges
(
pNew
)
)
Cba_ObjSetRange
(
pNew
,
iObj
,
Cba_ObjRange
(
p
,
i
)
);
...
...
@@ -473,7 +476,7 @@ static inline void Cba_NtkDup( Cba_Ntk_t * pNew, Cba_Ntk_t * p )
Cba_ObjDup
(
pNew
,
p
,
iObj
);
Cba_NtkForEachCo
(
p
,
iObj
)
Cba_ObjSetFanin
(
pNew
,
Cba_ObjCopy
(
p
,
iObj
),
Cba_ObjCopy
(
p
,
Cba_ObjFanin
(
p
,
iObj
))
);
//Cba_NtkFreeCopies( p ); // needed for host ntk
//Cba_NtkFreeCopies( p ); // needed for
name transfer and
host ntk
assert
(
Cba_NtkObjNum
(
pNew
)
==
Cba_NtkObjNumAlloc
(
pNew
)
);
}
static
inline
void
Cba_NtkDupUserBoxes
(
Cba_Ntk_t
*
pNew
,
Cba_Ntk_t
*
p
)
...
...
@@ -482,8 +485,6 @@ static inline void Cba_NtkDupUserBoxes( Cba_Ntk_t * pNew, Cba_Ntk_t * p )
assert
(
pNew
!=
p
);
Cba_NtkAlloc
(
pNew
,
Cba_NtkNameId
(
p
),
Cba_NtkPiNum
(
p
),
Cba_NtkPoNum
(
p
),
Cba_NtkObjNum
(
p
)
+
3
*
Cba_NtkCoNum
(
p
)
);
Cba_NtkStartCopies
(
p
);
if
(
Cba_NtkHasNames
(
p
)
)
Cba_NtkStartNames
(
pNew
);
Cba_NtkForEachPi
(
p
,
iObj
,
i
)
Cba_ObjDup
(
pNew
,
p
,
iObj
);
Cba_NtkForEachPo
(
p
,
iObj
,
i
)
...
...
@@ -492,11 +493,29 @@ static inline void Cba_NtkDupUserBoxes( Cba_Ntk_t * pNew, Cba_Ntk_t * p )
Cba_BoxDup
(
pNew
,
p
,
iObj
);
// connect feed-throughs
Cba_NtkForEachCo
(
p
,
iObj
)
if
(
Cba_ObjCopy
(
p
,
iObj
)
>=
0
&&
Cba_ObjCopy
(
p
,
Cba_ObjFanin
(
p
,
iObj
))
>=
0
&&
Cba_ObjName
(
p
,
iObj
)
==
Cba_ObjName
(
p
,
Cba_ObjFanin
(
p
,
iObj
))
)
if
(
Cba_ObjCopy
(
p
,
iObj
)
>=
0
&&
Cba_ObjCopy
(
p
,
Cba_ObjFanin
(
p
,
iObj
))
>=
0
)
Cba_ObjSetFanin
(
pNew
,
Cba_ObjCopy
(
p
,
iObj
),
Cba_ObjCopy
(
p
,
Cba_ObjFanin
(
p
,
iObj
))
);
}
static
inline
void
Cba_NtkMoveNames
(
Cba_Ntk_t
*
pNew
,
Cba_Ntk_t
*
p
)
{
int
i
,
iBox
,
iObj
;
assert
(
Cba_NtkHasNames
(
p
)
);
assert
(
!
Cba_NtkHasNames
(
pNew
)
);
Cba_NtkStartNames
(
pNew
);
Cba_NtkForEachPi
(
p
,
iObj
,
i
)
Cba_ObjSetName
(
pNew
,
Cba_ObjCopy
(
p
,
iObj
),
Cba_ObjName
(
p
,
iObj
)
);
Cba_NtkForEachBoxUser
(
p
,
iBox
)
Cba_BoxForEachBo
(
p
,
iBox
,
iObj
,
i
)
Cba_ObjSetName
(
pNew
,
Cba_ObjCopy
(
p
,
iObj
),
Cba_ObjName
(
p
,
iObj
)
);
Cba_NtkForEachBoxUser
(
p
,
iBox
)
Cba_BoxForEachBi
(
p
,
iBox
,
iObj
,
i
)
if
(
!
Cba_ObjName
(
pNew
,
Cba_ObjFanin
(
pNew
,
Cba_ObjCopy
(
p
,
iObj
)))
)
Cba_ObjSetName
(
pNew
,
Cba_ObjFanin
(
pNew
,
Cba_ObjCopy
(
p
,
iObj
)),
Cba_ObjName
(
p
,
iObj
)
);
Cba_NtkForEachPo
(
p
,
iObj
,
i
)
if
(
!
Cba_ObjName
(
pNew
,
Cba_ObjFanin
(
pNew
,
Cba_ObjCopy
(
p
,
iObj
)))
)
Cba_ObjSetName
(
pNew
,
Cba_ObjFanin
(
pNew
,
Cba_ObjCopy
(
p
,
iObj
)),
Cba_ObjName
(
p
,
iObj
)
);
}
static
inline
void
Cba_NtkFree
(
Cba_Ntk_t
*
p
)
{
Vec_IntErase
(
&
p
->
vInputs
);
...
...
@@ -619,6 +638,12 @@ static inline Cba_Man_t * Cba_ManDupUserBoxes( Cba_Man_t * p )
Cba_NtkSetHost
(
Cba_NtkCopyNtk
(
pNew
,
pNtk
),
Cba_NtkCopy
(
pHost
),
Cba_ObjCopy
(
pHost
,
Cba_NtkHostObj
(
pNtk
))
);
return
pNew
;
}
static
inline
void
Cba_ManMoveNames
(
Cba_Man_t
*
pNew
,
Cba_Man_t
*
p
)
{
Cba_Ntk_t
*
pNtk
;
int
i
;
Cba_ManForEachNtk
(
p
,
pNtk
,
i
)
Cba_NtkMoveNames
(
Cba_NtkCopyNtk
(
pNew
,
pNtk
),
pNtk
);
}
static
inline
void
Cba_ManFree
(
Cba_Man_t
*
p
)
...
...
src/base/cba/cbaBlast.c
View file @
edf3622c
...
...
@@ -300,9 +300,7 @@ void Cba_NtkCreateAndConnectBuffer( Gia_Man_t * pGia, Gia_Obj_t * pObj, Cba_Ntk_
int
iObj
;
if
(
pGia
&&
Gia_ObjFaninId0p
(
pGia
,
pObj
)
>
0
)
{
assert
(
Cba_ObjName
(
p
,
Gia_ObjFanin0
(
pObj
)
->
Value
)
!=
Cba_ObjName
(
p
,
iTerm
)
);
// not a feedthrough
iObj
=
Cba_ObjAlloc
(
p
,
CBA_OBJ_BI
,
Gia_ObjFanin0
(
pObj
)
->
Value
);
Cba_ObjSetName
(
p
,
iObj
,
Cba_ObjName
(
p
,
Gia_ObjFanin0
(
pObj
)
->
Value
)
);
Cba_ObjAlloc
(
p
,
Gia_ObjFaninC0
(
pObj
)
?
CBA_BOX_INV
:
CBA_BOX_BUF
,
-
1
);
}
else
...
...
@@ -310,7 +308,6 @@ void Cba_NtkCreateAndConnectBuffer( Gia_Man_t * pGia, Gia_Obj_t * pObj, Cba_Ntk_
Cba_ObjAlloc
(
p
,
pGia
&&
Gia_ObjFaninC0
(
pObj
)
?
CBA_BOX_CT
:
CBA_BOX_CF
,
-
1
);
}
iObj
=
Cba_ObjAlloc
(
p
,
CBA_OBJ_BO
,
-
1
);
Cba_ObjSetName
(
p
,
iObj
,
Cba_ObjName
(
p
,
iTerm
)
);
Cba_ObjSetFanin
(
p
,
iTerm
,
iObj
);
}
void
Cba_NtkInsertGia
(
Cba_Man_t
*
p
,
Gia_Man_t
*
pGia
)
...
...
@@ -353,9 +350,7 @@ void Cba_NtkInsertGia( Cba_Man_t * p, Gia_Man_t * pGia )
Type
=
CBA_BOX_AND
;
// create box
iTerm
=
Cba_ObjAlloc
(
pNtk
,
CBA_OBJ_BI
,
iLit1
);
Cba_ObjSetName
(
pNtk
,
iTerm
,
Cba_ObjName
(
pNtk
,
iLit1
)
);
iTerm
=
Cba_ObjAlloc
(
pNtk
,
CBA_OBJ_BI
,
iLit0
);
Cba_ObjSetName
(
pNtk
,
iTerm
,
Cba_ObjName
(
pNtk
,
iLit0
)
);
Cba_ObjAlloc
(
pNtk
,
Type
,
-
1
);
pObj
->
Value
=
Cba_ObjAlloc
(
pNtk
,
CBA_OBJ_BO
,
-
1
);
}
...
...
@@ -384,6 +379,7 @@ Cba_Man_t * Cba_ManInsertGia( Cba_Man_t * p, Gia_Man_t * pGia )
Cba_ManMarkNodesGia
(
p
,
pGia
);
Cba_ManRemapBarbufs
(
pNew
,
p
);
Cba_NtkInsertGia
(
pNew
,
pGia
);
Cba_ManMoveNames
(
pNew
,
p
);
return
pNew
;
}
...
...
@@ -450,15 +446,13 @@ void Cba_ManMarkNodesAbc( Cba_Man_t * p, Abc_Ntk_t * pNtk )
void
Cba_NtkCreateOrConnectFanin
(
Abc_Obj_t
*
pFanin
,
Cba_Ntk_t
*
p
,
int
iTerm
)
{
int
iObj
;
if
(
pFanin
&&
Abc_NodeIsSeriousGate
(
pFanin
)
&&
Cba_ObjName
(
p
,
pFanin
->
iTemp
)
==
-
1
)
// gate without name
if
(
pFanin
&&
Abc_NodeIsSeriousGate
(
pFanin
)
)
//
&& Cba_ObjName(p, pFanin->iTemp) == -1 ) // gate without name
{
iObj
=
pFanin
->
iTemp
;
}
else
if
(
pFanin
&&
(
Abc_ObjIsPi
(
pFanin
)
||
Abc_ObjIsBarBuf
(
pFanin
)
||
Abc_NodeIsSeriousGate
(
pFanin
))
)
// PI/BO or gate with name
{
assert
(
Cba_ObjName
(
p
,
pFanin
->
iTemp
)
!=
Cba_ObjName
(
p
,
iTerm
)
);
// not a feedthrough
iObj
=
Cba_ObjAlloc
(
p
,
CBA_OBJ_BI
,
pFanin
->
iTemp
);
Cba_ObjSetName
(
p
,
iObj
,
Cba_ObjName
(
p
,
pFanin
->
iTemp
)
);
Cba_ObjAlloc
(
p
,
CBA_BOX_GATE
,
p
->
pDesign
->
ElemGates
[
2
]
);
// buffer
iObj
=
Cba_ObjAlloc
(
p
,
CBA_OBJ_BO
,
-
1
);
}
...
...
@@ -468,7 +462,6 @@ void Cba_NtkCreateOrConnectFanin( Abc_Obj_t * pFanin, Cba_Ntk_t * p, int iTerm )
Cba_ObjAlloc
(
p
,
CBA_BOX_GATE
,
p
->
pDesign
->
ElemGates
[(
pFanin
&&
Abc_NodeIsConst1
(
pFanin
))]
);
// const 0/1
iObj
=
Cba_ObjAlloc
(
p
,
CBA_OBJ_BO
,
-
1
);
}
Cba_ObjSetName
(
p
,
iObj
,
Cba_ObjName
(
p
,
iTerm
)
);
Cba_ObjSetFanin
(
p
,
iTerm
,
iObj
);
}
void
Cba_NtkPrepareLibrary
(
Cba_Man_t
*
p
,
Mio_Library_t
*
pLib
)
...
...
@@ -528,10 +521,7 @@ void Cba_NtkInsertNtk( Cba_Man_t * p, Abc_Ntk_t * pNtk )
{
pCbaNtk
=
Cba_ManNtk
(
p
,
pObj
->
iTemp
);
for
(
k
=
Abc_ObjFaninNum
(
pObj
)
-
1
;
k
>=
0
;
k
--
)
{
iTerm
=
Cba_ObjAlloc
(
pCbaNtk
,
CBA_OBJ_BI
,
Abc_ObjFanin
(
pObj
,
k
)
->
iTemp
);
Cba_ObjSetName
(
pCbaNtk
,
iTerm
,
Cba_ObjName
(
pCbaNtk
,
Abc_ObjFanin
(
pObj
,
k
)
->
iTemp
)
);
}
Cba_ObjAlloc
(
pCbaNtk
,
CBA_BOX_GATE
,
Abc_NamStrFind
(
p
->
pMods
,
Mio_GateReadName
((
Mio_Gate_t
*
)
pObj
->
pData
))
);
pObj
->
iTemp
=
Cba_ObjAlloc
(
pCbaNtk
,
CBA_OBJ_BO
,
-
1
);
}
...
...
@@ -561,6 +551,7 @@ void * Cba_ManInsertAbc( Cba_Man_t * p, void * pAbc )
Cba_ManMarkNodesAbc
(
p
,
pNtk
);
Cba_ManRemapBarbufs
(
pNew
,
p
);
Cba_NtkInsertNtk
(
pNew
,
pNtk
);
Cba_ManMoveNames
(
pNew
,
p
);
return
pNew
;
}
...
...
src/base/cba/cbaNtk.c
View file @
edf3622c
...
...
@@ -77,30 +77,18 @@ void Cba_ManAssignInternNamesNtk( Cba_Ntk_t * p, Vec_Int_t * vMap )
// set all names
Cba_NtkForEachPi
(
p
,
iObj
,
i
)
nNameless
+=
Cba_ManSetInternOne
(
p
,
iObj
,
vMap
);
Cba_NtkForEachPo
(
p
,
iObj
,
i
)
nNameless
+=
Cba_ManSetInternOne
(
p
,
iObj
,
vMap
);
Cba_NtkForEachBox
(
p
,
iObj
)
{
Cba_BoxForEachBi
(
p
,
iObj
,
iTerm
,
i
)
nNameless
+=
Cba_ManSetInternOne
(
p
,
iTerm
,
vMap
);
Cba_BoxForEachBo
(
p
,
iObj
,
iTerm
,
i
)
nNameless
+=
Cba_ManSetInternOne
(
p
,
iTerm
,
vMap
);
}
// generate new names
if
(
nNameless
)
{
int
nNameless2
=
0
;
// generate new names
Cba_NtkForEachPi
(
p
,
iObj
,
i
)
nNameless2
+=
Cba_ManAssignInternOne
(
p
,
iObj
,
vMap
);
Cba_NtkForEachPo
(
p
,
iObj
,
i
)
nNameless2
+=
Cba_ManAssignInternOne
(
p
,
iObj
,
vMap
);
Cba_NtkForEachBox
(
p
,
iObj
)
{
Cba_BoxForEachBi
(
p
,
iObj
,
iTerm
,
i
)
nNameless2
+=
Cba_ManAssignInternOne
(
p
,
iTerm
,
vMap
);
Cba_BoxForEachBo
(
p
,
iObj
,
iTerm
,
i
)
nNameless2
+=
Cba_ManAssignInternOne
(
p
,
iTerm
,
vMap
);
}
assert
(
nNameless
==
nNameless2
);
if
(
nNameless
)
printf
(
"Generated unique names for %d objects in network
\"
%s
\"
.
\n
"
,
nNameless
,
Cba_NtkName
(
p
)
);
...
...
@@ -108,16 +96,9 @@ void Cba_ManAssignInternNamesNtk( Cba_Ntk_t * p, Vec_Int_t * vMap )
// unmark all names
Cba_NtkForEachPi
(
p
,
iObj
,
i
)
Vec_IntWriteEntry
(
vMap
,
Cba_ObjName
(
p
,
iObj
),
0
);
Cba_NtkForEachPo
(
p
,
iObj
,
i
)
Vec_IntWriteEntry
(
vMap
,
Cba_ObjName
(
p
,
iObj
),
0
);
Cba_NtkForEachBox
(
p
,
iObj
)
{
Cba_BoxForEachBi
(
p
,
iObj
,
iTerm
,
i
)
Vec_IntWriteEntry
(
vMap
,
Cba_ObjName
(
p
,
iTerm
),
0
);
Cba_BoxForEachBo
(
p
,
iObj
,
iTerm
,
i
)
Vec_IntWriteEntry
(
vMap
,
Cba_ObjName
(
p
,
iTerm
),
0
);
}
}
void
Cba_ManAssignInternNames
(
Cba_Man_t
*
p
)
{
...
...
@@ -315,8 +296,9 @@ Cba_Man_t * Cba_ManCollapse( Cba_Man_t * p )
Cba_NtkStartNames
(
pRootNew
);
Cba_NtkForEachPi
(
pRoot
,
iObj
,
i
)
Cba_ObjSetName
(
pRootNew
,
Cba_NtkPi
(
pRootNew
,
i
),
Cba_ObjName
(
pRoot
,
iObj
)
);
Cba_NtkForEachPo
(
pRoot
,
iObj
,
i
)
Cba_ObjSetName
(
pRootNew
,
Cba_NtkPo
(
pRootNew
,
i
),
Cba_ObjName
(
pRoot
,
iObj
)
);
Cba_NtkForEachPoDriver
(
pRoot
,
iObj
,
i
)
if
(
!
Cba_ObjIsPi
(
pRoot
,
iObj
)
)
Cba_ObjSetName
(
pRootNew
,
Cba_ObjCopy
(
pRoot
,
iObj
),
Cba_ObjName
(
pRoot
,
iObj
)
);
}
return
pNew
;
}
...
...
src/base/cba/cbaPrsBuild.c
View file @
edf3622c
...
...
@@ -269,7 +269,7 @@ void Prs_ManBuildNtk( Cba_Ntk_t * pNew, Vec_Ptr_t * vDes, Prs_Ntk_t * pNtk, Vec_
nNonDriven
++
;
}
Cba_ObjSetFanin
(
pNew
,
iTerm
,
Vec_IntEntry
(
vMap
,
NameId
)
);
Cba_ObjSetName
(
pNew
,
iTerm
,
NameId
);
//
Cba_ObjSetName( pNew, iTerm, NameId );
}
}
else
...
...
@@ -291,7 +291,7 @@ void Prs_ManBuildNtk( Cba_Ntk_t * pNew, Vec_Ptr_t * vDes, Prs_Ntk_t * pNtk, Vec_
nNonDriven
++
;
}
Cba_ObjSetFanin
(
pNew
,
iTerm
,
Vec_IntEntry
(
vMap
,
NameId
)
);
Cba_ObjSetName
(
pNew
,
iTerm
,
NameId
);
//
Cba_ObjSetName( pNew, iTerm, NameId );
}
}
}
...
...
@@ -312,7 +312,7 @@ void Prs_ManBuildNtk( Cba_Ntk_t * pNew, Vec_Ptr_t * vDes, Prs_Ntk_t * pNtk, Vec_
nNonDriven
++
;
}
Cba_ObjSetFanin
(
pNew
,
iTerm
,
Vec_IntEntry
(
vMap
,
NameId
)
);
Cba_ObjSetName
(
pNew
,
iTerm
,
NameId
);
//
Cba_ObjSetName( pNew, iTerm, NameId );
}
}
// add fanins for primary outputs
...
...
@@ -328,7 +328,7 @@ void Prs_ManBuildNtk( Cba_Ntk_t * pNew, Vec_Ptr_t * vDes, Prs_Ntk_t * pNtk, Vec_
Prs_NtkForEachPo
(
pNtk
,
NameId
,
i
)
{
iObj
=
Cba_ObjAlloc
(
pNew
,
CBA_OBJ_PO
,
Vec_IntEntry
(
vMap
,
NameId
)
);
Cba_ObjSetName
(
pNew
,
iObj
,
NameId
);
//
Cba_ObjSetName( pNew, iObj, NameId );
}
if
(
nNonDriven
)
printf
(
"Module %s has %d non-driven nets (for example, %s).
\n
"
,
Prs_NtkName
(
pNtk
),
nNonDriven
,
Prs_NtkStr
(
pNtk
,
iNonDriven
)
);
...
...
src/base/cba/cbaPtrAbc.c
View file @
edf3622c
...
...
@@ -331,7 +331,7 @@ int Cba_NtkDeriveFromPtr( Cba_Ntk_t * pNtk, Vec_Ptr_t * vNtk, Vec_Int_t * vMap,
if
(
Vec_IntGetEntryFull
(
vMap
,
NameId
)
==
-
1
)
printf
(
"Signal
\"
%s
\"
in not driven in module
\"
%s
\"
.
\n
"
,
pName
,
pModuleName
);
Cba_ObjSetFanin
(
pNtk
,
iTerm
,
Vec_IntGetEntryFull
(
vMap
,
NameId
)
);
Cba_ObjSetName
(
pNtk
,
iTerm
,
NameId
);
//
Cba_ObjSetName( pNtk, iTerm, NameId );
}
}
// connect POs
...
...
@@ -341,7 +341,7 @@ int Cba_NtkDeriveFromPtr( Cba_Ntk_t * pNtk, Vec_Ptr_t * vNtk, Vec_Int_t * vMap,
if
(
Vec_IntGetEntryFull
(
vMap
,
NameId
)
==
-
1
)
printf
(
"PO with name
\"
%s
\"
in not driven in module
\"
%s
\"
.
\n
"
,
pName
,
pModuleName
);
iObj
=
Cba_ObjAlloc
(
pNtk
,
CBA_OBJ_PO
,
Vec_IntGetEntryFull
(
vMap
,
NameId
)
);
Cba_ObjSetName
(
pNtk
,
iObj
,
NameId
);
//
Cba_ObjSetName( pNtk, iObj, NameId );
}
// update map
Cba_NtkForEachCi
(
pNtk
,
iObj
)
...
...
src/base/cba/cbaWriteVer.c
View file @
edf3622c
...
...
@@ -275,6 +275,7 @@ void Cba_ManWriteVerilogBoxes( FILE * pFile, Cba_Ntk_t * p )
fprintf
(
pFile
,
"%s.%s(%s)"
,
Cba_BoxBiNum
(
p
,
i
)
?
", "
:
""
,
Mio_GateReadOutName
(
pGate
),
Cba_ObjNameStr
(
p
,
iTerm
)
);
fprintf
(
pFile
,
");
\n
"
);
}
/*
else if ( Cba_BoxNtkId(p, i) )
{
int pRanges[8]; char pSymbs[8];
...
...
@@ -323,6 +324,7 @@ void Cba_ManWriteVerilogBoxes( FILE * pFile, Cba_Ntk_t * p )
}
fprintf( pFile, ") );\n" );
}
*/
else
{
Cba_ObjType_t
Type
=
Cba_ObjType
(
p
,
i
);
...
...
src/base/wlc/wlcReadSmt.c
View file @
edf3622c
...
...
@@ -667,7 +667,6 @@ Wlc_Ntk_t * Wlc_ReadSmtBuffer( char * pFileName, char * pBuffer, char * pLimit )
Wlc_Ntk_t
*
Wlc_ReadSmt
(
char
*
pFileName
)
{
Wlc_Ntk_t
*
pNtk
=
NULL
;
Prs_Smt_t
*
p
=
NULL
;
char
*
pBuffer
,
*
pLimit
;
pBuffer
=
Prs_SmtLoadFile
(
pFileName
,
&
pLimit
);
if
(
pBuffer
==
NULL
)
...
...
src/misc/extra/extraBddMisc.c
View file @
edf3622c
...
...
@@ -1505,6 +1505,7 @@ int Extra_bddCountCubes( DdManager * dd, DdNode ** pFuncs, int nFuncs, int fDire
CounterAll
+=
Abc_MinInt
(
Count0
,
Count1
);
if
(
CounterAll
>
nLimit
)
break
;
//printf( "Output %d has %d cubes\n", i, Abc_MinInt(Count0, Count1) );
}
dd
->
maxLive
=
saveLimit
;
st__free_table
(
table
);
...
...
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