forked from esl-epfl/HEEPsilon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcgra_x_heep.core
269 lines (243 loc) · 7.36 KB
/
cgra_x_heep.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
CAPI=2:
# Copyright 2022 EPFL
# Solderpad Hardware License, Version 2.1, see LICENSE.md for details.
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
name: eslepfl:systems:cgra-x-heep
description: CGRA X-HEEP Top.
filesets:
files_rtl_generic:
depend:
- x-heep::packages
- openhwgroup.org:systems:core-v-mini-mcu
- eslepfl::cgra
files:
- hw/rtl/cgra_x_heep_pkg.sv
- hw/rtl/cgra_x_heep_top.sv
file_type: systemVerilogSource
x_heep_system:
depend:
- x-heep::packages
- x-heep:ip:pad_control
files:
- hw/vendor/esl_epfl_x_heep/hw/system/x_heep_system.sv
- hw/vendor/esl_epfl_x_heep/hw/system/pad_ring.sv
file_type: systemVerilogSource
tb-harness:
files:
- tb/tb_util.svh: {is_include_file: true}
- tb/testharness.sv
file_type: systemVerilogSource
files_verilator_waiver:
files:
- tb/tb.vlt
- hw/rtl/cgra_top.vlt
file_type: vlt
systemverilog_only_simjtag:
depend:
- pulp-platform.org::pulpissimo_simjtag
uartdpi:
depend:
- lowrisc:dv_dpi:uartdpi
systemverilog_only_uart:
files:
- hw/vendor/esl_epfl_x_heep/hw/vendor/lowrisc_opentitan/hw/dv/dpi/uartdpi/uartdpi.sv
file_type: systemVerilogSource
remote_bitbang_dpi:
depend:
- pulp-platform.org::pulpissimo_remote_bitbang
cypress_flash:
depend:
- ::spiflash:0
# 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:
- scripts/sim/modelsim/patch_modelsim_Makefile.py
file_type: user
tb-verilator:
files:
- tb/tb_top.cpp
file_type: cppSource
tb-sv:
files:
- tb/tb_top.sv
file_type: systemVerilogSource
rtl-fpga:
files:
- hw/fpga/xilinx_core_v_mini_mcu_wrapper.sv
- hw/fpga/sram_wrapper.sv
- hw/fpga_cgra/cgra_sram_wrapper.sv
- hw/fpga_cgra/cgra_clock_gate.sv
- hw/fpga_cgra/xilinx_cgra_x_heep_wrapper.sv
file_type: systemVerilogSource
ip-fpga:
files:
- hw/fpga/scripts/xilinx_generate_clk_wizard.tcl: { file_type: tclSource }
- hw/fpga/scripts/generate_sram.tcl: { file_type: tclSource }
- hw/fpga/prim_xilinx_clk.sv: { file_type: systemVerilogSource } # Here there are the following modules
- hw/fpga/cve2_xilinx_clock_gate.sv: { file_type: systemVerilogSource }
- hw/fpga/pad_cell_input_xilinx.sv: { file_type: systemVerilogSource }
- hw/fpga/pad_cell_output_xilinx.sv: { file_type: systemVerilogSource }
- hw/fpga/pad_cell_inout_xilinx.sv: { file_type: systemVerilogSource }
- hw/fpga/pad_cell_bypass_input_xilinx.sv: { file_type: systemVerilogSource }
- hw/fpga/pad_cell_bypass_output_xilinx.sv: { file_type: systemVerilogSource }
fpga-arm-emulation:
depend:
- pulp-platform.org::axi_spi_slave
files:
- linux_femu/scripts/xilinx_generate_processing_system.tcl: {file_type: tclSource}
- linux_femu/rtl/axi_address_hijacker.v: {file_type: verilogSource}
- linux_femu/rtl/linux_femu.sv: {file_type: systemVerilogSource}
- linux_femu/constraints/pin_assign.xdc: {file_type: xdc}
- linux_femu/constraints/constraints.xdc: {file_type: xdc}
xdc-fpga-pynq-z2:
files:
- hw/fpga_cgra/constraints/pin_assign.xdc
file_type: xdc
netlist-fpga:
files:
- build/openhwgroup.org_systems_core-v-mini-mcu_0/nexys-a7-100t-vivado/core_v_mini_mcu_xiling_postsynth.v
file_type: verilogSource
parameters:
COREV_PULP:
datatype: int
paramtype: vlogparam
default: 0
JTAG_DPI:
datatype: int
paramtype: vlogparam
default: 0
USE_UPF:
datatype: bool
paramtype: vlogdefine
default: false
SYNTHESIS:
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
scripts:
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
- ../../../scripts/sim/modelsim/patch_modelsim_Makefile.py
targets:
default: &default_target
filesets:
- files_rtl_generic
toplevel: [cgra_x_heep_top]
sim:
<<: *default_target
default_tool: modelsim
filesets_append:
- tb-harness
- tool_verilator? (uartdpi)
- tool_modelsim? (systemverilog_only_uart)
- tool_vcs? (systemverilog_only_uart)
- tool_verilator? (files_verilator_waiver)
- tool_verilator? (remote_bitbang_dpi)
- tool_modelsim? (systemverilog_only_simjtag)
- tool_vcs? (systemverilog_only_simjtag)
- tool_modelsim? (cypress_flash)
- tool_vcs? (cypress_flash)
- tool_modelsim? (pre_build_remote_bitbang)
- tool_modelsim? (pre_build_uartdpi)
- tool_modelsim? (pre_patch_modelsim_Makefile)
- tool_vcs? (pre_build_remote_bitbang)
- tool_vcs? (pre_build_uartdpi)
- tool_verilator? (tb-verilator)
- tool_modelsim? (tb-sv)
- tool_vcs? (tb-sv)
- "!integrated_heep? (x_heep_system)"
toplevel:
- tool_modelsim? (tb_top)
- tool_vcs? (tb_top)
- tool_verilator? (testharness)
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
parameters:
- COREV_PULP=0
- use_jtag_dpi? (JTAG_DPI=1)
- "!use_jtag_dpi? (JTAG_DPI=0)"
tools:
modelsim:
vlog_options:
- -override_timescale 1ns/1ps
- -suppress vlog-2583
- -suppress vlog-2577
- -pedanticerrors
- -define MODELSIM
vsim_options:
- -sv_lib ../../../hw/vendor/esl_epfl_x_heep/hw/vendor/lowrisc_opentitan/hw/dv/dpi/uartdpi/uartdpi
- -sv_lib ../../../hw/vendor/esl_epfl_x_heep/hw/vendor/pulp_platform_pulpissimo/rtl/tb/remote_bitbang/librbs
vcs:
vcs_options:
- -override_timescale=1ns/1ps
- -assert disable_cover
- -assert svaext
- -debug_access+all
- -fgp
- -kdb
- -notice
- -ntb_opts error
- -race=all
- -xlrm uniq_prior_final
- -CFLAGS "-std=c++14 -pthread"
- -LDFLAGS "-pthread -lutil"
- -V
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 "-std=c++11 -Wall -g -fpermissive"'
- '-LDFLAGS "-pthread -lutil -lelf"'
- "-Wall"
pynq-z2:
<<: *default_target
default_tool: vivado
description: TUL Pynq-Z2 Board
filesets_append:
- x_heep_system
- files_rtl_generic # Already added by default?
- rtl-fpga
- ip-fpga
- xdc-fpga-pynq-z2
parameters:
- COREV_PULP=0
- SYNTHESIS=true
tools:
vivado:
part: xc7z020clg400-1
toplevel: [xilinx_cgra_x_heep_wrapper]