abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
place_inc.c File Reference
#include <stdlib.h>
#include <limits.h>
#include <assert.h>
#include <string.h>
#include "place_base.h"
#include "place_gordian.h"

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START int sqHashId (int id, int max)
 
float fastEstimate (ConcreteCell *cell, int numNets, ConcreteNet *nets[])
 

Function Documentation

float fastEstimate ( ConcreteCell cell,
int  numNets,
ConcreteNet nets[] 
)

Definition at line 92 of file place_inc.c.

93  {
94  float len = 0;
95  int n;
96  Rect box;
97 
98  assert(cell);
99 
100  for(n=0; n<numNets; n++) {
101  box = getNetBBox(nets[n]);
102  if (cell->m_x < box.x) len += (box.x - cell->m_x);
103  if (cell->m_x > box.x+box.w) len += (cell->m_x-box.x-box.w);
104  if (cell->m_y < box.y) len += (box.x - cell->m_y);
105  if (cell->m_y > box.y+box.h) len += (cell->m_y-box.y-box.h);
106  }
107 
108  return len;
109 }
float h
Definition: place_base.h:36
float x
Definition: place_base.h:35
float y
Definition: place_base.h:35
int numNets
Definition: place_test.c:68
float w
Definition: place_base.h:36
Rect getNetBBox(const ConcreteNet *net)
Returns the bounding box of a net.
Definition: place_base.c:45
#define assert(ex)
Definition: util_old.h:213
ABC_NAMESPACE_IMPL_START int sqHashId ( int  id,
int  max 
)
inline

Definition at line 21 of file place_inc.c.

21  {
22  return ((id * (id+17)) % max);
23 }
static double max
Definition: cuddSubsetHB.c:134