ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
abcPlace.c File Reference
Include dependency graph for abcPlace.c:

Go to the source code of this file.

Functions

float Abc_PlaceEvaluateCut (Abc_Obj_t *pRoot, Vec_Ptr_t *vFanins)
 
void Abc_PlaceUpdate (Vec_Ptr_t *vAddedCells, Vec_Ptr_t *vUpdatedNets)
 
void Abc_PlaceBegin (Abc_Ntk_t *pNtk)
 
void Abc_PlaceEnd (Abc_Ntk_t *pNtk)
 

Variables

ABC_NAMESPACE_IMPL_START AbstractCellabstractCells = NULL
 DECLARATIONS ///.
 
ConcreteCellcells = NULL
 
ConcreteNetnets = NULL
 
int nAllocSize = 0
 

Function Documentation

◆ Abc_PlaceBegin()

void Abc_PlaceBegin ( Abc_Ntk_t * pNtk)

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

Synopsis [This procedure is called before the writing start.]

Description []

SideEffects []

SeeAlso []

Definition at line 178 of file abcPlace.c.

179{
180 Abc_Obj_t * pObj;
181 int i;
182
183 // allocate and clean internal storage
184 nAllocSize = 5 * Abc_NtkObjNumMax(pNtk);
187 memset( cells, 0, sizeof(ConcreteCell) * nAllocSize );
188 memset( nets, 0, sizeof(ConcreteNet) * nAllocSize );
189
190 // create AbstractCells
191 // 1: pad
192 // 2: and
193 if (!abstractCells)
195
196 abstractCells[0].m_height = 1.0;
197 abstractCells[0].m_width = 1.0;
198 abstractCells[0].m_label = "pio";
199 abstractCells[0].m_pad = 1;
200
201 abstractCells[1].m_height = 1.0;
202 abstractCells[1].m_width = 1.0;
203 abstractCells[1].m_label = "and";
204 abstractCells[1].m_pad = 0;
205
206 // input pads
207 Abc_NtkForEachCi( pNtk, pObj, i )
208 Abc_PlaceCreateCell( pObj, 0 );
209
210 // ouput pads
211 Abc_NtkForEachCo( pNtk, pObj, i )
212 Abc_PlaceCreateCell( pObj, 0 );
213
214 // AND nodes
215 Abc_AigForEachAnd( pNtk, pObj, i )
216 Abc_PlaceCreateCell( pObj, 1 );
217
218 // all nets
219 Abc_NtkForEachObj( pNtk, pObj, i )
220 {
221 if ( !Abc_ObjIsCi(pObj) && !Abc_ObjIsNode(pObj) )
222 continue;
223 Abc_PlaceUpdateNet( pObj );
224 }
225
226 globalPreplace((float)0.8);
227 globalPlace();
228}
ABC_NAMESPACE_IMPL_START AbstractCell * abstractCells
DECLARATIONS ///.
Definition abcPlace.c:33
int nAllocSize
Definition abcPlace.c:36
ConcreteNet * nets
Definition abcPlace.c:35
ConcreteCell * cells
Definition abcPlace.c:34
struct Abc_Obj_t_ Abc_Obj_t
Definition abc.h:116
#define Abc_NtkForEachCo(pNtk, pCo, i)
Definition abc.h:522
#define Abc_AigForEachAnd(pNtk, pNode, i)
Definition abc.h:488
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
Definition abc.h:449
#define Abc_NtkForEachCi(pNtk, pCi, i)
Definition abc.h:518
#define ALLOC(type, num)
Definition avl.h:27
#define REALLOC(type, obj, num)
Definition avl.h:29
void globalPreplace(float utilization)
Place pad ring, leaving a core area to meet a desired utilization.
Definition place_pads.c:31
void globalPlace()
Performs analytic placement using a GORDIAN-like algorithm.
char * memset()
Here is the call graph for this function:

◆ Abc_PlaceEnd()

void Abc_PlaceEnd ( Abc_Ntk_t * pNtk)

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

