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
4669839b
Commit
4669839b
authored
Jun 20, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new mapping feature.
parent
6fd29922
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
4 deletions
+31
-4
abclib.dsp
+4
-0
src/base/abci/abc.c
+22
-2
src/map/if/if.h
+2
-0
src/map/if/ifCut.c
+1
-1
src/map/if/ifDec10.c
+0
-0
src/map/if/ifMap.c
+1
-1
src/map/if/module.make
+1
-0
No files found.
abclib.dsp
View file @
4669839b
...
@@ -2031,6 +2031,10 @@ SOURCE=.\src\map\if\ifDec.c
...
@@ -2031,6 +2031,10 @@ SOURCE=.\src\map\if\ifDec.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\map\if\ifDec10.c
# End Source File
# Begin Source File
SOURCE=.\src\map\if\ifLib.c
SOURCE=.\src\map\if\ifLib.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
src/base/abci/abc.c
View file @
4669839b
...
@@ -12878,7 +12878,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -12878,7 +12878,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
fLutMux
=
0
;
fLutMux
=
0
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCFADEqaflepmrsdbugojvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCFADEqaflepmrsdbugoj
k
vh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -12995,6 +12995,9 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -12995,6 +12995,9 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'j'
:
case
'j'
:
pPars
->
fEnableCheck
^=
1
;
pPars
->
fEnableCheck
^=
1
;
break
;
break
;
case
'k'
:
pPars
->
fEnableCheck2
^=
1
;
break
;
case
'v'
:
case
'v'
:
pPars
->
fVerbose
^=
1
;
pPars
->
fVerbose
^=
1
;
break
;
break
;
...
@@ -13074,6 +13077,11 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -13074,6 +13077,11 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars
->
fCutMin
=
1
;
pPars
->
fCutMin
=
1
;
}
}
if
(
pPars
->
fEnableCheck
&&
pPars
->
fEnableCheck2
)
{
Abc_Print
(
-
1
,
"These two checks cannot be enabled at the same time.
\n
"
);
return
1
;
}
if
(
pPars
->
fEnableCheck
)
if
(
pPars
->
fEnableCheck
)
{
{
if
(
pPars
->
nLutSize
<
6
||
pPars
->
nLutSize
>
7
)
if
(
pPars
->
nLutSize
<
6
||
pPars
->
nLutSize
>
7
)
...
@@ -13085,6 +13093,17 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -13085,6 +13093,17 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars
->
fCutMin
=
1
;
pPars
->
fCutMin
=
1
;
}
}
if
(
pPars
->
fEnableCheck2
)
{
if
(
pPars
->
nLutSize
<
6
||
pPars
->
nLutSize
>
10
)
{
Abc_Print
(
-
1
,
"This feature only works for {6,7,8,9,10}-LUTs.
\n
"
);
return
1
;
}
pPars
->
pFuncCell
=
If_CutPerformCheck10
;
pPars
->
fCutMin
=
1
;
}
// enable truth table computation if cut minimization is selected
// enable truth table computation if cut minimization is selected
if
(
pPars
->
fCutMin
)
if
(
pPars
->
fCutMin
)
{
{
...
@@ -13162,7 +13181,7 @@ usage:
...
@@ -13162,7 +13181,7 @@ usage:
sprintf
(
LutSize
,
"library"
);
sprintf
(
LutSize
,
"library"
);
else
else
sprintf
(
LutSize
,
"%d"
,
pPars
->
nLutSize
);
sprintf
(
LutSize
,
"%d"
,
pPars
->
nLutSize
);
Abc_Print
(
-
2
,
"usage: if [-KCFA num] [-DE float] [-qarlepmsdbugojvh]
\n
"
);
Abc_Print
(
-
2
,
"usage: if [-KCFA num] [-DE float] [-qarlepmsdbugoj
k
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs FPGA technology mapping of the network
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs FPGA technology mapping of the network
\n
"
);
Abc_Print
(
-
2
,
"
\t
-K num : the number of LUT inputs (2 < num < %d) [default = %s]
\n
"
,
IF_MAX_LUTSIZE
+
1
,
LutSize
);
Abc_Print
(
-
2
,
"
\t
-K num : the number of LUT inputs (2 < num < %d) [default = %s]
\n
"
,
IF_MAX_LUTSIZE
+
1
,
LutSize
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of priority cuts (0 < num < 2^12) [default = %d]
\n
"
,
pPars
->
nCutsMax
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of priority cuts (0 < num < 2^12) [default = %d]
\n
"
,
pPars
->
nCutsMax
);
...
@@ -13185,6 +13204,7 @@ usage:
...
@@ -13185,6 +13204,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-g : toggles global delay optimization [default = %s]
\n
"
,
pPars
->
fDelayOpt
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-g : toggles global delay optimization [default = %s]
\n
"
,
pPars
->
fDelayOpt
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-o : toggles using buffers to decouple combinational outputs [default = %s]
\n
"
,
pPars
->
fUseBuffs
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-o : toggles using buffers to decouple combinational outputs [default = %s]
\n
"
,
pPars
->
fUseBuffs
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-j : toggles enabling additional check [default = %s]
\n
"
,
pPars
->
fEnableCheck
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-j : toggles enabling additional check [default = %s]
\n
"
,
pPars
->
fEnableCheck
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-k : toggles enabling additional check [default = %s]
\n
"
,
pPars
->
fEnableCheck2
?
"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
-h : prints the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : prints the command usage
\n
"
);
return
1
;
return
1
;
...
...
src/map/if/if.h
View file @
4669839b
...
@@ -97,6 +97,7 @@ struct If_Par_t_
...
@@ -97,6 +97,7 @@ struct If_Par_t_
int
fUseBat
;
// use one specialized feature
int
fUseBat
;
// use one specialized feature
int
fUseBuffs
;
// use buffers to decouple outputs
int
fUseBuffs
;
// use buffers to decouple outputs
int
fEnableCheck
;
// enable additional checking
int
fEnableCheck
;
// enable additional checking
int
fEnableCheck2
;
// enable additional checking
int
fVerbose
;
// the verbosity flag
int
fVerbose
;
// the verbosity flag
// internal parameters
// internal parameters
int
fDelayOpt
;
// special delay optimization
int
fDelayOpt
;
// special delay optimization
...
@@ -406,6 +407,7 @@ extern float If_CutPowerDerefed( If_Man_t * p, If_Cut_t * pCut, If_Obj
...
@@ -406,6 +407,7 @@ extern float If_CutPowerDerefed( If_Man_t * p, If_Cut_t * pCut, If_Obj
extern
float
If_CutPowerRefed
(
If_Man_t
*
p
,
If_Cut_t
*
pCut
,
If_Obj_t
*
pRoot
);
extern
float
If_CutPowerRefed
(
If_Man_t
*
p
,
If_Cut_t
*
pCut
,
If_Obj_t
*
pRoot
);
/*=== ifDec.c =============================================================*/
/*=== ifDec.c =============================================================*/
extern
int
If_CutPerformCheck
(
unsigned
*
pTruth
,
int
nVars
,
int
nLeaves
);
extern
int
If_CutPerformCheck
(
unsigned
*
pTruth
,
int
nVars
,
int
nLeaves
);
extern
int
If_CutPerformCheck10
(
unsigned
*
pTruth
,
int
nVars
,
int
nLeaves
);
/*=== ifLib.c =============================================================*/
/*=== ifLib.c =============================================================*/
extern
If_Lib_t
*
If_LutLibRead
(
char
*
FileName
);
extern
If_Lib_t
*
If_LutLibRead
(
char
*
FileName
);
extern
If_Lib_t
*
If_LutLibDup
(
If_Lib_t
*
p
);
extern
If_Lib_t
*
If_LutLibDup
(
If_Lib_t
*
p
);
...
...
src/map/if/ifCut.c
View file @
4669839b
...
@@ -685,7 +685,7 @@ void If_CutSort( If_Man_t * p, If_Set_t * pCutSet, If_Cut_t * pCut )
...
@@ -685,7 +685,7 @@ void If_CutSort( If_Man_t * p, If_Set_t * pCutSet, If_Cut_t * pCut )
return
;
return
;
}
}
if
(
(
p
->
pPars
->
fUseBat
||
p
->
pPars
->
fEnableCheck
)
&&
!
pCut
->
fUseless
)
if
(
(
p
->
pPars
->
fUseBat
||
p
->
pPars
->
fEnableCheck
||
p
->
pPars
->
fEnableCheck2
)
&&
!
pCut
->
fUseless
)
{
{
If_Cut_t
*
pFirst
=
pCutSet
->
ppCuts
[
0
];
If_Cut_t
*
pFirst
=
pCutSet
->
ppCuts
[
0
];
if
(
pFirst
->
fUseless
||
If_ManSortCompare
(
p
,
pFirst
,
pCut
)
==
1
)
if
(
pFirst
->
fUseless
||
If_ManSortCompare
(
p
,
pFirst
,
pCut
)
==
1
)
...
...
src/map/if/ifDec10.c
0 → 100644
View file @
4669839b
This diff is collapsed.
Click to expand it.
src/map/if/ifMap.c
View file @
4669839b
...
@@ -140,7 +140,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
...
@@ -140,7 +140,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
pCut
->
fUseless
=
0
;
pCut
->
fUseless
=
0
;
if
(
p
->
pPars
->
pFuncCell
&&
RetValue
<
2
)
if
(
p
->
pPars
->
pFuncCell
&&
RetValue
<
2
)
{
{
assert
(
pCut
->
nLimit
>=
4
&&
pCut
->
nLimit
<=
7
);
assert
(
pCut
->
nLimit
>=
4
&&
pCut
->
nLimit
<=
10
);
pCut
->
fUseless
=
!
p
->
pPars
->
pFuncCell
(
If_CutTruth
(
pCut
),
pCut
->
nLimit
,
pCut
->
nLeaves
);
pCut
->
fUseless
=
!
p
->
pPars
->
pFuncCell
(
If_CutTruth
(
pCut
),
pCut
->
nLimit
,
pCut
->
nLeaves
);
p
->
nCutsUseless
+=
pCut
->
fUseless
;
p
->
nCutsUseless
+=
pCut
->
fUseless
;
}
}
...
...
src/map/if/module.make
View file @
4669839b
SRC
+=
src/map/if/ifCore.c
\
SRC
+=
src/map/if/ifCore.c
\
src/map/if/ifCut.c
\
src/map/if/ifCut.c
\
src/map/if/ifDec.c
\
src/map/if/ifDec.c
\
src/map/if/ifDec10.c
\
src/map/if/ifLib.c
\
src/map/if/ifLib.c
\
src/map/if/ifMan.c
\
src/map/if/ifMan.c
\
src/map/if/ifMap.c
\
src/map/if/ifMap.c
\
...
...
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