ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
place_qpsolver.h
Go to the documentation of this file.
1/*===================================================================*/
2//
3// place_qpsolver.h
4//
5// Philip Chong
6// pchong@cadence.com
7//
8/*===================================================================*/
9
10#if !defined(_QPS_H)
11#define ABC__phys__place__place_qpsolver_h
12
13
14#include <stdio.h>
15
17
18
19 typedef float qps_float_t;
20
21 typedef struct qps_problem {
22
23 /* Basic stuff */
24 int num_cells; /* Total number of cells (both fixed and
25 floating) to be placed. */
26 int *connect; /* Connectivity array. Must contain at least
27 num_cells elements with value -1. The
28 entries which precede the first element
29 with value -1 are the indices of the cells
30 which connect to cell 0; the entries
31 which lie between the first and second
32 elements with value -1 are the indices of
33 the cells which connect to cell 1; etc.
34 Example: cells 0 and 1 are connected
35 together, and 1 and 2 are connected as
36 well. *connect = { 1, -1, 0, 2, -1, 1, -1
37 }. */
38 qps_float_t *edge_weight; /* Same structure as connectivity array, but
39 giving the weights assigned to each edge
40 instead. */
41 qps_float_t *x; /* num_cells element array which contains the
42 x-coordinates of the cells. This is used
43 for the initial values in the iterative
44 solution of floating cells, and for the
45 fixed location of fixed cells. */
46 qps_float_t *y; /* num_cells element array of
47 y-coordinates. */
48 int *fixed; /* num_cells element array with value 1 if
49 corresponding cell is fixed, 0 if
50 floating. */
51 qps_float_t f; /* return value for sum-of-square
52 wirelengths. */
53
54 /* COG stuff */
55 int cog_num; /* Number of COG constraints. */
56 int *cog_list; /* Array indicating for each COG constraint
57 which cells belong to that constraint.
58 Format is similar to c array: there must
59 be at least cog_num elements with value
60 -1. The entries of cog_list preceding the
61 first -1 element are the indices of the
62 cells which belong to the first COG
63 constraint; etc. Example: cells 0 and 1
64 belong to one COG constraint, cells 4 and
65 5 belong to another. *cog_list= { 0, 1,
66 -1, 4, 5, -1 }. */
67 qps_float_t *cog_x; /* cog_num element array whose values are the
68 x-coordinates for the corresponding COG
69 constraints. */
70 qps_float_t *cog_y; /* cog_num element array whose values are the
71 y-coordinates for the corresponding COG
72 constraints. */
73 qps_float_t *area; /* num_cells element array whose values are
74 the areas for the corresponding cells;
75 only useful with COG constraints. */
76
77 /* Loop constraint stuff */
78 int loop_num; /* Number of loop constraints. */
79 int *loop_list; /* Array with list of cells for each loop
80 constraint. Format is similar to cog_list.
81 */
82 qps_float_t *loop_max; /* loop_num element array indicating maximum
83 distance for each loop. */
84 qps_float_t *loop_penalty; /* loop_num element array indicating penalty
85 for each loop. */
86 int loop_k; /* Current iteration for loop optimization. */
87 int loop_done; /* Done flag for loop optimization. */
89
90 /* max_x/max_y stuff */
91 qps_float_t max_x; /* max x location; only used in
92 constrained optimization. */
93 qps_float_t max_y; /* max y location; only used in
94 constrained optimization. */
95 int max_enable; /* Set to 1 after qps_init() to enable
96 max_x/max_y. */
97 int max_done; /* Done flag for max optimization. */
98
99 /* Private stuff */
122 FILE *priv_fp;
123
125
126 /* call qps_init() as soon as the qps_problem_t has been set up */
127 /* this initializes some private data structures */
128 extern void qps_init(qps_problem_t *);
129
130 /* call qps_solve() to solve the given qp problem */
131 extern void qps_solve(qps_problem_t *);
132
133 /* call qps_clean() when finished with the qps_problem_t */
134 /* this discards the private data structures assigned by qps_init() */
135 extern void qps_clean(qps_problem_t *);
136
138
139#endif /* _QPS_H */
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
struct qps_problem qps_problem_t
ABC_NAMESPACE_HEADER_START typedef float qps_float_t
void qps_solve(qps_problem_t *)
void qps_init(qps_problem_t *)
void qps_clean(qps_problem_t *)
qps_float_t * area
qps_float_t * priv_tp2
qps_float_t priv_f
qps_float_t * priv_h
qps_float_t * edge_weight
qps_float_t * cog_y
qps_float_t priv_fopt
qps_float_t max_y
qps_float_t * priv_pcg
qps_float_t * priv_pcgt
qps_float_t * priv_myh
qps_float_t * x
qps_float_t * cog_x
qps_float_t max_x
qps_float_t * loop_max
qps_float_t * priv_tp
qps_float_t * priv_mxh
qps_float_t * loop_penalty
qps_float_t priv_fprev
qps_float_t * y
qps_float_t * priv_cw
qps_float_t * priv_gw
qps_float_t f
qps_float_t * priv_ct
qps_float_t * priv_xi
qps_float_t * priv_g
qps_float_t * priv_myl
qps_float_t * priv_mxl
qps_float_t * priv_cp
qps_float_t * priv_lt
qps_float_t priv_eps
qps_float_t * priv_gm
qps_float_t priv_fmax