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
09a5950c
Commit
09a5950c
authored
Oct 11, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deriving network in terms of programmable cells.
parent
f0044175
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
src/aig/gia/giaIf.c
+12
-5
src/map/if/ifTune.c
+2
-1
No files found.
src/aig/gia/giaIf.c
View file @
09a5950c
...
@@ -1435,10 +1435,14 @@ int Gia_ManFromIfLogicFindCell( If_Man_t * pIfMan, Gia_Man_t * pNew, Gia_Man_t *
...
@@ -1435,10 +1435,14 @@ int Gia_ManFromIfLogicFindCell( If_Man_t * pIfMan, Gia_Man_t * pNew, Gia_Man_t *
else
else
{
{
Gia_Obj_t
*
pObj
;
Gia_Obj_t
*
pObj
;
int
i
,
Id
;
int
i
,
Id
,
iLitTemp
;
// extract variable permutation
// extract variable permutation
word
Perm
=
If_DsdManGetFuncPerm
(
pIfMan
->
pIfDsdMan
,
If_CutDsdLit
(
pIfMan
,
pCutBest
)
);
char
*
pCutPerm
=
If_CutDsdPerm
(
pIfMan
,
pCutBest
);
// DSD input -> cut input
word
Perm
=
If_DsdManGetFuncPerm
(
pIfMan
->
pIfDsdMan
,
If_CutDsdLit
(
pIfMan
,
pCutBest
)
);
// cell input -> DSD input
assert
(
Perm
>
0
);
assert
(
Perm
>
0
);
// (extend storage for configuration bits)
// derive mapping from cell inputs into cut inputs
// retrieve config bits of the LUTs
// perform boolean matching
// perform boolean matching
if
(
!
If_ManSatFindCofigBits
(
pSat
,
vPiVars
,
vPoVars
,
If_CutTruthW
(
pIfMan
,
pCutBest
),
Vec_IntSize
(
vLeaves
),
Perm
,
Ifn_NtkInputNum
(
pNtkCell
),
vLits
)
)
if
(
!
If_ManSatFindCofigBits
(
pSat
,
vPiVars
,
vPoVars
,
If_CutTruthW
(
pIfMan
,
pCutBest
),
Vec_IntSize
(
vLeaves
),
Perm
,
Ifn_NtkInputNum
(
pNtkCell
),
vLits
)
)
{
{
...
@@ -1450,12 +1454,15 @@ int Gia_ManFromIfLogicFindCell( If_Man_t * pIfMan, Gia_Man_t * pNew, Gia_Man_t *
...
@@ -1450,12 +1454,15 @@ int Gia_ManFromIfLogicFindCell( If_Man_t * pIfMan, Gia_Man_t * pNew, Gia_Man_t *
// copy GIA back into the manager
// copy GIA back into the manager
Vec_IntFillExtra
(
&
pTemp
->
vCopies
,
Gia_ManObjNum
(
pTemp
),
-
1
);
Vec_IntFillExtra
(
&
pTemp
->
vCopies
,
Gia_ManObjNum
(
pTemp
),
-
1
);
Gia_ObjSetCopyArray
(
pTemp
,
0
,
0
);
Gia_ObjSetCopyArray
(
pTemp
,
0
,
0
);
Gia_ManForEachCiId
(
pTemp
,
Id
,
i
)
Vec_IntForEachEntry
(
vLeaves
,
iLitTemp
,
i
)
Gia_ObjSetCopyArray
(
pTemp
,
Id
,
Vec_IntEntry
(
vLeaves
,
i
)
);
Gia_ObjSetCopyArray
(
pTemp
,
Gia_ManCiIdToId
(
pTemp
,
i
),
iLitTemp
);
// collect nodes
// collect nodes
Gia_ManIncrementTravId
(
pTemp
);
Gia_ManIncrementTravId
(
pTemp
);
Id
=
Abc_Lit2Var
(
iLit
);
Id
=
Abc_Lit2Var
(
iLit
);
Gia_ManCollectAnds
(
pTemp
,
&
Id
,
1
,
vCover
);
Gia_ManCollectAnds
(
pTemp
,
&
Id
,
1
,
vCover
);
Vec_IntPrint
(
vCover
);
Gia_ManForEachObjVec
(
vCover
,
pTemp
,
pObj
,
i
)
Gia_ObjPrint
(
pTemp
,
pObj
);
// copy GIA
// copy GIA
Gia_ManForEachObjVec
(
vCover
,
pTemp
,
pObj
,
i
)
Gia_ManForEachObjVec
(
vCover
,
pTemp
,
pObj
,
i
)
{
{
...
@@ -1502,7 +1509,7 @@ Gia_Man_t * Gia_ManFromIfLogic( If_Man_t * pIfMan )
...
@@ -1502,7 +1509,7 @@ Gia_Man_t * Gia_ManFromIfLogic( If_Man_t * pIfMan )
// start mapping and packing
// start mapping and packing
vMapping
=
Vec_IntStart
(
If_ManObjNum
(
pIfMan
)
);
vMapping
=
Vec_IntStart
(
If_ManObjNum
(
pIfMan
)
);
vMapping2
=
Vec_IntStart
(
1
);
vMapping2
=
Vec_IntStart
(
1
);
if
(
pIfMan
->
pPars
->
fDeriveLuts
&&
(
pIfMan
->
pPars
->
pLutStruct
||
pIfMan
->
pPars
->
fEnableCheck75
||
pIfMan
->
pPars
->
fEnableCheck75u
||
pIfMan
->
pPars
->
fEnableCheck07
)
)
if
(
pIfMan
->
pPars
->
fDeriveLuts
&&
(
pIfMan
->
pPars
->
pLutStruct
||
pIfMan
->
pPars
->
fEnableCheck75
||
pIfMan
->
pPars
->
fEnableCheck75u
||
pIfMan
->
pPars
->
fEnableCheck07
||
pIfMan
->
pPars
->
fUseDsdTune
)
)
{
{
vPacking
=
Vec_IntAlloc
(
1000
);
vPacking
=
Vec_IntAlloc
(
1000
);
Vec_IntPush
(
vPacking
,
0
);
Vec_IntPush
(
vPacking
,
0
);
...
...
src/map/if/ifTune.c
View file @
09a5950c
...
@@ -770,6 +770,7 @@ int If_ManSatDeriveGiaFromBits( void * pGia, Ifn_Ntk_t * p, Vec_Int_t * vValues,
...
@@ -770,6 +770,7 @@ int If_ManSatDeriveGiaFromBits( void * pGia, Ifn_Ntk_t * p, Vec_Int_t * vValues,
for
(
k
=
0
;
k
<
nMints
;
k
++
)
for
(
k
=
0
;
k
<
nMints
;
k
++
)
if
(
Vec_IntEntry
(
vValues
,
iVar
++
)
)
if
(
Vec_IntEntry
(
vValues
,
iVar
++
)
)
uTruth
|=
((
word
)
1
<<
k
);
uTruth
|=
((
word
)
1
<<
k
);
uTruth
=
Abc_Tt6Stretch
(
uTruth
,
nFans
);
// collect function
// collect function
for
(
k
=
0
;
k
<
nFans
;
k
++
)
for
(
k
=
0
;
k
<
nFans
;
k
++
)
pFaninLits
[
k
]
=
pVarMap
[
pFans
[
k
]];
pFaninLits
[
k
]
=
pVarMap
[
pFans
[
k
]];
...
@@ -781,7 +782,7 @@ int If_ManSatDeriveGiaFromBits( void * pGia, Ifn_Ntk_t * p, Vec_Int_t * vValues,
...
@@ -781,7 +782,7 @@ int If_ManSatDeriveGiaFromBits( void * pGia, Ifn_Ntk_t * p, Vec_Int_t * vValues,
{
{
extern
int
Kit_TruthToGia
(
Gia_Man_t
*
pMan
,
unsigned
*
pTruth
,
int
nVars
,
Vec_Int_t
*
vMemory
,
Vec_Int_t
*
vLeaves
,
int
fHash
);
extern
int
Kit_TruthToGia
(
Gia_Man_t
*
pMan
,
unsigned
*
pTruth
,
int
nVars
,
Vec_Int_t
*
vMemory
,
Vec_Int_t
*
vLeaves
,
int
fHash
);
Vec_Int_t
Leaves
=
{
nVarsNew
,
nVarsNew
,
pFaninLits
};
Vec_Int_t
Leaves
=
{
nVarsNew
,
nVarsNew
,
pFaninLits
};
pVarMap
[
i
]
=
Kit_TruthToGia
(
pNew
,
(
unsigned
*
)
uTruth
,
nVarsNew
,
vCover
,
&
Leaves
,
1
);
// hashing enabled!!!
pVarMap
[
i
]
=
Kit_TruthToGia
(
pNew
,
(
unsigned
*
)
&
uTruth
,
nVarsNew
,
vCover
,
&
Leaves
,
1
);
// hashing enabled!!!
}
}
}
}
else
assert
(
0
);
else
assert
(
0
);
...
...
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