/
cell.h
62 lines (45 loc) · 1.07 KB
/
cell.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
#ifndef __CELL_H__
#define __CELL_H__
#include "coord.h"
#include "blif.h"
typedef unsigned char block_t;
typedef unsigned char data_t;
enum pin_direction { INPUT, OUTPUT };
enum ordinal_direction { NORTH, EAST, SOUTH, WEST };
struct placed_pin {
struct coordinate coordinate;
struct logic_cell *cell;
struct logic_cell_pin *cell_pin;
net_t net;
int extracted;
};
struct logic_cell_pin {
char *name;
enum pin_direction direction;
enum ordinal_direction facing;
struct coordinate coordinate;
int level;
int clock; /* for DFFs */
};
typedef struct logic_cell_pin * struct_pin_p;
typedef block_t * block_t_p;
typedef data_t * data_t_p;
struct logic_cell {
char *name;
unsigned int n_pins;
struct_pin_p pins[4];
struct dimensions dimensions[4];
block_t_p blocks[4];
data_t_p data[4];
int delay_combinational;
struct cell_library *lib;
};
struct cell_library {
char *name;
char *fn;
unsigned int n_cells;
struct logic_cell *cells;
};
struct cell_library *read_cell_library(FILE *, char *);
void free_cell_library(struct cell_library *);
#endif /* __CELL_H__ */