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
1d25ae3b
Commit
1d25ae3b
authored
Feb 22, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiment with technology mapping.
parent
d2cab859
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
17 deletions
+76
-17
src/base/abci/abc.c
+63
-17
src/base/abci/abcIfif.c
+0
-0
src/map/if/if.h
+13
-0
No files found.
src/base/abci/abc.c
View file @
1d25ae3b
...
...
@@ -13612,14 +13612,21 @@ usage:
***********************************************************************/
int
Abc_CommandIfif
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
void
Abc_NtkPerformIfif
(
Abc_Ntk_t
*
pNtk
,
int
nDelayLut
,
int
nDegree
,
int
fVerbose
);
extern
void
Abc_NtkPerformIfif
(
Abc_Ntk_t
*
pNtk
,
Ifif_Par_t
*
pPars
);
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
int
c
;
int
nDelayLut
=
5
;
int
nDegree
=
3
;
int
fVerbose
=
0
;
Ifif_Par_t
Pars
,
*
pPars
=
&
Pars
;
int
c
,
fError
;
pPars
->
nLutSize
=
-
1
;
// the LUT size
pPars
->
pLutLib
=
(
If_Lib_t
*
)
Abc_FrameReadLibLut
();
// the LUT library
pPars
->
DelayWire
=
(
float
)
0
.
5
;
// wire delay
pPars
->
nDegree
=
0
;
// structure degree
pPars
->
fCascade
=
0
;
// cascade
pPars
->
fVerbose
=
0
;
// verbose
pPars
->
fVeryVerbose
=
0
;
// verbose
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"DN
v
h"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"DN
cvw
h"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -13629,9 +13636,9 @@ int Abc_CommandIfif( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Command line switch
\"
-D
\"
should be followed by a floating point number.
\n
"
);
goto
usage
;
}
nDelayLut
=
atoi
(
argv
[
globalUtilOptind
]);
pPars
->
DelayWire
=
atof
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nDelayLut
<=
0
.
0
)
if
(
pPars
->
DelayWire
<
0
.
0
)
goto
usage
;
break
;
case
'N'
:
...
...
@@ -13640,13 +13647,19 @@ int Abc_CommandIfif( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Command line switch
\"
-N
\"
should be followed by a floating point number.
\n
"
);
goto
usage
;
}
nDegree
=
atoi
(
argv
[
globalUtilOptind
]);
pPars
->
nDegree
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nDegree
<
0
)
if
(
pPars
->
nDegree
<
0
)
goto
usage
;
break
;
case
'c'
:
pPars
->
fCascade
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
pPars
->
fVerbose
^=
1
;
break
;
case
'w'
:
pPars
->
fVeryVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
...
...
@@ -13665,15 +13678,48 @@ int Abc_CommandIfif( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Need mapped network.
\n
"
);
return
1
;
}
Abc_NtkPerformIfif
(
pNtk
,
nDelayLut
,
nDegree
,
fVerbose
);
if
(
pPars
->
pLutLib
==
NULL
)
{
Abc_Print
(
-
1
,
"LUT library is not given.
\n
"
);
return
1
;
}
pPars
->
nLutSize
=
Abc_NtkGetFaninMax
(
pNtk
);
if
(
pPars
->
nLutSize
>
pPars
->
pLutLib
->
LutMax
)
{
Abc_Print
(
-
1
,
"The max node size (%d) exceeds the LUT size (%d).
\n
"
,
pPars
->
nLutSize
,
pPars
->
pLutLib
->
LutMax
);
return
1
;
}
if
(
pPars
->
nLutSize
<
pPars
->
pLutLib
->
LutMax
)
Abc_Print
(
0
,
"Node size (%d) is less than LUT size (%d).
\n
"
,
pPars
->
nLutSize
,
pPars
->
pLutLib
->
LutMax
);
// check delay information
fError
=
0
;
for
(
c
=
0
;
c
<
pPars
->
pLutLib
->
LutMax
;
c
++
)
{
pPars
->
pLutDelays
[
c
]
=
(
pPars
->
pLutLib
->
fVarPinDelays
?
pPars
->
pLutLib
->
pLutDelays
[
pPars
->
pLutLib
->
LutMax
][
c
]
:
pPars
->
pLutLib
->
pLutDelays
[
pPars
->
pLutLib
->
LutMax
][
0
]
);
if
(
pPars
->
DelayWire
>=
pPars
->
pLutDelays
[
c
]
)
{
fError
=
1
;
printf
(
" Wire delay (%.2f) exceeds pin+wire delay (%.2f) for pin %d in the LUT library.
\n
"
,
pPars
->
DelayWire
,
pPars
->
pLutDelays
[
c
],
c
);
}
}
if
(
fError
)
return
1
;
// call the mapper
Abc_NtkPerformIfif
(
pNtk
,
pPars
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: ifif [-DNvh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
experimental technology mapper
\n
"
);
Abc_Print
(
-
2
,
"
\t
-D num : the ratio of LUT delay to wire delay [default = %d]
\n
"
,
nDelayLut
);
Abc_Print
(
-
2
,
"
\t
-N num : degree of the combination of LUTs [default = %d]
\n
"
,
nDegree
);
Abc_Print
(
-
2
,
"
\t
-v : toggles verbose output [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"usage: ifif [-DNcvwh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
technology mapper into N-node K-LUT structures
\n
"
);
Abc_Print
(
-
2
,
"
\t
(takes a LUT network and maps it into a delay-optimal network
\n
"
);
Abc_Print
(
-
2
,
"
\t
of N-node K-LUT structures using the current LUT library)
\n
"
);
Abc_Print
(
-
2
,
"
\t
-D float : wire delay (should be less than the LUT delay) [default = %.2f]
\n
"
,
pPars
->
DelayWire
);
Abc_Print
(
-
2
,
"
\t
-N num : degree of the LUT structure [default = %d]
\n
"
,
pPars
->
nDegree
);
Abc_Print
(
-
2
,
"
\t
-c : toggles using LUT cascade vs LUT cluster [default = %s]
\n
"
,
pPars
->
fCascade
?
"cascade"
:
"cluster"
);
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
-h : print the command usage
\n
"
);
return
1
;
}
...
...
src/base/abci/abcIfif.c
View file @
1d25ae3b
This diff is collapsed.
Click to expand it.
src/map/if/if.h
View file @
1d25ae3b
...
...
@@ -74,6 +74,19 @@ typedef struct If_Obj_t_ If_Obj_t;
typedef
struct
If_Cut_t_
If_Cut_t
;
typedef
struct
If_Set_t_
If_Set_t
;
typedef
struct
Ifif_Par_t_
Ifif_Par_t
;
struct
Ifif_Par_t_
{
int
nLutSize
;
// the LUT size
If_Lib_t
*
pLutLib
;
// the LUT library
float
pLutDelays
[
IF_MAX_LUTSIZE
];
// pin-to-pin delays of the max LUT
float
DelayWire
;
// wire delay
int
nDegree
;
// structure degree
int
fCascade
;
// cascade
int
fVerbose
;
// verbose
int
fVeryVerbose
;
// verbose
};
// parameters
struct
If_Par_t_
{
...
...
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