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
6ad7dae1
Commit
6ad7dae1
authored
Feb 17, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes to LUT mappers.
parent
eb66ce9c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
17 additions
and
52 deletions
+17
-52
abclib.dsp
+4
-0
src/base/abci/abc.c
+1
-1
src/map/if/if.h
+7
-2
src/map/if/ifDec07.c
+0
-1
src/map/if/ifDec75.c
+0
-1
src/map/if/ifDsd.c
+0
-0
src/map/if/ifMan.c
+3
-14
src/map/if/ifMap.c
+1
-32
src/map/if/ifTruth.c
+0
-1
src/map/if/module.make
+1
-0
No files found.
abclib.dsp
View file @
6ad7dae1
...
...
@@ -2319,6 +2319,10 @@ SOURCE=.\src\map\if\ifDec75.c
# End Source File
# Begin Source File
SOURCE=.\src\map\if\ifDsd.c
# End Source File
# Begin Source File
SOURCE=.\src\map\if\ifLibBox.c
# End Source File
# Begin Source File
...
...
src/base/abci/abc.c
View file @
6ad7dae1
...
...
@@ -15075,7 +15075,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
pPars
->
fUseDsd
)
{
pPars
->
fTruth
=
0
;
pPars
->
fTruth
=
1
;
pPars
->
fCutMin
=
1
;
pPars
->
fExpRed
=
0
;
pPars
->
fUsePerm
=
1
;
src/map/if/if.h
View file @
6ad7dae1
...
...
@@ -78,6 +78,7 @@ typedef struct If_Cut_t_ If_Cut_t;
typedef
struct
If_Set_t_
If_Set_t
;
typedef
struct
If_LibLut_t_
If_LibLut_t
;
typedef
struct
If_LibBox_t_
If_LibBox_t
;
typedef
struct
If_DsdMan_t_
If_DsdMan_t
;
typedef
struct
Ifif_Par_t_
Ifif_Par_t
;
struct
Ifif_Par_t_
...
...
@@ -230,7 +231,7 @@ struct If_Man_t_
int
nCutsCountAll
;
int
nCutsUselessAll
;
int
nCuts5
,
nCuts5a
;
Dss_Man_t
*
p
DsdMan
;
If_DsdMan_t
*
pIf
DsdMan
;
Vec_Mem_t
*
vTtMem
;
// truth table memory and hash table
int
nBestCutSmall
[
2
];
...
...
@@ -265,7 +266,6 @@ struct If_Cut_t_
unsigned
nLeaves
:
8
;
// the number of leaves
int
*
pLeaves
;
// array of fanins
char
*
pPerm
;
// permutation
// unsigned * pTruth; // the truth table
};
// set of priority cut
...
...
@@ -513,6 +513,11 @@ extern int If_CluCheckExt( void * p, word * pTruth, int nVars, int n
char
*
pLut0
,
char
*
pLut1
,
word
*
pFunc0
,
word
*
pFunc1
);
extern
int
If_CluCheckExt3
(
void
*
p
,
word
*
pTruth
,
int
nVars
,
int
nLutLeaf
,
int
nLutLeaf2
,
int
nLutRoot
,
char
*
pLut0
,
char
*
pLut1
,
char
*
pLut2
,
word
*
pFunc0
,
word
*
pFunc1
,
word
*
pFunc2
);
/*=== ifDsd.c =============================================================*/
extern
If_DsdMan_t
*
If_DsdManAlloc
(
int
nLutSize
);
extern
void
If_DsdManPrint
(
If_DsdMan_t
*
p
,
char
*
pFileName
);
extern
void
If_DsdManFree
(
If_DsdMan_t
*
p
);
extern
int
If_DsdManCompute
(
If_DsdMan_t
*
p
,
word
*
pTruth
,
int
nLeaves
,
unsigned
char
*
pPerm
);
/*=== ifLib.c =============================================================*/
extern
If_LibLut_t
*
If_LibLutRead
(
char
*
FileName
);
extern
If_LibLut_t
*
If_LibLutDup
(
If_LibLut_t
*
p
);
...
...
src/map/if/ifDec07.c
View file @
6ad7dae1
...
...
@@ -21,7 +21,6 @@
#include "if.h"
#include "misc/extra/extra.h"
#include "bool/kit/kit.h"
#include "misc/util/utilTruth.h"
ABC_NAMESPACE_IMPL_START
...
...
src/map/if/ifDec75.c
View file @
6ad7dae1
...
...
@@ -22,7 +22,6 @@
#include "misc/extra/extra.h"
#include "bool/kit/kit.h"
#include "opt/dau/dau.h"
#include "misc/util/utilTruth.h"
ABC_NAMESPACE_IMPL_START
...
...
src/map/if/ifDsd.c
0 → 100644
View file @
6ad7dae1
This diff is collapsed.
Click to expand it.
src/map/if/ifMan.c
View file @
6ad7dae1
...
...
@@ -84,7 +84,7 @@ If_Man_t * If_ManStart( If_Par_t * pPars )
p
->
puTemp
[
3
]
=
p
->
puTemp
[
2
]
+
p
->
nTruth6Words
*
2
;
p
->
puTempW
=
p
->
pPars
->
fTruth
?
ABC_ALLOC
(
word
,
p
->
nTruth6Words
)
:
NULL
;
if
(
pPars
->
fUseDsd
)
p
->
p
DsdMan
=
Dss_ManAlloc
(
pPars
->
nLutSize
,
pPars
->
nNonDecLimit
);
p
->
p
IfDsdMan
=
If_DsdManAlloc
(
pPars
->
nLutSize
);
// create the constant node
p
->
pConst1
=
If_ManSetupObj
(
p
);
p
->
pConst1
->
Type
=
IF_CONST1
;
...
...
@@ -154,19 +154,8 @@ void If_ManStop( If_Man_t * p )
Abc_Print
(
1
,
"Statistics about 5-cuts: Total = %d Non-decomposable = %d (%.2f %%)
\n
"
,
p
->
nCuts5
,
p
->
nCuts5
-
p
->
nCuts5a
,
100
.
0
*
(
p
->
nCuts5
-
p
->
nCuts5a
)
/
p
->
nCuts5
);
if
(
p
->
pPars
->
fUseDsd
)
{
/*
if ( p->pPars->fVerbose )
Abc_Print( 1, "Number of unique entries in the DSD table = %d. Memory = %.1f MB.\n",
Abc_NamObjNumMax(p->pNamDsd), 1.0*Abc_NamMemAlloc(p->pNamDsd)/(1<<20) );
Abc_PrintTime( 1, "Time0", s_TimeComp[0] );
Abc_PrintTime( 1, "Time1", s_TimeComp[1] );
Abc_PrintTime( 1, "Time2", s_TimeComp[2] );
Abc_PrintTime( 1, "Time3", s_TimeComp[3] );
// Abc_NamPrint( p->pNamDsd );
Abc_NamStop( p->pNamDsd );
*/
Dss_ManPrint
(
NULL
,
p
->
pDsdMan
);
Dss_ManFree
(
p
->
pDsdMan
);
If_DsdManPrint
(
p
->
pIfDsdMan
,
NULL
);
If_DsdManFree
(
p
->
pIfDsdMan
);
}
// Abc_PrintTime( 1, "Truth", p->timeTruth );
// Abc_Print( 1, "Small support = %d.\n", p->nSmallSupp );
...
...
src/map/if/ifMap.c
View file @
6ad7dae1
...
...
@@ -186,10 +186,6 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
If_CutCopy
(
p
,
pCutSet
->
ppCuts
[
pCutSet
->
nCuts
++
],
pCut
);
}
if
(
pObj
->
Id
==
153
)
{
int
s
=
0
;
}
// generate cuts
If_ObjForEachCut
(
pObj
->
pFanin0
,
pCut0
,
i
)
If_ObjForEachCut
(
pObj
->
pFanin1
,
pCut1
,
k
)
...
...
@@ -256,34 +252,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
}
}
if
(
p
->
pPars
->
fUseDsd
)
{
int
j
,
iDsd
[
2
]
=
{
Abc_LitNotCond
(
pCut0
->
iCutDsd
,
pObj
->
fCompl0
),
Abc_LitNotCond
(
pCut1
->
iCutDsd
,
pObj
->
fCompl1
)
};
int
nFans
[
2
]
=
{
pCut0
->
nLeaves
,
pCut1
->
nLeaves
};
int
Fans
[
2
][
DAU_MAX_VAR
],
*
pFans
[
2
]
=
{
Fans
[
0
],
Fans
[
1
]
};
assert
(
pCut0
->
iCutDsd
>=
0
&&
pCut1
->
iCutDsd
>=
0
);
// create fanins
for
(
j
=
0
;
j
<
(
int
)
pCut0
->
nLeaves
;
j
++
)
pFans
[
0
][
j
]
=
Abc_Lit2LitV
(
p
->
pPerm
[
0
],
(
int
)
pCut0
->
pPerm
[
j
]
);
for
(
j
=
0
;
j
<
(
int
)
pCut1
->
nLeaves
;
j
++
)
pFans
[
1
][
j
]
=
Abc_Lit2LitV
(
p
->
pPerm
[
1
],
(
int
)
pCut1
->
pPerm
[
j
]
);
// canonicize
if
(
iDsd
[
0
]
>
iDsd
[
1
]
)
{
ABC_SWAP
(
int
,
iDsd
[
0
],
iDsd
[
1
]
);
ABC_SWAP
(
int
,
nFans
[
0
],
nFans
[
1
]
);
ABC_SWAP
(
int
*
,
pFans
[
0
],
pFans
[
1
]
);
}
// derive new DSD
pCut
->
iCutDsd
=
Dss_ManMerge
(
p
->
pDsdMan
,
iDsd
,
nFans
,
pFans
,
p
->
uSharedMask
,
pCut
->
nLimit
,
(
unsigned
char
*
)
pCut
->
pPerm
,
If_CutTruthW
(
p
,
pCut
)
);
if
(
pCut
->
iCutDsd
<
0
)
{
pCut
->
fUseless
=
1
;
p
->
nCutsUselessAll
++
;
p
->
nCutsUseless
[
pCut
->
nLeaves
]
++
;
}
p
->
nCutsCountAll
++
;
p
->
nCutsCount
[
pCut
->
nLeaves
]
++
;
}
pCut
->
iCutDsd
=
If_DsdManCompute
(
p
->
pIfDsdMan
,
If_CutTruthW
(
p
,
pCut
),
pCut
->
nLeaves
,
(
unsigned
char
*
)
pCut
->
pPerm
);
// compute the application-specific cost and depth
pCut
->
fUser
=
(
p
->
pPars
->
pFuncCost
!=
NULL
);
...
...
src/map/if/ifTruth.c
View file @
6ad7dae1
...
...
@@ -19,7 +19,6 @@
***********************************************************************/
#include "if.h"
#include "misc/util/utilTruth.h"
ABC_NAMESPACE_IMPL_START
...
...
src/map/if/module.make
View file @
6ad7dae1
...
...
@@ -6,6 +6,7 @@ SRC += src/map/if/ifCom.c \
src/map/if/ifDec10.c
\
src/map/if/ifDec16.c
\
src/map/if/ifDec75.c
\
src/map/if/ifDsd.c
\
src/map/if/ifLibBox.c
\
src/map/if/ifLibLut.c
\
src/map/if/ifMan.c
\
...
...
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