abc-master
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "misc/vec/vec.h"
#include "misc/util/utilNam.h"
#include "misc/extra/extra.h"
#include "abc.h"
#include "aig/gia/gia.h"
Go to the source code of this file.
Data Structures | |
struct | Au_Obj_t_ |
struct | Au_Ntk_t_ |
struct | Au_Man_t_ |
Macros | |
#define | AU_MAX_FANINS 0x1FFFFFFF |
DECLARATIONS ///. More... | |
#define | Au_ManForEachNtk(p, pNtk, i) for ( i = 1; (i < Vec_PtrSize(&p->vNtks)) && (((pNtk) = Au_ManNtk(p, i)), 1); i++ ) |
#define | Au_ManForEachNtkReverse(p, pNtk, i) for ( i = Vec_PtrSize(&p->vNtks) - 1;(i>=1) && (((pNtk) = Au_ManNtk(p, i)), 1); i-- ) |
#define | Au_ObjForEachFaninId(pObj, hFanin, i) for ( i = 0; (i < Au_ObjFaninNum(pObj)) && (((hFanin) = Au_ObjFaninId(pObj, i)), 1); i++ ) |
#define | Au_BoxForEachFanoutId(pObj, hFanout, i) for ( i = 0; (i < Au_BoxFanoutNum(pObj)) && (((hFanout) = Au_BoxFanoutId(pObj, i)), 1); i++ ) |
#define | Au_ObjForEachFanin(pObj, pFanin, i) for ( i = 0; (i < Au_ObjFaninNum(pObj)) && (((pFanin) = Au_ObjFanin(pObj, i)), 1); i++ ) |
#define | Au_BoxForEachFanout(pObj, pFanout, i) for ( i = 0; (i < Au_BoxFanoutNum(pObj)) && (((pFanout) = Au_BoxFanout(pObj, i)), 1); i++ ) |
#define | Au_NtkForEachPi(p, pObj, i) for ( i = 0; (i < Vec_IntSize(&p->vPis)) && (((pObj) = Au_NtkPi(p, i)), 1); i++ ) |
#define | Au_NtkForEachPo(p, pObj, i) for ( i = 0; (i < Vec_IntSize(&p->vPos)) && (((pObj) = Au_NtkPo(p, i)), 1); i++ ) |
#define | Au_NtkForEachObj(p, pObj, i) for ( i = 0; (i < Vec_IntSize(&p->vObjs)) && (((pObj) = Au_NtkObjI(p, i)), 1); i++ ) |
#define | Au_NtkForEachNode(p, pObj, i) for ( i = 0; (i < Vec_IntSize(&p->vObjs)) && (((pObj) = Au_NtkObjI(p, i)), 1); i++ ) if ( !Au_ObjIsNode(pObj) ) {} else |
#define | Au_NtkForEachBox(p, pObj, i) for ( i = 0; (i < Vec_IntSize(&p->vObjs)) && (((pObj) = Au_NtkObjI(p, i)), 1); i++ ) if ( !Au_ObjIsBox(pObj) ) {} else |
#define | AU_VAL0 1 |
#define | AU_VAL1 2 |
#define | AU_VALX 3 |
Typedefs | |
typedef struct Au_Man_t_ | Au_Man_t |
typedef struct Au_Ntk_t_ | Au_Ntk_t |
typedef struct Au_Obj_t_ | Au_Obj_t |
Enumerations | |
enum | Au_Type_t { AU_OBJ_NONE, AU_OBJ_CONST0, AU_OBJ_PI, AU_OBJ_PO, AU_OBJ_FAN, AU_OBJ_FLOP, AU_OBJ_BOX, AU_OBJ_NODE, AU_OBJ_VOID } |
#define Au_BoxForEachFanout | ( | pObj, | |
pFanout, | |||
i | |||
) | for ( i = 0; (i < Au_BoxFanoutNum(pObj)) && (((pFanout) = Au_BoxFanout(pObj, i)), 1); i++ ) |
Definition at line 211 of file abcHieNew.c.
#define Au_BoxForEachFanoutId | ( | pObj, | |
hFanout, | |||
i | |||
) | for ( i = 0; (i < Au_BoxFanoutNum(pObj)) && (((hFanout) = Au_BoxFanoutId(pObj, i)), 1); i++ ) |
Definition at line 206 of file abcHieNew.c.
#define Au_ManForEachNtk | ( | p, | |
pNtk, | |||
i | |||
) | for ( i = 1; (i < Vec_PtrSize(&p->vNtks)) && (((pNtk) = Au_ManNtk(p, i)), 1); i++ ) |
Definition at line 199 of file abcHieNew.c.
#define Au_ManForEachNtkReverse | ( | p, | |
pNtk, | |||
i | |||
) | for ( i = Vec_PtrSize(&p->vNtks) - 1;(i>=1) && (((pNtk) = Au_ManNtk(p, i)), 1); i-- ) |
Definition at line 201 of file abcHieNew.c.
#define AU_MAX_FANINS 0x1FFFFFFF |
DECLARATIONS ///.
CFile****************************************************************
FileName [abcHieNew.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Network and node package.]
Synopsis [New hierarchy manager.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [
]
Definition at line 36 of file abcHieNew.c.
#define Au_NtkForEachBox | ( | p, | |
pObj, | |||
i | |||
) | for ( i = 0; (i < Vec_IntSize(&p->vObjs)) && (((pObj) = Au_NtkObjI(p, i)), 1); i++ ) if ( !Au_ObjIsBox(pObj) ) {} else |
Definition at line 222 of file abcHieNew.c.
#define Au_NtkForEachNode | ( | p, | |
pObj, | |||
i | |||
) | for ( i = 0; (i < Vec_IntSize(&p->vObjs)) && (((pObj) = Au_NtkObjI(p, i)), 1); i++ ) if ( !Au_ObjIsNode(pObj) ) {} else |
Definition at line 220 of file abcHieNew.c.
#define Au_NtkForEachObj | ( | p, | |
pObj, | |||
i | |||
) | for ( i = 0; (i < Vec_IntSize(&p->vObjs)) && (((pObj) = Au_NtkObjI(p, i)), 1); i++ ) |
Definition at line 218 of file abcHieNew.c.
#define Au_NtkForEachPi | ( | p, | |
pObj, | |||
i | |||
) | for ( i = 0; (i < Vec_IntSize(&p->vPis)) && (((pObj) = Au_NtkPi(p, i)), 1); i++ ) |
Definition at line 214 of file abcHieNew.c.
#define Au_NtkForEachPo | ( | p, | |
pObj, | |||
i | |||
) | for ( i = 0; (i < Vec_IntSize(&p->vPos)) && (((pObj) = Au_NtkPo(p, i)), 1); i++ ) |
Definition at line 216 of file abcHieNew.c.
#define Au_ObjForEachFanin | ( | pObj, | |
pFanin, | |||
i | |||
) | for ( i = 0; (i < Au_ObjFaninNum(pObj)) && (((pFanin) = Au_ObjFanin(pObj, i)), 1); i++ ) |
Definition at line 209 of file abcHieNew.c.
#define Au_ObjForEachFaninId | ( | pObj, | |
hFanin, | |||
i | |||
) | for ( i = 0; (i < Au_ObjFaninNum(pObj)) && (((hFanin) = Au_ObjFaninId(pObj, i)), 1); i++ ) |
Definition at line 204 of file abcHieNew.c.
#define AU_VAL0 1 |
Definition at line 1254 of file abcHieNew.c.
#define AU_VAL1 2 |
Definition at line 1255 of file abcHieNew.c.
#define AU_VALX 3 |
Definition at line 1256 of file abcHieNew.c.
Definition at line 51 of file abcHieNew.c.
Definition at line 52 of file abcHieNew.c.
Definition at line 53 of file abcHieNew.c.
enum Au_Type_t |
Enumerator | |
---|---|
AU_OBJ_NONE | |
AU_OBJ_CONST0 | |
AU_OBJ_PI | |
AU_OBJ_PO | |
AU_OBJ_FAN | |
AU_OBJ_FLOP | |
AU_OBJ_BOX | |
AU_OBJ_NODE | |
AU_OBJ_VOID |
Definition at line 38 of file abcHieNew.c.
int Abc_NtkCheckRecursive | ( | Abc_Ntk_t * | pNtk | ) |
Function*************************************************************
Synopsis [Checks if there is a recursive definition.]
Description []
SideEffects []
SeeAlso []
Definition at line 626 of file abcHieCec.c.
int Abc_NtkDeriveFlatGiaSop | ( | Gia_Man_t * | pGia, |
int * | gFanins, | ||
char * | pSop | ||
) |
Function*************************************************************
Synopsis [Strashes one logic node using its SOP.]
Description []
SideEffects []
SeeAlso []
Definition at line 131 of file abcHieCec.c.
ABC_NAMESPACE_IMPL_END ABC_NAMESPACE_IMPL_START Vec_Ptr_t* Abc_NtkDfsBoxes | ( | Abc_Ntk_t * | pNtk | ) |
Function*************************************************************
Synopsis [Returns the array of node and boxes reachable from POs.]
Description []
SideEffects []
SeeAlso []
Definition at line 104 of file abcHieCec.c.
Gia_Man_t* Abc_NtkHieCecTest2 | ( | char * | pFileName, |
char * | pModelName, | ||
int | fVerbose | ||
) |
Function*************************************************************
Synopsis [Performs hierarchical equivalence checking.]
Description []
SideEffects []
SeeAlso []
Definition at line 1571 of file abcHieNew.c.
Definition at line 183 of file abcHieNew.c.
|
inlinestatic |
Definition at line 182 of file abcHieNew.c.
|
inlinestatic |
Definition at line 181 of file abcHieNew.c.
|
inlinestatic |
Definition at line 122 of file abcHieNew.c.
|
inlinestatic |
Definition at line 113 of file abcHieNew.c.
|
inlinestatic |
Definition at line 114 of file abcHieNew.c.
|
inlinestatic |
Definition at line 115 of file abcHieNew.c.
|
inlinestatic |
Definition at line 116 of file abcHieNew.c.
|
inlinestatic |
Definition at line 117 of file abcHieNew.c.
Definition at line 370 of file abcHieNew.c.
Au_Man_t* Au_ManAlloc | ( | char * | pName | ) |
Function*************************************************************
Synopsis [Working with manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 327 of file abcHieNew.c.
void Au_ManCountThings | ( | Au_Man_t * | p | ) |
Definition at line 492 of file abcHieNew.c.
void Au_ManDelete | ( | Au_Man_t * | p | ) |
Definition at line 347 of file abcHieNew.c.
Definition at line 1486 of file abcHieNew.c.
int Au_ManFindNtk | ( | Au_Man_t * | p, |
char * | pName | ||
) |
Definition at line 354 of file abcHieNew.c.
Definition at line 363 of file abcHieNew.c.
void Au_ManFree | ( | Au_Man_t * | p | ) |
Definition at line 336 of file abcHieNew.c.
int Au_ManMemUsage | ( | Au_Man_t * | p | ) |
Definition at line 377 of file abcHieNew.c.
int Au_ManMemUsageUseful | ( | Au_Man_t * | p | ) |
Definition at line 385 of file abcHieNew.c.
|
inlinestatic |
Definition at line 126 of file abcHieNew.c.
Definition at line 128 of file abcHieNew.c.
|
inlinestatic |
Definition at line 127 of file abcHieNew.c.
Definition at line 129 of file abcHieNew.c.
void Au_ManPrintBoxInfo | ( | Au_Ntk_t * | pNtk | ) |
Definition at line 543 of file abcHieNew.c.
void Au_ManPrintBoxInfoSorted | ( | Au_Ntk_t * | pNtk | ) |
Definition at line 628 of file abcHieNew.c.
void Au_ManPrintStats | ( | Au_Man_t * | p | ) |
Definition at line 393 of file abcHieNew.c.
Definition at line 426 of file abcHieNew.c.
Definition at line 409 of file abcHieNew.c.
Definition at line 120 of file abcHieNew.c.
Definition at line 121 of file abcHieNew.c.
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Working with models.]
Description []
SideEffects []
SeeAlso []
Definition at line 245 of file abcHieNew.c.
int Au_NtkAllocObj | ( | Au_Ntk_t * | p, |
int | nFanins, | ||
int | Type | ||
) |
Definition at line 761 of file abcHieNew.c.
|
inlinestatic |
Definition at line 137 of file abcHieNew.c.
int Au_NtkCheckRecursive | ( | Au_Ntk_t * | pNtk | ) |
Definition at line 660 of file abcHieNew.c.
void Au_NtkCleanCopy | ( | Au_Ntk_t * | p | ) |
Definition at line 297 of file abcHieNew.c.
Definition at line 539 of file abcHieNew.c.
Definition at line 621 of file abcHieNew.c.
Definition at line 857 of file abcHieNew.c.
int Au_NtkCreateConst0 | ( | Au_Ntk_t * | pNtk | ) |
Definition at line 822 of file abcHieNew.c.
int Au_NtkCreateFan | ( | Au_Ntk_t * | pNtk, |
int | iFanin, | ||
int | iFanout, | ||
int | iModel | ||
) |
Definition at line 837 of file abcHieNew.c.
Definition at line 847 of file abcHieNew.c.
int Au_NtkCreatePi | ( | Au_Ntk_t * | pNtk | ) |
Definition at line 826 of file abcHieNew.c.
int Au_NtkCreatePo | ( | Au_Ntk_t * | pNtk, |
int | iFanin | ||
) |
Definition at line 830 of file abcHieNew.c.
Function*************************************************************
Synopsis [Duplicates ABC network.]
Description []
SideEffects []
SeeAlso []
Definition at line 1441 of file abcHieNew.c.
Function*************************************************************
Synopsis [Flattens the logic hierarchy of the netlist.]
Description []
SideEffects []
SeeAlso []
Definition at line 1222 of file abcHieNew.c.
Function*************************************************************
Synopsis [Flattens the logic hierarchy of the netlist.]
Description []
SideEffects []
SeeAlso []
Definition at line 1131 of file abcHieNew.c.
|
inlinestatic |
Definition at line 135 of file abcHieNew.c.
|
inlinestatic |
Definition at line 136 of file abcHieNew.c.
void Au_NtkFree | ( | Au_Ntk_t * | p | ) |
Definition at line 258 of file abcHieNew.c.
|
inlinestatic |
Definition at line 191 of file abcHieNew.c.
|
inlinestatic |
Function*************************************************************
Synopsis [Returns memory for the next object.]
Description []
SideEffects []
SeeAlso []
Definition at line 753 of file abcHieNew.c.
Definition at line 132 of file abcHieNew.c.
int Au_NtkMemUsage | ( | Au_Ntk_t * | p | ) |
Definition at line 271 of file abcHieNew.c.
|
inlinestatic |
Definition at line 131 of file abcHieNew.c.
|
inlinestatic |
Definition at line 138 of file abcHieNew.c.
int Au_NtkNodeNumFunc | ( | Au_Ntk_t * | p, |
int | Func | ||
) |
Definition at line 301 of file abcHieNew.c.
Definition at line 141 of file abcHieNew.c.
Definition at line 145 of file abcHieNew.c.
|
inlinestatic |
Definition at line 140 of file abcHieNew.c.
|
inlinestatic |
Definition at line 139 of file abcHieNew.c.
Au_Ntk_t* Au_NtkParseCBlif | ( | char * | pFileName | ) |
Function*************************************************************
Synopsis [Parses CBLIF file.]
Description []
SideEffects []
SeeAlso []
Definition at line 959 of file abcHieNew.c.
|
inlinestatic |
Function*************************************************************
Synopsis [Reads one entry.]
Description []
SideEffects []
SeeAlso []
Definition at line 923 of file abcHieNew.c.
Definition at line 143 of file abcHieNew.c.
|
inlinestatic |
Definition at line 133 of file abcHieNew.c.
Definition at line 144 of file abcHieNew.c.
|
inlinestatic |
Definition at line 134 of file abcHieNew.c.
void Au_NtkPrintStats | ( | Au_Ntk_t * | p | ) |
Definition at line 280 of file abcHieNew.c.
|
inlinestatic |
Function*************************************************************
Synopsis [Reads one entry.]
Description []
SideEffects []
SeeAlso []
Definition at line 908 of file abcHieNew.c.
int Au_NtkSuppSizeTest | ( | Au_Ntk_t * | p | ) |
Definition at line 731 of file abcHieNew.c.
void Au_NtkTerSimulate | ( | Au_Ntk_t * | p | ) |
Function*************************************************************
Synopsis [Flattens the logic hierarchy of the netlist.]
Description []
SideEffects []
SeeAlso []
Definition at line 1402 of file abcHieNew.c.
void Au_NtkTerSimulate_rec | ( | Au_Ntk_t * | p | ) |
Function*************************************************************
Synopsis [Flattens the logic hierarchy of the netlist.]
Description []
SideEffects []
SeeAlso []
Definition at line 1325 of file abcHieNew.c.
|
inlinestatic |
Definition at line 157 of file abcHieNew.c.
|
inlinestatic |
Definition at line 185 of file abcHieNew.c.
Definition at line 169 of file abcHieNew.c.
Definition at line 170 of file abcHieNew.c.
Definition at line 171 of file abcHieNew.c.
Definition at line 172 of file abcHieNew.c.
|
inlinestatic |
Definition at line 173 of file abcHieNew.c.
|
inlinestatic |
Definition at line 174 of file abcHieNew.c.
|
inlinestatic |
Definition at line 175 of file abcHieNew.c.
|
inlinestatic |
Definition at line 176 of file abcHieNew.c.
|
inlinestatic |
Definition at line 165 of file abcHieNew.c.
|
inlinestatic |
Definition at line 166 of file abcHieNew.c.
|
inlinestatic |
Definition at line 167 of file abcHieNew.c.
|
inlinestatic |
Definition at line 168 of file abcHieNew.c.
|
inlinestatic |
Definition at line 177 of file abcHieNew.c.
|
inlinestatic |
Definition at line 164 of file abcHieNew.c.
|
inlinestatic |
Definition at line 188 of file abcHieNew.c.
|
inlinestatic |
Definition at line 161 of file abcHieNew.c.
|
inlinestatic |
Definition at line 1259 of file abcHieNew.c.
|
inlinestatic |
Definition at line 1298 of file abcHieNew.c.
|
inlinestatic |
Definition at line 1303 of file abcHieNew.c.
|
inlinestatic |
Definition at line 1308 of file abcHieNew.c.
|
inlinestatic |
Definition at line 159 of file abcHieNew.c.
|
inlinestatic |
Definition at line 153 of file abcHieNew.c.
|
inlinestatic |
Definition at line 148 of file abcHieNew.c.
|
inlinestatic |
Definition at line 151 of file abcHieNew.c.
|
inlinestatic |
Definition at line 152 of file abcHieNew.c.
|
inlinestatic |
Definition at line 154 of file abcHieNew.c.
|
inlinestatic |
Definition at line 147 of file abcHieNew.c.
|
inlinestatic |
Definition at line 149 of file abcHieNew.c.
|
inlinestatic |
Definition at line 150 of file abcHieNew.c.
|
inlinestatic |
Definition at line 155 of file abcHieNew.c.
|
inlinestatic |
Definition at line 194 of file abcHieNew.c.
|
inlinestatic |
Definition at line 197 of file abcHieNew.c.
|
inlinestatic |
Definition at line 195 of file abcHieNew.c.
Definition at line 162 of file abcHieNew.c.
Definition at line 158 of file abcHieNew.c.
|
inlinestatic |
Definition at line 160 of file abcHieNew.c.
|
inlinestatic |
Definition at line 186 of file abcHieNew.c.
|
inlinestatic |
Definition at line 178 of file abcHieNew.c.
|
inlinestatic |
Definition at line 179 of file abcHieNew.c.
|
inlinestatic |
Definition at line 189 of file abcHieNew.c.
|
inlinestatic |
Definition at line 192 of file abcHieNew.c.
|
inlinestatic |
Definition at line 196 of file abcHieNew.c.
|
inlinestatic |
Definition at line 193 of file abcHieNew.c.
|
inlinestatic |
Definition at line 1258 of file abcHieNew.c.
int Au_ObjSuppSize | ( | Au_Obj_t * | pObj | ) |
Definition at line 703 of file abcHieNew.c.
int Au_ObjSuppSize_rec | ( | Au_Ntk_t * | p, |
int | Id | ||
) |
Definition at line 688 of file abcHieNew.c.
Definition at line 119 of file abcHieNew.c.
|
inlinestatic |
Definition at line 124 of file abcHieNew.c.
|
inlinestatic |
Definition at line 112 of file abcHieNew.c.
|
inlinestatic |
Definition at line 1269 of file abcHieNew.c.
|
inlinestatic |
Definition at line 1260 of file abcHieNew.c.
|
inlinestatic |
Definition at line 1286 of file abcHieNew.c.
|
inlinestatic |
Definition at line 1278 of file abcHieNew.c.