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

Go to the source code of this file.

Functions

void Abc_NtkFindCiOrder (Abc_Ntk_t *pNtk, int fReverse, int fVerbose)
 FUNCTION DEFINITIONS ///.
 
void Abc_NtkImplementCiOrder (Abc_Ntk_t *pNtk, char *pFileName, int fReverse, int fVerbose)
 

Function Documentation

◆ Abc_NtkFindCiOrder()

void Abc_NtkFindCiOrder ( Abc_Ntk_t * pNtk,
int fReverse,
int fVerbose )

FUNCTION DEFINITIONS ///.

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

Synopsis [Changes the order of primary inputs.]

Description []

SideEffects []

SeeAlso []

Definition at line 47 of file abcOrder.c.

48{
49 Vec_Ptr_t * vSupp;
50 vSupp = Abc_NtkSupport( pNtk );
51 Abc_NtkChangeCiOrder( pNtk, vSupp, fReverse );
52 Vec_PtrFree( vSupp );
53}
ABC_DLL Vec_Ptr_t * Abc_NtkSupport(Abc_Ntk_t *pNtk)
Definition abcDfs.c:859
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
Here is the call graph for this function:

◆ Abc_NtkImplementCiOrder()

void Abc_NtkImplementCiOrder ( Abc_Ntk_t * pNtk,
char * pFileName,
int fReverse,
int fVerbose )

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

Synopsis [Implements the given variable order.]

Description []

SideEffects []

SeeAlso []

Definition at line 66 of file abcOrder.c.

67{
68 char Buffer[1000];
69 FILE * pFile;
70 Vec_Ptr_t * vSupp;
71 Abc_Obj_t * pObj;
72 pFile = fopen( pFileName, "r" );
73 vSupp = Vec_PtrAlloc( Abc_NtkCiNum(pNtk) );
74 while ( fscanf( pFile, "%s", Buffer ) == 1 )
75 {
76 pObj = Abc_NtkFindCi( pNtk, Buffer );
77 if ( pObj == NULL || !Abc_ObjIsCi(pObj) )
78 {
79 printf( "Name \"%s\" is not a PI name. Cannot use this order.\n", Buffer );
80 Vec_PtrFree( vSupp );
81 fclose( pFile );
82 return;
83 }
84 Vec_PtrPush( vSupp, pObj );
85 }
86 fclose( pFile );
87 if ( Vec_PtrSize(vSupp) != Abc_NtkCiNum(pNtk) )
88 {
89 printf( "The number of names in the order (%d) is not the same as the number of PIs (%d).\n", Vec_PtrSize(vSupp), Abc_NtkCiNum(pNtk) );
90 Vec_PtrFree( vSupp );
91 return;
92 }
93 Abc_NtkChangeCiOrder( pNtk, vSupp, fReverse );
94 Vec_PtrFree( vSupp );
95}
struct Abc_Obj_t_ Abc_Obj_t
Definition abc.h:116
ABC_DLL Abc_Obj_t * Abc_NtkFindCi(Abc_Ntk_t *pNtk, char *pName)
Definition abcObj.c:538
Here is the call graph for this function: