ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
mvcApi.c File Reference
#include "mvc.h"
Include dependency graph for mvcApi.c:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START int Mvc_CoverReadWordNum (Mvc_Cover_t *pCover)
 DECLARATIONS ///.
 
int Mvc_CoverReadBitNum (Mvc_Cover_t *pCover)
 
int Mvc_CoverReadCubeNum (Mvc_Cover_t *pCover)
 
Mvc_Cube_tMvc_CoverReadCubeHead (Mvc_Cover_t *pCover)
 
Mvc_Cube_tMvc_CoverReadCubeTail (Mvc_Cover_t *pCover)
 
Mvc_List_tMvc_CoverReadCubeList (Mvc_Cover_t *pCover)
 
int Mvc_ListReadCubeNum (Mvc_List_t *pList)
 
Mvc_Cube_tMvc_ListReadCubeHead (Mvc_List_t *pList)
 
Mvc_Cube_tMvc_ListReadCubeTail (Mvc_List_t *pList)
 
void Mvc_CoverSetCubeNum (Mvc_Cover_t *pCover, int nItems)
 
void Mvc_CoverSetCubeHead (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CoverSetCubeTail (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CoverSetCubeList (Mvc_Cover_t *pCover, Mvc_List_t *pList)
 
int Mvc_CoverIsEmpty (Mvc_Cover_t *pCover)
 
int Mvc_CoverIsTautology (Mvc_Cover_t *pCover)
 
int Mvc_CoverIsBinaryBuffer (Mvc_Cover_t *pCover)
 
void Mvc_CoverMakeEmpty (Mvc_Cover_t *pCover)
 
void Mvc_CoverMakeTautology (Mvc_Cover_t *pCover)
 
Mvc_Cover_tMvc_CoverCreateEmpty (Mvc_Cover_t *pCover)
 
Mvc_Cover_tMvc_CoverCreateTautology (Mvc_Cover_t *pCover)
 

Function Documentation

◆ Mvc_CoverCreateEmpty()

Mvc_Cover_t * Mvc_CoverCreateEmpty ( Mvc_Cover_t * pCover)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 202 of file mvcApi.c.

203{
204 Mvc_Cover_t * pCoverNew;
205 pCoverNew = Mvc_CoverAlloc( pCover->pMem, pCover->nBits );
206 return pCoverNew;
207}
Mvc_Cover_t * Mvc_CoverAlloc(Mvc_Manager_t *pMem, int nBits)
DECLARATIONS ///.
Definition mvcCover.c:43
struct MvcCoverStruct Mvc_Cover_t
Definition mvc.h:58
int nBits
Definition mvc.h:87
Mvc_Manager_t * pMem
Definition mvc.h:93
Here is the call graph for this function:

◆ Mvc_CoverCreateTautology()

Mvc_Cover_t * Mvc_CoverCreateTautology ( Mvc_Cover_t * pCover)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 220 of file mvcApi.c.

221{
222 Mvc_Cube_t * pCubeNew;
223 Mvc_Cover_t * pCoverNew;
224 pCoverNew = Mvc_CoverAlloc( pCover->pMem, pCover->nBits );
225 pCubeNew = Mvc_CubeAlloc( pCoverNew );
226 Mvc_CubeBitFill( pCubeNew );
227 Mvc_CoverAddCubeTail( pCoverNew, pCubeNew );
228 return pCoverNew;
229}
#define Mvc_CoverAddCubeTail(pCover, pCube)
Definition mvc.h:501
struct MvcCubeStruct Mvc_Cube_t
Definition mvc.h:56
#define Mvc_CubeBitFill(Cube)
Definition mvc.h:385
Mvc_Cube_t * Mvc_CubeAlloc(Mvc_Cover_t *pCover)
DECLARATIONS ///.
Definition mvcCube.c:43
Here is the call graph for this function:

◆ Mvc_CoverIsBinaryBuffer()

int Mvc_CoverIsBinaryBuffer ( Mvc_Cover_t * pCover)

Function*************************************************************

Synopsis [Returns 1 if the cover is a binary buffer.]

Description []

SideEffects []

SeeAlso []

Definition at line 135 of file mvcApi.c.

136{
137 Mvc_Cube_t * pCube;
138 if ( pCover->nBits != 2 )
139 return 0;
140 if ( Mvc_CoverReadCubeNum(pCover) != 1 )
141 return 0;
142 pCube = pCover->lCubes.pHead;
143 if ( Mvc_CubeBitValue(pCube, 0) == 0 && Mvc_CubeBitValue(pCube, 1) == 1 )
144 return 1;
145 return 0;
146}
int Mvc_CoverReadCubeNum(Mvc_Cover_t *pCover)
Definition mvcApi.c:45
#define Mvc_CubeBitValue(Cube, Bit)
Definition mvc.h:138
Mvc_List_t lCubes
Definition mvc.h:88
Mvc_Cube_t * pHead
Definition mvc.h:77
Here is the call graph for this function:

◆ Mvc_CoverIsEmpty()

int Mvc_CoverIsEmpty ( Mvc_Cover_t * pCover)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 93 of file mvcApi.c.

94{
95 return Mvc_CoverReadCubeNum(pCover) == 0;
96}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverIsTautology()

int Mvc_CoverIsTautology ( Mvc_Cover_t * pCover)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 109 of file mvcApi.c.

110{
111 Mvc_Cube_t * pCube;
112 int iBit, Value;
113
114 if ( Mvc_CoverReadCubeNum(pCover) != 1 )
115 return 0;
116
117 pCube = Mvc_CoverReadCubeHead( pCover );
118 Mvc_CubeForEachBit( pCover, pCube, iBit, Value )
119 if ( Value == 0 )
120 return 0;
121 return 1;
122}
Mvc_Cube_t * Mvc_CoverReadCubeHead(Mvc_Cover_t *pCover)
Definition mvcApi.c:46
#define Mvc_CubeForEachBit(Cover, Cube, iBit, Value)
Definition mvc.h:553
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverMakeEmpty()

void Mvc_CoverMakeEmpty ( Mvc_Cover_t * pCover)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 160 of file mvcApi.c.

161{
162 Mvc_Cube_t * pCube, * pCube2;
163 Mvc_CoverForEachCubeSafe( pCover, pCube, pCube2 )
164 Mvc_CubeFree( pCover, pCube );
165 pCover->lCubes.nItems = 0;
166 pCover->lCubes.pHead = NULL;
167 pCover->lCubes.pTail = NULL;
168}
void Mvc_CubeFree(Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
Definition mvcCube.c:114
#define Mvc_CoverForEachCubeSafe(Cover, Cube, Cube2)
Definition mvc.h:536
Mvc_Cube_t * pTail
Definition mvc.h:78
int nItems
Definition mvc.h:79
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mvc_CoverMakeTautology()

void Mvc_CoverMakeTautology ( Mvc_Cover_t * pCover)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 181 of file mvcApi.c.

182{
183 Mvc_Cube_t * pCubeNew;
184 Mvc_CoverMakeEmpty( pCover );
185 pCubeNew = Mvc_CubeAlloc( pCover );
186 Mvc_CubeBitFill( pCubeNew );
187 Mvc_CoverAddCubeTail( pCover, pCubeNew );
188}
void Mvc_CoverMakeEmpty(Mvc_Cover_t *pCover)
Definition mvcApi.c:160
Here is the call graph for this function:

◆ Mvc_CoverReadBitNum()

int Mvc_CoverReadBitNum ( Mvc_Cover_t * pCover)

Definition at line 44 of file mvcApi.c.

44{ return pCover->nBits; }

◆ Mvc_CoverReadCubeHead()

Mvc_Cube_t * Mvc_CoverReadCubeHead ( Mvc_Cover_t * pCover)

Definition at line 46 of file mvcApi.c.

46{ return pCover->lCubes.pHead; }
Here is the caller graph for this function:

◆ Mvc_CoverReadCubeList()

Mvc_List_t * Mvc_CoverReadCubeList ( Mvc_Cover_t * pCover)

Definition at line 48 of file mvcApi.c.

48{ return &pCover->lCubes; }

◆ Mvc_CoverReadCubeNum()

int Mvc_CoverReadCubeNum ( Mvc_Cover_t * pCover)

Definition at line 45 of file mvcApi.c.

45{ return pCover->lCubes.nItems; }
Here is the caller graph for this function:

◆ Mvc_CoverReadCubeTail()

Mvc_Cube_t * Mvc_CoverReadCubeTail ( Mvc_Cover_t * pCover)

Definition at line 47 of file mvcApi.c.

47{ return pCover->lCubes.pTail; }
Here is the caller graph for this function:

◆ Mvc_CoverReadWordNum()

ABC_NAMESPACE_IMPL_START int Mvc_CoverReadWordNum ( Mvc_Cover_t * pCover)

DECLARATIONS ///.

FUNCTION DEFINITIONS ///.

CFile****************************************************************

FileName [mvcApi.c]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis []

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id
mvcApi.c,v 1.4 2003/04/03 06:31:48 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 43 of file mvcApi.c.

43{ return pCover->nWords; }
int nWords
Definition mvc.h:85

◆ Mvc_CoverSetCubeHead()

void Mvc_CoverSetCubeHead ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )

Definition at line 78 of file mvcApi.c.

78{ pCover->lCubes.pHead = pCube; }
Here is the caller graph for this function:

◆ Mvc_CoverSetCubeList()

void Mvc_CoverSetCubeList ( Mvc_Cover_t * pCover,
Mvc_List_t * pList )

Definition at line 80 of file mvcApi.c.

80{ pCover->lCubes = *pList; }

◆ Mvc_CoverSetCubeNum()

void Mvc_CoverSetCubeNum ( Mvc_Cover_t * pCover,
int nItems )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 77 of file mvcApi.c.

77{ pCover->lCubes.nItems = nItems; }

◆ Mvc_CoverSetCubeTail()

void Mvc_CoverSetCubeTail ( Mvc_Cover_t * pCover,
Mvc_Cube_t * pCube )

Definition at line 79 of file mvcApi.c.

79{ pCover->lCubes.pTail = pCube; }
Here is the caller graph for this function:

◆ Mvc_ListReadCubeHead()

Mvc_Cube_t * Mvc_ListReadCubeHead ( Mvc_List_t * pList)

Definition at line 63 of file mvcApi.c.

63{ return pList->pHead; }

◆ Mvc_ListReadCubeNum()

int Mvc_ListReadCubeNum ( Mvc_List_t * pList)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 62 of file mvcApi.c.

62{ return pList->nItems; }

◆ Mvc_ListReadCubeTail()

Mvc_Cube_t * Mvc_ListReadCubeTail ( Mvc_List_t * pList)

Definition at line 64 of file mvcApi.c.

64{ return pList->pTail; }