HAL
simplification_abc.cpp File Reference
#include "hal_core/netlist/boolean_function/simplification.h"
#include <boost/fusion/include/at_c.hpp>
#include <boost/fusion/sequence/intrinsic/at_c.hpp>
#include <boost/spirit/home/x3.hpp>
#include <mutex>
#include <sstream>
#include <string>
Include dependency graph for simplification_abc.cpp:

Go to the source code of this file.

Classes

struct  Vec_Ptr_t_
 
struct  Vec_Int_t_
 
struct  Vec_Vec_t_
 
struct  Hop_Obj_t_
 
struct  Hop_Man_t_
 
struct  Abc_Ntk_t_
 
struct  Abc_Obj_t_
 
struct  Abc_Frame_t_
 

Namespaces

 hal
 

Macros

#define ABC_FREE(obj)   ((obj) ? (free((char*)(obj)), (obj) = 0) : 0)
 

Typedefs

typedef struct Vec_Ptr_t_ Vec_Ptr_t
 Copied from "src/misc/vec/vecPtr.h", see above for link to ABC's repository. More...
 
typedef struct Vec_Int_t_ Vec_Int_t
 Copied from "src/misc/vec/vecInt.h", see above for link to ABC's repository. More...
 
typedef struct Vec_Vec_t_ Vec_Vec_t
 Copied from "src/misc/vec/vecVec.h", see above for link to ABC's repository. More...
 
typedef struct Nm_Man_t_ Nm_Man_t
 
typedef struct Abc_Des_t_ Abc_Des_t
 
typedef struct Mem_Fixed_t_ Mem_Fixed_t
 
typedef struct Mem_Step_t_ Mem_Step_t
 
typedef struct Abc_ManTime_t_ Abc_ManTime_t
 
typedef struct Abc_Aig_t_ Abc_Aig_t
 
typedef struct Abc_Cex_t_ Abc_Cex_t
 
typedef struct st__table st__table
 
typedef struct Gia_Man_t_ Gia_Man_t
 
typedef struct Abc_Nam_t_ Abc_Nam_t
 
typedef struct Dsd_Manager_t_ DdManager
 
typedef void(* Abc_Frame_Callback_BmcFrameDone_Func) (int, int, int)
 
typedef struct Vec_Wec_t_ Vec_Wec_t
 
typedef int64_t abctime
 
typedef struct Hop_Obj_t_ Hop_Obj_t
 Copied from "src/misc/vec/vecVec.h", see above for link to ABC's repository. More...
 
typedef struct Hop_Man_t_ Hop_Man_t
 Copied from "src/aig/hop/hop.h", see above for link to ABC's repository. More...
 
typedef struct Abc_Ntk_t_ Abc_Ntk_t
 Copied from "src/base/abc/abc.h", see above for link to ABC's repository. More...
 
typedef struct Abc_Obj_t_ Abc_Obj_t
 Copied from "src/base/abc/abc.h", see above for link to ABC's repository. More...
 
typedef struct Abc_Frame_t_ Abc_Frame_t
 Copied from "src/base/main/mainInt.h", see above for link to ABC's repository. More...
 

Enumerations

enum  Abc_NtkFunc_t {
  ABC_FUNC_NONE = 0 , ABC_FUNC_SOP , ABC_FUNC_BDD , ABC_FUNC_AIG ,
  ABC_FUNC_MAP , ABC_FUNC_BLIFMV , ABC_FUNC_BLACKBOX , ABC_FUNC_OTHER
}
 Copied from "src/base/abc/abc.h", see above for link to ABC's repository. More...
 
enum  Abc_NtkType_t {
  ABC_NTK_NONE = 0 , ABC_NTK_NETLIST , ABC_NTK_LOGIC , ABC_NTK_STRASH ,
  ABC_NTK_OTHER
}
 Copied from "src/base/abc/abc.h", see above for link to ABC's repository. More...
 
