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
97545722
Commit
97545722
authored
Aug 14, 2019
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding switch to suppress printing simple objects in %retime.
parent
9017fa91
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
12 deletions
+19
-12
src/base/wlc/wlcCom.c
+10
-5
src/base/wln/wln.h
+1
-1
src/base/wln/wlnNdr.c
+2
-2
src/base/wln/wlnRetime.c
+6
-4
No files found.
src/base/wlc/wlcCom.c
View file @
97545722
...
@@ -1323,15 +1323,19 @@ usage:
...
@@ -1323,15 +1323,19 @@ usage:
******************************************************************************/
******************************************************************************/
int
Abc_CommandRetime
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandRetime
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
void
Wln_NtkRetimeTest
(
char
*
pFileName
,
int
fVerbose
);
extern
void
Wln_NtkRetimeTest
(
char
*
pFileName
,
int
f
SkipSimple
,
int
f
Verbose
);
FILE
*
pFile
;
FILE
*
pFile
;
char
*
pFileName
=
NULL
;
char
*
pFileName
=
NULL
;
int
fSkipSimple
=
0
;
int
c
,
fVerbose
=
0
;
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"vh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
s
vh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
case
's'
:
fSkipSimple
^=
1
;
break
;
case
'v'
:
case
'v'
:
fVerbose
^=
1
;
fVerbose
^=
1
;
break
;
break
;
...
@@ -1351,7 +1355,7 @@ int Abc_CommandRetime( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -1351,7 +1355,7 @@ int Abc_CommandRetime( Abc_Frame_t * pAbc, int argc, char ** argv )
printf
(
"Transforming NDR into internal represnetation has failed.
\n
"
);
printf
(
"Transforming NDR into internal represnetation has failed.
\n
"
);
return
0
;
return
0
;
}
}
vMoves
=
Wln_NtkRetime
(
pNtk
,
fVerbose
);
vMoves
=
Wln_NtkRetime
(
pNtk
,
f
SkipSimple
,
f
Verbose
);
Wln_NtkFree
(
pNtk
);
Wln_NtkFree
(
pNtk
);
ABC_FREE
(
pAbc
->
pNdrArray
);
ABC_FREE
(
pAbc
->
pNdrArray
);
if
(
vMoves
)
pAbc
->
pNdrArray
=
Vec_IntReleaseNewArray
(
vMoves
);
if
(
vMoves
)
pAbc
->
pNdrArray
=
Vec_IntReleaseNewArray
(
vMoves
);
...
@@ -1374,11 +1378,12 @@ int Abc_CommandRetime( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -1374,11 +1378,12 @@ int Abc_CommandRetime( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
return
0
;
}
}
fclose
(
pFile
);
fclose
(
pFile
);
Wln_NtkRetimeTest
(
pFileName
,
fVerbose
);
Wln_NtkRetimeTest
(
pFileName
,
f
SkipSimple
,
f
Verbose
);
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: %%retime [-vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: %%retime [-
s
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs retiming for the NDR design
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs retiming for the NDR design
\n
"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle printing simple nodes [default = %s]
\n
"
,
!
fSkipSimple
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
return
1
;
...
...
src/base/wln/wln.h
View file @
97545722
...
@@ -244,7 +244,7 @@ extern int Wln_ObjClone( Wln_Ntk_t * pNew, Wln_Ntk_t * p, int iObj );
...
@@ -244,7 +244,7 @@ extern int Wln_ObjClone( Wln_Ntk_t * pNew, Wln_Ntk_t * p, int iObj );
extern
int
Wln_ObjCreateCo
(
Wln_Ntk_t
*
p
,
int
iFanin
);
extern
int
Wln_ObjCreateCo
(
Wln_Ntk_t
*
p
,
int
iFanin
);
extern
void
Wln_ObjPrint
(
Wln_Ntk_t
*
p
,
int
iObj
);
extern
void
Wln_ObjPrint
(
Wln_Ntk_t
*
p
,
int
iObj
);
/*=== wlcRetime.c ========================================================*/
/*=== wlcRetime.c ========================================================*/
extern
Vec_Int_t
*
Wln_NtkRetime
(
Wln_Ntk_t
*
p
,
int
fVerbose
);
extern
Vec_Int_t
*
Wln_NtkRetime
(
Wln_Ntk_t
*
p
,
int
f
SkipSimple
,
int
f
Verbose
);
extern
void
Wln_NtkRetimeCreateDelayInfo
(
Wln_Ntk_t
*
pNtk
);
extern
void
Wln_NtkRetimeCreateDelayInfo
(
Wln_Ntk_t
*
pNtk
);
/*=== wlcWriteVer.c ========================================================*/
/*=== wlcWriteVer.c ========================================================*/
extern
void
Wln_WriteVer
(
Wln_Ntk_t
*
p
,
char
*
pFileName
);
extern
void
Wln_WriteVer
(
Wln_Ntk_t
*
p
,
char
*
pFileName
);
...
...
src/base/wln/wlnNdr.c
View file @
97545722
...
@@ -309,7 +309,7 @@ void Wln_ReadNdrTest()
...
@@ -309,7 +309,7 @@ void Wln_ReadNdrTest()
Wln_NtkStaticFanoutTest
(
pNtk
);
Wln_NtkStaticFanoutTest
(
pNtk
);
Wln_NtkFree
(
pNtk
);
Wln_NtkFree
(
pNtk
);
}
}
void
Wln_NtkRetimeTest
(
char
*
pFileName
,
int
f
Verbose
)
void
Wln_NtkRetimeTest
(
char
*
pFileName
,
int
f
SkipSimple
,
int
fVerbose
)
{
{
Vec_Int_t
*
vMoves
;
Vec_Int_t
*
vMoves
;
void
*
pData
=
Ndr_Read
(
pFileName
);
void
*
pData
=
Ndr_Read
(
pFileName
);
...
@@ -321,7 +321,7 @@ void Wln_NtkRetimeTest( char * pFileName, int fVerbose )
...
@@ -321,7 +321,7 @@ void Wln_NtkRetimeTest( char * pFileName, int fVerbose )
}
}
Ndr_Delete
(
pData
);
Ndr_Delete
(
pData
);
Wln_NtkRetimeCreateDelayInfo
(
pNtk
);
Wln_NtkRetimeCreateDelayInfo
(
pNtk
);
vMoves
=
Wln_NtkRetime
(
pNtk
,
fVerbose
);
vMoves
=
Wln_NtkRetime
(
pNtk
,
f
SkipSimple
,
f
Verbose
);
//Vec_IntPrint( vMoves );
//Vec_IntPrint( vMoves );
Vec_IntFree
(
vMoves
);
Vec_IntFree
(
vMoves
);
Wln_NtkFree
(
pNtk
);
Wln_NtkFree
(
pNtk
);
...
...
src/base/wln/wlnRetime.c
View file @
97545722
...
@@ -499,7 +499,7 @@ void Wln_RetRetimeBackward( Wln_Ret_t * p, Vec_Int_t * vSet )
...
@@ -499,7 +499,7 @@ void Wln_RetRetimeBackward( Wln_Ret_t * p, Vec_Int_t * vSet )
Wln_RetInsertOneFanin
(
p
,
iObj
,
iFlop
);
Wln_RetInsertOneFanin
(
p
,
iObj
,
iFlop
);
}
}
}
}
void
Wln_RetAddToMoves
(
Wln_Ret_t
*
p
,
Vec_Int_t
*
vSet
,
int
Delay
,
int
fForward
,
int
nMoves
,
int
fVerbose
)
void
Wln_RetAddToMoves
(
Wln_Ret_t
*
p
,
Vec_Int_t
*
vSet
,
int
Delay
,
int
fForward
,
int
nMoves
,
int
f
SkipSimple
,
int
f
Verbose
)
{
{
int
i
,
iObj
;
int
i
,
iObj
;
if
(
vSet
==
NULL
)
if
(
vSet
==
NULL
)
...
@@ -513,6 +513,8 @@ void Wln_RetAddToMoves( Wln_Ret_t * p, Vec_Int_t * vSet, int Delay, int fForward
...
@@ -513,6 +513,8 @@ void Wln_RetAddToMoves( Wln_Ret_t * p, Vec_Int_t * vSet, int Delay, int fForward
Vec_IntForEachEntry
(
vSet
,
iObj
,
i
)
Vec_IntForEachEntry
(
vSet
,
iObj
,
i
)
{
{
int
NameId
=
Vec_IntEntry
(
&
p
->
pNtk
->
vNameIds
,
iObj
);
int
NameId
=
Vec_IntEntry
(
&
p
->
pNtk
->
vNameIds
,
iObj
);
if
(
fSkipSimple
&&
(
Wln_ObjIsFf
(
p
->
pNtk
,
iObj
)
||
Wln_ObjType
(
p
->
pNtk
,
iObj
)
==
ABC_OPER_SLICE
||
Wln_ObjType
(
p
->
pNtk
,
iObj
)
==
ABC_OPER_CONCAT
)
)
continue
;
Vec_IntPush
(
&
p
->
vMoves
,
fForward
?
-
NameId
:
NameId
);
Vec_IntPush
(
&
p
->
vMoves
,
fForward
?
-
NameId
:
NameId
);
if
(
fVerbose
)
if
(
fVerbose
)
printf
(
" %d (NameID = %d) "
,
fForward
?
-
iObj
:
iObj
,
fForward
?
-
NameId
:
NameId
);
printf
(
" %d (NameID = %d) "
,
fForward
?
-
iObj
:
iObj
,
fForward
?
-
NameId
:
NameId
);
...
@@ -560,7 +562,7 @@ void Wln_NtkRetimeCreateDelayInfo( Wln_Ntk_t * pNtk )
...
@@ -560,7 +562,7 @@ void Wln_NtkRetimeCreateDelayInfo( Wln_Ntk_t * pNtk )
printf
(
"Assuming default delays: 10 units for most nodes and 1 unit for bit-slice, concat, and buffers driving COs.
\n
"
);
printf
(
"Assuming default delays: 10 units for most nodes and 1 unit for bit-slice, concat, and buffers driving COs.
\n
"
);
}
}
}
}
Vec_Int_t
*
Wln_NtkRetime
(
Wln_Ntk_t
*
pNtk
,
int
fVerbose
)
Vec_Int_t
*
Wln_NtkRetime
(
Wln_Ntk_t
*
pNtk
,
int
f
SkipSimple
,
int
f
Verbose
)
{
{
Wln_Ret_t
*
p
=
Wln_RetAlloc
(
pNtk
);
Wln_Ret_t
*
p
=
Wln_RetAlloc
(
pNtk
);
Vec_Int_t
*
vSources
=
&
p
->
vSources
;
Vec_Int_t
*
vSources
=
&
p
->
vSources
;
...
@@ -573,7 +575,7 @@ Vec_Int_t * Wln_NtkRetime( Wln_Ntk_t * pNtk, int fVerbose )
...
@@ -573,7 +575,7 @@ Vec_Int_t * Wln_NtkRetime( Wln_Ntk_t * pNtk, int fVerbose )
Wln_RetMarkChanges
(
p
,
NULL
);
Wln_RetMarkChanges
(
p
,
NULL
);
p
->
DelayMax
=
DelayInit
=
DelayBest
=
Wln_RetPropDelay
(
p
);
p
->
DelayMax
=
DelayInit
=
DelayBest
=
Wln_RetPropDelay
(
p
);
Wln_RetFindSources
(
p
);
Wln_RetFindSources
(
p
);
Wln_RetAddToMoves
(
p
,
NULL
,
p
->
DelayMax
,
0
,
nMoves
,
fVerbose
);
Wln_RetAddToMoves
(
p
,
NULL
,
p
->
DelayMax
,
0
,
nMoves
,
f
SkipSimple
,
f
Verbose
);
while
(
Vec_IntSize
(
vSources
)
||
Vec_IntSize
(
vSinks
)
)
while
(
Vec_IntSize
(
vSources
)
||
Vec_IntSize
(
vSinks
)
)
{
{
int
DelayMaxPrev
=
p
->
DelayMax
;
int
DelayMaxPrev
=
p
->
DelayMax
;
...
@@ -616,7 +618,7 @@ Vec_Int_t * Wln_NtkRetime( Wln_Ntk_t * pNtk, int fVerbose )
...
@@ -616,7 +618,7 @@ Vec_Int_t * Wln_NtkRetime( Wln_Ntk_t * pNtk, int fVerbose )
//Wln_RetPrint( p );
//Wln_RetPrint( p );
if
(
fVerbose
)
if
(
fVerbose
)
printf
(
"
\n
"
);
printf
(
"
\n
"
);
Wln_RetAddToMoves
(
p
,
vFront
,
p
->
DelayMax
,
fForward
,
nMoves
,
fVerbose
);
Wln_RetAddToMoves
(
p
,
vFront
,
p
->
DelayMax
,
fForward
,
nMoves
,
f
SkipSimple
,
f
Verbose
);
if
(
fVerbose
)
if
(
fVerbose
)
{
{
printf
(
"Sinks: "
);
printf
(
"Sinks: "
);
...
...
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