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

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START Ivy_Man_tAbc_NtkIvyBefore (Abc_Ntk_t *pNtk, int fSeq, int fUseDc)
 DECLARATIONS ///.
 
Abc_Ntk_tAbc_NtkFpgaFast (Abc_Ntk_t *pNtk, int nLutSize, int fRecovery, int fVerbose)
 FUNCTION DEFINITIONS ///.
 

Function Documentation

◆ Abc_NtkFpgaFast()

Abc_Ntk_t * Abc_NtkFpgaFast ( Abc_Ntk_t * pNtk,
int nLutSize,
int fRecovery,
int fVerbose )

FUNCTION DEFINITIONS ///.

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

Synopsis [Performs fast FPGA mapping of the network.]

Description [Takes the AIG to be mapped, the LUT size, and verbosity flag. Produces the new network by fast FPGA mapping of the current network. If the current network in ABC in not an AIG, the user should run command "strash" to make sure that the current network into an AIG before calling this procedure.]

SideEffects []

SeeAlso []

Definition at line 58 of file abcFpgaFast.c.

59{
60 Ivy_Man_t * pMan;
61 Abc_Ntk_t * pNtkNew;
62 // make sure the network is an AIG
63 assert( Abc_NtkIsStrash(pNtk) );
64 // convert the network into the AIG
65 pMan = Abc_NtkIvyBefore( pNtk, 0, 0 );
66 // perform fast FPGA mapping
67 Ivy_FastMapPerform( pMan, nLutSize, fRecovery, fVerbose );
68 // convert back into the ABC network
69 pNtkNew = Ivy_ManFpgaToAbc( pNtk, pMan );
70 Ivy_FastMapStop( pMan );
71 Ivy_ManStop( pMan );
72 // make sure that the final network passes the test
73 if ( pNtkNew != NULL && !Abc_NtkCheck( pNtkNew ) )
74 {
75 printf( "Abc_NtkFastMap: The network check has failed.\n" );
76 Abc_NtkDelete( pNtkNew );
77 return NULL;
78 }
79 return pNtkNew;
80}
ABC_NAMESPACE_IMPL_START Ivy_Man_t * Abc_NtkIvyBefore(Abc_Ntk_t *pNtk, int fSeq, int fUseDc)
DECLARATIONS ///.
Definition abcIvy.c:88
ABC_DLL int Abc_NtkCheck(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition abcCheck.c:64
struct Abc_Ntk_t_ Abc_Ntk_t
Definition abc.h:115
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition abcNtk.c:1421
typedefABC_NAMESPACE_HEADER_START struct Ivy_Man_t_ Ivy_Man_t
INCLUDES ///.
Definition ivy.h:46
void Ivy_FastMapStop(Ivy_Man_t *pAig)
Definition ivyFastMap.c:194
void Ivy_ManStop(Ivy_Man_t *p)
Definition ivyMan.c:238
void Ivy_FastMapPerform(Ivy_Man_t *pAig, int nLimit, int fRecovery, int fVerbose)
FUNCTION DEFINITIONS ///.
Definition ivyFastMap.c:105
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:

◆ Abc_NtkIvyBefore()

ABC_NAMESPACE_IMPL_START Ivy_Man_t * Abc_NtkIvyBefore ( Abc_Ntk_t * pNtk,
int fSeq,
int fUseDc )
extern

DECLARATIONS ///.

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

FileName [abcFpgaFast.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Network and node package.]

Synopsis [Fast FPGA mapper.]

Author [Sungmin Cho]

Affiliation [UC Berkeley]

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

Revision [

Id
abcFpgaFast.c,v 1.00 2006/09/02 00:00:00 alanmi Exp

]

DECLARATIONS ///.

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

Synopsis [Prepares the IVY package.]

Description []

SideEffects []

SeeAlso []

Definition at line 88 of file abcIvy.c.

89{
90 Ivy_Man_t * pMan;
91//timeRetime = Abc_Clock();
92 assert( !Abc_NtkIsNetlist(pNtk) );
93 if ( Abc_NtkIsBddLogic(pNtk) )
94 {
95 if ( !Abc_NtkBddToSop(pNtk, -1, ABC_INFINITY, 1) )
96 {
97 printf( "Abc_NtkIvyBefore(): Converting to SOPs has failed.\n" );
98 return NULL;
99 }
100 }
101 if ( fSeq && Abc_NtkCountSelfFeedLatches(pNtk) )
102 {
103 printf( "Warning: The network has %d self-feeding latches.\n", Abc_NtkCountSelfFeedLatches(pNtk) );
104// return NULL;
105 }
106 // print warning about choice nodes
107 if ( Abc_NtkGetChoiceNum( pNtk ) )
108 printf( "Warning: The choice nodes in the initial AIG are removed by strashing.\n" );
109 // convert to the AIG manager
110 pMan = Abc_NtkToIvy( pNtk );
111 if ( !Ivy_ManCheck( pMan ) )
112 {
113 printf( "AIG check has failed.\n" );
114 Ivy_ManStop( pMan );
115 return NULL;
116 }
117// Ivy_ManPrintStats( pMan );
118 if ( fSeq )
119 {
120 int nLatches = Abc_NtkLatchNum(pNtk);
121 Vec_Int_t * vInit = Abc_NtkCollectLatchValuesIvy( pNtk, fUseDc );
122 Ivy_ManMakeSeq( pMan, nLatches, vInit->pArray );
123 Vec_IntFree( vInit );
124// Ivy_ManPrintStats( pMan );
125 }
126//timeRetime = Abc_Clock() - timeRetime;
127 return pMan;
128}
ABC_DLL int Abc_NtkCountSelfFeedLatches(Abc_Ntk_t *pNtk)
Definition abcLatch.c:92
ABC_DLL int Abc_NtkGetChoiceNum(Abc_Ntk_t *pNtk)
Definition abcUtil.c:463
ABC_DLL int Abc_NtkBddToSop(Abc_Ntk_t *pNtk, int fMode, int nCubeLimit, int fCubeSort)
Definition abcFunc.c:866
#define ABC_INFINITY
MACRO DEFINITIONS ///.
Definition abc_global.h:250
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
int Ivy_ManCheck(Ivy_Man_t *p)
DECLARATIONS ///.
Definition ivyCheck.c:45
void Ivy_ManMakeSeq(Ivy_Man_t *p, int nLatches, int *pInits)
Definition ivyMan.c:482
Here is the caller graph for this function: