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
dfd6ab08
Commit
dfd6ab08
authored
Aug 25, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New package to read/write a subset of Liberty for STA.
parent
fba0552f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
17 deletions
+77
-17
src/map/scl/scl.c
+56
-12
src/map/scl/scl.h
+6
-3
src/map/scl/sclFile.c
+0
-0
src/map/scl/sclInt.h
+14
-2
src/map/scl/sclSize.c
+1
-0
src/map/scl/sclTime.c
+0
-0
No files found.
src/map/scl/scl.c
View file @
dfd6ab08
...
...
@@ -29,6 +29,7 @@ ABC_NAMESPACE_IMPL_START
static
int
Scl_CommandRead
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandWrite
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Scl_CommandStime
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
...
...
@@ -49,19 +50,8 @@ void Scl_Init( Abc_Frame_t * pAbc )
{
Cmd_CommandAdd
(
pAbc
,
"SC mapping"
,
"read_scl"
,
Scl_CommandRead
,
0
);
Cmd_CommandAdd
(
pAbc
,
"SC mapping"
,
"write_scl"
,
Scl_CommandWrite
,
0
);
Cmd_CommandAdd
(
pAbc
,
"SC mapping"
,
"stime"
,
Scl_CommandStime
,
0
);
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Scl_End
(
Abc_Frame_t
*
pAbc
)
{
Abc_SclLoad
(
NULL
,
&
pAbc
->
pLibScl
);
...
...
@@ -111,6 +101,7 @@ int Scl_CommandRead( Abc_Frame_t * pAbc, int argc, char ** argv )
// read new library
Abc_SclLoad
(
pFileName
,
&
pAbc
->
pLibScl
);
Abc_SclWriteText
(
"sizing
\\
scl_out.txt"
,
pAbc
->
pLibScl
);
return
0
;
usage:
...
...
@@ -177,6 +168,59 @@ usage:
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Scl_CommandStime
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
int
c
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"h"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
Abc_FrameReadNtk
(
pAbc
)
==
NULL
)
{
fprintf
(
pAbc
->
Err
,
"There is no current network.
\n
"
);
return
1
;
}
if
(
!
Abc_NtkHasMapping
(
Abc_FrameReadNtk
(
pAbc
))
)
{
fprintf
(
pAbc
->
Err
,
"The current network is not mapped.
\n
"
);
return
1
;
}
if
(
pAbc
->
pLibScl
==
NULL
)
{
fprintf
(
pAbc
->
Err
,
"There is no Liberty Library available.
\n
"
);
return
1
;
}
Abc_SclTimePerform
(
pAbc
->
pLibScl
,
Abc_FrameReadNtk
(
pAbc
)
);
return
0
;
usage:
fprintf
(
pAbc
->
Err
,
"usage: stime [-h]
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
performs STA using Liberty library
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
-h : print the help massage
\n
"
);
return
1
;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
...
...
src/map/scl/scl.h
View file @
dfd6ab08
...
...
@@ -46,9 +46,12 @@ ABC_NAMESPACE_HEADER_START
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/*=== scl.c =============================================================*/
extern
void
Abc_SclLoad
(
char
*
pFileName
,
void
**
ppScl
);
extern
void
Abc_SclSave
(
char
*
pFileName
,
void
*
pScl
);
/*=== sclFile.c =============================================================*/
extern
void
Abc_SclLoad
(
char
*
pFileName
,
void
**
ppScl
);
extern
void
Abc_SclSave
(
char
*
pFileName
,
void
*
pScl
);
/*=== sclTime.c =============================================================*/
extern
void
Abc_SclTimePerform
(
SC_Lib
*
pLib
,
void
*
pNtk
);
ABC_NAMESPACE_HEADER_END
...
...
src/map/scl/sclFile.c
View file @
dfd6ab08
This diff is collapsed.
Click to expand it.
src/map/scl/sclInt.h
View file @
dfd6ab08
...
...
@@ -159,7 +159,9 @@ struct SC_Lib_
Vec_Ptr_t
*
vWireLoads
;
// NamedSet<SC_WireLoad>
Vec_Ptr_t
*
vWireLoadSels
;
// NamedSet<SC_WireLoadSel>
Vec_Ptr_t
*
vTempls
;
// NamedSet<SC_TableTempl>
Vec_Ptr_t
*
vCells
;
// NamedSet<SC_Cell>
Vec_Ptr_t
*
vCells
;
// NamedSet<SC_Cell>
int
*
pBins
;
// hashing gateName -> gateId
int
nBins
;
};
////////////////////////////////////////////////////////////////////////
...
...
@@ -170,6 +172,9 @@ struct SC_Lib_
/// MACRO DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
static
inline
SC_Cell
*
SC_LibCell
(
SC_Lib
*
p
,
int
i
)
{
return
(
SC_Cell
*
)
Vec_PtrEntry
(
p
->
vCells
,
i
);
}
static
inline
SC_Pin
*
SC_CellPin
(
SC_Cell
*
p
,
int
i
)
{
return
(
SC_Pin
*
)
Vec_PtrEntry
(
p
->
vPins
,
i
);
}
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
...
...
@@ -351,11 +356,18 @@ static inline void Abc_SclLibFree( SC_Lib * p )
ABC_FREE
(
p
->
lib_name
);
ABC_FREE
(
p
->
default_wire_load
);
ABC_FREE
(
p
->
default_wire_load_sel
);
ABC_FREE
(
p
->
pBins
);
ABC_FREE
(
p
);
}
/*=== scl.c =============================================================*/
/*=== sclFile.c =============================================================*/
extern
SC_Lib
*
Abc_SclRead
(
char
*
pFileName
);
extern
void
Abc_SclWrite
(
char
*
pFileName
,
SC_Lib
*
p
);
extern
void
Abc_SclWriteText
(
char
*
pFileName
,
SC_Lib
*
p
);
extern
int
Abc_SclCellFind
(
SC_Lib
*
p
,
char
*
pName
);
ABC_NAMESPACE_HEADER_END
...
...
src/map/scl/sclSize.c
View file @
dfd6ab08
...
...
@@ -41,6 +41,7 @@ ABC_NAMESPACE_IMPL_START
***********************************************************************/
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...
...
src/map/scl/sclTime.c
View file @
dfd6ab08
This diff is collapsed.
Click to expand it.
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