Synopsis [This procedure is called after the writing completes.]

Description []

SideEffects []

SeeAlso []

Definition at line 241 of file abcPlace.c.

242{
243 int i;
244
245
246 // clean up
247 for ( i = 0; i < nAllocSize; i++ )
248 FREE( nets[i].m_terms );
250 FREE( cells );
251 FREE( nets );
252}
#define FREE(obj)
Definition avl.h:31

◆ Abc_PlaceEvaluateCut()

float Abc_PlaceEvaluateCut ( Abc_Obj_t * pRoot,
Vec_Ptr_t * vFanins )

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

Synopsis [Returns the placement cost of the cut.]

Description []

SideEffects []

SeeAlso []

Definition at line 103 of file abcPlace.c.

104{
105 Abc_Obj_t * pObj;
106// double x, y;
107 int i;
108 Vec_PtrForEachEntry( Abc_Obj_t *, vFanins, pObj, i )
109 {
110// pObj->Id
111 }
112 return 0.0;
113}
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55

◆ Abc_PlaceUpdate()

void Abc_PlaceUpdate ( Vec_Ptr_t * vAddedCells,
Vec_Ptr_t * vUpdatedNets )

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

Synopsis [Updates placement after one step of rewriting.]

Description []

SideEffects []

SeeAlso []

Definition at line 126 of file abcPlace.c.

127{
128 Abc_Obj_t * pObj, * pFanin;
129 int i, k;
130 Vec_Ptr_t * vCells, * vNets;
131
132 // start the arrays of new cells and nets
133 vCells = Vec_PtrAlloc( 16 );
134 vNets = Vec_PtrAlloc( 32 );
135
136 // go through the new nodes
137 Vec_PtrForEachEntry( Abc_Obj_t *, vAddedCells, pObj, i )
138 {
139 assert( !Abc_ObjIsComplement(pObj) );
140 Abc_PlaceCreateCell( pObj, 1 );
141 Abc_PlaceUpdateNet( pObj );
142
143 // add the new cell and its fanin nets to temporary storage
144 Vec_PtrPush( vCells, &(cells[pObj->Id]) );
145 Abc_ObjForEachFanin( pObj, pFanin, k )
146 Vec_PtrPushUnique( vNets, &(nets[pFanin->Id]) );
147 }
148
149 // go through the modified nets
150 Vec_PtrForEachEntry( Abc_Obj_t *, vUpdatedNets, pObj, i )
151 {
152 assert( !Abc_ObjIsComplement(pObj) );
153 if ( Abc_ObjType(pObj) == ABC_OBJ_NONE ) // dead node
154 continue;
155 Abc_PlaceUpdateNet( pObj );
156 }
157
158 // update the placement
159// fastPlace( Vec_PtrSize(vCells), (ConcreteCell **)Vec_PtrArray(vCells),
160// Vec_PtrSize(vNets), (ConcreteNet **)Vec_PtrArray(vNets) );
161
162 // clean up
163 Vec_PtrFree( vCells );
164 Vec_PtrFree( vNets );
165}
#define Abc_ObjForEachFanin(pObj, pFanin, i)
Definition abc.h:527
@ ABC_OBJ_NONE
Definition abc.h:87
int Id
Definition abc.h:132
#define assert(ex)
Definition util_old.h:213
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42

Variable Documentation

◆ abstractCells

ABC_NAMESPACE_IMPL_START AbstractCell* abstractCells = NULL

DECLARATIONS ///.

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

FileName [abcPlace.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Network and node package.]

Synopsis [Interface with a placer.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

]

Definition at line 33 of file abcPlace.c.

◆ cells

ConcreteCell* cells = NULL

Definition at line 34 of file abcPlace.c.

◆ nAllocSize

int nAllocSize = 0

Definition at line 36 of file abcPlace.c.

◆ nets

ConcreteNet* nets = NULL

Definition at line 35 of file abcPlace.c.