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
9e723d40
Commit
9e723d40
authored
Jul 18, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New technology mapper.
parent
7630f2bd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
40 deletions
+19
-40
src/map/mpm/mpmMan.c
+4
-4
src/map/mpm/mpmMap.c
+15
-35
src/map/mpm/mpmMig.h
+0
-1
No files found.
src/map/mpm/mpmMan.c
View file @
9e723d40
...
...
@@ -180,8 +180,8 @@ void Mpm_ManPrintStats( Mpm_Man_t * p )
1
.
0
*
Mig_ManObjNum
(
p
->
pMig
)
*
sizeof
(
Mig_Obj_t
)
/
(
1
<<
20
)
+
1
.
0
*
Mig_ManObjNum
(
p
->
pMig
)
*
48
/
(
1
<<
20
)
+
1
.
0
*
Mmr_StepMemory
(
p
->
pManCuts
)
/
(
1
<<
17
)
);
#ifdef MIG_RUNTIME
if
(
p
->
timeDerive
)
{
printf
(
"
\n
"
);
p
->
timeTotal
=
Abc_Clock
()
-
p
->
timeTotal
;
p
->
timeOther
=
p
->
timeTotal
-
p
->
timeDerive
;
...
...
@@ -194,9 +194,9 @@ void Mpm_ManPrintStats( Mpm_Man_t * p )
ABC_PRTP
(
"- Adding cuts to storage "
,
p
->
timeStore
,
p
->
timeTotal
);
ABC_PRTP
(
"Other "
,
p
->
timeOther
,
p
->
timeTotal
);
ABC_PRTP
(
"TOTAL "
,
p
->
timeTotal
,
p
->
timeTotal
);
#else
}
else
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
p
->
timeTotal
);
#endif
}
////////////////////////////////////////////////////////////////////////
...
...
src/map/mpm/mpmMap.c
View file @
9e723d40
...
...
@@ -26,6 +26,8 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
#define MIG_RUNTIME
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
...
...
@@ -115,41 +117,22 @@ static inline void Mpm_CutPrintAll( Mpm_Man_t * p )
Mpm_CutPrint
(
&
p
->
pCutStore
[
i
]
->
pCut
);
}
}
static
inline
int
Mpm_
Man
FindLeaf
(
Mpm_Cut_t
*
pNew
,
int
iObj
)
static
inline
int
Mpm_
Cut
FindLeaf
(
Mpm_Cut_t
*
pNew
,
int
iObj
)
{
int
i
;
for
(
i
=
0
;
i
<
(
int
)
pNew
->
nLeaves
;
i
++
)
if
(
Abc_Lit2Var
(
pNew
->
pLeaves
[
i
])
==
iObj
)
return
i
;
return
0xFF
;
return
i
;
}
static
inline
int
Mpm_
ManSetIsSmaller
(
Mpm_Man_t
*
p
,
Mpm_Cut_t
*
pNew
,
Mpm_Cut_t
*
pCut
,
int
nTotal
)
// check if pCut is contained in the current on
e
static
inline
int
Mpm_
CutIsContained
(
Mpm_Man_t
*
p
,
Mpm_Cut_t
*
pBase
,
Mpm_Cut_t
*
pCut
)
// check if pCut is contained pBas
e
{
int
i
,
Index
;
int
i
;
for
(
i
=
0
;
i
<
(
int
)
pCut
->
nLeaves
;
i
++
)
{
// Index = (int)p->pObjPres[Abc_Lit2Var(pCut->pLeaves[i])];
Index
=
Mpm_ManFindLeaf
(
pNew
,
Abc_Lit2Var
(
pCut
->
pLeaves
[
i
])
);
if
(
Index
==
0xFF
)
if
(
Mpm_CutFindLeaf
(
pBase
,
Abc_Lit2Var
(
pCut
->
pLeaves
[
i
])
)
==
(
int
)
pBase
->
nLeaves
)
return
0
;
// assert( Index < nTotal );
}
return
1
;
}
static
inline
int
Mpm_ManSetIsBigger
(
Mpm_Man_t
*
p
,
Mpm_Cut_t
*
pNew
,
Mpm_Cut_t
*
pCut
,
int
nTotal
)
// check if pCut contains the current one
{
int
i
,
Index
,
Counter
=
0
;
for
(
i
=
0
;
i
<
(
int
)
pCut
->
nLeaves
;
i
++
)
{
// Index = (int)p->pObjPres[Abc_Lit2Var(pCut->pLeaves[i])];
Index
=
Mpm_ManFindLeaf
(
pNew
,
Abc_Lit2Var
(
pCut
->
pLeaves
[
i
])
);
if
(
Index
==
0xFF
)
continue
;
// assert( Index < nTotal );
Counter
++
;
}
return
(
int
)(
Counter
==
nTotal
);
}
/**Function*************************************************************
...
...
@@ -222,6 +205,9 @@ static inline Mpm_Uni_t * Mpm_CutSetupInfo( Mpm_Man_t * p, Mpm_Cut_t * pCut, int
pUnit
->
uSign
|=
((
word
)
1
<<
(
iLeaf
&
0x3F
));
}
pUnit
->
mAveRefs
=
pUnit
->
mAveRefs
*
MPM_UNIT_EDGE
/
Abc_MaxInt
(
pCut
->
nLeaves
,
1
);
assert
(
pUnit
->
mTime
<=
0x3FFFFFFF
);
assert
(
pUnit
->
mArea
<=
0x3FFFFFFF
);
assert
(
pUnit
->
mEdge
<=
0x3FFFFFFF
);
return
pUnit
;
}
...
...
@@ -278,7 +264,7 @@ clk = Abc_Clock();
pUnit
=
p
->
pCutStore
[
k
];
if
(
pUnitNew
->
pCut
.
nLeaves
>=
pUnit
->
pCut
.
nLeaves
&&
(
pUnitNew
->
uSign
&
pUnit
->
uSign
)
==
pUnit
->
uSign
&&
Mpm_
ManSetIsSmaller
(
p
,
&
pUnitNew
->
pCut
,
&
pUnit
->
pCut
,
pUnitNew
->
pCut
.
nLeaves
)
)
Mpm_
CutIsContained
(
p
,
&
pUnitNew
->
pCut
,
&
pUnit
->
pCut
)
)
{
#ifdef MIG_RUNTIME
p
->
timeCompare
+=
Abc_Clock
()
-
clk
;
...
...
@@ -310,7 +296,7 @@ p->timeCompare += Abc_Clock() - clk;
pUnit
=
p
->
pCutStore
[
k
];
if
(
pUnitNew
->
pCut
.
nLeaves
<=
pUnit
->
pCut
.
nLeaves
&&
(
pUnitNew
->
uSign
&
pUnit
->
uSign
)
==
pUnitNew
->
uSign
&&
Mpm_
ManSetIsBigger
(
p
,
&
pUnitNew
->
pCut
,
&
pUnit
->
pCut
,
pUnitNew
->
pCut
.
nLeaves
)
)
Mpm_
CutIsContained
(
p
,
&
pUnit
->
pCut
,
&
pUnitNew
->
pCut
)
)
{
Vec_PtrPush
(
&
p
->
vFreeUnits
,
pUnit
);
continue
;
...
...
@@ -344,7 +330,7 @@ p->timeCompare += Abc_Clock() - clk;
static
inline
Mpm_Cut_t
*
Mpm_ManMergeCuts
(
Mpm_Man_t
*
p
,
Mpm_Cut_t
*
pCut0
,
Mpm_Cut_t
*
pCut1
,
Mpm_Cut_t
*
pCut2
)
{
Mpm_Cut_t
*
pTemp
,
*
pCut
=
&
((
Mpm_Uni_t
*
)
Vec_PtrEntryLast
(
&
p
->
vFreeUnits
))
->
pCut
;
int
i
,
c
,
i
Obj
,
i
Place
;
int
i
,
c
,
iPlace
;
// base cut
memcpy
(
pCut
->
pLeaves
,
pCut0
->
pLeaves
,
sizeof
(
int
)
*
pCut0
->
nLeaves
);
pCut
->
nLeaves
=
pCut0
->
nLeaves
;
...
...
@@ -360,10 +346,7 @@ static inline Mpm_Cut_t * Mpm_ManMergeCuts( Mpm_Man_t * p, Mpm_Cut_t * pCut0, Mp
p
->
uComplMask
[
c
]
=
0
;
for
(
i
=
0
;
i
<
(
int
)
pTemp
->
nLeaves
;
i
++
)
{
iObj
=
Abc_Lit2Var
(
pTemp
->
pLeaves
[
i
]);
for
(
iPlace
=
0
;
iPlace
<
(
int
)
pCut
->
nLeaves
;
iPlace
++
)
if
(
iObj
==
Abc_Lit2Var
(
pCut
->
pLeaves
[
iPlace
])
)
break
;
iPlace
=
Mpm_CutFindLeaf
(
pCut
,
Abc_Lit2Var
(
pTemp
->
pLeaves
[
i
])
);
if
(
iPlace
==
(
int
)
pCut
->
nLeaves
)
{
if
(
(
int
)
pCut
->
nLeaves
==
p
->
nLutSize
)
...
...
@@ -385,10 +368,7 @@ static inline Mpm_Cut_t * Mpm_ManMergeCuts( Mpm_Man_t * p, Mpm_Cut_t * pCut0, Mp
break
;
for
(
i
=
0
;
i
<
(
int
)
pTemp
->
nLeaves
;
i
++
)
{
iObj
=
Abc_Lit2Var
(
pTemp
->
pLeaves
[
i
]);
for
(
iPlace
=
0
;
iPlace
<
(
int
)
pCut
->
nLeaves
;
iPlace
++
)
if
(
iObj
==
Abc_Lit2Var
(
pCut
->
pLeaves
[
iPlace
])
)
break
;
iPlace
=
Mpm_CutFindLeaf
(
pCut
,
Abc_Lit2Var
(
pTemp
->
pLeaves
[
i
])
);
if
(
iPlace
==
(
int
)
pCut
->
nLeaves
)
{
if
(
(
int
)
pCut
->
nLeaves
==
p
->
nLutSize
)
...
...
src/map/mpm/mpmMig.h
View file @
9e723d40
...
...
@@ -34,7 +34,6 @@ ABC_NAMESPACE_HEADER_START
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
//#define MIG_RUNTIME
#define MIG_NONE 0x7FFFFFFF
//#define MIG_MASK 0x0000FFFF
//#define MIG_BASE 16
...
...
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