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
a8a08035
Commit
a8a08035
authored
Mar 06, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes to LUT mappers.
parent
83963214
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
14 deletions
+26
-14
src/aig/gia/giaIf.c
+3
-3
src/base/abci/abc.c
+18
-6
src/map/if/if.h
+1
-1
src/map/if/ifDsd.c
+4
-4
No files found.
src/aig/gia/giaIf.c
View file @
a8a08035
...
...
@@ -1298,7 +1298,7 @@ Gia_Man_t * Gia_ManFromIfLogic( If_Man_t * pIfMan )
If_CutForEachLeaf
(
pIfMan
,
pCutBest
,
pIfLeaf
,
k
)
Vec_IntPush
(
vLeaves
,
pIfLeaf
->
iCopy
);
// perform one of the two types of mapping: with and without structures
if
(
pIfMan
->
pPars
->
fUseDsd
)
if
(
pIfMan
->
pPars
->
fUseDsd
&&
pIfMan
->
pPars
->
pLutStruct
)
{
if
(
pSat
==
NULL
)
pSat
=
(
sat_solver
*
)
If_ManSatBuildXY
(
(
int
)(
pIfMan
->
pPars
->
pLutStruct
[
0
]
-
'0'
)
);
...
...
@@ -1308,7 +1308,7 @@ Gia_Man_t * Gia_ManFromIfLogic( If_Man_t * pIfMan )
pIfObj
->
iCopy
=
Gia_ManFromIfLogicCreateLut
(
pNew
,
If_CutTruthW
(
pIfMan
,
pCutBest
),
vLeaves
,
vCover
,
vMapping
,
vMapping2
);
pIfObj
->
iCopy
=
Abc_LitNotCond
(
pIfObj
->
iCopy
,
pCutBest
->
fCompl
);
}
else
if
(
pIfMan
->
pPars
->
fDeriveLuts
&&
pIfMan
->
pPars
->
fTruth
)
else
if
(
(
pIfMan
->
pPars
->
fDeriveLuts
&&
pIfMan
->
pPars
->
fTruth
)
||
pIfMan
->
pPars
->
fUseDsd
)
{
// perform decomposition of the cut
pIfObj
->
iCopy
=
Gia_ManFromIfLogicNode
(
pIfMan
,
pNew
,
i
,
vLeaves
,
vLeaves2
,
If_CutTruthW
(
pIfMan
,
pCutBest
),
pIfMan
->
pPars
->
pLutStruct
,
vCover
,
vMapping
,
vMapping2
,
vPacking
,
(
pIfMan
->
pPars
->
fEnableCheck75
||
pIfMan
->
pPars
->
fEnableCheck75u
),
pIfMan
->
pPars
->
fEnableCheck07
);
...
...
@@ -1528,7 +1528,7 @@ Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pp, int fNormalized )
If_Man_t
*
pIfMan
;
If_Par_t
*
pPars
=
(
If_Par_t
*
)
pp
;
// disable cut minimization when GIA strucure is needed
if
(
!
pPars
->
fDelayOpt
&&
!
pPars
->
fUserRecLib
&&
((
!
pPars
->
fDeriveLuts
&&
!
pPars
->
fUseDsd
)
||
!
pPars
->
pLutStruct
)
)
if
(
!
pPars
->
fDelayOpt
&&
!
pPars
->
fUserRecLib
&&
!
pPars
->
fDeriveLuts
&&
!
pPars
->
fUseDsd
)
pPars
->
fCutMin
=
0
;
// reconstruct GIA according to the hierarchy manager
...
...
src/base/abci/abc.c
View file @
a8a08035
...
...
@@ -15531,14 +15531,25 @@ usage:
***********************************************************************/
int
Abc_CommandDsdPs
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
int
c
,
fPrintLib
=
0
;
int
c
,
Number
=
0
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
p
h"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
Nv
h"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'p'
:
fPrintLib
^=
1
;
case
'N'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-N
\"
should be followed by a floating point number.
\n
"
);
goto
usage
;
}
Number
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
Number
<
0
)
goto
usage
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
...
...
@@ -15551,12 +15562,13 @@ int Abc_CommandDsdPs( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
1
,
"The DSD manager is not started.
\n
"
);
return
0
;
}
If_DsdManPrint
(
(
If_DsdMan_t
*
)
Abc_FrameReadManDsd
(),
NULL
,
0
);
If_DsdManPrint
(
(
If_DsdMan_t
*
)
Abc_FrameReadManDsd
(),
NULL
,
Number
,
fVerbose
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: dsd_ps [-h]
\n
"
);
Abc_Print
(
-
2
,
"usage: dsd_ps [-
N num] [-v
h]
\n
"
);
Abc_Print
(
-
2
,
"
\t
prints statistics of DSD manager
\n
"
);
Abc_Print
(
-
2
,
"
\t
-v : toggles verbose output [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
src/map/if/if.h
View file @
a8a08035
...
...
@@ -519,7 +519,7 @@ extern int If_CluCheckExt3( void * p, word * pTruth, int nVars, int
/*=== ifDsd.c =============================================================*/
extern
If_DsdMan_t
*
If_DsdManAlloc
(
int
nVars
,
int
nLutSize
);
extern
void
If_DsdManDump
(
If_DsdMan_t
*
p
);
extern
void
If_DsdManPrint
(
If_DsdMan_t
*
p
,
char
*
pFileName
,
int
fVerbose
);
extern
void
If_DsdManPrint
(
If_DsdMan_t
*
p
,
char
*
pFileName
,
int
Number
,
int
fVerbose
);
extern
void
If_DsdManTune
(
If_DsdMan_t
*
p
,
int
LutSize
,
int
fFast
,
int
fSpec
,
int
fVerbose
);
extern
void
If_DsdManFree
(
If_DsdMan_t
*
p
,
int
fVerbose
);
extern
void
If_DsdManSave
(
If_DsdMan_t
*
p
,
char
*
pFileName
);
...
...
src/map/if/ifDsd.c
View file @
a8a08035
...
...
@@ -220,7 +220,7 @@ void If_DsdManFree( If_DsdMan_t * p, int fVerbose )
int
v
;
// If_DsdManDump( p );
if
(
fVerbose
)
If_DsdManPrint
(
p
,
NULL
,
0
);
If_DsdManPrint
(
p
,
NULL
,
0
,
0
);
if
(
fVerbose
)
Vec_MemDumpTruthTables
(
p
->
vTtMem
,
"dumpdsd"
,
p
->
nVars
);
for
(
v
=
2
;
v
<
p
->
nVars
;
v
++
)
...
...
@@ -396,7 +396,7 @@ void If_DsdManPrintDistrib( If_DsdMan_t * p )
printf
(
"(%6.2f %%)"
,
100
.
0
*
CountNonTotal
/
Vec_PtrSize
(
p
->
vObjs
)
);
printf
(
"
\n
"
);
}
void
If_DsdManPrint
(
If_DsdMan_t
*
p
,
char
*
pFileName
,
int
fVerbose
)
void
If_DsdManPrint
(
If_DsdMan_t
*
p
,
char
*
pFileName
,
int
Number
,
int
fVerbose
)
{
If_DsdObj_t
*
pObj
;
int
i
,
DsdMax
=
0
,
CountUsed
=
0
,
CountNonDsdStr
=
0
,
CountMarked
=
0
;
...
...
@@ -441,8 +441,8 @@ void If_DsdManPrint( If_DsdMan_t * p, char * pFileName, int fVerbose )
return
;
If_DsdVecForEachObj
(
p
->
vObjs
,
pObj
,
i
)
{
// if ( i == 50
)
// break
;
if
(
Number
&&
i
%
Number
)
continue
;
If_DsdManPrintOne
(
pFile
,
p
,
pObj
->
Id
,
NULL
,
1
);
}
fprintf
(
pFile
,
"
\n
"
);
...
...
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