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
d92bfbad
Commit
d92bfbad
authored
Mar 20, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with new network data-structure.
parent
bacc1bc1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
11 deletions
+18
-11
src/base/abc/abcUtil.c
+1
-1
src/base/acb/acb.h
+12
-3
src/base/acb/acbAbc.c
+1
-7
src/map/mio/mio.h
+1
-0
src/map/mio/mioApi.c
+1
-0
src/misc/vec/vecInt.h
+2
-0
No files found.
src/base/abc/abcUtil.c
View file @
d92bfbad
...
...
@@ -3123,7 +3123,6 @@ Vec_Wec_t * Abc_SopSynthesize( Vec_Ptr_t * vSops )
Abc_FrameReplaceCurrentNetwork
(
Abc_FrameReadGlobalFrame
(),
pNtk
);
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
"fx; strash; balance; dc2; map -a"
);
pNtkNew
=
Abc_FrameReadNtk
(
Abc_FrameReadGlobalFrame
()
);
Abc_NtkDelete
(
pNtk
);
vRes
=
Vec_WecStart
(
Abc_NtkPiNum
(
pNtkNew
)
+
Abc_NtkNodeNum
(
pNtkNew
)
+
Abc_NtkPoNum
(
pNtkNew
)
);
Abc_NtkForEachPi
(
pNtkNew
,
pObj
,
i
)
pObj
->
iTemp
=
iNode
++
;
...
...
@@ -3131,6 +3130,7 @@ Vec_Wec_t * Abc_SopSynthesize( Vec_Ptr_t * vSops )
{
Vec_Int_t
*
vNode
=
Vec_WecEntry
(
vRes
,
iNode
);
Vec_IntPush
(
vNode
,
Abc_GateToType
(
pObj
)
);
Vec_IntPush
(
vNode
,
iNode
);
Abc_ObjForEachFanin
(
pObj
,
pFanin
,
k
)
Vec_IntPush
(
vNode
,
pFanin
->
iTemp
);
pObj
->
iTemp
=
iNode
++
;
...
...
src/base/acb/acb.h
View file @
d92bfbad
...
...
@@ -260,7 +260,7 @@ static inline int Acb_ObjTravId( Acb_Ntk_t * p, int i ) { r
static
inline
int
Acb_ObjIsTravIdCur
(
Acb_Ntk_t
*
p
,
int
i
)
{
return
Acb_ObjTravId
(
p
,
i
)
==
p
->
nObjTravs
;
}
static
inline
int
Acb_ObjIsTravIdPrev
(
Acb_Ntk_t
*
p
,
int
i
)
{
return
Acb_ObjTravId
(
p
,
i
)
==
p
->
nObjTravs
-
1
;
}
static
inline
int
Acb_ObjSetTravIdCur
(
Acb_Ntk_t
*
p
,
int
i
)
{
int
r
=
Acb_ObjIsTravIdCur
(
p
,
i
);
Vec_IntWriteEntry
(
&
p
->
vObjTrav
,
i
,
p
->
nObjTravs
);
return
r
;
}
static
inline
int
Acb_ObjSetTravIdPrev
(
Acb_Ntk_t
*
p
,
int
i
)
{
int
r
=
Acb_Obj
Set
TravIdPrev
(
p
,
i
);
Vec_IntWriteEntry
(
&
p
->
vObjTrav
,
i
,
p
->
nObjTravs
-
1
);
return
r
;
}
static
inline
int
Acb_ObjSetTravIdPrev
(
Acb_Ntk_t
*
p
,
int
i
)
{
int
r
=
Acb_Obj
Is
TravIdPrev
(
p
,
i
);
Vec_IntWriteEntry
(
&
p
->
vObjTrav
,
i
,
p
->
nObjTravs
-
1
);
return
r
;
}
static
inline
int
Acb_NtkTravId
(
Acb_Ntk_t
*
p
)
{
return
p
->
nObjTravs
;
}
static
inline
void
Acb_NtkIncTravId
(
Acb_Ntk_t
*
p
)
{
if
(
!
Acb_NtkHasObjTravs
(
p
)
)
Acb_NtkCleanObjTravs
(
p
);
p
->
nObjTravs
++
;
}
...
...
@@ -280,17 +280,26 @@ static inline void Acb_NtkIncTravId( Acb_Ntk_t * p ) { i
for ( i = 0; (i < Acb_NtkCiNum(p)) && (((iObj) = Acb_NtkCi(p, i)), 1); i++ )
#define Acb_NtkForEachCo( p, iObj, i ) \
for ( i = 0; (i < Acb_NtkCoNum(p)) && (((iObj) = Acb_NtkCo(p, i)), 1); i++ )
#define Acb_NtkForEachCoDriver( p, iObj, i ) \
for ( i = 0; (i < Acb_NtkCoNum(p)) && (((iObj) = Acb_ObjFanin(p, Acb_NtkCo(p, i), 0)), 1); i++ )
#define Acb_NtkForEachCiVec( vVec, p, iObj, i ) \
for ( i = 0; (i < Vec_IntSize(vVec)) && (((iObj) = Acb_NtkCi(p, Vec_IntEntry(vVec,i))), 1); i++ )
#define Acb_NtkForEachCoVec( vVec, p, iObj, i ) \
for ( i = 0; (i < Vec_IntSize(vVec)) && (((iObj) = Acb_NtkCo(p, Vec_IntEntry(vVec,i))), 1); i++ )
#define Acb_NtkForEachCoDriverVec( vVec, p, iObj, i ) \
for ( i = 0; (i < Vec_IntSize(vVec)) && (((iObj) = Acb_ObjFanin(p, Acb_NtkCo(p, Vec_IntEntry(vVec,i)), 0)), 1); i++ )
#define Acb_NtkForEachBoxSeq( p, iObj, i ) \
for ( i = 0; (i < Acb_NtkSeqNum(p)) && (((iObj) = Acb_NtkBoxSeq(p, i)), 1); i++ )
#define Acb_NtkForEachCioOrder( p, iObj, i ) \
for ( i = 0; (i < Acb_NtkCioOrderNum(p)) && (((iObj) = Acb_NtkCioOrder(p, i)), 1); i++ )
#define Acb_NtkForEachCoDriver( p, iObj, i ) \
for ( i = 0; (i < Acb_NtkCoNum(p)) && (((iObj) = Acb_ObjFanin(p, Acb_NtkCo(p, i), 0)), 1); i++ )
#define Acb_NtkForEachObj( p, i ) \
for ( i = 1; i < Vec_StrSize(&p->vObjType); i++ ) if ( !Acb_ObjType(p, i) ) {} else
#define Acb_NtkForEachNode( p, i ) \
for ( i = 1; i < Vec_StrSize(&p->vObjType); i++ ) if ( !Acb_ObjType(p, i) || Acb_ObjIsCio(p, i) ) {} else
#define Acb_NtkForEachObjType( p, Type, i ) \
for ( i = 1; i < Vec_StrSize(&p->vObjType) && (((Type) = Acb_ObjType(p, i)), 1); i++ ) if ( !Type ) {} else
#define Acb_NtkForEachBox( p, i ) \
...
...
src/base/acb/acbAbc.c
View file @
d92bfbad
...
...
@@ -96,13 +96,7 @@ Acb_Ntk_t * Acb_NtkFromNdr( char * pFileName, void * pModule, Abc_Nam_t * pNames
ObjId
=
Acb_ObjAlloc
(
pNtk
,
ABC_OPER_CI
,
0
,
0
);
Vec_IntWriteEntry
(
vMap
,
NameId
,
ObjId
);
Acb_ObjSetName
(
pNtk
,
ObjId
,
NameId
);
}
Ndr_ModForEachPi
(
p
,
Mod
,
Obj
)
{
NameId
=
Ndr_ObjReadBody
(
p
,
Obj
,
NDR_OUTPUT
);
ObjId
=
Acb_ObjAlloc
(
pNtk
,
ABC_OPER_CI
,
0
,
0
);
Vec_IntWriteEntry
(
vMap
,
NameId
,
ObjId
);
Acb_ObjSetName
(
pNtk
,
ObjId
,
NameId
);
Acb_ObjSetWeight
(
pNtk
,
ObjId
,
vWeights
?
Vec_IntEntry
(
vWeights
,
NameId
)
:
0
);
}
Ndr_ModForEachTarget
(
p
,
Mod
,
Obj
)
{
...
...
src/map/mio/mio.h
View file @
d92bfbad
...
...
@@ -136,6 +136,7 @@ extern float Mio_LibraryReadAreaInv ( Mio_Library_t * pLib );
extern
float
Mio_LibraryReadAreaBuf
(
Mio_Library_t
*
pLib
);
extern
float
Mio_LibraryReadAreaNand2
(
Mio_Library_t
*
pLib
);
extern
int
Mio_LibraryReadGateNameMax
(
Mio_Library_t
*
pLib
);
extern
void
Mio_LibrarySetName
(
Mio_Library_t
*
pLib
,
char
*
pName
);
extern
char
*
Mio_GateReadName
(
Mio_Gate_t
*
pGate
);
extern
char
*
Mio_GateReadOutName
(
Mio_Gate_t
*
pGate
);
extern
double
Mio_GateReadArea
(
Mio_Gate_t
*
pGate
);
...
...
src/map/mio/mioApi.c
View file @
d92bfbad
...
...
@@ -64,6 +64,7 @@ float Mio_LibraryReadDelayAigNode ( Mio_Library_t * pLib ) { retur
float
Mio_LibraryReadAreaInv
(
Mio_Library_t
*
pLib
)
{
return
(
float
)(
pLib
->
pGateInv
?
pLib
->
pGateInv
->
dArea
:
0
.
0
);
}
float
Mio_LibraryReadAreaBuf
(
Mio_Library_t
*
pLib
)
{
return
(
float
)(
pLib
->
pGateBuf
?
pLib
->
pGateBuf
->
dArea
:
0
.
0
);
}
float
Mio_LibraryReadAreaNand2
(
Mio_Library_t
*
pLib
)
{
return
(
float
)(
pLib
->
pGateNand2
?
pLib
->
pGateNand2
->
dArea
:
0
.
0
);
}
void
Mio_LibrarySetName
(
Mio_Library_t
*
pLib
,
char
*
pName
)
{
ABC_FREE
(
pLib
->
pName
);
pLib
->
pName
=
pName
;
}
/**Function*************************************************************
...
...
src/misc/vec/vecInt.h
View file @
d92bfbad
...
...
@@ -71,6 +71,8 @@ struct Vec_Int_t_
for ( i = 0; (i+2 < Vec_IntSize(vVec)) && (((Entry1) = Vec_IntEntry(vVec, i)), 1) && (((Entry2) = Vec_IntEntry(vVec, i+1)), 1) && (((Entry3) = Vec_IntEntry(vVec, i+2)), 1); i += 3 )
#define Vec_IntForEachEntryThisNext( vVec, This, Next, i ) \
for ( i = 0, (This) = (Next) = (Vec_IntSize(vVec) ? Vec_IntEntry(vVec, 0) : -1); (i+1 < Vec_IntSize(vVec)) && (((Next) = Vec_IntEntry(vVec, i+1)), 1); i += 2, (This) = (Next) )
#define Vec_IntForEachEntryInVec( vVec2, vVec, Entry, i ) \
for ( i = 0; (i < Vec_IntSize(vVec)) && (((Entry) = Vec_IntEntry(vVec2, Vec_IntEntry(vVec, i))), 1); i++ )
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
...
...
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