-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathibex_demo_system.core
316 lines (295 loc) · 8.08 KB
/
ibex_demo_system.core
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
CAPI=2:
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
name: "lowrisc:ibex:demo_system"
description: "Ibex Demo System for Arty A7 boards (both, -35 and -100)"
filesets:
files_rtl:
depend:
- lowrisc:ibex:demo_system_core
files_xilinx:
depend:
- lowrisc:ibex:rv_timer
- lowrisc:ibex:fpga_xilinx_shared
files:
- rtl/fpga/top_artya7.sv
file_type: systemVerilogSource
files_xilinx_cw305:
depend:
- lowrisc:ibex:rv_timer
- lowrisc:ibex:fpga_xilinx_shared
files:
- rtl/fpga/top_cw305.sv
file_type: systemVerilogSource
files_xilinx_cw312a35:
depend:
- lowrisc:ibex:rv_timer
- lowrisc:ibex:fpga_xilinx_shared
files:
- rtl/fpga/top_cw312a35.sv
file_type: systemVerilogSource
files_xilinx_blackboard:
depend:
- lowrisc:ibex:rv_timer
- lowrisc:ibex:fpga_xilinx_shared
files:
- rtl/fpga/top_blackboard.sv
file_type: systemVerilogSource
files_xilinx_boolean:
depend:
- lowrisc:ibex:rv_timer
- lowrisc:ibex:fpga_xilinx_shared
files:
- rtl/fpga/top_boolean.sv
file_type: systemVerilogSource
files_xilinx_nexysa7:
depend:
- lowrisc:ibex:rv_timer
- lowrisc:ibex:fpga_xilinx_shared
files:
- rtl/fpga/top_nexysa7.sv
file_type: systemVerilogSource
files_xilinx_artys7:
depend:
- lowrisc:ibex:rv_timer
- lowrisc:ibex:fpga_xilinx_shared
files:
- rtl/fpga/top_artys7.sv
file_type: systemVerilogSource
files_sonata:
depend:
- lowrisc:ibex:rv_timer
- lowrisc:ibex:fpga_xilinx_shared
files:
- rtl/fpga/top_sonata.sv
- rtl/fpga/clkgen_sonata.sv
- rtl/fpga/rst_ctrl.sv
file_type: systemVerilogSource
files_verilator:
depend:
- lowrisc:ibex:sim_shared
- lowrisc:dv_verilator:memutil_verilator
- lowrisc:dv_verilator:simutil_verilator
- lowrisc:dv_verilator:ibex_pcounts
- lowrisc:dv_dpi_c:uartdpi:0.1
- lowrisc:dv_dpi_sv:uartdpi:0.1
files:
- dv/verilator/top_verilator.sv: { file_type: systemVerilogSource }
- dv/verilator/ibex_demo_system.cc: { file_type: cppSource }
- dv/verilator/ibex_demo_system.h: { file_type: cppSource, is_include_file: true}
- dv/verilator/ibex_demo_system_main.cc: { file_type: cppSource }
- dv/verilator/demo_system_verilator_lint.vlt: { file_type: vlt }
files_constraints:
files:
- data/pins_artya7.xdc
file_type: xdc
files_constraints_cw305:
files:
- data/pins_cw305.xdc
file_type: xdc
files_constraints_cw312a35:
files:
- data/pins_cw312a35.xdc
file_type: xdc
files_constraints_blackboard:
files:
- data/pins_blackboard.xdc
file_type: xdc
files_constraints_boolean:
files:
- data/pins_boolean.xdc
file_type: xdc
files_constraints_nexysa7:
files:
- data/pins_nexysa7.xdc
file_type: xdc
files_constraints_artys7:
files:
- data/pins_artys7.xdc
file_type: xdc
files_constraints_sonata:
files:
- data/pins_sonata.xdc
file_type: xdc
parameters:
# XXX: This parameter needs to be absolute, or relative to the *.runs/synth_1
# directory. It's best to pass it as absolute path when invoking fusesoc, e.g.
# --SRAMInitFile=$PWD/sw/led/led.vmem
# XXX: The VMEM file should be added to the sources of the Vivado project to
# make the Vivado dependency tracking work. However this requires changes to
# fusesoc first.
SRAMInitFile:
datatype: str
description: SRAM initialization file in vmem hex format
default: "../../../../../sw/c/build/blank/blank.vmem"
paramtype: vlogparam
# For value definition, please see ip/prim/rtl/prim_pkg.sv
PRIM_DEFAULT_IMPL:
datatype: str
paramtype: vlogdefine
description: Primitives implementation to use, e.g. "prim_pkg::ImplGeneric".
targets:
default: &default_target
filesets:
- files_rtl
synth:
<<: *default_target
default_tool: vivado
filesets_append:
- files_xilinx
- files_constraints
toplevel: top_artya7
tools:
vivado:
part: "xc7a35tcsg324-1" # Default to Arty A7-35
parameters:
- SRAMInitFile
- PRIM_DEFAULT_IMPL=prim_pkg::ImplXilinx
flags:
use_bscane_tap: true
synth_cw305:
<<: *default_target
default_tool: vivado
filesets_append:
- files_xilinx_cw305
- files_constraints_cw305
toplevel: top_cw305
tools:
vivado:
part: "xc7a100tftg256-2" # default to a100 part
#part: "xc7a35tftg256-2" # a35 option
parameters:
- SRAMInitFile
- PRIM_DEFAULT_IMPL=prim_pkg::ImplXilinx
flags:
use_bscane_tap: true
synth_cw312a35:
<<: *default_target
default_tool: vivado
filesets_append:
- files_xilinx_cw312a35
- files_constraints_cw312a35
toplevel: top_cw312a35
tools:
vivado:
part: "xc7a35tcsg324-1"
parameters:
- SRAMInitFile
- PRIM_DEFAULT_IMPL=prim_pkg::ImplXilinx
flags:
use_bscane_tap: true
synth_blackboard:
<<: *default_target
default_tool: vivado
filesets_append:
- files_xilinx_blackboard
- files_constraints_blackboard
toplevel: top_blackboard
tools:
vivado:
part: "xc7z007sclg400-1"
parameters:
- SRAMInitFile
- PRIM_DEFAULT_IMPL=prim_pkg::ImplXilinx
flags:
use_bscane_tap: true
synth_boolean:
<<: *default_target
default_tool: vivado
filesets_append:
- files_xilinx_boolean
- files_constraints_boolean
toplevel: top_boolean
tools:
vivado:
part: "xc7s50csga324-1"
parameters:
- SRAMInitFile
- PRIM_DEFAULT_IMPL=prim_pkg::ImplXilinx
flags:
use_bscane_tap: true
synth_nexysa7:
<<: *default_target
default_tool: vivado
filesets_append:
- files_xilinx_nexysa7
- files_constraints_nexysa7
toplevel: top_nexysa7
tools:
vivado:
part: "xc7a100tcsg324-1"
parameters:
- SRAMInitFile
- PRIM_DEFAULT_IMPL=prim_pkg::ImplXilinx
flags:
use_bscane_tap: true
synth_artys7-25:
<<: *default_target
default_tool: vivado
filesets_append:
- files_xilinx_artys7
- files_constraints_artys7
toplevel: top_artys7
tools:
vivado:
part: "xc7s25csga324-1"
parameters:
- SRAMInitFile
- PRIM_DEFAULT_IMPL=prim_pkg::ImplXilinx
flags:
use_bscane_tap: true
synth_artys7-50:
<<: *default_target
default_tool: vivado
filesets_append:
- files_xilinx_artys7
- files_constraints_artys7
toplevel: top_artys7
tools:
vivado:
part: "xc7s50csga324-1"
parameters:
- SRAMInitFile
- PRIM_DEFAULT_IMPL=prim_pkg::ImplXilinx
flags:
use_bscane_tap: true
synth_sonata:
<<: *default_target
default_tool: vivado
filesets_append:
- files_sonata
- files_constraints_sonata
toplevel: top_sonata
tools:
vivado:
part: "xc7a50tcsg324-1"
parameters:
- SRAMInitFile
- PRIM_DEFAULT_IMPL=prim_pkg::ImplXilinx
sim:
<<: *default_target
default_tool: verilator
filesets_append:
- files_verilator
toplevel: top_verilator
tools:
verilator:
mode: cc
verilator_options:
# Disabling tracing reduces compile times but doesn't have a
# huge influence on runtime performance.
- '--trace'
- '--trace-fst' # this requires -DVM_TRACE_FMT_FST in CFLAGS below!
- '--trace-structs'
- '--trace-params'
- '--trace-max-array 1024'
- '-CFLAGS "-std=c++14 -Wall -DVM_TRACE_FMT_FST -DTOPLEVEL_NAME=top_verilator"'
- '-LDFLAGS "-pthread -lutil -lelf"'
- "-Wall"
- "-Wwarn-IMPERFECTSCH"
# RAM primitives wider than 64bit (required for ECC) fail to build in
# Verilator without increasing the unroll count (see Verilator#1266)
- "--unroll-count 72"
parameters:
- PRIM_DEFAULT_IMPL=prim_pkg::ImplGeneric