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
73ba1458
Commit
73ba1458
authored
Sep 30, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Producing AIG after structural mapping.
parent
cb845d44
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
11 deletions
+26
-11
src/aig/gia/giaFx.c
+1
-1
src/aig/gia/giaJf.c
+20
-5
src/aig/gia/giaTruth.c
+2
-2
src/opt/dau/dau.h
+1
-1
src/opt/dau/dauGia.c
+2
-2
No files found.
src/aig/gia/giaFx.c
View file @
73ba1458
...
...
@@ -193,7 +193,7 @@ Vec_Wec_t * Gia_ManFxRetrieve( Gia_Man_t * p, Vec_Str_t ** pvCompl, int fReverse
// compute truth tables
nCutSize
=
Gia_ManLutSizeMax
(
p
);
nWords
=
Abc_Truth6WordNum
(
nCutSize
);
vTruths
=
Gia_ManComputeTruths
(
p
,
Abc_MaxInt
(
6
,
nCutSize
)
,
nItems
-
Gia_ManCiNum
(
p
),
fReverse
);
vTruths
=
Gia_ManComputeTruths
(
p
,
nCutSize
,
nItems
-
Gia_ManCiNum
(
p
),
fReverse
);
vCover
=
Vec_IntAlloc
(
1
<<
16
);
// collect cubes
vCubes
=
Vec_WecAlloc
(
1000
);
...
...
src/aig/gia/giaJf.c
View file @
73ba1458
...
...
@@ -1446,8 +1446,7 @@ Gia_Man_t * Jf_ManDeriveGia( Jf_Man_t * p )
Vec_Int_t
*
vCover
=
Vec_IntAlloc
(
1
<<
16
);
Vec_Int_t
*
vLeaves
=
Vec_IntAlloc
(
16
);
int
i
,
k
,
iLit
,
Class
,
*
pCut
;
word
uTruth
;
assert
(
p
->
pPars
->
fCutMin
);
word
*
pTruth
,
uTruth
=
0
;
// create new manager
pNew
=
Gia_ManStart
(
Gia_ManObjNum
(
p
->
pGia
)
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pGia
->
pName
);
...
...
@@ -1457,6 +1456,8 @@ Gia_Man_t * Jf_ManDeriveGia( Jf_Man_t * p )
Gia_ManForEachCi
(
p
->
pGia
,
pObj
,
i
)
Vec_IntWriteEntry
(
vCopies
,
Gia_ObjId
(
p
->
pGia
,
pObj
),
Gia_ManAppendCi
(
pNew
)
);
// iterate through nodes used in the mapping
if
(
!
p
->
pPars
->
fCutMin
)
Gia_ObjComputeTruthTableStart
(
p
->
pGia
,
p
->
pPars
->
nLutSize
);
Gia_ManHashStart
(
pNew
);
Gia_ManForEachAnd
(
p
->
pGia
,
pObj
,
i
)
{
...
...
@@ -1464,6 +1465,9 @@ Gia_Man_t * Jf_ManDeriveGia( Jf_Man_t * p )
continue
;
pCut
=
Jf_ObjCutBest
(
p
,
i
);
// printf( "Best cut of node %d: ", i ); Jf_CutPrint(pCut);
// get the truth table
if
(
p
->
pPars
->
fCutMin
)
{
Class
=
Jf_CutFuncClass
(
pCut
);
uTruth
=
p
->
pPars
->
fFuncDsd
?
Sdm_ManReadDsdTruth
(
p
->
pDsd
,
Class
)
:
*
Vec_MemReadEntry
(
p
->
vTtMem
,
Class
);
assert
(
p
->
pDsd
==
NULL
||
Sdm_ManReadDsdVarNum
(
p
->
pDsd
,
Class
)
==
Jf_CutSize
(
pCut
)
);
...
...
@@ -1481,13 +1485,22 @@ Gia_Man_t * Jf_ManDeriveGia( Jf_Man_t * p )
Vec_IntWriteEntry
(
vCopies
,
i
,
iLit
);
continue
;
}
// collect leaves
pTruth
=
&
uTruth
;
}
else
{
Vec_IntClear
(
vLeaves
);
Jf_CutForEachLit
(
pCut
,
iLit
,
k
)
Vec_IntPush
(
vLeaves
,
Abc_Lit2Var
(
iLit
)
);
pTruth
=
Gia_ObjComputeTruthTableCut
(
p
->
pGia
,
pObj
,
vLeaves
);
}
// collect incoming literals
Vec_IntClear
(
vLeaves
);
Jf_CutForEachLit
(
pCut
,
iLit
,
k
)
Vec_IntPush
(
vLeaves
,
Abc_Lit2LitL
(
Vec_IntArray
(
vCopies
),
iLit
)
);
// create GIA
iLit
=
Dsm_ManDeriveGia
(
pNew
,
u
Truth
,
vLeaves
,
vCover
);
iLit
=
Abc_LitNotCond
(
iLit
,
Jf_CutFuncCompl
(
pCut
)
);
iLit
=
Dsm_ManDeriveGia
(
pNew
,
p
Truth
,
vLeaves
,
vCover
);
iLit
=
Abc_LitNotCond
(
iLit
,
(
p
->
pPars
->
fCutMin
&&
Jf_CutFuncCompl
(
pCut
)
)
);
Vec_IntWriteEntry
(
vCopies
,
i
,
iLit
);
}
Gia_ManForEachCo
(
p
->
pGia
,
pObj
,
i
)
...
...
@@ -1495,6 +1508,8 @@ Gia_Man_t * Jf_ManDeriveGia( Jf_Man_t * p )
iLit
=
Vec_IntEntry
(
vCopies
,
Gia_ObjFaninId0p
(
p
->
pGia
,
pObj
)
);
Gia_ManAppendCo
(
pNew
,
Abc_LitNotCond
(
iLit
,
Gia_ObjFaninC0
(
pObj
))
);
}
if
(
!
p
->
pPars
->
fCutMin
)
Gia_ObjComputeTruthTableStop
(
p
->
pGia
);
Vec_IntFree
(
vCopies
);
Vec_IntFree
(
vLeaves
);
Vec_IntFree
(
vCover
);
...
...
src/aig/gia/giaTruth.c
View file @
73ba1458
...
...
@@ -185,7 +185,7 @@ word * Gia_ObjComputeTruthTable( Gia_Man_t * p, Gia_Obj_t * pObj )
p
->
nTtWords
=
Abc_Truth6WordNum
(
p
->
nTtVars
);
p
->
vTtNums
=
Vec_IntStart
(
Gia_ManObjNum
(
p
)
+
1000
);
p
->
vTtNodes
=
Vec_IntAlloc
(
256
);
p
->
vTtInputs
=
Vec_PtrAllocTruthTables
(
p
->
nTtVars
);
p
->
vTtInputs
=
Vec_PtrAllocTruthTables
(
Abc_MaxInt
(
6
,
p
->
nTtVars
)
);
p
->
vTtMemory
=
Vec_WrdStart
(
p
->
nTtWords
*
256
);
}
else
...
...
@@ -285,7 +285,7 @@ void Gia_ObjComputeTruthTableStart( Gia_Man_t * p, int nVarsMax )
p
->
nTtVars
=
nVarsMax
;
p
->
nTtWords
=
Abc_Truth6WordNum
(
p
->
nTtVars
);
p
->
vTtNodes
=
Vec_IntAlloc
(
256
);
p
->
vTtInputs
=
Vec_PtrAllocTruthTables
(
p
->
nTtVars
);
p
->
vTtInputs
=
Vec_PtrAllocTruthTables
(
Abc_MaxInt
(
6
,
p
->
nTtVars
)
);
p
->
vTtMemory
=
Vec_WrdStart
(
p
->
nTtWords
*
64
);
p
->
vTtNums
=
Vec_IntAlloc
(
Gia_ManObjNum
(
p
)
+
1000
);
Vec_IntFill
(
p
->
vTtNums
,
Vec_IntCap
(
p
->
vTtNums
),
-
ABC_INFINITY
);
...
...
src/opt/dau/dau.h
View file @
73ba1458
...
...
@@ -88,7 +88,7 @@ extern void Dau_DsdTruthCompose_rec( word * pFunc, word pFanins[DAU_MAX
extern
int
Dau_DsdCheck1Step
(
word
*
pTruth
,
int
nVarsInit
);
/*=== dauGia.c ==========================================================*/
extern
int
Dsm_ManDeriveGia
(
void
*
p
,
word
u
Truth
,
Vec_Int_t
*
vLeaves
,
Vec_Int_t
*
vCover
);
extern
int
Dsm_ManDeriveGia
(
void
*
p
,
word
*
p
Truth
,
Vec_Int_t
*
vLeaves
,
Vec_Int_t
*
vCover
);
/*=== dauMerge.c ==========================================================*/
extern
void
Dau_DsdRemoveBraces
(
char
*
pDsd
,
int
*
pMatches
);
...
...
src/opt/dau/dauGia.c
View file @
73ba1458
...
...
@@ -210,14 +210,14 @@ int Dau_DsdToGia( Gia_Man_t * pGia, char * p, int * pLits, Vec_Int_t * vCover )
SeeAlso []
***********************************************************************/
int
Dsm_ManDeriveGia
(
void
*
p
,
word
u
Truth
,
Vec_Int_t
*
vLeaves
,
Vec_Int_t
*
vCover
)
int
Dsm_ManDeriveGia
(
void
*
p
,
word
*
p
Truth
,
Vec_Int_t
*
vLeaves
,
Vec_Int_t
*
vCover
)
{
Gia_Man_t
*
pGia
=
(
Gia_Man_t
*
)
p
;
char
pDsd
[
1000
];
int
nSizeNonDec
;
m_Calls
++
;
// static int Counter = 0; Counter++;
nSizeNonDec
=
Dau_DsdDecompose
(
&
u
Truth
,
Vec_IntSize
(
vLeaves
),
0
,
1
,
pDsd
);
nSizeNonDec
=
Dau_DsdDecompose
(
p
Truth
,
Vec_IntSize
(
vLeaves
),
0
,
1
,
pDsd
);
if
(
nSizeNonDec
)
m_NonDsd
++
;
// printf( "%s\n", pDsd );
...
...
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