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
efa6b54b
Commit
efa6b54b
authored
Sep 17, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debugging and finetuning the flow.
parent
c62f380e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
47 deletions
+73
-47
src/base/io/io.c
+2
-0
src/base/io/ioUtil.c
+1
-1
src/map/scl/scl.c
+68
-26
src/map/scl/sclLoad.c
+1
-1
src/map/scl/sclSize.c
+1
-1
src/map/scl/sclUtil.c
+0
-18
No files found.
src/base/io/io.c
View file @
efa6b54b
...
...
@@ -210,6 +210,8 @@ int IoCommandRead( Abc_Frame_t * pAbc, int argc, char ** argv )
sprintf
(
Command
,
"read_scl %s"
,
pFileName
);
else
if
(
!
strcmp
(
Extra_FileNameExtension
(
pFileName
),
"super"
)
)
sprintf
(
Command
,
"read_super %s"
,
pFileName
);
else
if
(
!
strcmp
(
Extra_FileNameExtension
(
pFileName
),
"constr"
)
)
sprintf
(
Command
,
"read_constr %s"
,
pFileName
);
else
if
(
!
strcmp
(
Extra_FileNameExtension
(
pFileName
),
"c"
)
)
sprintf
(
Command
,
"so %s"
,
pFileName
);
if
(
Command
[
0
]
)
...
...
src/base/io/ioUtil.c
View file @
efa6b54b
...
...
@@ -101,7 +101,7 @@ Abc_Ntk_t * Io_ReadNetlist( char * pFileName, Io_FileType_t FileType, int fCheck
Abc_Ntk_t
*
pNtk
;
if
(
FileType
==
IO_FILE_NONE
||
FileType
==
IO_FILE_UNKNOWN
)
{
fprintf
(
stdout
,
"
The generic file reader requires a known file extension.
\n
"
);
fprintf
(
stdout
,
"
Generic file reader requires a known file extension to open
\"
%s
\"
.
\n
"
,
pFileName
);
return
NULL
;
}
// check if the file exists
...
...
src/map/scl/scl.c
View file @
efa6b54b
...
...
@@ -28,26 +28,27 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
static
int
Scl_CommandReadLib
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandWriteLib
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandReadScl
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandWriteScl
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandPrintLib
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandDumpGen
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandPrintGS
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandStime
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandTopo
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandBuffer
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandBufSize
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandUnBuffer
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandMinsize
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandMaxsize
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandUpsize
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandDnsize
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandBsize
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandPrintBuf
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandSetConstr
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandPrintConstr
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandReadLib
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandWriteLib
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandReadScl
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandWriteScl
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandPrintLib
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandDumpGen
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandPrintGS
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandStime
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandTopo
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandBuffer
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandBufSize
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandUnBuffer
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandMinsize
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandMaxsize
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandUpsize
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandDnsize
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandBsize
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandPrintBuf
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandReadConstr
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandPrintConstr
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandResetConstr
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
...
...
@@ -107,8 +108,9 @@ void Scl_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"SCL mapping"
,
"dnsize"
,
Scl_CommandDnsize
,
1
);
Cmd_CommandAdd
(
pAbc
,
"SCL mapping"
,
"bsize"
,
Scl_CommandBsize
,
1
);
Cmd_CommandAdd
(
pAbc
,
"SCL mapping"
,
"print_buf"
,
Scl_CommandPrintBuf
,
0
);
Cmd_CommandAdd
(
pAbc
,
"SCL mapping"
,
"set_constr"
,
Scl_CommandSetConstr
,
0
);
Cmd_CommandAdd
(
pAbc
,
"SCL mapping"
,
"print_constr"
,
Scl_CommandPrintConstr
,
0
);
Cmd_CommandAdd
(
pAbc
,
"SCL mapping"
,
"read_constr"
,
Scl_CommandReadConstr
,
0
);
Cmd_CommandAdd
(
pAbc
,
"SCL mapping"
,
"print_constr"
,
Scl_CommandPrintConstr
,
0
);
Cmd_CommandAdd
(
pAbc
,
"SCL mapping"
,
"reset_constr"
,
Scl_CommandResetConstr
,
0
);
}
void
Scl_End
(
Abc_Frame_t
*
pAbc
)
{
...
...
@@ -1788,7 +1790,7 @@ usage:
SeeAlso []
***********************************************************************/
int
Scl_Command
Set
Constr
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Scl_Command
Read
Constr
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
void
Abc_SclReadTimingConstr
(
Abc_Frame_t
*
pAbc
,
char
*
pFileName
,
int
fVerbose
);
FILE
*
pFile
;
...
...
@@ -1824,8 +1826,8 @@ int Scl_CommandSetConstr( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
fprintf
(
pAbc
->
Err
,
"usage:
set
_constr [-vh] <file>
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
sets
timing constraints for standard-cell designs
\n
"
);
fprintf
(
pAbc
->
Err
,
"usage:
read
_constr [-vh] <file>
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
read file with
timing constraints for standard-cell designs
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
fprintf
(
pAbc
->
Err
,
"
\t
-h : prints the command summary
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
<file> : the name of a file to read
\n
"
);
...
...
@@ -1846,7 +1848,6 @@ usage:
int
Scl_CommandPrintConstr
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"vh"
)
)
!=
EOF
)
{
...
...
@@ -1874,6 +1875,47 @@ usage:
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Scl_CommandResetConstr
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
Abc_FrameSetDrivingCell
(
NULL
);
Abc_FrameSetMaxLoad
(
0
);
return
0
;
usage:
fprintf
(
pAbc
->
Err
,
"usage: reset_constr [-vh] <file>
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
removes current timing constraints
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
fprintf
(
pAbc
->
Err
,
"
\t
-h : prints the command summary
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
<file> : the name of a file to read
\n
"
);
return
1
;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...
...
src/map/scl/sclLoad.c
View file @
efa6b54b
...
...
@@ -115,7 +115,7 @@ void Abc_SclComputeLoad( SC_Man * p )
}
}
// add PO load
Abc_NtkForEach
P
o
(
p
->
pNtk
,
pObj
,
i
)
Abc_NtkForEach
C
o
(
p
->
pNtk
,
pObj
,
i
)
{
SC_Pair
*
pLoadPo
=
Abc_SclObjLoad
(
p
,
pObj
);
SC_Pair
*
pLoad
=
Abc_SclObjLoad
(
p
,
Abc_ObjFanin0
(
pObj
)
);
...
...
src/map/scl/sclSize.c
View file @
efa6b54b
...
...
@@ -136,7 +136,7 @@ void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll, int fPrintPath )
printf
(
"WireLoad =
\"
%s
\"
"
,
p
->
pWLoadUsed
?
p
->
pWLoadUsed
->
pName
:
"none"
);
printf
(
"Gates =%7d "
,
Abc_NtkNodeNum
(
p
->
pNtk
)
);
printf
(
"(%5.1f %%) "
,
100
.
0
*
Abc_SclGetBufInvCount
(
p
->
pNtk
)
/
Abc_NtkNodeNum
(
p
->
pNtk
)
);
printf
(
"Cap =%5.1f ff "
,
p
->
EstLoadAve
);
printf
(
"Cap =%5.1f ff "
,
SC_LibCapFf
(
p
->
pLib
,
p
->
EstLoadAve
)
);
printf
(
"(%5.1f %%) "
,
Abc_SclGetAverageSize
(
p
->
pNtk
)
);
printf
(
"Area =%12.2f "
,
Abc_SclGetTotalArea
(
p
->
pNtk
)
);
printf
(
"(%5.1f %%) "
,
100
.
0
*
Abc_SclCountMinSize
(
p
->
pLib
,
p
->
pNtk
,
0
)
/
Abc_NtkNodeNum
(
p
->
pNtk
)
);
...
...
src/map/scl/sclUtil.c
View file @
efa6b54b
...
...
@@ -202,24 +202,6 @@ int Abc_SclCountMinSize( SC_Lib * pLib, Abc_Ntk_t * p, int fUseMax )
/**Function*************************************************************
Synopsis [Returns gate formula by name.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
char
*
Abc_SclFindGateFormula
(
char
*
pGateName
,
char
*
pOutName
)
{
Mio_Library_t
*
pLib
=
(
Mio_Library_t
*
)
Abc_FrameReadLibGen
();
Mio_Gate_t
*
pGate
=
Mio_LibraryReadGateByName
(
pLib
,
pGateName
,
pOutName
);
return
Mio_GateReadForm
(
pGate
);
}
/**Function*************************************************************
Synopsis [Reads timing constraints.]
Description []
...
...
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