enum  Abc_ObjType_t {
  ABC_OBJ_NONE = 0 , ABC_OBJ_CONST1 , ABC_OBJ_PI , ABC_OBJ_PO ,
  ABC_OBJ_BI , ABC_OBJ_BO , ABC_OBJ_NET , ABC_OBJ_NODE ,
  ABC_OBJ_LATCH , ABC_OBJ_WHITEBOX , ABC_OBJ_BLACKBOX , ABC_OBJ_NUMBER
}
 Copied from "src/base/abc/abc.h", see above for link to ABC's repository. More...
 
enum  Hop_Type_t {
  AIG_NONE , AIG_CONST1 , AIG_PI , AIG_PO ,
  AIG_AND , AIG_EXOR , AIG_VOID
}
 Copied from "src/aig/hop/hop.h", see above for link to ABC's repository. More...
 

Functions

void Abc_Start ()
 
void Abc_Stop ()
 
Abc_Frame_tAbc_FrameGetGlobalFrame ()
 
Abc_Ntk_tAbc_NtkAlloc (Abc_NtkType_t, Abc_NtkFunc_t, int)
 
void Abc_NtkDelete (Abc_Ntk_t *)
 
Abc_Obj_tAbc_NtkCreateObj (Abc_Ntk_t *, Abc_ObjType_t)
 
char * Abc_ObjAssignName (Abc_Obj_t *, char *, char *)
 
Abc_Obj_tAbc_AigConst1 (Abc_Ntk_t *)
 
Abc_Obj_tAbc_AigAnd (Abc_Aig_t *, Abc_Obj_t *, Abc_Obj_t *)
 
Abc_Obj_tAbc_AigOr (Abc_Aig_t *, Abc_Obj_t *, Abc_Obj_t *)
 
Abc_Obj_tAbc_AigXor (Abc_Aig_t *, Abc_Obj_t *, Abc_Obj_t *)
 
void Abc_ObjAddFanin (Abc_Obj_t *, Abc_Obj_t *)
 
int Abc_AigCleanup (Abc_Aig_t *)
 
int Abc_NtkCheck (Abc_Ntk_t *)
 
int Cmd_CommandExecute (Abc_Frame_t *, const char *)
 
void Abc_FrameReplaceCurrentNetwork (Abc_Frame_t *, Abc_Ntk_t *)
 
void Abc_FrameClearVerifStatus (Abc_Frame_t *)
 
Abc_Ntk_tAbc_NtkToNetlist (Abc_Ntk_t *)
 
int Abc_NtkToAig (Abc_Ntk_t *)
 
Hop_Obj_tHop_IthVar (Hop_Man_t *p, int i)
 
char * Abc_ObjName (Abc_Obj_t *)
 
char * Extra_UtilStrsav (const char *)
 
void Hop_ObjPrintVerilog (FILE *, Hop_Obj_t *, Vec_Vec_t *, int, int)
 

Macro Definition Documentation

◆ ABC_FREE

#define ABC_FREE (   obj)    ((obj) ? (free((char*)(obj)), (obj) = 0) : 0)

Typedef Documentation

◆ Abc_Aig_t

typedef struct Abc_Aig_t_ Abc_Aig_t

Definition at line 1 of file simplification_abc.cpp.

◆ Abc_Cex_t

typedef struct Abc_Cex_t_ Abc_Cex_t

Definition at line 1 of file simplification_abc.cpp.

◆ Abc_Des_t

typedef struct Abc_Des_t_ Abc_Des_t

Definition at line 1 of file simplification_abc.cpp.

◆ Abc_Frame_Callback_BmcFrameDone_Func

typedef void(* Abc_Frame_Callback_BmcFrameDone_Func) (int, int, int)

Definition at line 122 of file simplification_abc.cpp.

◆ Abc_Frame_t

typedef struct Abc_Frame_t_ Abc_Frame_t

Copied from "src/base/main/mainInt.h", see above for link to ABC's repository.

Definition at line 124 of file simplification_abc.cpp.

◆ Abc_ManTime_t

typedef struct Abc_ManTime_t_ Abc_ManTime_t

Definition at line 1 of file simplification_abc.cpp.

◆ Abc_Nam_t

typedef struct Abc_Nam_t_ Abc_Nam_t

Definition at line 1 of file simplification_abc.cpp.

