ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
simSymStr.c File Reference
#include "base/abc/abc.h"
#include "sim.h"
Include dependency graph for simSymStr.c:

Go to the source code of this file.

Macros

#define SIM_READ_SYMMS(pNode)
 DECLARATIONS ///.
 
#define SIM_SET_SYMMS(pNode, vVect)
 

Functions

void Sim_SymmsStructCompute (Abc_Ntk_t *pNtk, Vec_Ptr_t *vMatrs, Vec_Ptr_t *vSuppFun)
 FUNCTION DEFINITIONS ///.
 

Macro Definition Documentation

◆ SIM_READ_SYMMS

#define SIM_READ_SYMMS ( pNode)
Value:
((Vec_Int_t *)pNode->pCopy)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37

DECLARATIONS ///.

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

FileName [simSymStr.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Network and node package.]

Synopsis [Structural detection of symmetries.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id
simSymStr.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

]

Definition at line 31 of file simSymStr.c.

◆ SIM_SET_SYMMS

#define SIM_SET_SYMMS ( pNode,
vVect )
Value:
(pNode->pCopy = (Abc_Obj_t *)(vVect))
struct Abc_Obj_t_ Abc_Obj_t
Definition abc.h:116

Definition at line 32 of file simSymStr.c.

Function Documentation

◆ Sim_SymmsStructCompute()

void Sim_SymmsStructCompute ( Abc_Ntk_t * pNtk,
Vec_Ptr_t * vMatrs,
Vec_Ptr_t * vSuppFun )

FUNCTION DEFINITIONS ///.

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

Synopsis [Computes symmetries for a single output function.]

Description []

SideEffects []

SeeAlso []

Definition at line 61 of file simSymStr.c.

62{
63 Vec_Ptr_t * vNodes;
64 Abc_Obj_t * pTemp;
65 int * pMap, i;
66
67 assert( Abc_NtkCiNum(pNtk) + 10 < (1<<16) );
68
69 // get the structural support
70 pNtk->vSupps = Sim_ComputeStrSupp( pNtk );
71 // set elementary info for the CIs
72 Abc_NtkForEachCi( pNtk, pTemp, i )
73 SIM_SET_SYMMS( pTemp, Vec_IntAlloc(0) );
74 // create the map of CI ids into their numbers
75 pMap = Sim_SymmsCreateMap( pNtk );
76 // collect the nodes in the TFI cone of this output
77 vNodes = Abc_NtkDfs( pNtk, 0 );
78 Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pTemp, i )
79 {
80// if ( Abc_NodeIsConst(pTemp) )
81// continue;
82 Sim_SymmsStructComputeOne( pNtk, pTemp, pMap );
83 }
84 // collect the results for the COs;
85 Abc_NtkForEachCo( pNtk, pTemp, i )
86 {
87//printf( "Output %d:\n", i );
88 pTemp = Abc_ObjFanin0(pTemp);
89 if ( Abc_ObjIsCi(pTemp) || Abc_AigNodeIsConst(pTemp) )
90 continue;
91 Sim_SymmsTransferToMatrix( (Extra_BitMat_t *)Vec_PtrEntry(vMatrs, i), SIM_READ_SYMMS(pTemp), (unsigned *)Vec_PtrEntry(vSuppFun, i) );
92 }
93 // clean the intermediate results
94 Sim_UtilInfoFree( pNtk->vSupps );
95 pNtk->vSupps = NULL;
96 Abc_NtkForEachCi( pNtk, pTemp, i )
97 Vec_IntFree( SIM_READ_SYMMS(pTemp) );
98 Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pTemp, i )
99// if ( !Abc_NodeIsConst(pTemp) )
100 Vec_IntFree( SIM_READ_SYMMS(pTemp) );
101 Vec_PtrFree( vNodes );
102 ABC_FREE( pMap );
103}
#define Abc_NtkForEachCo(pNtk, pCo, i)
Definition abc.h:522
ABC_DLL Vec_Ptr_t * Abc_NtkDfs(Abc_Ntk_t *pNtk, int fCollectAll)
Definition abcDfs.c:82
#define Abc_NtkForEachCi(pNtk, pCi, i)
Definition abc.h:518
#define ABC_FREE(obj)
Definition abc_global.h:267
struct Extra_BitMat_t_ Extra_BitMat_t
Definition extra.h:81
#define SIM_SET_SYMMS(pNode, vVect)
Definition simSymStr.c:32
#define SIM_READ_SYMMS(pNode)
DECLARATIONS ///.
Definition simSymStr.c:31
void Sim_UtilInfoFree(Vec_Ptr_t *p)
Definition simUtils.c:84
Vec_Ptr_t * Sim_ComputeStrSupp(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition simSupp.c:57
Vec_Ptr_t * vSupps
Definition abc.h:197
#define assert(ex)
Definition util_old.h:213
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55
Here is the call graph for this function:
Here is the caller graph for this function: