-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathsites_v4.h
99 lines (90 loc) · 2.46 KB
/
sites_v4.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
* Copyright (C) 2006, 2007 Jean-Baptiste Note <[email protected]>
*
* This file is part of debit.
*
* Debit is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Debit is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with debit. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SITES_V4_H
#define _SITES_V4_H
typedef enum _switch_type {
SW_NONE = 0,
SW_INT, SW_CLB,
SW_IOB, SW_DSP48,
NR_SWITCH_TYPE,
} __attribute__((packed)) switch_type_t;
typedef enum _site_type {
SITE_TYPE_NEUTRAL = 0,
IOB, CLB, DSP48,
GCLKC, BRAM,
NR_SITE_TYPE,
} __attribute__((packed)) site_type_t;
/* XXX this will be duplicated wherever included */
static const switch_type_t sw_of_type_table[NR_SITE_TYPE] = {
[SITE_TYPE_NEUTRAL] = 0,
[CLB] = SW_INT,
[IOB] = SW_INT,
[DSP48] = SW_INT,
};
static inline
switch_type_t sw_of_type(const site_type_t site) {
return sw_of_type_table[site];
}
typedef enum _wire_direction {
WIRE_DIRECTION_NEUTRAL = 0,
N, WN, NW,
W, WS, SW,
S, SE, ES,
E, EN, NE,
DN, UP, // global clock
NR_WIRE_DIRECTION,
} __attribute__((packed)) wire_direction_t;
typedef enum _wire_situation {
WIRE_SITUATION_NEUTRAL = 0,
BEG, A, B, MID, C, D, END,
NR_WIRE_SITUATION,
} __attribute__((packed)) wire_situation_t;
typedef enum _wire_type {
WIRE_TYPE_NEUTRAL = 0,
DOUBLE, HEX,
OMUX,
BX, BY,
BX_PINWIRE, BY_PINWIRE,
CE, CIN,
CLK,
COUT,
DX, DY,
F1, F2, F3, F4,
F1_PINWIRE, F2_PINWIRE, F3_PINWIRE, F4_PINWIRE,
F5, FX, FXINA, FXINB,
G1, G2, G3, G4,
G1_PINWIRE, G2_PINWIRE, G3_PINWIRE, G4_PINWIRE,
GCLK,
// XXX might want to replace those 4 with one type + DIR
GCLKC_GCLKB, GCLKC_GCLKL, GCLKC_GCLKR, GCLKC_GCLKT,
GCLKH_GCLK_B,
GCLKH_GCLK, // with dir DN and UP
LH, LV,
SHIFTIN, SHIFTOUT, SR,
TBUF, TBUS,
TI, TOUT, TS,
VCC_PINWIRE,
WF1_PINWIRE, WF2_PINWIRE, WF3_PINWIRE, WF4_PINWIRE,
WG1_PINWIRE, WG2_PINWIRE, WG3_PINWIRE, WG4_PINWIRE,
X, XB, XQ,
Y, YB, YQ,
LOGIC,
NR_WIRE_TYPE,
} __attribute__((packed)) wire_type_t;
#endif /* _SITES_V4_H */