diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-08-29 00:48:36 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-08-29 00:48:36 -0700 |
commit | bebd7ee6cb49f4876a7411e2986c12d4e72ff06a (patch) | |
tree | aab595e9063be03365b396668c20cf0c505b9ecd /src/map/scl/sclInt.h | |
parent | 5ff49be9931a7be3037812230f5d9eb085f59593 (diff) | |
download | abc-bebd7ee6cb49f4876a7411e2986c12d4e72ff06a.tar.gz abc-bebd7ee6cb49f4876a7411e2986c12d4e72ff06a.tar.bz2 abc-bebd7ee6cb49f4876a7411e2986c12d4e72ff06a.zip |
New package to read/write a subset of Liberty for STA.
Diffstat (limited to 'src/map/scl/sclInt.h')
-rw-r--r-- | src/map/scl/sclInt.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/map/scl/sclInt.h b/src/map/scl/sclInt.h index b9a78f75..034308b5 100644 --- a/src/map/scl/sclInt.h +++ b/src/map/scl/sclInt.h @@ -28,6 +28,7 @@ #include <stdlib.h> #include <string.h> #include <assert.h> +#include <math.h> #include "misc/vec/vec.h" @@ -175,9 +176,12 @@ 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); } -static inline Vec_Wrd_t * SC_CellFunc( SC_Cell * p ) { return SC_CellPin(p, p->n_inputs)->vFunc; } +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); } +static inline Vec_Wrd_t * SC_CellFunc( SC_Cell * p ) { return SC_CellPin(p, p->n_inputs)->vFunc; } + +static inline double SC_LibCapFf( SC_Lib * p, double cap ) { return cap * p->unit_cap_fst * pow(10, 15 - p->unit_cap_snd); } +static inline double SC_LibTimePs( SC_Lib * p, double time ) { return time * pow(10, 12 - p->unit_time); } #define SC_LitForEachCell( p, pCell, i ) Vec_PtrForEachEntry( SC_Cell *, p->vCells, pCell, i ) #define SC_CellForEachPin( p, pPin, i ) Vec_PtrForEachEntry( SC_Pin *, pCell->vPins, pPin, i ) |