/
placer.h
72 lines (53 loc) · 1.89 KB
/
placer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
#ifndef __PLACER_H__
#define __PLACER_H__
#include "blif.h"
#include "cell.h"
#define CONSTR_NONE 0
#define CONSTR_NO_ROTATE (1L << 0)
#define CONSTR_KEEP_LEFT (1L << 1)
#define CONSTR_KEEP_RIGHT (1L << 2)
#define CONSTR_MASK_NO_INTERCHANGE (CONSTR_KEEP_LEFT | CONSTR_KEEP_RIGHT)
struct pin_placements {
int n_pins;
struct placed_pin *pins;
};
struct placement {
struct logic_cell *cell;
struct coordinate placement;
unsigned long turns;
/* a mapping of net names to net_t and should be the same size as cell->n_pins */
net_t *nets;
/* bit-vector of constraints; default CONSTR_NONE */
unsigned long constraints;
/* margin in X and Z directions to other cells */
unsigned int margin;
};
struct cell_placements {
struct placement *placements;
unsigned long n_placements;
int n_nets;
};
struct net_pin_map {
int n_nets;
int *n_pins_for_net;
struct placed_pin **pins;
};
struct cell_placements *simulated_annealing_placement(struct cell_placements *,
struct dimensions *,
double,
unsigned int, unsigned int);
struct cell_placements *copy_placements(struct cell_placements *);
void placements_displace(struct cell_placements *, struct coordinate disp);
void placements_reconstrain(struct cell_placements *);
void free_cell_placements(struct cell_placements *);
struct cell_placements *placer_initial_place(struct blif *, struct cell_library *);
struct dimensions compute_placement_dimensions(struct cell_placements *);
void print_cell_placements(struct cell_placements *);
struct pin_placements *placer_place_pins(struct cell_placements *);
void free_pin_placements(struct pin_placements *);
struct net_pin_map *placer_create_net_pin_map(struct pin_placements *);
struct coordinate extend_pin(struct placed_pin *);
void free_net_pin_map(struct net_pin_map *);
struct extraction *extract_placements(struct cell_placements *);
void free_extraction(struct extraction *);
#endif /* __PLACER_H__ */