#include <stdio.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include "misc/util/abc_global.h"#include "bblif.h"
Go to the source code of this file.
Classes | |
| struct | Vec_Int_t_ |
| struct | Vec_Str_t_ |
| struct | Bbl_Obj_t_ |
| struct | Bbl_Fnc_t_ |
| struct | Bbl_Ent_t_ |
| struct | Bbl_Man_t_ |
Macros | |
| #define | Bbl_ManForEachObj_int(p, pObj, h) |
| #define | Bbl_ManForEachFnc_int(p, pObj, h) |
| #define | Bbl_ObjForEachFanin_int(pObj, pFanin, i) |
| #define | BBLIF_ALLOC(type, num) |
| #define | BBLIF_CALLOC(type, num) |
| #define | BBLIF_FALLOC(type, num) |
| #define | BBLIF_FREE(obj) |
| #define | BBLIF_REALLOC(type, obj, num) |
Typedefs | |
| typedef typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ | Vec_Int_t |
| DECLARATIONS ///. | |
| typedef struct Vec_Str_t_ | Vec_Str_t |
| typedef struct Bbl_Fnc_t_ | Bbl_Fnc_t |
| typedef struct Bbl_Ent_t_ | Bbl_Ent_t |
| #define Bbl_ManForEachFnc_int | ( | p, | |
| pObj, | |||
| h ) |
| #define Bbl_ManForEachObj_int | ( | p, | |
| pObj, | |||
| h ) |
| #define Bbl_ObjForEachFanin_int | ( | pObj, | |
| pFanin, | |||
| i ) |
| #define BBLIF_ALLOC | ( | type, | |
| num ) |
| #define BBLIF_CALLOC | ( | type, | |
| num ) |
| #define BBLIF_FALLOC | ( | type, | |
| num ) |
| #define BBLIF_FREE | ( | obj | ) |
| #define BBLIF_REALLOC | ( | type, | |
| obj, | |||
| num ) |
| typedef struct Bbl_Ent_t_ Bbl_Ent_t |
| typedef struct Bbl_Fnc_t_ Bbl_Fnc_t |
| typedef typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t |
DECLARATIONS ///.
CFile****************************************************************
FileName [bblif.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Binary BLIF representation for logic networks.]
Synopsis [Main implementation module.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - February 28, 2009.]
Revision [
]
| typedef struct Vec_Str_t_ Vec_Str_t |
| void Bbl_ManAddFanin | ( | Bbl_Man_t * | p, |
| int | ObjId, | ||
| int | FaninId ) |
Fnction*************************************************************
Synopsis [Creates fanin/fanout relationship between two objects.]
Description []
SideEffects []
SeeAlso []
Definition at line 1023 of file bblif.c.

| int Bbl_ManCheck | ( | Bbl_Man_t * | p | ) |
Fnction*************************************************************
Synopsis [Returns 1 if the manager was created correctly.]
Description []
SideEffects []
SeeAlso []
Definition at line 1062 of file bblif.c.

| int Bbl_ManCreateEntry | ( | Bbl_Man_t * | p, |
| int | iFunc, | ||
| int | iNext ) |
Fnction*************************************************************
Synopsis [Saves one entry.]
Description []
SideEffects []
SeeAlso []
Definition at line 901 of file bblif.c.


| void Bbl_ManCreateObject | ( | Bbl_Man_t * | p, |
| Bbl_Type_t | Type, | ||
| int | ObjId, | ||
| int | nFanins, | ||
| char * | pSop ) |
Fnction*************************************************************
Synopsis [Adds one object.]
Description []
SideEffects []
SeeAlso []
Definition at line 988 of file bblif.c.


| void Bbl_ManDumpBinaryBlif | ( | Bbl_Man_t * | p, |
| char * | pFileName ) |
Fnction*************************************************************
Synopsis [Writes data into file.]
Description []
SideEffects []
SeeAlso []
Definition at line 691 of file bblif.c.


| void Bbl_ManDumpBlif | ( | Bbl_Man_t * | p, |
| char * | pFileName ) |
Fnction*************************************************************
Synopsis [Drives text BLIF file for debugging.]
Description []
SideEffects []
SeeAlso []
Definition at line 1218 of file bblif.c.


| char * Bbl_ManFileRead | ( | char * | pFileName | ) |
Fnction*************************************************************
Synopsis [Read data from file.]
Description []
SideEffects []
SeeAlso []
Definition at line 664 of file bblif.c.


| int Bbl_ManFileSize | ( | char * | pFileName | ) |
Fnction*************************************************************
Synopsis [Returns the file size.]
Description [The file should be closed.]
SideEffects []
SeeAlso []
Definition at line 637 of file bblif.c.

