-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathgr-heep.core
More file actions
374 lines (349 loc) · 9.46 KB
/
Copy pathgr-heep.core
File metadata and controls
374 lines (349 loc) · 9.46 KB
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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
CAPI=2:
# Copyright 2025 X-HEEP
# Solderpad Hardware License, Version 2.1, see LICENSE.md for details.
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
name: x-heep:systems:gr-heep
description: GR-HEEP extended SoC (from X-HEEP).
filesets:
files_rtl_generic:
depend:
- x-heep::packages
- x-heep:ip:pad_control
- openhwgroup.org:systems:core-v-mini-mcu
files:
- hw/gr-heep/gr_heep_pkg.sv
- hw/gr-heep/gr_heep_xbar.sv
- hw/gr-heep/gr_heep_bus.sv
- hw/gr-heep/gr_heep_pad_ring.sv
- hw/gr-heep/gr_heep_peripherals.sv
- hw/gr-heep/gr_heep.sv
file_type: systemVerilogSource
# Simulation
files_verilator_waiver:
files:
- hw/gr-heep/gr_heep_waivers.vlt
- tb/tb.vlt
- tb/tb_v5.vlt
file_type: vlt
tb-verilator:
files:
- tb/XHEEP_CmdLineOptions.hh: { is_include_file: true }
- tb/XHEEP_CmdLineOptions.cpp
- tb/tb_top.cpp
file_type: cppSource
tb-harness:
depend:
- pulp-platform.org::tech_cells_generic
- x-heep:sim:sram_wrapper
- x-heep:sim:pad_cells
files:
- tb/tb_util.svh: {is_include_file: true}
- tb/yosys_spiflash.sv
- tb/testharness.sv
file_type: systemVerilogSource
tb-sv:
files:
- tb/tb_top.sv
file_type: systemVerilogSource
uartdpi:
depend:
- lowrisc:dv_dpi:uartdpi
systemverilog_only_uart:
files:
- hw/vendor/x-heep/hw/vendor/lowrisc/opentitan/hw/dv/dpi/uartdpi/uartdpi.sv
file_type: systemVerilogSource
systemverilog_only_simjtag:
depend:
- pulp-platform.org::pulpissimo_simjtag
# FPGA
rtl-fpga:
depend:
- openhwgroup.org:systems:core-v-mini-mcu-fpga
files:
- hw/fpga_ext/xilinx_gr_heep_wrapper.sv
file_type: systemVerilogSource
# Scripts for hooks
pre_build_remote_bitbang:
files:
- scripts/sim/compile_remote_bitbang.sh
file_type: user
pre_build_uartdpi:
files:
- scripts/sim/compile_uart_dpi.sh
file_type: user
pre_patch_modelsim_Makefile:
files:
- hw/vendor/x-heep/scripts/sim/modelsim/patch_modelsim_Makefile.py
file_type: user
parameters:
JTAG_DPI:
datatype: int
paramtype: vlogparam
description: |
Enables testbench JTAG DIPs. Admitted values: 1|0.
default: 0
USE_EXTERNAL_DEVICE_EXAMPLE:
datatype: int
paramtype: vlogparam
description: |
Enables testbench modules compilation. Admitted values: 1|0.
default: 1
USE_UPF:
datatype: bool
paramtype: vlogdefine
description: |
Enables simulation with UPF with Modelsim/VCS
REMOVE_OBI_FIFO:
datatype: bool
paramtype: vlogdefine
description: |
Remove the FIFO between the BUS and the peripherals subsystems
SYNTHESIS:
datatype: bool
paramtype: vlogdefine
default: false
VERILATOR: #used by SV2V
datatype: bool
paramtype: vlogdefine
default: false
SIM_SYSTEMC:
datatype: bool
paramtype: vlogdefine
default: false
FPGA_SYNTHESIS:
datatype: bool
paramtype: vlogdefine
default: false
FPGA_NEXYS:
datatype: bool
paramtype: vlogdefine
default: false
FPGA_ZCU104:
datatype: bool
paramtype: vlogdefine
default: false
FPGA_ZCU102:
datatype: bool
paramtype: vlogdefine
default: false
FPGA_AUP_ZU3:
datatype: bool
paramtype: vlogdefine
default: false
FPGA_GENESYS2:
datatype: bool
paramtype: vlogdefine
default: false
NO_DDR_CLK_PORTS:
datatype: bool
paramtype: vlogdefine
default: false
# Make the parameter known to FuseSoC to enable overrides from the
# command line. If not overwritten, use the generic technology library.
PRIM_DEFAULT_IMPL:
datatype: str
paramtype: vlogdefine
description: Primitives implementation to use, e.g. "prim_pkg::ImplGeneric".
default: prim_pkg::ImplGeneri
COMMON_CELLS_ASSERTS_OFF:
datatype: bool
description: Turn off asserts for PULP common cells
paramtype: vlogdefine
default: false
ASSERTS_OFF:
datatype: bool
description: Turn off asserts for PULP common cells
paramtype: vlogdefine
default: false
scripts:
# Build utils
pre_build_remote_bitbang:
cmd:
- sh
- ../../../scripts/sim/compile_remote_bitbang.sh
pre_build_uartdpi:
cmd:
- sh
- ../../../scripts/sim/compile_uart_dpi.sh
pre_patch_modelsim_Makefile:
cmd:
- python
- ../../../hw/vendor/x-heep/scripts/sim/modelsim/patch_modelsim_Makefile.py
# Simulation utils
remove_uart_log:
cmd: [sh, -c, rm -f uart0.log]
print_uart_log:
cmd: [sh, -c, cat uart0.log]
targets:
default: &default_target
filesets:
- files_rtl_generic
- target_sim? (tool_verilator? (files_verilator_waiver))
toplevel: [gr_heep]
sim:
<<: *default_target
default_tool: modelsim
filesets_append:
- tb-harness
- tool_verilator? (uartdpi)
- tool_verilator? (tb-verilator)
- tool_verilator? (systemverilog_only_simjtag)
- tool_modelsim? (systemverilog_only_uart)
- tool_modelsim? (tb-sv)
- tool_modelsim? (systemverilog_only_simjtag)
- tool_modelsim? (pre_build_remote_bitbang)
- tool_modelsim? (pre_build_uartdpi)
- tool_modelsim? (pre_patch_modelsim_Makefile)
toplevel:
- tool_verilator? (testharness)
- tool_modelsim? (tb_top)
hooks:
pre_build:
- tool_modelsim? (pre_build_uartdpi)
- tool_modelsim? (pre_build_remote_bitbang)
- tool_modelsim? (pre_patch_modelsim_Makefile) # this is required by Questa 2020 on
pre_run:
- remove_uart_log
post_run:
- print_uart_log
parameters:
- JTAG_DPI
- USE_EXTERNAL_DEVICE_EXAMPLE
- USE_UPF
- REMOVE_OBI_FIFO
- COMMON_CELLS_ASSERTS_OFF
- ASSERTS_OFF
tools:
verilator:
mode: cc
verilator_options:
- '--cc'
- '--trace'
- '--trace-fst'
- '--trace-structs'
- '--trace-params'
- '--trace-max-array 1024'
- '--x-assign unique'
- '--x-initial unique'
- '--exe tb_top.cpp'
- '-CFLAGS "-Wall -fpermissive"'
- '-LDFLAGS "-pthread -lutil -lelf"'
- "-Wall"
modelsim:
vlog_options:
- -override_timescale 1ns/1ps
- -suppress vlog-2583
- -suppress vlog-2577
- -suppress vlog-2720
- -pedanticerrors
- -define MODELSIM
vsim_options:
- -sv_lib ../../../hw/vendor/x-heep/hw/vendor/lowrisc/opentitan/hw/dv/dpi/uartdpi/uartdpi
- -sv_lib ../../../hw/vendor/x-heep/hw/vendor/pulp_platform/pulpissimo/rtl/tb/remote_bitbang/librbs
- -voptargs=+acc=npr
pynq-z2:
<<: *default_target
default_tool: vivado
description: TUL Pynq-Z2 Board
filesets_append:
- rtl-fpga
parameters:
- SYNTHESIS=true
- REMOVE_OBI_FIFO
- FPGA_SYNTHESIS=true
tools:
vivado:
part: xc7z020clg400-1
board_part: tul.com.tw:pynq-z2:part0:1.0
board_repo_paths: [../../../hw/fpga/board_files/vendor/esl_epfl_pynq_z2_board_files]
toplevel: [xilinx_gr_heep_wrapper]
nexys-a7-100t:
<<: *default_target
default_tool: vivado
description: Digilent Nexys-A7-100T Board
filesets_append:
- rtl-fpga
parameters:
- SYNTHESIS=true
- REMOVE_OBI_FIFO
- FPGA_SYNTHESIS=true
- FPGA_NEXYS=true
- NO_DDR_CLK_PORTS=true
tools:
vivado:
part: xc7a100tcsg324-1
board_part: digilentinc.com:nexys-a7-100t:part0:1.3
board_repo_paths: [../../../hw/fpga/board_files/vendor/esl_epfl_nexys_a7_100t_board_files]
toplevel: [xilinx_gr_heep_wrapper]
zcu104:
<<: *default_target
default_tool: vivado
description: ZCU104 Evaluation Board
filesets_append:
- rtl-fpga
parameters:
- SYNTHESIS=true
- REMOVE_OBI_FIFO
- FPGA_SYNTHESIS=true
- FPGA_ZCU104=true
- NO_DDR_CLK_PORTS=true
tools:
vivado:
part: xczu7ev-ffvc1156-2-e
board_part: xilinx.com:zcu104:part0:1.0
board_repo_paths: [../../../hw/fpga/board_files/vendor/esl_epfl_zcu104_board_files]
toplevel: [xilinx_gr_heep_wrapper]
zcu102:
<<: *default_target
default_tool: vivado
description: ZCU102 Evaluation Board
filesets_append:
- rtl-fpga
parameters:
- SYNTHESIS=true
- REMOVE_OBI_FIFO
- FPGA_SYNTHESIS=true
- FPGA_ZCU102=true
- NO_DDR_CLK_PORTS=true
tools:
vivado:
part: xczu9eg-ffvb1156-2-e
board_part: xilinx.com:zcu102:part0:3.3
board_repo_paths: [../../../hw/fpga/board_files/vendor/zcu102]
toplevel: [xilinx_gr_heep_wrapper]
aup-zu3:
<<: *default_target
default_tool: vivado
description: RD aup-zu3 Board
filesets_append:
- rtl-fpga
parameters:
- SYNTHESIS=true
- REMOVE_OBI_FIFO
- FPGA_SYNTHESIS=true
- FPGA_AUP_ZU3=true
- NO_DDR_CLK_PORTS=true
tools:
vivado:
part: xczu3eg-sfvc784-2-e
board_part: realdigital.org:aup-zu3-8gb:part0:1.0
board_repo_paths: [../../../hw/fpga/board_files/vendor/aup-zu3-8gb/1.0]
toplevel: [xilinx_gr_heep_wrapper]
genesys2:
<<: *default_target
default_tool: vivado
description: Genesys2 Evaluation Board
filesets_append:
- rtl-fpga
parameters:
- SYNTHESIS=true
- REMOVE_OBI_FIFO
- FPGA_SYNTHESIS=true
- FPGA_GENESYS2=true
- NO_DDR_CLK_PORTS=true
tools:
vivado:
part: xc7k325tffg900-2
board_part: digilentinc.com:genesys2:part0:1.1
board_repo_paths: [../../../hw/fpga/board_files/vendor/genesys2]
toplevel: [xilinx_gr_heep_wrapper]