◆ Abc_Ntk_t

typedef struct Abc_Ntk_t_ Abc_Ntk_t

Copied from "src/base/abc/abc.h", see above for link to ABC's repository.

Definition at line 124 of file simplification_abc.cpp.

◆ Abc_Obj_t

typedef struct Abc_Obj_t_ Abc_Obj_t

Copied from "src/base/abc/abc.h", see above for link to ABC's repository.

Definition at line 124 of file simplification_abc.cpp.

◆ abctime

typedef int64_t abctime

Definition at line 124 of file simplification_abc.cpp.

◆ DdManager

typedef struct Dsd_Manager_t_ DdManager

Definition at line 1 of file simplification_abc.cpp.

◆ Gia_Man_t

typedef struct Gia_Man_t_ Gia_Man_t

Definition at line 1 of file simplification_abc.cpp.

◆ Hop_Man_t

typedef struct Hop_Man_t_ Hop_Man_t

Copied from "src/aig/hop/hop.h", see above for link to ABC's repository.

Definition at line 124 of file simplification_abc.cpp.

◆ Hop_Obj_t

typedef struct Hop_Obj_t_ Hop_Obj_t

Copied from "src/misc/vec/vecVec.h", see above for link to ABC's repository.

Definition at line 124 of file simplification_abc.cpp.

◆ Mem_Fixed_t

typedef struct Mem_Fixed_t_ Mem_Fixed_t

Definition at line 1 of file simplification_abc.cpp.

◆ Mem_Step_t

typedef struct Mem_Step_t_ Mem_Step_t

Definition at line 1 of file simplification_abc.cpp.

◆ Nm_Man_t

typedef struct Nm_Man_t_ Nm_Man_t

List of forward declarations of specific ABC data types required within the data types that have to be known at compile-time.

Definition at line 1 of file simplification_abc.cpp.

◆ st__table

typedef struct st__table st__table

Definition at line 1 of file simplification_abc.cpp.

◆ Vec_Int_t

typedef struct Vec_Int_t_ Vec_Int_t

Copied from "src/misc/vec/vecInt.h", see above for link to ABC's repository.

Definition at line 1 of file simplification_abc.cpp.

◆ Vec_Ptr_t

typedef struct Vec_Ptr_t_ Vec_Ptr_t

Copied from "src/misc/vec/vecPtr.h", see above for link to ABC's repository.

Definition at line 1 of file simplification_abc.cpp.

◆ Vec_Vec_t

typedef struct Vec_Vec_t_ Vec_Vec_t

Copied from "src/misc/vec/vecVec.h", see above for link to ABC's repository.

Definition at line 1 of file simplification_abc.cpp.

◆ Vec_Wec_t

typedef struct Vec_Wec_t_ Vec_Wec_t

Definition at line 122 of file simplification_abc.cpp.

Enumeration Type Documentation

◆ Abc_NtkFunc_t

Copied from "src/base/abc/abc.h", see above for link to ABC's repository.

Developer Note