| int Bbl_ManFncSize | ( | Bbl_Man_t * | p | ) |
| char * Bbl_ManName | ( | Bbl_Man_t * | p | ) |
Fnction*************************************************************
Synopsis [Returns the next object.]
Description []
SideEffects []
SeeAlso []
| void Bbl_ManPrintStats | ( | Bbl_Man_t * | p | ) |
Fnction*************************************************************
Synopsis [Prints stats of the manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 749 of file bblif.c.

| Bbl_Man_t * Bbl_ManReadBinaryBlif | ( | char * | pFileName | ) |
Fnction*************************************************************
Synopsis [Creates manager after reading.]
Description []
SideEffects []
SeeAlso []
Definition at line 712 of file bblif.c.


| int Bbl_ManSaveSop | ( | Bbl_Man_t * | p, |
| char * | pSop, | ||
| int | nVars ) |
Fnction*************************************************************
Synopsis [Saves one SOP.]
Description []
SideEffects []
SeeAlso []
Definition at line 954 of file bblif.c.


| void Bbl_ManSimpleDemo | ( | ) |
Fnction*************************************************************
Synopsis [This demo shows using the internal to construct a half-adder.]
Description [We construct the logic network for the half-adder represnted using the BLIF file below]
SideEffects []
SeeAlso []
Definition at line 1446 of file bblif.c.

| int Bbl_ManSopCheckUnique | ( | Bbl_Man_t * | p, |
| char * | pSop, | ||
| int | nVars, | ||
| int | nCubes, | ||
| int | iFunc ) |
Function*************************************************************
Synopsis [Sorts the cubes in the SOP to uniqify them to some extent.]
Description []
SideEffects []
SeeAlso []
Definition at line 921 of file bblif.c.


| unsigned * Bbl_ManSopToTruth | ( | char * | pSop, |
| int | nVars ) |
Fnction*************************************************************
Synopsis [Converting SOP into a truth table.]
Description [The SOP is represented as a C-string, as documented in file "bblif.h". The truth table is returned as a bit-string composed of 2^nVars bits. For functions of less than 6 variables, the full machine word is returned. (The truth table looks as if the function had 5 variables.) The use of this procedure should be limited to Boolean functions with no more than 16 inputs.]
SideEffects []
SeeAlso []
Definition at line 1362 of file bblif.c.


| void Bbl_ManSortCubes | ( | char ** | pCubes, |
| int | nCubes, | ||
| int | nVars ) |
Function*************************************************************
Synopsis [Performs selection sort on the array of cubes.]
Description []
SideEffects []
SeeAlso []
Definition at line 839 of file bblif.c.


| char * Bbl_ManSortSop | ( | char * | pSop, |
| int | nVars ) |
Function*************************************************************
Synopsis [Sorts the cubes in the SOP to uniqify them to some extent.]
Description []
SideEffects []
SeeAlso []
Definition at line 864 of file bblif.c.


| Bbl_Man_t * Bbl_ManStart | ( | char * | pName | ) |
MACRO DEFINITIONS ///.
Fnction*************************************************************
Synopsis [Creates manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 806 of file bblif.c.


| void Bbl_ManStop | ( | Bbl_Man_t * | p | ) |
Fnction*************************************************************
Synopsis [Deletes the manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 775 of file bblif.c.

| void Bbl_ManTestTruth | ( | char * | pSop, |
| int | nVars ) |
Fnction*************************************************************
Synopsis [Checks the truth table computation.]
Description [We construct the logic network for the half-adder represnted using the BLIF file below]
SideEffects []
SeeAlso []
Definition at line 1422 of file bblif.c.

| char * Bbl_ManTruthToSop | ( | unsigned * | pTruth, |
| int | nVars ) |
Fnction*************************************************************
Synopsis [Converting truth table into an SOP.]
Description [The truth table is given as a bit-string pTruth composed of 2^nVars bits. The result is an SOP derived by collecting minterms appearing in the truth table. The SOP is represented as a C-string, as documented in file "bblif.h". It is recommended to limit the use of this procedure to Boolean functions up to 6 inputs.]
SideEffects []
SeeAlso []
Definition at line 1273 of file bblif.c.

| int Bbl_ObjFaninNumber | ( | Bbl_Obj_t * | p | ) |
| int Bbl_ObjFncHandle | ( | Bbl_Obj_t * | p | ) |
| int Bbl_ObjId | ( | Bbl_Obj_t * | p | ) |
| int Bbl_ObjIsInput | ( | Bbl_Obj_t * | p | ) |
| int Bbl_ObjIsLut | ( | Bbl_Obj_t * | p | ) |
| int Bbl_ObjIsMarked | ( | Bbl_Obj_t * | p | ) |
| int Bbl_ObjIsOutput | ( | Bbl_Obj_t * | p | ) |
| void Bbl_ObjMark | ( | Bbl_Obj_t * | p | ) |
| char * Vec_StrFetch | ( | Vec_Str_t * | p, |
| int | nBytes ) |
| Vec_Str_t * Vec_StrRead | ( | char ** | ppStr | ) |