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

Go to the source code of this file.

Functions

Abc_Ntk_tAbc_NtkFpga (Abc_Ntk_t *pNtk, float DelayTarget, int fRecovery, int fSwitching, int fLatchPaths, int fVerbose)
 FUNCTION DEFINITIONS ///.
 

Function Documentation

◆ Abc_NtkFpga()

Abc_Ntk_t * Abc_NtkFpga ( Abc_Ntk_t * pNtk,
float DelayTarget,
int fRecovery,
int fSwitching,
int fLatchPaths,
int fVerbose )

FUNCTION DEFINITIONS ///.

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

Synopsis [Interface with the FPGA mapping package.]

Description []

SideEffects []

SeeAlso []

Definition at line 54 of file abcFpga.c.

55{
56 int fShowSwitching = 1;
57 Abc_Ntk_t * pNtkNew;
58 Fpga_Man_t * pMan;
59 Vec_Int_t * vSwitching = NULL;
60 float * pSwitching = NULL;
61 int Num;
62
63 assert( Abc_NtkIsStrash(pNtk) );
64
65 // print a warning about choice nodes
66 if ( (Num = Abc_NtkGetChoiceNum( pNtk )) )
67 Abc_Print( 0, "Performing LUT mapping with %d choices.\n", Num );
68
69 // compute switching activity
70 fShowSwitching |= fSwitching;
71 if ( fShowSwitching )
72 {
73 extern Vec_Int_t * Sim_NtkComputeSwitching( Abc_Ntk_t * pNtk, int nPatterns );
74 vSwitching = Sim_NtkComputeSwitching( pNtk, 4096 );
75 pSwitching = (float *)vSwitching->pArray;
76 }
77
78 // perform FPGA mapping
79 pMan = Abc_NtkToFpga( pNtk, fRecovery, pSwitching, fLatchPaths, fVerbose );
80 if ( pSwitching ) { assert(vSwitching); Vec_IntFree( vSwitching ); }
81 if ( pMan == NULL )
82 return NULL;
83 Fpga_ManSetSwitching( pMan, fSwitching );
84 Fpga_ManSetLatchPaths( pMan, fLatchPaths );
85 Fpga_ManSetLatchNum( pMan, Abc_NtkLatchNum(pNtk) );
86 Fpga_ManSetDelayTarget( pMan, DelayTarget );
87 if ( !Fpga_Mapping( pMan ) )
88 {
89 Fpga_ManFree( pMan );
90 return NULL;
91 }
92
93 // transform the result of mapping into a BDD network
94 pNtkNew = Abc_NtkFromFpga( pMan, pNtk );
95 if ( pNtkNew == NULL )
96 return NULL;
97 Fpga_ManFree( pMan );
98
99 // make the network minimum base
100 Abc_NtkMinimumBase( pNtkNew );
101
102 if ( pNtk->pExdc )
103 pNtkNew->pExdc = Abc_NtkDup( pNtk->pExdc );
104
105 // make sure that everything is okay
106 if ( !Abc_NtkCheck( pNtkNew ) )
107 {
108 printf( "Abc_NtkFpga: The network check has failed.\n" );
109 Abc_NtkDelete( pNtkNew );
110 return NULL;
111 }
112 return pNtkNew;
113}
ABC_DLL int Abc_NtkGetChoiceNum(Abc_Ntk_t *pNtk)
Definition abcUtil.c:463
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 int Abc_NtkMinimumBase(Abc_Ntk_t *pNtk)
DECLARATIONS ///.
Definition abcMinBase.c:892
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition abcNtk.c:1421
ABC_DLL Abc_Ntk_t * Abc_NtkDup(Abc_Ntk_t *pNtk)
Definition abcNtk.c:472
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
void Fpga_ManFree(Fpga_Man_t *pMan)
Definition fpgaCreate.c:217
struct Fpga_ManStruct_t_ Fpga_Man_t
STRUCTURE DEFINITIONS ///.
Definition fpga.h:43
void Fpga_ManSetDelayTarget(Fpga_Man_t *p, float DelayTarget)
Definition fpgaCreate.c:72
void Fpga_ManSetSwitching(Fpga_Man_t *p, int fSwitching)
Definition fpgaCreate.c:69
int Fpga_Mapping(Fpga_Man_t *p)
FUNCTION DEFINITIONS ///.
Definition fpgaCore.c:53
void Fpga_ManSetLatchPaths(Fpga_Man_t *p, int fLatchPaths)
Definition fpgaCreate.c:70
void Fpga_ManSetLatchNum(Fpga_Man_t *p, int nLatches)
Definition fpgaCreate.c:71
Vec_Int_t * Sim_NtkComputeSwitching(Abc_Ntk_t *pNtk, int nPatterns)
FUNCTION DEFINITIONS ///.
Definition simSwitch.c:52
Abc_Ntk_t * pExdc
Definition abc.h:201
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function: