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
56a233be
Commit
56a233be
authored
Aug 02, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding switch 'buffer -p' to enable buffing of the primary inputs.
parent
f1615dcc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
9 deletions
+16
-9
src/map/scl/scl.c
+9
-4
src/map/scl/sclBuffer.c
+6
-4
src/map/scl/sclSize.h
+1
-1
No files found.
src/map/scl/scl.c
View file @
56a233be
...
...
@@ -558,15 +558,16 @@ int Scl_CommandBuffer( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
Abc_Ntk_t
*
pNtkRes
;
int
FanMin
,
FanMax
,
fUseInvs
;
int
FanMin
,
FanMax
,
fUseInvs
,
fBufPis
;
int
c
,
fVerbose
;
int
fOldAlgo
=
0
;
FanMin
=
6
;
FanMax
=
14
;
fUseInvs
=
0
;
fBufPis
=
0
;
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"NMaivh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"NMai
p
vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -598,6 +599,9 @@ int Scl_CommandBuffer( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'i'
:
fUseInvs
^=
1
;
break
;
case
'p'
:
fBufPis
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
...
...
@@ -623,7 +627,7 @@ int Scl_CommandBuffer( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
fOldAlgo
)
pNtkRes
=
Abc_SclPerformBuffering
(
pNtk
,
FanMax
,
fUseInvs
,
fVerbose
);
else
pNtkRes
=
Abc_SclBufPerform
(
pNtk
,
FanMin
,
FanMax
,
fVerbose
);
pNtkRes
=
Abc_SclBufPerform
(
pNtk
,
FanMin
,
FanMax
,
f
BufPis
,
f
Verbose
);
if
(
pNtkRes
==
NULL
)
{
Abc_Print
(
-
1
,
"The command has failed.
\n
"
);
...
...
@@ -634,12 +638,13 @@ int Scl_CommandBuffer( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
fprintf
(
pAbc
->
Err
,
"usage: buffer [-NM num] [-aivh]
\n
"
);
fprintf
(
pAbc
->
Err
,
"usage: buffer [-NM num] [-ai
p
vh]
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
performs buffering of the mapped network
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
-N <num> : the min fanout considered by the algorithm [default = %d]
\n
"
,
FanMin
);
fprintf
(
pAbc
->
Err
,
"
\t
-M <num> : the max allowed fanout count of node/buffer [default = %d]
\n
"
,
FanMax
);
fprintf
(
pAbc
->
Err
,
"
\t
-a : toggle using old algorithm [default = %s]
\n
"
,
fOldAlgo
?
"yes"
:
"no"
);
fprintf
(
pAbc
->
Err
,
"
\t
-i : toggle using interters instead of buffers [default = %s]
\n
"
,
fUseInvs
?
"yes"
:
"no"
);
fprintf
(
pAbc
->
Err
,
"
\t
-p : toggle buffering primary inputs [default = %s]
\n
"
,
fBufPis
?
"yes"
:
"no"
);
fprintf
(
pAbc
->
Err
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
fprintf
(
pAbc
->
Err
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
...
...
src/map/scl/sclBuffer.c
View file @
56a233be
...
...
@@ -36,6 +36,7 @@ struct Buf_Man_t_
// parameters
int
nFanMin
;
// the smallest fanout count to consider
int
nFanMax
;
// the largest fanout count allowed off CP
int
fBufPis
;
// enables buffing of the combinational inputs
// internal deta
Abc_Ntk_t
*
pNtk
;
// logic network
Vec_Int_t
*
vOffsets
;
// offsets into edge delays
...
...
@@ -372,7 +373,7 @@ void Abc_BufCreateEdges( Buf_Man_t * p, Abc_Obj_t * pObj )
}
void
Abc_BufAddToQue
(
Buf_Man_t
*
p
,
Abc_Obj_t
*
pObj
)
{
if
(
Abc_ObjFanoutNum
(
pObj
)
<
p
->
nFanMin
)
if
(
Abc_ObjFanoutNum
(
pObj
)
<
p
->
nFanMin
||
(
!
p
->
fBufPis
&&
Abc_ObjIsCi
(
pObj
))
)
return
;
Vec_FltWriteEntry
(
p
->
vCounts
,
Abc_ObjId
(
pObj
),
Abc_ObjFanoutNum
(
pObj
)
);
if
(
Vec_QueIsMember
(
p
->
vQue
,
Abc_ObjId
(
pObj
))
)
...
...
@@ -484,7 +485,7 @@ void Abc_BufUpdateDep( Buf_Man_t * p, Abc_Obj_t * pObj )
SeeAlso []
***********************************************************************/
Buf_Man_t
*
Buf_ManStart
(
Abc_Ntk_t
*
pNtk
,
int
FanMin
,
int
FanMax
)
Buf_Man_t
*
Buf_ManStart
(
Abc_Ntk_t
*
pNtk
,
int
FanMin
,
int
FanMax
,
int
fBufPis
)
{
Buf_Man_t
*
p
;
Abc_Obj_t
*
pObj
;
...
...
@@ -494,6 +495,7 @@ Buf_Man_t * Buf_ManStart( Abc_Ntk_t * pNtk, int FanMin, int FanMax )
p
->
pNtk
=
pNtk
;
p
->
nFanMin
=
FanMin
;
p
->
nFanMax
=
FanMax
;
p
->
fBufPis
=
fBufPis
;
// allocate arrays
p
->
nObjStart
=
Abc_NtkObjNumMax
(
p
->
pNtk
);
p
->
nObjAlloc
=
(
6
*
Abc_NtkObjNumMax
(
p
->
pNtk
)
/
3
)
+
100
;
...
...
@@ -793,10 +795,10 @@ printf( "Doing nothing\n" );
// if ( DelayMax != p->DelayMax )
// printf( "%d (%.2f) ", p->DelayMax, 1.0 * p->DelayMax * p->DelayInv / BUF_SCALE );
}
Abc_Ntk_t
*
Abc_SclBufPerform
(
Abc_Ntk_t
*
pNtk
,
int
FanMin
,
int
FanMax
,
int
fVerbose
)
Abc_Ntk_t
*
Abc_SclBufPerform
(
Abc_Ntk_t
*
pNtk
,
int
FanMin
,
int
FanMax
,
int
f
BufPis
,
int
f
Verbose
)
{
Abc_Ntk_t
*
pNew
;
Buf_Man_t
*
p
=
Buf_ManStart
(
pNtk
,
FanMin
,
FanMax
);
Buf_Man_t
*
p
=
Buf_ManStart
(
pNtk
,
FanMin
,
FanMax
,
fBufPis
);
int
i
,
Limit
=
ABC_INFINITY
;
for
(
i
=
0
;
i
<
Limit
&&
Vec_QueSize
(
p
->
vQue
);
i
++
)
Abc_BufPerformOne
(
p
,
Vec_QuePop
(
p
->
vQue
),
fVerbose
);
...
...
src/map/scl/sclSize.h
View file @
56a233be
...
...
@@ -389,7 +389,7 @@ static inline void Abc_SclDumpStats( SC_Man * p, char * pFileName, abctime Time
extern
Abc_Ntk_t
*
Abc_SclUnBufferPerform
(
Abc_Ntk_t
*
pNtk
,
int
fVerbose
);
extern
int
Abc_SclCheckNtk
(
Abc_Ntk_t
*
p
,
int
fVerbose
);
extern
Abc_Ntk_t
*
Abc_SclPerformBuffering
(
Abc_Ntk_t
*
p
,
int
Degree
,
int
fUseInvs
,
int
fVerbose
);
extern
Abc_Ntk_t
*
Abc_SclBufPerform
(
Abc_Ntk_t
*
pNtk
,
int
FanMin
,
int
FanMax
,
int
fVerbose
);
extern
Abc_Ntk_t
*
Abc_SclBufPerform
(
Abc_Ntk_t
*
pNtk
,
int
FanMin
,
int
FanMax
,
int
f
BufPis
,
int
f
Verbose
);
/*=== sclDnsize.c ===============================================================*/
extern
void
Abc_SclDnsizePerform
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
pNtk
,
SC_SizePars
*
pPars
);
/*=== sclLoad.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