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
4a861d86
Commit
4a861d86
authored
Jul 17, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small changes in several packages.
parent
c58b57e2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
4 deletions
+55
-4
src/aig/gia/gia.h
+1
-0
src/aig/gia/giaFalse.c
+1
-2
src/aig/gia/giaIf.c
+52
-1
src/base/abci/abc.c
+1
-1
No files found.
src/aig/gia/gia.h
View file @
4a861d86
...
...
@@ -280,6 +280,7 @@ struct Jf_Par_t_
word
Area
;
word
Edge
;
word
Clause
;
word
Mux7
;
float
*
pTimesArr
;
float
*
pTimesReq
;
};
...
...
src/aig/gia/giaFalse.c
View file @
4a861d86
...
...
@@ -327,8 +327,7 @@ Gia_Man_t * Gia_ManFalseRebuildPath( Gia_Man_t * p, Vec_Int_t * vHooks, int fVer
{
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Obj_t
*
pObj
;
int
i
,
Counter
=
0
;
int
iPathEnd
=
Vec_IntEntryLast
(
vHooks
);
int
i
,
iPathEnd
=
Vec_IntEntryLast
(
vHooks
);
pNew
=
Gia_ManStart
(
4
*
Gia_ManObjNum
(
p
)
/
3
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
...
...
src/aig/gia/giaIf.c
View file @
4a861d86
...
...
@@ -308,16 +308,63 @@ int Gia_ManComputeOverlap( Gia_Man_t * p )
SeeAlso []
***********************************************************************/
void
Gia_ManPrintGetMuxFanins
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
int
*
pFanins
)
{
Gia_Obj_t
*
pData0
,
*
pData1
;
Gia_Obj_t
*
pCtrl
=
Gia_ObjRecognizeMux
(
pObj
,
&
pData1
,
&
pData0
);
pFanins
[
0
]
=
Gia_ObjId
(
p
,
Gia_Regular
(
pCtrl
));
pFanins
[
1
]
=
Gia_ObjId
(
p
,
Gia_Regular
(
pData1
));
pFanins
[
2
]
=
Gia_ObjId
(
p
,
Gia_Regular
(
pData0
));
}
int
Gia_ManCountDupLut6
(
Gia_Man_t
*
p
)
{
int
i
,
nCountDup
=
0
,
nCountPis
=
0
;
Gia_ManCleanMark0
(
p
);
Gia_ManForEachLut
(
p
,
i
)
if
(
Gia_ObjLutSize
(
p
,
i
)
==
3
&&
Gia_ObjLutFanins
(
p
,
i
)[
3
]
==
-
i
)
{
Gia_Obj_t
*
pFanin
;
int
pFanins
[
3
];
Gia_ManPrintGetMuxFanins
(
p
,
Gia_ManObj
(
p
,
i
),
pFanins
);
pFanin
=
Gia_ManObj
(
p
,
pFanins
[
1
]);
nCountPis
+=
Gia_ObjIsCi
(
pFanin
);
nCountDup
+=
pFanin
->
fMark0
;
pFanin
->
fMark0
=
1
;
pFanin
=
Gia_ManObj
(
p
,
pFanins
[
2
]);
nCountPis
+=
Gia_ObjIsCi
(
pFanin
);
nCountDup
+=
pFanin
->
fMark0
;
pFanin
->
fMark0
=
1
;
}
Gia_ManCleanMark0
(
p
);
if
(
nCountDup
+
nCountDup
)
printf
(
"Dup fanins = %d. CI fanins = %d. Total = %d. (%.2f %%)
\n
"
,
nCountDup
,
nCountPis
,
nCountDup
+
nCountPis
,
100
.
0
*
(
nCountDup
+
nCountPis
)
/
Gia_ManLutNum
(
p
)
);
return
nCountDup
+
nCountPis
;
}
void
Gia_ManPrintMappingStats
(
Gia_Man_t
*
p
,
char
*
pDumpFile
)
{
Gia_Obj_t
*
pObj
;
int
*
pLevels
;
int
i
,
k
,
iFan
,
nLutSize
=
0
,
nLuts
=
0
,
nFanins
=
0
,
LevelMax
=
0
,
Ave
=
0
;
int
i
,
k
,
iFan
,
nLutSize
=
0
,
nLuts
=
0
,
nFanins
=
0
,
LevelMax
=
0
,
Ave
=
0
,
nMuxF7
=
0
;
if
(
!
Gia_ManHasMapping
(
p
)
)
return
;
pLevels
=
ABC_CALLOC
(
int
,
Gia_ManObjNum
(
p
)
);
Gia_ManForEachLut
(
p
,
i
)
{
if
(
Gia_ObjLutSize
(
p
,
i
)
==
3
&&
Gia_ObjLutFanins
(
p
,
i
)[
3
]
==
-
i
)
{
int
pFanins
[
3
];
Gia_ManPrintGetMuxFanins
(
p
,
Gia_ManObj
(
p
,
i
),
pFanins
);
pLevels
[
i
]
=
Abc_MaxInt
(
pLevels
[
i
],
pLevels
[
pFanins
[
0
]]
+
1
);
pLevels
[
i
]
=
Abc_MaxInt
(
pLevels
[
i
],
pLevels
[
pFanins
[
1
]]
);
pLevels
[
i
]
=
Abc_MaxInt
(
pLevels
[
i
],
pLevels
[
pFanins
[
2
]]
);
LevelMax
=
Abc_MaxInt
(
LevelMax
,
pLevels
[
i
]
);
nMuxF7
++
;
continue
;
}
nLuts
++
;
nFanins
+=
Gia_ObjLutSize
(
p
,
i
);
nLutSize
=
Abc_MaxInt
(
nLutSize
,
Gia_ObjLutSize
(
p
,
i
)
);
...
...
@@ -336,6 +383,8 @@ void Gia_ManPrintMappingStats( Gia_Man_t * p, char * pDumpFile )
Abc_Print
(
1
,
"Mapping (K=%d) : "
,
nLutSize
);
SetConsoleTextAttribute
(
hConsole
,
14
);
// yellow
Abc_Print
(
1
,
"lut =%7d "
,
nLuts
);
if
(
nMuxF7
)
Abc_Print
(
1
,
"mux =%7d "
,
nMuxF7
);
SetConsoleTextAttribute
(
hConsole
,
10
);
// green
Abc_Print
(
1
,
"edge =%8d "
,
nFanins
);
SetConsoleTextAttribute
(
hConsole
,
12
);
// red
...
...
@@ -357,6 +406,8 @@ void Gia_ManPrintMappingStats( Gia_Man_t * p, char * pDumpFile )
Abc_Print
(
1
,
"
\n
"
);
#endif
Gia_ManCountDupLut6
(
p
);
if
(
pDumpFile
)
{
...
...
src/base/abci/abc.c
View file @
4a861d86
...
...
@@ -27845,7 +27845,7 @@ int Abc_CommandAbc9BalanceLut( Abc_Frame_t * pAbc, int argc, char ** argv )
int
nCutNum
=
8
;
int
fUseMuxes
=
1
;
int
fRecursive
=
1
;
int
fOptArea
=
0
;
int
fOptArea
=
1
;
int
c
,
fVerbose
=
0
;
int
fVeryVerbose
=
0
;
Extra_UtilGetoptReset
();
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