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
9d195981
Commit
9d195981
authored
Aug 04, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change from input slew to input drive strength in the BLIF file.
parent
56a233be
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
10 deletions
+81
-10
src/map/scl/sclDnsize.c
+2
-0
src/map/scl/sclLoad.c
+27
-9
src/map/scl/sclSize.c
+46
-0
src/map/scl/sclSize.h
+4
-1
src/map/scl/sclUpsize.c
+2
-0
No files found.
src/map/scl/sclDnsize.c
View file @
9d195981
...
...
@@ -120,6 +120,8 @@ clk = Abc_Clock();
continue
;
if
(
i
>
Notches
)
break
;
if
(
p
->
pInDrive
&&
!
Abc_SclInputDriveOk
(
p
,
pObj
,
pCellNew
)
)
continue
;
// set new cell
Abc_SclObjSetCell
(
p
,
pObj
,
pCellNew
);
Abc_SclUpdateLoad
(
p
,
pObj
,
pCellOld
,
pCellNew
);
...
...
src/map/scl/sclLoad.c
View file @
9d195981
...
...
@@ -111,18 +111,36 @@ void Abc_SclComputeLoad( SC_Man * p )
pLoad
->
rise
+=
pLoadPo
->
rise
;
pLoad
->
fall
+=
pLoadPo
->
fall
;
}
if
(
p
->
pWLoadUsed
==
NULL
)
return
;
// add wire load
vWireCaps
=
Abc_SclFindWireCaps
(
p
,
p
->
pWLoadUsed
);
Abc_NtkForEachNode1
(
p
->
pNtk
,
pObj
,
i
)
if
(
p
->
pWLoadUsed
!=
NULL
)
{
SC_Pair
*
pLoad
=
Abc_SclObjLoad
(
p
,
pObj
);
k
=
Abc_MinInt
(
Vec_FltSize
(
vWireCaps
)
-
1
,
Abc_ObjFanoutNum
(
pObj
)
);
pLoad
->
rise
+=
Vec_FltEntry
(
vWireCaps
,
k
);
pLoad
->
fall
+=
Vec_FltEntry
(
vWireCaps
,
k
);
vWireCaps
=
Abc_SclFindWireCaps
(
p
,
p
->
pWLoadUsed
);
Abc_NtkForEachNode1
(
p
->
pNtk
,
pObj
,
i
)
{
SC_Pair
*
pLoad
=
Abc_SclObjLoad
(
p
,
pObj
);
k
=
Abc_MinInt
(
Vec_FltSize
(
vWireCaps
)
-
1
,
Abc_ObjFanoutNum
(
pObj
)
);
pLoad
->
rise
+=
Vec_FltEntry
(
vWireCaps
,
k
);
pLoad
->
fall
+=
Vec_FltEntry
(
vWireCaps
,
k
);
}
Abc_NtkForEachPi
(
p
->
pNtk
,
pObj
,
i
)
{
SC_Pair
*
pLoad
=
Abc_SclObjLoad
(
p
,
pObj
);
k
=
Abc_MinInt
(
Vec_FltSize
(
vWireCaps
)
-
1
,
Abc_ObjFanoutNum
(
pObj
)
);
pLoad
->
rise
+=
Vec_FltEntry
(
vWireCaps
,
k
);
pLoad
->
fall
+=
Vec_FltEntry
(
vWireCaps
,
k
);
}
Vec_FltFree
(
vWireCaps
);
}
// check input loads
if
(
p
->
pInDrive
!=
NULL
)
{
Abc_NtkForEachPi
(
p
->
pNtk
,
pObj
,
i
)
{
SC_Pair
*
pLoad
=
Abc_SclObjLoad
(
p
,
pObj
);
if
(
p
->
pInDrive
[
Abc_ObjId
(
pObj
)]
!=
0
&&
(
pLoad
->
rise
>
p
->
pInDrive
[
Abc_ObjId
(
pObj
)]
||
pLoad
->
fall
>
p
->
pInDrive
[
Abc_ObjId
(
pObj
)])
)
printf
(
"Maximum input drive strength is exceeded at primary input %d.
\n
"
,
i
);
}
}
Vec_FltFree
(
vWireCaps
);
}
/**Function*************************************************************
...
...
src/map/scl/sclSize.c
View file @
9d195981
...
...
@@ -298,6 +298,7 @@ void Abc_SclManReadSlewAndLoad( SC_Man * p, Abc_Ntk_t * pNtk )
int
i
;
if
(
pNtk
->
pManTime
==
NULL
)
return
;
/*
// read input slew
pTime = Abc_NtkReadDefaultInputDrive( pNtk );
if ( Abc_MaxFloat(pTime->Rise, pTime->Fall) != 0 )
...
...
@@ -321,6 +322,27 @@ void Abc_SclManReadSlewAndLoad( SC_Man * p, Abc_Ntk_t * pNtk )
pSlew->fall = SC_LibTimeFromPs( p->pLib, pTime->Fall );
}
}
*/
pTime
=
Abc_NtkReadDefaultInputDrive
(
pNtk
);
if
(
Abc_MaxFloat
(
pTime
->
Rise
,
pTime
->
Fall
)
!=
0
)
{
printf
(
"Default input drive strength is specified (%.2f ff; %.2f ff).
\n
"
,
pTime
->
Rise
,
pTime
->
Fall
);
if
(
p
->
pInDrive
==
NULL
)
p
->
pInDrive
=
ABC_CALLOC
(
float
,
Abc_NtkObjNumMax
(
pNtk
)
);
Abc_NtkForEachPi
(
pNtk
,
pObj
,
i
)
p
->
pInDrive
[
Abc_ObjId
(
pObj
)]
=
0
.
5
*
SC_LibCapFromFf
(
p
->
pLib
,
pTime
->
Rise
)
+
0
.
5
*
SC_LibCapFromFf
(
p
->
pLib
,
pTime
->
Fall
);
}
if
(
Abc_NodeReadInputDrive
(
pNtk
,
0
)
!=
NULL
)
{
printf
(
"Input drive strengths for some primary inputs are specified.
\n
"
);
if
(
p
->
pInDrive
==
NULL
)
p
->
pInDrive
=
ABC_CALLOC
(
float
,
Abc_NtkObjNumMax
(
pNtk
)
);
Abc_NtkForEachPi
(
pNtk
,
pObj
,
i
)
{
pTime
=
Abc_NodeReadInputDrive
(
pNtk
,
i
);
p
->
pInDrive
[
Abc_ObjId
(
pObj
)]
=
0
.
5
*
SC_LibCapFromFf
(
p
->
pLib
,
pTime
->
Rise
)
+
0
.
5
*
SC_LibCapFromFf
(
p
->
pLib
,
pTime
->
Fall
);
}
}
// read output load
pTime
=
Abc_NtkReadDefaultOutputLoad
(
pNtk
);
if
(
Abc_MaxFloat
(
pTime
->
Rise
,
pTime
->
Fall
)
!=
0
)
...
...
@@ -511,6 +533,30 @@ void Abc_SclPrintBuffers( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fVerbose )
}
/**Function*************************************************************
Synopsis [Checks if the input drive capability is ok.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_SclInputDriveOk
(
SC_Man
*
p
,
Abc_Obj_t
*
pObj
,
SC_Cell
*
pCell
)
{
Abc_Obj_t
*
pFanin
;
int
i
;
assert
(
Abc_ObjFaninNum
(
pObj
)
==
pCell
->
n_inputs
);
Abc_ObjForEachFanin
(
pObj
,
pFanin
,
i
)
if
(
Abc_ObjIsPi
(
pFanin
)
&&
p
->
pInDrive
[
Abc_ObjId
(
pFanin
)]
>
0
&&
(
p
->
pInDrive
[
Abc_ObjId
(
pFanin
)]
/
Abc_ObjFanoutNum
(
pFanin
))
<
Abc_MaxFloat
(
SC_CellPin
(
pCell
,
i
)
->
rise_cap
,
SC_CellPin
(
pCell
,
i
)
->
fall_cap
)
)
return
0
;
return
1
;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...
...
src/map/scl/sclSize.h
View file @
9d195981
...
...
@@ -58,7 +58,8 @@ struct SC_Man_
SC_Pair
*
pSlews
;
// slews for each gate
SC_Pair
*
pTimes2
;
// arrivals for each gate
SC_Pair
*
pSlews2
;
// slews for each gate
float
*
pSlack
;
// slacks for each gate
float
*
pSlack
;
// slacks for each gatt
float
*
pInDrive
;
// maximum input drive strength
Vec_Flt_t
*
vTimesOut
;
// output arrival times
Vec_Que_t
*
vQue
;
// outputs by their time
SC_WireLoad
*
pWLoadUsed
;
// name of the used WireLoad model
...
...
@@ -185,6 +186,7 @@ static inline void Abc_SclManFree( SC_Man * p )
ABC_FREE
(
p
->
pTimes2
);
ABC_FREE
(
p
->
pSlews2
);
ABC_FREE
(
p
->
pSlack
);
ABC_FREE
(
p
->
pInDrive
);
ABC_FREE
(
p
);
}
static
inline
void
Abc_SclManCleanTime
(
SC_Man
*
p
)
...
...
@@ -404,6 +406,7 @@ extern void Abc_SclTimeCone( SC_Man * p, Vec_Int_t * vCone );
extern
void
Abc_SclTimeNtkRecompute
(
SC_Man
*
p
,
float
*
pArea
,
float
*
pDelay
,
int
fReverse
,
float
DUser
);
extern
void
Abc_SclTimePerform
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
pNtk
,
int
fUseWireLoads
,
int
fShowAll
,
int
fPrintPath
,
int
fDumpStats
);
extern
void
Abc_SclPrintBuffers
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
pNtk
,
int
fVerbose
);
extern
int
Abc_SclInputDriveOk
(
SC_Man
*
p
,
Abc_Obj_t
*
pObj
,
SC_Cell
*
pCell
);
/*=== sclUpsize.c ===============================================================*/
extern
void
Abc_SclUpsizePerform
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
pNtk
,
SC_SizePars
*
pPars
);
/*=== sclUtil.c ===============================================================*/
...
...
src/map/scl/sclUpsize.c
View file @
9d195981
...
...
@@ -286,6 +286,8 @@ int Abc_SclFindUpsizes( SC_Man * p, Vec_Int_t * vPathNodes, int Ratio, int Notch
continue
;
if
(
k
>
Notches
)
break
;
if
(
p
->
pInDrive
&&
!
Abc_SclInputDriveOk
(
p
,
pObj
,
pCellNew
)
)
continue
;
// set new cell
Abc_SclObjSetCell
(
p
,
pObj
,
pCellNew
);
Abc_SclUpdateLoad
(
p
,
pObj
,
pCellOld
,
pCellNew
);
...
...
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