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
75fee107
Commit
75fee107
authored
Sep 12, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to the new technology mapper.
parent
14606c47
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
103 additions
and
7 deletions
+103
-7
src/aig/gia/gia.h
+6
-3
src/aig/gia/giaJf.c
+0
-0
src/base/abci/abc.c
+12
-4
src/map/if/ifTruth.c
+36
-0
src/misc/extra/extra.h
+1
-0
src/misc/extra/extraUtilDsd.c
+48
-0
No files found.
src/aig/gia/gia.h
View file @
75fee107
...
@@ -242,16 +242,19 @@ struct Jf_Par_t_
...
@@ -242,16 +242,19 @@ struct Jf_Par_t_
int
nRounds
;
int
nRounds
;
int
DelayTarget
;
int
DelayTarget
;
int
fAreaOnly
;
int
fAreaOnly
;
int
fOptEdge
;
int
fCoarsen
;
int
fCoarsen
;
int
fCutMin
;
int
fCutMin
;
int
fUseTts
;
int
fUseTts
;
int
fGenCnf
;
int
fVerbose
;
int
fVerbose
;
int
fVeryVerbose
;
int
fVeryVerbose
;
int
nLutSizeMax
;
int
nLutSizeMax
;
int
nCutNumMax
;
int
nCutNumMax
;
int
Delay
;
word
Delay
;
int
Area
;
word
Area
;
int
Edge
;
word
Edge
;
word
Clause
;
};
};
static
inline
unsigned
Gia_ObjCutSign
(
unsigned
ObjId
)
{
return
(
1
<<
(
ObjId
&
31
));
}
static
inline
unsigned
Gia_ObjCutSign
(
unsigned
ObjId
)
{
return
(
1
<<
(
ObjId
&
31
));
}
...
...
src/aig/gia/giaJf.c
View file @
75fee107
This diff is collapsed.
Click to expand it.
src/base/abci/abc.c
View file @
75fee107
...
@@ -29847,7 +29847,7 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -29847,7 +29847,7 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
int
c
;
int
c
;
Jf_ManSetDefaultPars
(
pPars
);
Jf_ManSetDefaultPars
(
pPars
);
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCRDa
cmt
vwh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCRDa
ekmtc
vwh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -29904,7 +29904,10 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -29904,7 +29904,10 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'a'
:
case
'a'
:
pPars
->
fAreaOnly
^=
1
;
pPars
->
fAreaOnly
^=
1
;
break
;
break
;
case
'c'
:
case
'e'
:
pPars
->
fOptEdge
^=
1
;
break
;
case
'k'
:
pPars
->
fCoarsen
^=
1
;
pPars
->
fCoarsen
^=
1
;
break
;
break
;
case
'm'
:
case
'm'
:
...
@@ -29913,6 +29916,9 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -29913,6 +29916,9 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
case
't'
:
case
't'
:
pPars
->
fUseTts
^=
1
;
pPars
->
fUseTts
^=
1
;
break
;
break
;
case
'c'
:
pPars
->
fGenCnf
^=
1
;
break
;
case
'v'
:
case
'v'
:
pPars
->
fVerbose
^=
1
;
pPars
->
fVerbose
^=
1
;
break
;
break
;
...
@@ -29951,16 +29957,18 @@ usage:
...
@@ -29951,16 +29957,18 @@ usage:
sprintf
(
Buffer
,
"best possible"
);
sprintf
(
Buffer
,
"best possible"
);
else
else
sprintf
(
Buffer
,
"%d"
,
pPars
->
DelayTarget
);
sprintf
(
Buffer
,
"%d"
,
pPars
->
DelayTarget
);
Abc_Print
(
-
2
,
"usage: &jf [-KCRD num] [-a
cmt
vwh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &jf [-KCRD num] [-a
kmtc
vwh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs technology mapping of the network
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs technology mapping of the network
\n
"
);
Abc_Print
(
-
2
,
"
\t
-K num : LUT size for the mapping (2 <= K <= %d) [default = %d]
\n
"
,
pPars
->
nLutSizeMax
,
pPars
->
nLutSize
);
Abc_Print
(
-
2
,
"
\t
-K num : LUT size for the mapping (2 <= K <= %d) [default = %d]
\n
"
,
pPars
->
nLutSizeMax
,
pPars
->
nLutSize
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of priority cuts (1 <= C <= %d) [default = %d]
\n
"
,
pPars
->
nCutNumMax
,
pPars
->
nCutNum
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of priority cuts (1 <= C <= %d) [default = %d]
\n
"
,
pPars
->
nCutNumMax
,
pPars
->
nCutNum
);
Abc_Print
(
-
2
,
"
\t
-R num : the number of mapping rounds [default = %d]
\n
"
,
pPars
->
nRounds
);
Abc_Print
(
-
2
,
"
\t
-R num : the number of mapping rounds [default = %d]
\n
"
,
pPars
->
nRounds
);
Abc_Print
(
-
2
,
"
\t
-D num : sets the delay constraint for the mapping [default = %s]
\n
"
,
Buffer
);
Abc_Print
(
-
2
,
"
\t
-D num : sets the delay constraint for the mapping [default = %s]
\n
"
,
Buffer
);
Abc_Print
(
-
2
,
"
\t
-a : toggles area-oriented mapping [default = %s]
\n
"
,
pPars
->
fAreaOnly
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggles area-oriented mapping [default = %s]
\n
"
,
pPars
->
fAreaOnly
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-c : toggles coarsening the subject graph [default = %s]
\n
"
,
pPars
->
fCoarsen
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-e : toggles edge vs node minimization [default = %s]
\n
"
,
pPars
->
fOptEdge
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-k : toggles coarsening the subject graph [default = %s]
\n
"
,
pPars
->
fCoarsen
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-m : toggles cut minimization [default = %s]
\n
"
,
pPars
->
fCutMin
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-m : toggles cut minimization [default = %s]
\n
"
,
pPars
->
fCutMin
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-t : toggles truth tables for minimization [default = %s]
\n
"
,
pPars
->
fUseTts
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-t : toggles truth tables for minimization [default = %s]
\n
"
,
pPars
->
fUseTts
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-c : toggles mapping for CNF generation [default = %s]
\n
"
,
pPars
->
fGenCnf
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggles verbose output [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggles verbose output [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggles very verbose output [default = %s]
\n
"
,
pPars
->
fVeryVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggles very verbose output [default = %s]
\n
"
,
pPars
->
fVeryVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : prints the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : prints the command usage
\n
"
);
src/map/if/ifTruth.c
View file @
75fee107
...
@@ -675,6 +675,42 @@ int If_CutComputeTruth2( If_Man_t * p, If_Cut_t * pCut, If_Cut_t * pCut0, If_Cut
...
@@ -675,6 +675,42 @@ int If_CutComputeTruth2( If_Man_t * p, If_Cut_t * pCut, If_Cut_t * pCut0, If_Cut
return
0
;
return
0
;
}
}
/**Function*************************************************************
Synopsis [Truth table computation.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
/*
int If_CutComputeTruth3( If_Man_t * p, If_Cut_t * pCut, If_Cut_t * pCut0, If_Cut_t * pCut1, int fCompl0, int fCompl1 )
{
int fCompl, truthId;
int iFuncLit0 = pCut0->iDsd;
int iFuncLit1 = pCut1->iDsd;
int nWords = Abc_TtWordNum( pCut->nLimit );
word * pTruth0s = Vec_MemReadEntry( p->vTtMem, Abc_Lit2Var(iFuncLit0) );
word * pTruth1s = Vec_MemReadEntry( p->vTtMem, Abc_Lit2Var(iFuncLit1) );
word * pTruth0 = (word *)p->puTemp[0];
word * pTruth1 = (word *)p->puTemp[1];
word * pTruth = (word *)p->puTemp[2];
Abc_TtCopy( pTruth0, pTruth0s, nWords, fCompl0 ^ pCut0->fCompl ^ Abc_LitIsCompl(iFuncLit0) );
Abc_TtCopy( pTruth1, pTruth1s, nWords, fCompl1 ^ pCut1->fCompl ^ Abc_LitIsCompl(iFuncLit1) );
Abc_TtStretch( pTruth0, pCut->nLimit, pCut0->pLeaves, pCut0->nLeaves, pCut->pLeaves, pCut->nLeaves );
Abc_TtStretch( pTruth1, pCut->nLimit, pCut1->pLeaves, pCut1->nLeaves, pCut->pLeaves, pCut->nLeaves );
fCompl = (pTruth0[0] & pTruth1[0] & 1);
Abc_TtAnd( pTruth, pTruth0, pTruth1, nWords, fCompl );
pCut->nLeaves = Abc_TtMinBase( pTruth, pCut->pLeaves, pCut->nLeaves );
truthId = Vec_MemHashInsert( p->vTtMem, pTruth );
pCut->iDsd = Abc_Var2Lit( truthId, fCompl );
assert( (pTruth[0] & 1) == 0 );
return 1;
}
*/
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
/// END OF FILE ///
...
...
src/misc/extra/extra.h
View file @
75fee107
...
@@ -226,6 +226,7 @@ extern int Sdm_ManReadDsdAndNum( Sdm_Man_t * p, int iDsd );
...
@@ -226,6 +226,7 @@ extern int Sdm_ManReadDsdAndNum( Sdm_Man_t * p, int iDsd );
extern
int
Sdm_ManReadDsdClauseNum
(
Sdm_Man_t
*
p
,
int
iDsd
);
extern
int
Sdm_ManReadDsdClauseNum
(
Sdm_Man_t
*
p
,
int
iDsd
);
extern
word
Sdm_ManReadDsdTruth
(
Sdm_Man_t
*
p
,
int
iDsd
);
extern
word
Sdm_ManReadDsdTruth
(
Sdm_Man_t
*
p
,
int
iDsd
);
extern
char
*
Sdm_ManReadDsdStr
(
Sdm_Man_t
*
p
,
int
iDsd
);
extern
char
*
Sdm_ManReadDsdStr
(
Sdm_Man_t
*
p
,
int
iDsd
);
extern
void
Sdm_ManReadCnfCosts
(
Sdm_Man_t
*
p
,
int
*
pCosts
,
int
nCosts
);
/*=== extraUtilProgress.c ================================================================*/
/*=== extraUtilProgress.c ================================================================*/
...
...
src/misc/extra/extraUtilDsd.c
View file @
75fee107
...
@@ -1014,6 +1014,14 @@ char * Sdm_ManReadDsdStr( Sdm_Man_t * p, int iDsd )
...
@@ -1014,6 +1014,14 @@ char * Sdm_ManReadDsdStr( Sdm_Man_t * p, int iDsd )
{
{
return
p
->
pDsd6
[
iDsd
].
pStr
;
return
p
->
pDsd6
[
iDsd
].
pStr
;
}
}
void
Sdm_ManReadCnfCosts
(
Sdm_Man_t
*
p
,
int
*
pCosts
,
int
nCosts
)
{
int
i
;
assert
(
nCosts
==
DSD_CLASS_NUM
);
pCosts
[
0
]
=
pCosts
[
1
]
=
0
;
for
(
i
=
2
;
i
<
DSD_CLASS_NUM
;
i
++
)
pCosts
[
i
]
=
Sdm_ManReadDsdClauseNum
(
p
,
i
);
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -1104,6 +1112,46 @@ void Sdm_ManTest()
...
@@ -1104,6 +1112,46 @@ void Sdm_ManTest()
Sdm_ManFree
(
p
);
Sdm_ManFree
(
p
);
}
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
/*
void Sdm_ManCompareCnfSizes()
{
Vec_Int_t * vMemory;
word uTruth;
int i, nSop0, nSop1, nVars, nCla, RetValue;
vMemory = Vec_IntAlloc( 1 << 16 );
for ( i = 1; i < DSD_CLASS_NUM; i++ )
{
uTruth = Sdm_ManReadDsdTruth( s_SdmMan, i );
nVars = Sdm_ManReadDsdVarNum( s_SdmMan, i );
nCla = Sdm_ManReadDsdClauseNum( s_SdmMan, i );
RetValue = Kit_TruthIsop( &uTruth, nVars, vMemory, 0 );
nSop0 = Vec_IntSize(vMemory);
uTruth = ~uTruth;
RetValue = Kit_TruthIsop( &uTruth, nVars, vMemory, 0 );
nSop1 = Vec_IntSize(vMemory);
if ( nSop0 + nSop1 != nCla )
printf( "Class %4d : %d + %d != %d\n", i, nSop0, nSop1, nCla );
else
printf( "Class %4d : %d + %d == %d\n", i, nSop0, nSop1, nCla );
}
Vec_IntFree( vMemory );
}
*/
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
...
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