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
a2d97cf2
Commit
a2d97cf2
authored
Sep 17, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debugging and finetuning the flow.
parent
73a997a8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
18 deletions
+58
-18
src/map/amap/amapRead.c
+8
-3
src/map/scl/scl.c
+3
-0
src/map/scl/sclLib.h
+15
-0
src/map/scl/sclLibScl.c
+3
-8
src/map/scl/sclSize.c
+8
-7
src/map/scl/sclSize.h
+21
-0
No files found.
src/map/amap/amapRead.c
View file @
a2d97cf2
...
@@ -328,8 +328,8 @@ Amap_Lib_t * Amap_ParseTokens( Vec_Ptr_t * vTokens, int fVerbose )
...
@@ -328,8 +328,8 @@ Amap_Lib_t * Amap_ParseTokens( Vec_Ptr_t * vTokens, int fVerbose )
Amap_Lib_t
*
p
;
Amap_Lib_t
*
p
;
Amap_Gat_t
*
pGate
,
*
pPrev
;
Amap_Gat_t
*
pGate
,
*
pPrev
;
Amap_Pin_t
*
pPin
;
Amap_Pin_t
*
pPin
;
char
*
pToken
;
char
*
pToken
,
*
pMoGate
=
NULL
;
int
i
,
nPins
,
iPos
=
0
;
int
i
,
nPins
,
iPos
=
0
,
Count
=
0
;
p
=
Amap_LibAlloc
();
p
=
Amap_LibAlloc
();
pToken
=
(
char
*
)
Vec_PtrEntry
(
vTokens
,
iPos
++
);
pToken
=
(
char
*
)
Vec_PtrEntry
(
vTokens
,
iPos
++
);
do
do
...
@@ -420,10 +420,15 @@ Amap_Lib_t * Amap_ParseTokens( Vec_Ptr_t * vTokens, int fVerbose )
...
@@ -420,10 +420,15 @@ Amap_Lib_t * Amap_ParseTokens( Vec_Ptr_t * vTokens, int fVerbose )
if
(
pPrev
&&
!
strcmp
(
pPrev
->
pName
,
pGate
->
pName
)
)
if
(
pPrev
&&
!
strcmp
(
pPrev
->
pName
,
pGate
->
pName
)
)
{
{
pPrev
->
pTwin
=
pGate
,
pGate
->
pTwin
=
pPrev
;
pPrev
->
pTwin
=
pGate
,
pGate
->
pTwin
=
pPrev
;
printf
(
"Warning: Detected multi-output gate
\"
%s
\"
.
\n
"
,
pGate
->
pName
);
// printf( "Warning: Detected multi-output gate \"%s\".\n", pGate->pName );
if
(
pMoGate
==
NULL
)
pMoGate
=
pGate
->
pName
;
Count
++
;
}
}
pPrev
=
pGate
;
pPrev
=
pGate
;
}
}
if
(
Count
)
printf
(
"Warning: Detected %d multi-output gates (for example,
\"
%s
\"
).
\n
"
,
Count
,
pMoGate
);
return
p
;
return
p
;
}
}
...
...
src/map/scl/scl.c
View file @
a2d97cf2
...
@@ -422,6 +422,9 @@ int Scl_CommandReadScl( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -422,6 +422,9 @@ int Scl_CommandReadScl( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_SclLoad
(
pLib
,
(
SC_Lib
**
)
&
pAbc
->
pLibScl
);
Abc_SclLoad
(
pLib
,
(
SC_Lib
**
)
&
pAbc
->
pLibScl
);
if
(
fDump
)
if
(
fDump
)
Abc_SclWriteLiberty
(
Extra_FileNameGenericAppend
(
pFileName
,
"_temp.lib"
),
(
SC_Lib
*
)
pAbc
->
pLibScl
);
Abc_SclWriteLiberty
(
Extra_FileNameGenericAppend
(
pFileName
,
"_temp.lib"
),
(
SC_Lib
*
)
pAbc
->
pLibScl
);
// extract genlib library
if
(
pAbc
->
pLibScl
)
Abc_SclInstallGenlib
(
pAbc
->
pLibScl
,
0
,
0
,
0
);
return
0
;
return
0
;
usage:
usage:
...
...
src/map/scl/sclLib.h
View file @
a2d97cf2
...
@@ -580,6 +580,21 @@ static inline float Scl_LibPinArrivalEstimate( SC_Cell * pCell, int iPin, float
...
@@ -580,6 +580,21 @@ static inline float Scl_LibPinArrivalEstimate( SC_Cell * pCell, int iPin, float
Scl_LibPinArrival
(
Scl_CellPinTime
(
pCell
,
iPin
),
&
ArrIn
,
&
SlewIn
,
&
LoadIn
,
&
ArrOut
,
&
SlewOut
);
Scl_LibPinArrival
(
Scl_CellPinTime
(
pCell
,
iPin
),
&
ArrIn
,
&
SlewIn
,
&
LoadIn
,
&
ArrOut
,
&
SlewOut
);
return
0
.
5
*
ArrOut
.
fall
+
0
.
5
*
ArrOut
.
rise
;
return
0
.
5
*
ArrOut
.
fall
+
0
.
5
*
ArrOut
.
rise
;
}
}
static
inline
void
Scl_LibHandleInputDriver
(
SC_Cell
*
pCell
,
SC_Pair
*
pLoadIn
,
SC_Pair
*
pArrOut
,
SC_Pair
*
pSlewOut
)
{
SC_Pair
LoadIn
=
{
0
.
0
,
0
.
0
};
// zero input load
SC_Pair
ArrIn
=
{
0
.
0
,
0
.
0
};
// zero input time
SC_Pair
SlewIn
=
{
0
.
0
,
0
.
0
};
// zero input slew
SC_Pair
ArrOut0
=
{
0
.
0
,
0
.
0
};
// output time under zero load
SC_Pair
ArrOut1
=
{
0
.
0
,
0
.
0
};
// output time under given load
SC_Pair
SlewOut
=
{
0
.
0
,
0
.
0
};
// output slew under zero load
pSlewOut
->
fall
=
pSlewOut
->
rise
=
0
;
assert
(
pCell
->
n_inputs
==
1
);
Scl_LibPinArrival
(
Scl_CellPinTime
(
pCell
,
0
),
&
ArrIn
,
&
SlewIn
,
&
LoadIn
,
&
ArrOut0
,
&
SlewOut
);
Scl_LibPinArrival
(
Scl_CellPinTime
(
pCell
,
0
),
&
ArrIn
,
&
SlewIn
,
pLoadIn
,
&
ArrOut1
,
pSlewOut
);
pArrOut
->
fall
=
ArrOut1
.
fall
-
ArrOut0
.
fall
;
pArrOut
->
rise
=
ArrOut1
.
rise
-
ArrOut0
.
rise
;
}
/*=== sclLiberty.c ===============================================================*/
/*=== sclLiberty.c ===============================================================*/
extern
SC_Lib
*
Abc_SclReadLiberty
(
char
*
pFileName
,
int
fVerbose
,
int
fVeryVerbose
);
extern
SC_Lib
*
Abc_SclReadLiberty
(
char
*
pFileName
,
int
fVerbose
,
int
fVeryVerbose
);
...
...
src/map/scl/sclLibScl.c
View file @
a2d97cf2
...
@@ -404,20 +404,15 @@ static void Abc_SclWriteLibrary( Vec_Str_t * vOut, SC_Lib * p )
...
@@ -404,20 +404,15 @@ static void Abc_SclWriteLibrary( Vec_Str_t * vOut, SC_Lib * p )
Vec_StrPutS
(
vOut
,
pPin
->
pName
);
Vec_StrPutS
(
vOut
,
pPin
->
pName
);
Vec_StrPutF
(
vOut
,
pPin
->
max_out_cap
);
Vec_StrPutF
(
vOut
,
pPin
->
max_out_cap
);
Vec_StrPutF
(
vOut
,
pPin
->
max_out_slew
);
Vec_StrPutF
(
vOut
,
pPin
->
max_out_slew
);
Vec_StrPutI
(
vOut
,
pCell
->
n_inputs
);
// write function
// write function
if
(
pPin
->
func_text
==
NULL
)
Vec_StrPutS
(
vOut
,
pPin
->
func_text
?
pPin
->
func_text
:
""
);
{
// formula is not given - write empty string
Vec_StrPutS
(
vOut
,
""
);
// write truth table
// write truth table
assert
(
Vec_WrdSize
(
pPin
->
vFunc
)
==
Abc_Truth6WordNum
(
pCell
->
n_inputs
)
);
assert
(
Vec_WrdSize
(
pPin
->
vFunc
)
==
Abc_Truth6WordNum
(
pCell
->
n_inputs
)
);
Vec_StrPutI
(
vOut
,
pCell
->
n_inputs
);
Vec_WrdForEachEntry
(
pPin
->
vFunc
,
uWord
,
k
)
// -- 'size = 1u << (n_vars - 6)'
Vec_WrdForEachEntry
(
pPin
->
vFunc
,
uWord
,
k
)
// -- 'size = 1u << (n_vars - 6)'
Vec_StrPutW
(
vOut
,
uWord
);
// -- 64-bit number, written uncompressed (low-byte first)
Vec_StrPutW
(
vOut
,
uWord
);
// -- 64-bit number, written uncompressed (low-byte first)
}
else
// formula is given
Vec_StrPutS
(
vOut
,
pPin
->
func_text
);
// Write 'rtiming': (pin-to-pin timing tables for this particular output)
// Write 'rtiming': (pin-to-pin timing tables for this particular output)
assert
(
Vec_PtrSize
(
pPin
->
vRTimings
)
==
pCell
->
n_inputs
);
assert
(
Vec_PtrSize
(
pPin
->
vRTimings
)
==
pCell
->
n_inputs
);
...
...
src/map/scl/sclSize.c
View file @
a2d97cf2
...
@@ -116,14 +116,14 @@ static inline void Abc_SclTimeNodePrint( SC_Man * p, Abc_Obj_t * pObj, int fRise
...
@@ -116,14 +116,14 @@ static inline void Abc_SclTimeNodePrint( SC_Man * p, Abc_Obj_t * pObj, int fRise
printf
(
"%-*s "
,
Length
,
pCell
?
pCell
->
pName
:
"pi"
);
printf
(
"%-*s "
,
Length
,
pCell
?
pCell
->
pName
:
"pi"
);
printf
(
"A =%7.2f "
,
pCell
?
pCell
->
area
:
0
.
0
);
printf
(
"A =%7.2f "
,
pCell
?
pCell
->
area
:
0
.
0
);
printf
(
"D%s ="
,
fRise
?
"r"
:
"f"
);
printf
(
"D%s ="
,
fRise
?
"r"
:
"f"
);
printf
(
"%
5.0
f"
,
Abc_MaxFloat
(
Abc_SclObjTimePs
(
p
,
pObj
,
0
),
Abc_SclObjTimePs
(
p
,
pObj
,
1
))
);
printf
(
"%
6.1
f"
,
Abc_MaxFloat
(
Abc_SclObjTimePs
(
p
,
pObj
,
0
),
Abc_SclObjTimePs
(
p
,
pObj
,
1
))
);
printf
(
"%
6.0
f ps "
,
-
Abc_AbsFloat
(
Abc_SclObjTimePs
(
p
,
pObj
,
0
)
-
Abc_SclObjTimePs
(
p
,
pObj
,
1
))
);
printf
(
"%
7.1
f ps "
,
-
Abc_AbsFloat
(
Abc_SclObjTimePs
(
p
,
pObj
,
0
)
-
Abc_SclObjTimePs
(
p
,
pObj
,
1
))
);
printf
(
"S =%
5.0f ps "
,
Abc_SclObjSlewPs
(
p
,
pObj
,
fRise
>=
0
?
fRise
:
0
)
);
printf
(
"S =%
6.1f ps "
,
Abc_SclObjSlewPs
(
p
,
pObj
,
fRise
>=
0
?
fRise
:
0
)
);
printf
(
"Cin =%
4.0f ff "
,
pCell
?
SC_CellPinCapAve
(
pCell
)
:
0
.
0
);
printf
(
"Cin =%
5.1f ff "
,
pCell
?
SC_LibCapFf
(
p
->
pLib
,
SC_CellPinCapAve
(
pCell
)
)
:
0
.
0
);
printf
(
"Cout =%
5.0f ff "
,
Abc_SclObjLoadFf
(
p
,
pObj
,
fRise
>=
0
?
fRise
:
0
)
);
printf
(
"Cout =%
6.1f ff "
,
Abc_SclObjLoadFf
(
p
,
pObj
,
fRise
>=
0
?
fRise
:
0
)
);
printf
(
"Cmax =%
5.0f ff "
,
pCell
?
SC_CellPin
(
pCell
,
pCell
->
n_inputs
)
->
max_out_cap
:
0
.
0
);
printf
(
"Cmax =%
6.1f ff "
,
pCell
?
SC_LibCapFf
(
p
->
pLib
,
SC_CellPin
(
pCell
,
pCell
->
n_inputs
)
->
max_out_cap
)
:
0
.
0
);
printf
(
"G =%5d "
,
pCell
?
(
int
)(
100
.
0
*
Abc_SclObjLoadAve
(
p
,
pObj
)
/
SC_CellPinCapAve
(
pCell
))
:
0
);
printf
(
"G =%5d "
,
pCell
?
(
int
)(
100
.
0
*
Abc_SclObjLoadAve
(
p
,
pObj
)
/
SC_CellPinCapAve
(
pCell
))
:
0
);
printf
(
"SL =%
5
.1f ps"
,
Abc_SclObjSlackPs
(
p
,
pObj
,
p
->
MaxDelay0
)
);
printf
(
"SL =%
6
.1f ps"
,
Abc_SclObjSlackPs
(
p
,
pObj
,
p
->
MaxDelay0
)
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
}
void
Abc_SclTimeNtkPrint
(
SC_Man
*
p
,
int
fShowAll
,
int
fPrintPath
)
void
Abc_SclTimeNtkPrint
(
SC_Man
*
p
,
int
fShowAll
,
int
fPrintPath
)
...
@@ -527,6 +527,7 @@ void Abc_SclManReadSlewAndLoad( SC_Man * p, Abc_Ntk_t * pNtk )
...
@@ -527,6 +527,7 @@ void Abc_SclManReadSlewAndLoad( SC_Man * p, Abc_Ntk_t * pNtk )
// printf( "Default PI driving cell is specified (%s).\n", Abc_FrameReadDrivingCell() );
// printf( "Default PI driving cell is specified (%s).\n", Abc_FrameReadDrivingCell() );
p
->
pPiDrive
=
SC_LibCell
(
p
->
pLib
,
iCell
);
p
->
pPiDrive
=
SC_LibCell
(
p
->
pLib
,
iCell
);
assert
(
p
->
pPiDrive
!=
NULL
);
assert
(
p
->
pPiDrive
!=
NULL
);
assert
(
p
->
pPiDrive
->
n_inputs
==
1
);
}
}
}
}
if
(
pNtk
->
pManTime
==
NULL
)
if
(
pNtk
->
pManTime
==
NULL
)
...
...
src/map/scl/sclSize.h
View file @
a2d97cf2
...
@@ -226,6 +226,7 @@ static inline void Abc_SclManFree( SC_Man * p )
...
@@ -226,6 +226,7 @@ static inline void Abc_SclManFree( SC_Man * p )
ABC_FREE
(
p
->
pSlews
);
ABC_FREE
(
p
->
pSlews
);
ABC_FREE
(
p
);
ABC_FREE
(
p
);
}
}
/*
static inline void Abc_SclManCleanTime( SC_Man * p )
static inline void Abc_SclManCleanTime( SC_Man * p )
{
{
Vec_Flt_t * vSlews;
Vec_Flt_t * vSlews;
...
@@ -249,6 +250,26 @@ static inline void Abc_SclManCleanTime( SC_Man * p )
...
@@ -249,6 +250,26 @@ static inline void Abc_SclManCleanTime( SC_Man * p )
}
}
Vec_FltFree( vSlews );
Vec_FltFree( vSlews );
}
}
*/
static
inline
void
Abc_SclManCleanTime
(
SC_Man
*
p
)
{
memset
(
p
->
pTimes
,
0
,
sizeof
(
SC_Pair
)
*
p
->
nObjs
);
memset
(
p
->
pSlews
,
0
,
sizeof
(
SC_Pair
)
*
p
->
nObjs
);
memset
(
p
->
pDepts
,
0
,
sizeof
(
SC_Pair
)
*
p
->
nObjs
);
if
(
p
->
pPiDrive
!=
NULL
)
{
SC_Pair
*
pSlew
,
*
pTime
,
*
pLoad
;
Abc_Obj_t
*
pObj
;
int
i
;
Abc_NtkForEachPi
(
p
->
pNtk
,
pObj
,
i
)
{
pLoad
=
Abc_SclObjLoad
(
p
,
pObj
);
pTime
=
Abc_SclObjTime
(
p
,
pObj
);
pSlew
=
Abc_SclObjSlew
(
p
,
pObj
);
Scl_LibHandleInputDriver
(
p
->
pPiDrive
,
pLoad
,
pTime
,
pSlew
);
}
}
}
/**Function*************************************************************
/**Function*************************************************************
...
...
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