-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.conf
197 lines (188 loc) · 6.06 KB
/
BUILD.conf
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# -*- python -*- vim:syntax=python:
plugin_path('tools/site_cobble', 'vnd/cobble/src/cobble/target')
install('bluespec')
install('bsv_fpga_version')
install('rdl')
install('c')
install('nextpnr')
install('shell')
install('yosys')
environment('default', contents = {
'bsc': VARS.get('bluespec', 'bin', default='bsc'),
'bsc_flags': [
'-q',
'-show-range-conflict',
],
'bluescan': ROOT + '/tools/site_cobble/bluescan.py',
'bluescan_flags': [
'--bs-prefix ' + VARS.get('bluespec', 'prefix', default='/usr/local/bluespec')
],
'yosys': VARS.get('yosys', 'bin', default='yosys'),
# Suppress warnings about translate_off and parallel_case since these
# are regularly found in BSC generated code. Additionally, suppress warning
# about limited tri-state support as it is supported for our devices.
'yosys_flags': [
'-w', 'translate_off',
'-w', 'parallel_case',
'-w', '"Yosys has only limited support for tri-state logic at the moment."',
],
'cxx': VARS.get('c', 'cxx', default='c++'),
'cxx_flags': [
'-std=c++17',
'-Wall',
'-Wextra',
'-Werror',
'-I' + ROOT,
],
'c_link_flags': [
],
'ar': VARS.get('c', 'ar', default='ar'),
'gen_git_version_bsv': ROOT + '/tools/site_cobble/gen_git_version_bsv.py',
'rdl_script': ROOT + '/tools/site_cobble/rdl_pkg/rdl_cli.py',
})
environment('bluesim_default', base = 'default', contents = {
'bsc_flags': [
'-check-assert',
# Suppress C++ compiler warnings in Bluesim generated code.
'-Xc++', '-Wno-dangling-else',
'-Xc++', '-Wno-bool-operation',
],
})
environment('bluesim_debug', base = 'bluesim_default', contents = {
'bsc_flags': [
'-keep-fires',
],
})
environment('cxxrtl_default', base = 'default', contents = {
'yosys_cmds': [
'hierarchy -top $$top_module',
],
'yosys_backend': 'cxxrtl -header',
'cxx_flags': [
'-Wno-array-bounds',
'-Wno-shift-count-overflow',
],
})
# FPGA Family environments.
environment('ecp5', base = 'default', contents = {
# Default synthesis commands for ECP5.
'yosys_cmds': [
'synth_ecp5 -top $$top_module',
],
'yosys_backend': 'json', # nextpnr assumes JSON input.
'nextpnr_ecp5': VARS.get('nextpnr', 'ecp5', default='nextpnr-ecp5'),
'nextpnr_ecp5_flags': [
'-q',
],
'nextpnr_ecp5_pack': VARS.get('nextpnr', 'ecp5_pack', default='ecppack'),
})
environment('ice40', base = 'default', contents = {
'yosys_cmds': [
'synth_ice40 -top $$top_module',
],
'yosys_backend': 'json', # nextpnr assumes JSON input.
'nextpnr_ice40': VARS.get('nextpnr', 'ice40', default='nextpnr-ice40'),
'nextpnr_ice40_flags': [
'-q',
],
'nextpnr_ice40_pack': VARS.get('nextpnr', 'ice40_pack', default='icepack'),
})
# Board environments/variants.
environment('ecp5_evn', base = 'ecp5', contents = {
'nextpnr_ecp5_flags': [
'--um5g-85k',
'--package CABGA381',
],
'nextpnr_constraints': ROOT + '/hdl/projects/ecp5_evn/ecp5_evn_basic.lpf',
})
environment('ulx3s', base = 'ecp5', contents = {
'nextpnr_ecp5_flags': [
'--85k',
'--package CABGA381',
],
'nextpnr_constraints': ROOT + '/hdl/projects/ulx3s/ulx3s_v20.lpf',
})
environment('icestick', base = 'ice40', contents = {
'nextpnr_ice40_flags': [
'--hx1k',
'--package tq144',
],
'nextpnr_constraints': ROOT + '/hdl/projects/icestick/icestick.pcf',
})
environment('ignition_target', base = 'ice40', contents = {
'bsc_flags': [
'-opt-undetermined-vals',
'-unspecified-to', 'X',
],
'nextpnr_ice40_flags': [
'--lp1k',
'--package qn84',
'--freq 50',
],
'nextpnr_constraints': ROOT + '/hdl/ip/bsv/ignition/ignition_target.pcf',
})
environment('gimlet', base = 'ice40', contents = {
'nextpnr_ice40_flags': [
'--hx8k',
'--package ct256',
'--freq 50',
],
})
environment('sidecar_mainboard_controller', base = 'ecp5', contents = {
'nextpnr_ecp5_flags': [
'--45k',
'--package CABGA554',
'--speed 6',
'--freq 50',
],
'nextpnr_ecp5_pack_flags': [
'--compress',
],
'nextpnr_constraints': ROOT + '/hdl/projects/sidecar/mainboard/sidecar_mainboard_controller.lpf',
})
environment('sidecar_qsfp', base = 'ecp5', contents = {
'nextpnr_ecp5_flags': [
'--45k',
'--package CABGA554',
'--freq 50',
],
})
environment('ignitionlet_sequencer', base = 'ignition_target', contents = {
'nextpnr_constraints': ROOT + '/hdl/projects/ignitionlet/ignitionlet_sequencer.pcf',
})
environment('ignitionlet_spi', base = 'ignition_target', contents = {
'nextpnr_constraints': ROOT + '/hdl/projects/gimlet/sequencer/ignitionlet_spi.pcf',
})
environment('gimlet_sequencer', base = 'gimlet', contents = {
'nextpnr_constraints': ROOT + '/hdl/projects/gimlet/sequencer/gimlet_sequencer.pcf',
})
environment('sidecar_mainboard_emulator_ecp5_evn', base='ecp5_evn', contents = {
'nextpnr_constraints':
ROOT + '/hdl/projects/sidecar/mainboard/emulator/sidecar_mainboard_emulator_ecp5_evn.lpf',
'nextpnr_ecp5_pack_flags': [
'--compress',
],
})
environment('sidecar_qsfp_x32_controller', base='sidecar_qsfp', contents = {
'nextpnr_constraints': ROOT + '/hdl/projects/sidecar/qsfp_x32/qsfp_x32.lpf',
})
seed('//hdl/ip/bsv')
seed('//hdl/projects/gimlet/ignition_target')
seed('//hdl/projects/gimlet/sequencer')
seed('//hdl/projects/ignitionlet')
seed('//hdl/projects/psc')
seed('//hdl/projects/sidecar/ignition_target')
seed('//hdl/projects/sidecar/mainboard')
seed('//hdl/projects/sidecar/mainboard/emulator')
seed('//hdl/projects/sidecar/mainboard/test')
seed('//hdl/projects/sidecar/qsfp_x32')
seed('//hdl/ip/bsv/ignition/test')
seed('//hdl/ip/bsv/MDIO')
seed('//hdl/projects/ecp5_evn')
seed('//hdl/projects/ulx3s')
seed('//hdl/projects/icestick')
seed('//hdl/ip/bsv/examples')
seed('//hdl/ip/bsv/interfaces')
seed('//hdl/ip/bsv/interfaces/video')
seed('//hdl/ip/bsv/test')
seed('//vnd/bluespec')