place_gordian.h 1.92 KB
Newer Older
Alan Mishchenko committed
1 2 3 4 5 6 7 8 9 10
/*===================================================================*/
//  
//     place_gordian.h
//
//        Aaron P. Hurst, 2003-2007
//              ahurst@eecs.berkeley.edu
//
/*===================================================================*/

#if !defined(PLACE_GORDIAN_H_)
11
#define ABC__phys__place__place_gordian_h
Alan Mishchenko committed
12

13

Alan Mishchenko committed
14 15 16
#include "place_base.h"
#include "place_qpsolver.h"

17 18 19
ABC_NAMESPACE_HEADER_START


Alan Mishchenko committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
// Parameters for analytic placement
#define CLIQUE_PENALTY 1.0
#define IGNORE_NETSIZE 20

// Parameters for partitioning
#define LARGEST_FINAL_SIZE 20
#define PARTITION_AREA_ONLY true
#define REALLOCATE_PARTITIONS false
#define FINAL_REALLOCATE_PARTITIONS false
#define IGNORE_COG false
#define MAX_PARTITION_NONSYMMETRY 0.30

// Parameters for re-partitioning
#define REPARTITION_LEVEL_DEPTH 4
#define REPARTITION_TARGET_FRACTION 0.15
#define REPARTITION_FM false
#define REPARTITION_HMETIS true

// Parameters for F-M re-partitioning
#define FM_MAX_BIN 10
#define FM_MAX_PASSES 10

extern int g_place_numPartitions;

extern qps_problem_t *g_place_qpProb;

typedef struct Partition {

  int               m_numMembers;
  ConcreteCell    **m_members;
  Rect              m_bounds;
  bool              m_done, 
                    m_leaf, 
                    m_vertical;
  float             m_area;
  int               m_level;
  struct Partition *m_sub1, *m_sub2;
} Partition;

extern Partition *g_place_rootPartition;

void initPartitioning();

void incrementalPartition();

bool refinePartitions();
void reallocPartitions();
bool refinePartition(Partition *p);
void resizePartition(Partition *p);
void reallocPartition(Partition *p);

void repartitionHMetis(Partition *parent);
void repartitionFM(Partition *parent);

void partitionScanlineMincut(Partition *parent);
void partitionEqualArea(Partition *parent);

void sanitizePlacement();

void constructQuadraticProblem();
void solveQuadraticProblem(bool useCOG);

82 83 84 85


ABC_NAMESPACE_HEADER_END

Alan Mishchenko committed
86
#endif