Since ABC is implemented in C (and we link towards the libabc.so within the HAL core), we have to forward declare and sometimes re-implement certain extern data types and (helper) functions we use from ABC [1]. Note that the code below is copied directy from ABC (and each data type or function is equipped with a '/// Copied from $FILENAME' to indiciate the original function implementation from ABC. Moreover note that we applied a code reformatting of various data types / functions in order to fit within the HAL code style.

[1] https://people.eecs.berkeley.edu/~alanmi/abc/

Enumerator
ABC_FUNC_NONE 
ABC_FUNC_SOP 
ABC_FUNC_BDD 
ABC_FUNC_AIG 
ABC_FUNC_MAP 
ABC_FUNC_BLIFMV 
ABC_FUNC_BLACKBOX 
ABC_FUNC_OTHER 

Definition at line 31 of file simplification_abc.cpp.

◆ Abc_NtkType_t

Copied from "src/base/abc/abc.h", see above for link to ABC's repository.

Enumerator
ABC_NTK_NONE 
ABC_NTK_NETLIST 
ABC_NTK_LOGIC 
ABC_NTK_STRASH 
ABC_NTK_OTHER 

Definition at line 44 of file simplification_abc.cpp.

◆ Abc_ObjType_t

Copied from "src/base/abc/abc.h", see above for link to ABC's repository.

Enumerator
ABC_OBJ_NONE 
ABC_OBJ_CONST1 
ABC_OBJ_PI 
ABC_OBJ_PO 
ABC_OBJ_BI 
ABC_OBJ_BO 
ABC_OBJ_NET 
ABC_OBJ_NODE 
ABC_OBJ_LATCH 
ABC_OBJ_WHITEBOX 
ABC_OBJ_BLACKBOX 
ABC_OBJ_NUMBER 

Definition at line 54 of file simplification_abc.cpp.

◆ Hop_Type_t

enum Hop_Type_t

Copied from "src/aig/hop/hop.h", see above for link to ABC's repository.

Enumerator
AIG_NONE 
AIG_CONST1 
AIG_PI 
AIG_PO 
AIG_AND 
AIG_EXOR 
AIG_VOID 

Definition at line 71 of file simplification_abc.cpp.

Function Documentation

◆ Abc_AigAnd()

Abc_Obj_t* Abc_AigAnd ( Abc_Aig_t ,
Abc_Obj_t ,
Abc_Obj_t  
)

◆ Abc_AigCleanup()

int Abc_AigCleanup ( Abc_Aig_t )

◆ Abc_AigConst1()

Abc_Obj_t* Abc_AigConst1 ( Abc_Ntk_t )

◆ Abc_AigOr()

Abc_Obj_t* Abc_AigOr ( Abc_Aig_t ,
Abc_Obj_t ,
Abc_Obj_t  
)

◆ Abc_AigXor()

Abc_Obj_t* Abc_AigXor ( Abc_Aig_t ,
Abc_Obj_t ,
Abc_Obj_t  
)

◆ Abc_FrameClearVerifStatus()

void Abc_FrameClearVerifStatus ( Abc_Frame_t )

◆ Abc_FrameGetGlobalFrame()

Abc_Frame_t* Abc_FrameGetGlobalFrame ( )

◆ Abc_FrameReplaceCurrentNetwork()

void Abc_FrameReplaceCurrentNetwork ( Abc_Frame_t ,
Abc_Ntk_t  
)

◆ Abc_NtkAlloc()

Abc_Ntk_t* Abc_NtkAlloc ( Abc_NtkType_t  ,
Abc_NtkFunc_t  ,
int   
)

◆ Abc_NtkCheck()

int Abc_NtkCheck ( Abc_Ntk_t )

◆ Abc_NtkCreateObj()

Abc_Obj_t* Abc_NtkCreateObj ( Abc_Ntk_t ,
Abc_ObjType_t   
)

◆ Abc_NtkDelete()

void Abc_NtkDelete ( Abc_Ntk_t )

◆ Abc_NtkToAig()

int Abc_NtkToAig ( Abc_Ntk_t )

◆ Abc_NtkToNetlist()

Abc_Ntk_t* Abc_NtkToNetlist ( Abc_Ntk_t )

◆ Abc_ObjAddFanin()

void Abc_ObjAddFanin ( Abc_Obj_t ,
Abc_Obj_t  
)

◆ Abc_ObjAssignName()

char* Abc_ObjAssignName ( Abc_Obj_t ,
char *  ,
char *   
)

◆ Abc_ObjName()

char* Abc_ObjName ( Abc_Obj_t )

◆ Abc_Start()

void Abc_Start ( )

◆ Abc_Stop()

void Abc_Stop ( )

◆ Cmd_CommandExecute()

int Cmd_CommandExecute ( Abc_Frame_t ,
const char *   
)

◆ Extra_UtilStrsav()

char* Extra_UtilStrsav ( const char *  )

◆ Hop_IthVar()

Hop_Obj_t* Hop_IthVar ( Hop_Man_t p,
int  i 
)

◆ Hop_ObjPrintVerilog()

void Hop_ObjPrintVerilog ( FILE *  ,
Hop_Obj_t ,
Vec_Vec_t ,
int  ,
int   
)