abc-master
|
#include <time.h>
#include <stdarg.h>
#include <stdlib.h>
Go to the source code of this file.
Macros | |
#define | ABC_DLLIMPORT |
INCLUDES ///. More... | |
#define | ABC_DLL ABC_DLLIMPORT |
#define | ___unused |
#define | ABC_NAMESPACE_HEADER_START |
NAMESPACES ///. More... | |
#define | ABC_NAMESPACE_HEADER_END |
#define | ABC_NAMESPACE_IMPL_START |
#define | ABC_NAMESPACE_IMPL_END |
#define | ABC_NAMESPACE_PREFIX |
#define | ABC_CONST(number) number |
PARAMETERS ///. More... | |
#define | ABC_INFINITY (100000000) |
MACRO DEFINITIONS ///. More... | |
#define | ABC_SWAP(Type, a, b) { Type t = a; a = b; b = t; } |
#define | ABC_PRT(a, t) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%9.2f sec\n", 1.0*(t)/(CLOCKS_PER_SEC))) |
#define | ABC_PRTr(a, t) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%9.2f sec\r", 1.0*(t)/(CLOCKS_PER_SEC))) |
#define | ABC_PRTn(a, t) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%9.2f sec ", 1.0*(t)/(CLOCKS_PER_SEC))) |
#define | ABC_PRTP(a, t, T) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%9.2f sec (%6.2f %%)\n", 1.0*(t)/(CLOCKS_PER_SEC), (T)? 100.0*(t)/(T) : 0.0)) |
#define | ABC_PRM(a, f) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%10.3f MB\n", 1.0*(f)/(1<<20))) |
#define | ABC_PRMr(a, f) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%10.3f MB\r", 1.0*(f)/(1<<20))) |
#define | ABC_PRMn(a, f) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%10.3f MB ", 1.0*(f)/(1<<20))) |
#define | ABC_PRMP(a, f, F) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%10.3f MB (%6.2f %%)\n", (1.0*(f)/(1<<20)), ((F)? 100.0*(f)/(F) : 0.0) ) ) |
#define | ABC_ALLOC(type, num) ((type *) malloc(sizeof(type) * (num))) |
#define | ABC_CALLOC(type, num) ((type *) calloc((num), sizeof(type))) |
#define | ABC_FALLOC(type, num) ((type *) memset(malloc(sizeof(type) * (num)), 0xff, sizeof(type) * (num))) |
#define | ABC_FREE(obj) ((obj) ? (free((char *) (obj)), (obj) = 0) : 0) |
#define | ABC_REALLOC(type, obj, num) |
#define | BRIDGE_NETLIST 106 |
#define | BRIDGE_ABS_NETLIST 107 |
Typedefs | |
typedef ABC_UINT64_T | word |
typedef ABC_INT64_T | iword |
typedef ABC_INT64_T | abctime |
Enumerations | |
enum | Abc_VerbLevel { ABC_PROMPT = -2, ABC_ERROR = -1, ABC_WARNING = 0, ABC_STANDARD = 1, ABC_VERBOSE = 2 } |
Functions | |
static int | Abc_AbsInt (int a) |
static int | Abc_MaxInt (int a, int b) |
static int | Abc_MinInt (int a, int b) |
static word | Abc_MaxWord (word a, word b) |
static word | Abc_MinWord (word a, word b) |
static float | Abc_AbsFloat (float a) |
static float | Abc_MaxFloat (float a, float b) |
static float | Abc_MinFloat (float a, float b) |
static double | Abc_AbsDouble (double a) |
static double | Abc_MaxDouble (double a, double b) |
static double | Abc_MinDouble (double a, double b) |
static int | Abc_Float2Int (float Val) |
static float | Abc_Int2Float (int Num) |
static int | Abc_Base2Log (unsigned n) |
static int | Abc_Base10Log (unsigned n) |
static int | Abc_Base16Log (unsigned n) |
static char * | Abc_UtilStrsav (char *s) |
static int | Abc_BitWordNum (int nBits) |
static int | Abc_TruthWordNum (int nVars) |
static int | Abc_Truth6WordNum (int nVars) |
static int | Abc_InfoHasBit (unsigned *p, int i) |
static void | Abc_InfoSetBit (unsigned *p, int i) |
static void | Abc_InfoXorBit (unsigned *p, int i) |
static unsigned | Abc_InfoMask (int nVar) |
static int | Abc_Var2Lit (int Var, int fCompl) |
static int | Abc_Lit2Var (int Lit) |
static int | Abc_LitIsCompl (int Lit) |
static int | Abc_LitNot (int Lit) |
static int | Abc_LitNotCond (int Lit, int c) |
static int | Abc_LitRegular (int Lit) |
static int | Abc_Lit2LitV (int *pMap, int Lit) |
static int | Abc_Lit2LitL (int *pMap, int Lit) |
static int | Abc_Ptr2Int (void *p) |
static void * | Abc_Int2Ptr (int i) |
static word | Abc_Ptr2Wrd (void *p) |
static void * | Abc_Wrd2Ptr (word i) |
static abctime | Abc_Clock () |
int | Gia_ManToBridgeText (FILE *pFile, int Size, unsigned char *pBuffer) |
int | Gia_ManToBridgeAbsNetlist (FILE *pFile, void *p, int pkg_type) |
char * | vnsprintf (const char *format, va_list args) |
char * | nsprintf (const char *format,...) |
static void | Abc_Print (int level, const char *format,...) |
static void | Abc_PrintInt (int i) |
static void | Abc_PrintTime (int level, const char *pStr, abctime time) |
static void | Abc_PrintTimeP (int level, const char *pStr, abctime time, abctime Time) |
static void | Abc_PrintMemoryP (int level, const char *pStr, int mem, int Mem) |
static int | Abc_PrimeCudd (unsigned int p) |
void | Abc_MergeSort (int *pInput, int nSize) |
int * | Abc_MergeSortCost (int *pCosts, int nSize) |
void | Abc_QuickSort1 (word *pData, int nSize, int fDecrease) |
void | Abc_QuickSort2 (word *pData, int nSize, int fDecrease) |
void | Abc_QuickSort3 (word *pData, int nSize, int fDecrease) |
void | Abc_QuickSortCostData (int *pCosts, int nSize, int fDecrease, word *pData, int *pResult) |
int * | Abc_QuickSortCost (int *pCosts, int nSize, int fDecrease) |
#define ___unused |
Definition at line 68 of file abc_global.h.
#define ABC_ALLOC | ( | type, | |
num | |||
) | ((type *) malloc(sizeof(type) * (num))) |
Definition at line 229 of file abc_global.h.
#define ABC_CALLOC | ( | type, | |
num | |||
) | ((type *) calloc((num), sizeof(type))) |
Definition at line 230 of file abc_global.h.
#define ABC_CONST | ( | number | ) | number |
PARAMETERS ///.
BASIC TYPES /// Pointer difference type; replacement for ptrdiff_t. This is a signed integral type that is the same size as a pointer. NOTE: This type may be different sizes on different platforms. Unsigned integral type that can contain a pointer. This is an unsigned integral type that is the same size as a pointer. NOTE: This type may be different sizes on different platforms. Signed integral type that can contain a pointer. This is a signed integral type that is the same size as a pointer. NOTE: This type may be different sizes on different platforms. 64-bit signed integral type. 64-bit unsigned integral type.
Definition at line 206 of file abc_global.h.
#define ABC_DLL ABC_DLLIMPORT |
Definition at line 53 of file abc_global.h.
#define ABC_DLLIMPORT |
INCLUDES ///.
CFile****************************************************************
FileName [abc_global.h]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Global declarations.]
Synopsis [Global declarations.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - Jan 30, 2009.]
Revision [
]
Definition at line 49 of file abc_global.h.
#define ABC_FALLOC | ( | type, | |
num | |||
) | ((type *) memset(malloc(sizeof(type) * (num)), 0xff, sizeof(type) * (num))) |
Definition at line 231 of file abc_global.h.
#define ABC_FREE | ( | obj | ) | ((obj) ? (free((char *) (obj)), (obj) = 0) : 0) |
Definition at line 232 of file abc_global.h.
#define ABC_INFINITY (100000000) |
MACRO DEFINITIONS ///.
Definition at line 216 of file abc_global.h.
#define ABC_NAMESPACE_HEADER_END |
Definition at line 106 of file abc_global.h.
#define ABC_NAMESPACE_HEADER_START |
NAMESPACES ///.
Definition at line 105 of file abc_global.h.
#define ABC_NAMESPACE_IMPL_END |
Definition at line 108 of file abc_global.h.
#define ABC_NAMESPACE_IMPL_START |
Definition at line 107 of file abc_global.h.
#define ABC_NAMESPACE_PREFIX |
Definition at line 109 of file abc_global.h.
Definition at line 224 of file abc_global.h.
Definition at line 226 of file abc_global.h.
#define ABC_PRMP | ( | a, | |
f, | |||
F | |||
) | (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%10.3f MB (%6.2f %%)\n", (1.0*(f)/(1<<20)), ((F)? 100.0*(f)/(F) : 0.0) ) ) |
Definition at line 227 of file abc_global.h.
Definition at line 225 of file abc_global.h.
#define ABC_PRT | ( | a, | |
t | |||
) | (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%9.2f sec\n", 1.0*(t)/(CLOCKS_PER_SEC))) |
Definition at line 220 of file abc_global.h.
#define ABC_PRTn | ( | a, | |
t | |||
) | (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%9.2f sec ", 1.0*(t)/(CLOCKS_PER_SEC))) |
Definition at line 222 of file abc_global.h.
#define ABC_PRTP | ( | a, | |
t, | |||
T | |||
) | (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%9.2f sec (%6.2f %%)\n", 1.0*(t)/(CLOCKS_PER_SEC), (T)? 100.0*(t)/(T) : 0.0)) |
Definition at line 223 of file abc_global.h.
#define ABC_PRTr | ( | a, | |
t | |||
) | (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%9.2f sec\r", 1.0*(t)/(CLOCKS_PER_SEC))) |
Definition at line 221 of file abc_global.h.
#define ABC_REALLOC | ( | type, | |
obj, | |||
num | |||
) |
#define ABC_SWAP | ( | Type, | |
a, | |||
b | |||
) | { Type t = a; a = b; b = t; } |
Definition at line 218 of file abc_global.h.
#define BRIDGE_ABS_NETLIST 107 |
Definition at line 295 of file abc_global.h.
#define BRIDGE_NETLIST 106 |
Definition at line 294 of file abc_global.h.
typedef ABC_INT64_T abctime |
Definition at line 278 of file abc_global.h.
typedef ABC_INT64_T iword |
Definition at line 210 of file abc_global.h.
typedef ABC_UINT64_T word |
Definition at line 209 of file abc_global.h.
enum Abc_VerbLevel |
Enumerator | |
---|---|
ABC_PROMPT | |
ABC_ERROR | |
ABC_WARNING | |
ABC_STANDARD | |
ABC_VERBOSE |
Definition at line 305 of file abc_global.h.
|
inlinestatic |
Definition at line 245 of file abc_global.h.
|
inlinestatic |
Definition at line 242 of file abc_global.h.
|
inlinestatic |
Definition at line 237 of file abc_global.h.
|
inlinestatic |
Definition at line 252 of file abc_global.h.
|
inlinestatic |
Definition at line 253 of file abc_global.h.
|
inlinestatic |
Definition at line 251 of file abc_global.h.
|
inlinestatic |
Definition at line 255 of file abc_global.h.
|
inlinestatic |
Definition at line 279 of file abc_global.h.
|
inlinestatic |
Definition at line 249 of file abc_global.h.
|
inlinestatic |
Definition at line 258 of file abc_global.h.
|
inlinestatic |
Definition at line 261 of file abc_global.h.
|
inlinestatic |
Definition at line 259 of file abc_global.h.
|
inlinestatic |
Definition at line 260 of file abc_global.h.
|
inlinestatic |
Definition at line 250 of file abc_global.h.
|
inlinestatic |
Definition at line 273 of file abc_global.h.
|
inlinestatic |
Definition at line 270 of file abc_global.h.
|
inlinestatic |
Definition at line 269 of file abc_global.h.
|
inlinestatic |
Definition at line 264 of file abc_global.h.
|
inlinestatic |
Definition at line 265 of file abc_global.h.
|
inlinestatic |
Definition at line 266 of file abc_global.h.
|
inlinestatic |
Definition at line 267 of file abc_global.h.
|
inlinestatic |
Definition at line 268 of file abc_global.h.
|
inlinestatic |
Definition at line 246 of file abc_global.h.
|
inlinestatic |
Definition at line 243 of file abc_global.h.
|
inlinestatic |
Definition at line 238 of file abc_global.h.
Definition at line 240 of file abc_global.h.
void Abc_MergeSort | ( | int * | pInput, |
int | nSize | ||
) |
Function*************************************************************
Synopsis [Returns the sorted array of integers.]
Description [This procedure is about 10% faster than qsort().]
SideEffects []
SeeAlso []
Definition at line 129 of file utilSort.c.
int* Abc_MergeSortCost | ( | int * | pCosts, |
int | nSize | ||
) |
Function*************************************************************
Synopsis [Sorting procedure.]
Description [Returns permutation for the non-decreasing order of costs.]
SideEffects []
SeeAlso []
Definition at line 238 of file utilSort.c.
|
inlinestatic |
Definition at line 247 of file abc_global.h.
|
inlinestatic |
Definition at line 244 of file abc_global.h.
|
inlinestatic |
Definition at line 239 of file abc_global.h.
Definition at line 241 of file abc_global.h.
|
inlinestatic |
Definition at line 383 of file abc_global.h.
|
inlinestatic |
Definition at line 313 of file abc_global.h.
|
inlinestatic |
Definition at line 342 of file abc_global.h.
|
inlinestatic |
Definition at line 377 of file abc_global.h.
Definition at line 367 of file abc_global.h.
|
inlinestatic |
Definition at line 372 of file abc_global.h.
|
inlinestatic |
Definition at line 272 of file abc_global.h.
|
inlinestatic |
Definition at line 274 of file abc_global.h.
void Abc_QuickSort1 | ( | word * | pData, |
int | nSize, | ||
int | fDecrease | ||
) |
Definition at line 477 of file utilSort.c.
void Abc_QuickSort2 | ( | word * | pData, |
int | nSize, | ||
int | fDecrease | ||
) |
Definition at line 662 of file utilSort.c.
void Abc_QuickSort3 | ( | word * | pData, |
int | nSize, | ||
int | fDecrease | ||
) |
Definition at line 680 of file utilSort.c.
int* Abc_QuickSortCost | ( | int * | pCosts, |
int | nSize, | ||
int | fDecrease | ||
) |
Definition at line 719 of file utilSort.c.
void Abc_QuickSortCostData | ( | int * | pCosts, |
int | nSize, | ||
int | fDecrease, | ||
word * | pData, | ||
int * | pResult | ||
) |
Function*************************************************************
Synopsis [Wrapper around QuickSort to sort entries based on cost.]
Description []
SideEffects []
SeeAlso []
Definition at line 710 of file utilSort.c.
|
inlinestatic |
Definition at line 257 of file abc_global.h.
|
inlinestatic |
Definition at line 256 of file abc_global.h.
|
inlinestatic |
Definition at line 254 of file abc_global.h.
|
inlinestatic |
Definition at line 263 of file abc_global.h.
|
inlinestatic |
Definition at line 275 of file abc_global.h.
int Gia_ManToBridgeAbsNetlist | ( | FILE * | pFile, |
void * | p, | ||
int | pkg_type | ||
) |
Definition at line 189 of file utilBridge.c.
int Gia_ManToBridgeText | ( | FILE * | pFile, |
int | Size, | ||
unsigned char * | pBuffer | ||
) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 168 of file utilBridge.c.
char* nsprintf | ( | const char * | format, |
... | |||
) |
Definition at line 205 of file utilFile.c.
char* vnsprintf | ( | const char * | format, |
va_list | args | ||
) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso [] Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 168 of file utilFile.c.