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
1bdb3773
Commit
1bdb3773
authored
Jul 21, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New technology mapper.
parent
a9afe7e8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
20 deletions
+25
-20
src/map/mpm/mpmDsd.c
+1
-1
src/map/mpm/mpmGates.c
+16
-13
src/map/mpm/mpmInt.h
+3
-3
src/map/mpm/mpmMan.c
+1
-2
src/map/mpm/mpmMap.c
+1
-1
src/map/scl/sclUpsize.c
+3
-0
No files found.
src/map/mpm/mpmDsd.c
View file @
1bdb3773
...
...
@@ -986,7 +986,7 @@ Kit_DsdPrintFromTruth( (unsigned *)&t, 6 ); printf( "\n" );
// check if the gate exists
if
(
p
->
pPars
->
fMap4Gates
)
{
if
(
Vec_Int
Entry
(
p
->
vNpnConfigs
,
iClass
)
<
0
)
if
(
Vec_Int
Size
(
Vec_WecEntry
(
p
->
vNpnConfigs
,
iClass
))
==
0
)
{
p
->
nNoMatch
++
;
return
0
;
...
...
src/map/mpm/mpmGates.c
View file @
1bdb3773
...
...
@@ -45,16 +45,16 @@ ABC_NAMESPACE_IMPL_START
SeeAlso []
***********************************************************************/
Vec_
Int_t
*
Mpm_ManFindDsdMatches
(
Mpm_Man_t
*
p
,
void
*
pScl
,
Vec_Int_t
**
pvNpnCosts
)
Vec_
Wec_t
*
Mpm_ManFindDsdMatches
(
Mpm_Man_t
*
p
,
void
*
pScl
)
{
int
fVerbose
=
p
->
pPars
->
fVeryVerbose
;
SC_Lib
*
pLib
=
(
SC_Lib
*
)
pScl
;
Vec_Int_t
*
vClasses
;
Vec_Wec_t
*
vClasses
;
Vec_Int_t
*
vClass
;
SC_Cell
*
pRepr
;
int
i
,
Config
,
iClass
;
word
Truth
;
vClasses
=
Vec_IntStartFull
(
600
);
*
pvNpnCosts
=
Vec_IntStartFull
(
600
);
vClasses
=
Vec_WecStart
(
600
);
SC_LibForEachCellClass
(
pLib
,
pRepr
,
i
)
{
if
(
pRepr
->
n_inputs
>
6
||
pRepr
->
n_outputs
>
1
)
...
...
@@ -74,8 +74,8 @@ Vec_Int_t * Mpm_ManFindDsdMatches( Mpm_Man_t * p, void * pScl, Vec_Int_t ** pvNp
iClass
=
Config
>>
17
;
Config
=
(
pRepr
->
Id
<<
17
)
|
(
Config
&
0x1FFFF
);
// write gate and NPN config for this DSD class
Vec_IntWriteEntry
(
vClasses
,
iClass
,
Config
);
Vec_Int
WriteEntry
(
*
pvNpnCosts
,
iClass
,
(
int
)(
100
*
pRepr
->
area
)
);
vClass
=
Vec_WecEntry
(
vClasses
,
iClass
);
Vec_Int
Push
(
vClass
,
Config
);
if
(
!
fVerbose
)
continue
;
...
...
@@ -100,17 +100,19 @@ Vec_Int_t * Mpm_ManFindDsdMatches( Mpm_Man_t * p, void * pScl, Vec_Int_t ** pvNp
SeeAlso []
***********************************************************************/
Vec_Ptr_t
*
Mpm_ManFindCells
(
Mio_Library_t
*
pMio
,
SC_Lib
*
pScl
,
Vec_
Int
_t
*
vNpnConfigs
)
Vec_Ptr_t
*
Mpm_ManFindCells
(
Mio_Library_t
*
pMio
,
SC_Lib
*
pScl
,
Vec_
Wec
_t
*
vNpnConfigs
)
{
Vec_Ptr_t
*
vNpnGatesMio
;
Vec_Int_t
*
vClass
;
Mio_Gate_t
*
pMioGate
;
SC_Cell
*
pCell
;
int
Config
,
iClass
;
vNpnGatesMio
=
Vec_PtrStart
(
Vec_
Int
Size
(
vNpnConfigs
)
);
Vec_
IntForEachEntry
(
vNpnConfigs
,
Config
,
iClass
)
vNpnGatesMio
=
Vec_PtrStart
(
Vec_
Wec
Size
(
vNpnConfigs
)
);
Vec_
WecForEachLevel
(
vNpnConfigs
,
vClass
,
iClass
)
{
if
(
Config
==
-
1
)
if
(
Vec_IntSize
(
vClass
)
==
0
)
continue
;
Config
=
Vec_IntEntry
(
vClass
,
0
);
pCell
=
SC_LibCell
(
pScl
,
(
Config
>>
17
)
);
pMioGate
=
Mio_LibraryReadGateByName
(
pMio
,
pCell
->
pName
,
NULL
);
if
(
pMioGate
==
NULL
)
...
...
@@ -161,7 +163,7 @@ Abc_Ntk_t * Mpm_ManDeriveMappedAbcNtk( Mpm_Man_t * p, Mio_Library_t * pMio )
{
Abc_Ntk_t
*
pNtk
;
Vec_Ptr_t
*
vNpnGatesMio
;
Vec_Int_t
*
vNodes
,
*
vCopy
;
Vec_Int_t
*
vNodes
,
*
vCopy
,
*
vClass
;
Abc_Obj_t
*
pObj
,
*
pFanin
;
Mig_Obj_t
*
pNode
;
Mpm_Cut_t
*
pCutBest
;
...
...
@@ -214,7 +216,8 @@ Abc_Ntk_t * Mpm_ManDeriveMappedAbcNtk( Mpm_Man_t * p, Mio_Library_t * pMio )
Vec_IntForEachEntry
(
vNodes
,
iNode
,
i
)
{
pCutBest
=
Mpm_ObjCutBestP
(
p
,
Mig_ManObj
(
p
->
pMig
,
iNode
)
);
Config
=
Vec_IntEntry
(
p
->
vNpnConfigs
,
Abc_Lit2Var
(
pCutBest
->
iFunc
)
);
vClass
=
Vec_WecEntry
(
p
->
vNpnConfigs
,
Abc_Lit2Var
(
pCutBest
->
iFunc
)
);
Config
=
Vec_IntEntry
(
vClass
,
0
);
pObj
=
Abc_NtkCreateNode
(
pNtk
);
pObj
->
pData
=
Vec_PtrEntry
(
vNpnGatesMio
,
Abc_Lit2Var
(
pCutBest
->
iFunc
)
);
assert
(
pObj
->
pData
!=
NULL
);
...
...
@@ -265,7 +268,7 @@ Abc_Ntk_t * Mpm_ManPerformCellMapping( Mig_Man_t * pMig, Mpm_Par_t * pPars, Mio_
p
=
Mpm_ManStart
(
pMig
,
pPars
);
if
(
p
->
pPars
->
fVerbose
)
Mpm_ManPrintStatsInit
(
p
);
p
->
vNpnConfigs
=
Mpm_ManFindDsdMatches
(
p
,
p
->
pPars
->
pScl
,
&
p
->
vNpnCosts
);
p
->
vNpnConfigs
=
Mpm_ManFindDsdMatches
(
p
,
p
->
pPars
->
pScl
);
Mpm_ManPrepare
(
p
);
Mpm_ManPerform
(
p
);
if
(
p
->
pPars
->
fVerbose
)
...
...
src/map/mpm/mpmInt.h
View file @
1bdb3773
...
...
@@ -36,6 +36,7 @@
#include "misc/vec/vec.h"
#include "misc/vec/vecMem.h"
#include "misc/vec/vecHsh.h"
#include "misc/vec/vecWec.h"
#include "misc/util/utilTruth.h"
#include "mpmMig.h"
#include "mpm.h"
...
...
@@ -136,8 +137,7 @@ struct Mpm_Man_t_
Vec_Int_t
*
vMap2Perm
;
// maps number into its permutation
unsigned
uPermMask
[
3
];
unsigned
uComplMask
[
3
];
Vec_Int_t
*
vNpnConfigs
;
Vec_Int_t
*
vNpnCosts
;
// area cost of each NPN class
Vec_Wec_t
*
vNpnConfigs
;
// mapping attributes
Vec_Int_t
vCutBests
;
// cut best
Vec_Int_t
vCutLists
;
// cut list
...
...
@@ -242,7 +242,7 @@ extern word Mpm_CutTruthFromDsd( Mpm_Man_t * pMan, Mpm_Cut_t *
extern
int
Mpm_CutCheckDsd6
(
Mpm_Man_t
*
p
,
word
t
);
extern
int
Mpm_CutComputeDsd6
(
Mpm_Man_t
*
p
,
Mpm_Cut_t
*
pCut
,
Mpm_Cut_t
*
pCut0
,
Mpm_Cut_t
*
pCut1
,
Mpm_Cut_t
*
pCutC
,
int
fCompl0
,
int
fCompl1
,
int
fComplC
,
int
Type
);
/*=== mpmGates.c ===========================================================*/
extern
Vec_
Int_t
*
Mpm_ManFindDsdMatches
(
Mpm_Man_t
*
p
,
void
*
pScl
,
Vec_Int_t
**
pvNpnCosts
);
extern
Vec_
Wec_t
*
Mpm_ManFindDsdMatches
(
Mpm_Man_t
*
p
,
void
*
pScl
);
/*=== mpmLib.c ===========================================================*/
extern
Mpm_LibLut_t
*
Mpm_LibLutSetSimple
(
int
nLutSize
);
extern
void
Mpm_LibLutFree
(
Mpm_LibLut_t
*
pLib
);
...
...
src/map/mpm/mpmMan.c
View file @
1bdb3773
...
...
@@ -135,8 +135,7 @@ void Mpm_ManStop( Mpm_Man_t * p )
Vec_IntFree
(
p
->
pHash
->
vData
);
Hsh_IntManStop
(
p
->
pHash
);
}
Vec_IntFreeP
(
&
p
->
vNpnCosts
);
Vec_IntFreeP
(
&
p
->
vNpnConfigs
);
Vec_WecFreeP
(
&
p
->
vNpnConfigs
);
Vec_PtrFree
(
p
->
vTemp
);
Mmr_StepStop
(
p
->
pManCuts
);
ABC_FREE
(
p
->
vFreeUnits
.
pArray
);
...
...
src/map/mpm/mpmMap.c
View file @
1bdb3773
...
...
@@ -152,7 +152,7 @@ static inline int Mpm_CutGetArea( Mpm_Man_t * p, Mpm_Cut_t * pCut )
if
(
p
->
pPars
->
fMap4Aig
)
return
MPM_UNIT_AREA
*
p
->
pDsd6
[
Abc_Lit2Var
(
pCut
->
iFunc
)].
nAnds
;
if
(
p
->
pPars
->
fMap4Gates
)
return
MPM_UNIT_AREA
*
Vec_IntEntry
(
p
->
vNpnCosts
,
Abc_Lit2Var
(
pCut
->
iFunc
)
)
;
return
MPM_UNIT_AREA
*
1
;
return
p
->
pLibLut
->
pLutAreas
[
pCut
->
nLeaves
];
}
static
inline
word
Mpm_CutGetSign
(
Mpm_Cut_t
*
pCut
)
...
...
src/map/scl/sclUpsize.c
View file @
1bdb3773
...
...
@@ -495,6 +495,9 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars
// perform upsizing
nAllPos
=
nAllNodes
=
nAllTfos
=
nAllUpsizes
=
0
;
if
(
p
->
BestDelay
<=
SC_LibTimeFromPs
(
p
->
pLib
,
(
float
)
pPars
->
DelayUser
)
)
printf
(
"Current delay (%.2f ps) is better than the target delay (%.2f ps).
\n
"
,
SC_LibTimePs
(
p
->
pLib
,
p
->
BestDelay
),
(
float
)
pPars
->
DelayUser
);
else
for
(
i
=
0
;
i
<
pPars
->
nIters
;
i
++
)
{
for
(
win
=
pPars
->
Window
;
win
<=
100
;
win
*=
2
)
...
...
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