forked from openhwgroup/core-v-mcu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
core-v-mcu.core
executable file
·365 lines (333 loc) · 11.1 KB
/
core-v-mcu.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
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
CAPI=2:
# Copyright 2021 OpenHW Group
# Solderpad Hardware License, Version 2.1, see LICENSE.md for details.
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
name: openhwgroup.org:systems:core-v-mcu
description: CORE-V MCU Top.
filesets:
files_rtl_generic:
depend:
- pulp-platform.org::axi
- pulp-platform.org::common_cells
- pulp-platform.org::riscv_dbg
- pulp-platform.org::tech_cells_generic
- pulp-platform.org::fpnew
- pulp-platform.org::fpu_div_sqrt_mvp
- openhwgroup.org:ip:apb_adv_timer
- openhwgroup.org:ip:apb_fll_if
- openhwgroup.org:ip:apb_gpio
- openhwgroup.org:ip:apb_i2cs
- openhwgroup.org:ip:apb_node
- openhwgroup.org:ip:apb2apbcomp
- openhwgroup.org:ip:apb2per
- openhwgroup.org:ip:apb_timer_unit
- openhwgroup.org:ip:udma_uart
- openhwgroup.org:ip:udma_sdio
- openhwgroup.org:ip:udma_qspi
- openhwgroup.org:ip:udma_i2s
- openhwgroup.org:ip:udma_i2c
- openhwgroup.org:ip:udma_filter
- openhwgroup.org:ip:udma_external_per
- openhwgroup.org:ip:udma_core
- openhwgroup.org:ip:udma_camera
- openhwgroup.org:ip:logint_dc_fifo_xbar
- openhwgroup.org:ip:l2_tcdm_hybrid_interco
- quicklogic.com:ip:efpga
# - openhwgroup.org:ip:generic_fll
- openhwgroup.org:ip:tcdm_interconnect
- openhwgroup.org:ip:cv32e40p
files:
- rtl/includes/periph_bus_defines.svh: {is_include_file: true, include_path: rtl/includes}
- rtl/includes/pulp_peripheral_defines.svh: {is_include_file: true, include_path: rtl/includes}
- rtl/includes/pulp_soc_defines.svh: {is_include_file: true, include_path: rtl/includes}
- rtl/includes/soc_mem_map.svh: {is_include_file: true, include_path: rtl/includes}
- rtl/core-v-mcu/include/tcdm_macros.svh: {is_include_file: true, include_path: rtl/core-v-mcu/include/}
- rtl/core-v-mcu/soc/pkg_soc_interconnect.sv
# - rtl/core-v-mcu/soc/axi64_2_lint32_wrap.sv
- rtl/core-v-mcu/soc/lint_2_axi_wrap.sv
- rtl/core-v-mcu/soc/contiguous_crossbar.sv
- rtl/core-v-mcu/soc/interleaved_crossbar.sv
- rtl/core-v-mcu/soc/tcdm_demux.sv
- rtl/core-v-mcu/soc/boot_rom.sv
- rtl/core-v-mcu/soc/l2_ram_multi_bank.sv
- rtl/core-v-mcu/soc/lint_jtag_wrap.sv
- rtl/core-v-mcu/soc/periph_bus_wrap.sv
- rtl/core-v-mcu/soc/soc_clk_rst_gen.sv
- rtl/core-v-mcu/soc/clk_and_control.sv
- rtl/core-v-mcu/soc/soc_event_arbiter.sv
- rtl/core-v-mcu/soc/soc_event_generator.sv
- rtl/core-v-mcu/soc/soc_event_queue.sv
- rtl/core-v-mcu/soc/tcdm_error_slave.sv
- rtl/core-v-mcu/soc/soc_interconnect.sv
- rtl/core-v-mcu/soc/soc_interconnect_wrap.sv
- rtl/core-v-mcu/soc/soc_peripherals.sv
- rtl/core-v-mcu/udma_subsystem/udma_subsystem.sv
- rtl/core-v-mcu/fc/fc_demux.sv
- rtl/core-v-mcu/fc/fc_subsystem.sv
- rtl/core-v-mcu/fc/fc_hwpe.sv
- rtl/core-v-mcu/fc/cv32e40p_fp_wrapper.sv
- rtl/core-v-mcu/components/apb_soc_ctrl.sv
- rtl/core-v-mcu/components/pulp_interfaces.sv
- rtl/core-v-mcu/efpga_subsystem/efpga_subsystem.sv
- rtl/core-v-mcu/efpga_subsystem/A2_fifo.sv
- rtl/core-v-mcu/efpga_subsystem/A2_fifo_ctl.sv
- rtl/core-v-mcu/efpga_subsystem/A2_fifo_ram.sv
- rtl/core-v-mcu/efpga_subsystem/tcdm_interface.sv
- rtl/core-v-mcu/efpga_subsystem/apbt1_interface.sv
- rtl/core-v-mcu/top/pad_control.sv
- rtl/core-v-mcu/top/safe_domain.sv
- rtl/core-v-mcu/top/soc_domain.sv
- rtl/core-v-mcu/top/core_v_mcu.sv
file_type: systemVerilogSource
rtl-behavioral:
files:
- rtl/core-v-mcu/components/freq_meter.sv
file_type: systemVerilogSource
rtl-simulation:
files:
- rtl/simulation/pPLL02F.sv
- rtl/simulation/core_v_mcu_sim_ram.sv
- rtl/simulation/sram512x64.v
- rtl/simulation/top.sv
- rtl/simulation/top1_wrapper.sv
- rtl/simulation/a2_bootrom.sv
file_type: systemVerilogSource
not_emulation-rtl:
files:
- rtl/core-v-mcu/soc/clk_gen.sv
file_type: systemVerilogSource
emulation-rtl:
depend:
- pulp-platform.org::tech_cells_xilinx
files:
- emulation/xilinx/rtl/cv32e40p_clock_gate.sv
- emulation/xilinx/rtl/fpga_interleaved_ram.sv
- emulation/xilinx/rtl/fpga_private_ram.sv
- emulation/xilinx/rtl/fpga_slow_clk_gen.sv
- emulation/xilinx/rtl/pad_functional_xilinx.sv
- emulation/xilinx/rtl/pulp_clock_gating_xilinx.sv
- emulation/xilinx/rtl/sram512x64.v
- emulation/xilinx/rtl/DW02_mac.sv
- rtl/simulation/pPLL02F.sv
- rtl/simulation/top.sv
- rtl/simulation/top1_wrapper.sv
- rtl/simulation/a2_bootrom.sv
file_type: systemVerilogSource
nexys-ips:
files:
- emulation/xilinx/ips/xilinx_clk_mngr.tcl
file_type: tclSource
genesys2-ips:
files:
- emulation/core-v-mcu-genesys2/ips/xilinx_clk_mngr.tcl
file_type: tclSource
xilinx-ips:
files:
# - emulation/xilinx/ips/xilinx_slow_clk_mngr.tcl
- emulation/xilinx/ips/xilinx_interleaved_ram.tcl
- emulation/xilinx/ips/xilinx_private_ram.tcl
file_type: tclSource
rom_init:
files:
- tb/mem_init_files/boot.mem: {copyto: mem_init/boot.mem}
file_type: mem
mem_init_modelsim:
files:
- tb/mem_init_files/boot.mem: {copyto: mem_init/boot.mem}
- tb/mem_init_files/cli_sim.txt: {copyto: mem_init/cli.txt}
- tb/mem_init_files/col0.mem: {copyto: 'mem_init/core_v_mcu_tb.core_v_mcu_i.i_soc_domain.l2_ram_i.CUTS[0].bank_i.u0.mem'}
- tb/mem_init_files/col1.mem: {copyto: 'mem_init/core_v_mcu_tb.core_v_mcu_i.i_soc_domain.l2_ram_i.CUTS[1].bank_i.u0.mem'}
- tb/mem_init_files/col2.mem: {copyto: 'mem_init/core_v_mcu_tb.core_v_mcu_i.i_soc_domain.l2_ram_i.CUTS[2].bank_i.u0.mem'}
- tb/mem_init_files/col3.mem: {copyto: 'mem_init/core_v_mcu_tb.core_v_mcu_i.i_soc_domain.l2_ram_i.CUTS[3].bank_i.u0.mem'}
- tb/mem_init_files/privateBank0.mem: {copyto: mem_init/core_v_mcu_tb.core_v_mcu_i.i_soc_domain.l2_ram_i.bank_sram_pri0_i.u0.mem}
- tb/mem_init_files/privateBank1.mem: {copyto: mem_init/core_v_mcu_tb.core_v_mcu_i.i_soc_domain.l2_ram_i.bank_sram_pri1_i.u0.mem}
file_type: user
mem_init_verilator:
files:
- tb/mem_init_files/verilatorBoot.mem: {copyto: mem_init/boot.mem}
- tb/mem_init_files/cli_sim.txt: {copyto: mem_init/cli.txt}
- tb/mem_init_files/col0.mem: {copyto: 'mem_init/TOP.core_v_mcu.i_soc_domain.l2_ram_i.CUTS[0].bank_i.u0.mem'}
- tb/mem_init_files/col1.mem: {copyto: 'mem_init/TOP.core_v_mcu.i_soc_domain.l2_ram_i.CUTS[1].bank_i.u0.mem'}
- tb/mem_init_files/col2.mem: {copyto: 'mem_init/TOP.core_v_mcu.i_soc_domain.l2_ram_i.CUTS[2].bank_i.u0.mem'}
- tb/mem_init_files/col3.mem: {copyto: 'mem_init/TOP.core_v_mcu.i_soc_domain.l2_ram_i.CUTS[3].bank_i.u0.mem'}
- tb/mem_init_files/privateBank0.mem: {copyto: mem_init/TOP.core_v_mcu.i_soc_domain.l2_ram_i.bank_sram_pri0_i.u0.mem}
- tb/mem_init_files/privateBank1.mem: {copyto: mem_init/TOP.core_v_mcu.i_soc_domain.l2_ram_i.bank_sram_pri1_i.u0.mem}
file_type: user
tb-rtl:
files:
- tb/core_v_mcu_tb.sv
- tb/uartdpi/uartdpi.sv
- tb/qspi_model/GD25Q128B.v
file_type: systemVerilogSource
nexys-rtl:
files:
- emulation/core-v-mcu-nexys/rtl/core_v_mcu_nexys.v
- emulation/xilinx/rtl/fpga_clk_gen.sv
file_type: systemVerilogSource
nexys-xdc:
files:
- emulation/core-v-mcu-nexys/constraints/core-v-mcu-pin-assignment.xdc
file_type: xdc
xilinx-tcl:
files:
- emulation/xilinx/tcl/common.tcl
- emulation/xilinx/tcl/flatten.tcl
file_type: tclSource
genesys2-rtl:
files:
- emulation/core-v-mcu-genesys2/rtl/core_v_mcu_genesys2.v
- emulation/core-v-mcu-genesys2/rtl/fpga_clk_gen.sv
file_type: systemVerilogSource
genesys2-xdc:
files:
- emulation/core-v-mcu-genesys2/constraints/core-v-mcu-pin-assignment.xdc
file_type: xdc
# Scripts for hooks
pre_build_scripts:
files:
- rtl/core-v-mcu/scripts/vedit.sh
file_type: user
# Waiver file, without which the model lib will not build.
verilator-waiver:
files:
- rtl/core-v-mcu/verilator.waiver
file_type: vlt
parameters:
PULP_FPGA_EMUL:
datatype: bool
paramtype: vlogdefine
default: true
VERILATOR:
datatype: bool
paramtype: vlogdefine
default: true
USE_BW:
datatype: bool
paramtype: vlogdefine
default: true
# A script to modify Verilator pre-build to generate a library, not an
# executable.
scripts:
pre_build_scripts:
cmd:
- sh
- ../src/openhwgroup.org_systems_core-v-mcu_0/rtl/core-v-mcu/scripts/vedit.sh
- openhwgroup.org_systems_core-v-mcu_0.vc
targets:
default: &default_target
filesets:
- files_rtl_generic
- not_emulation-rtl
- target_lint? (rtl-behavioral)
- target_model-lib? (rtl-behavioral)
toplevel: [core_v_mcu]
sim:
<<: *default_target
default_tool: modelsim
filesets_append:
- not_emulation-rtl
- rtl-simulation
- mem_init_modelsim
- rtl-behavioral
- tb-rtl
toplevel:
- core_v_mcu_tb
parameters:
- USE_BW=true
tools:
modelsim:
vlog_options:
- -override_timescale 1ns/1ps
- -suppress vlog-2583
vsim_options:
- -sv_lib ../../../tb/uartdpi/uartdpi -voptargs="-O1 +acc"
xcelium:
xrun_options:
- -64bit
- -timescale 1ns/1ps
- -disable_sem2009
xmsim_options:
- -sv_lib ../../../tb/uartdpi/uartdpi.so
xsim:
xelab_options:
- --define XSIM
- --incr
- -dup_entity_as_module
- -relax
- --O0
- -v 0
- -timescale 1ns/1ps
xsim_options:
# A target for a Verilator model as a library. Note that we do not disable
# UNOPTFLAT warnings, since these will affect performance, so we want to see
# them.
model-lib:
<<: *default_target
default_tool: verilator
parameters:
- VERILATOR=true
- USE_BW=true
filesets_append:
- pre_build_scripts
- verilator-waiver
- mem_init_verilator
- rtl-simulation
- not_emulation-rtl
toplevel: [core_v_mcu]
hooks:
pre_build: [pre_build_scripts]
tools:
verilator:
mode: cc
verilator_options:
- -Wno-fatal
- --trace
- --CFLAGS -DVL_TIME_CONTEXT
lint:
<<: *default_target
default_tool: verilator
toplevel: [core_v_mcu]
filesets_append:
- rtl-simulation
- not_emulation-rtl
tools:
verilator:
mode: lint-only
verilator_options:
- -Wno-fatal
nexys-a7-100t:
<<: *default_target
default_tool: vivado
description: Digilent Nexys-A7-100T Board
parameters:
- PULP_FPGA_EMUL=true
filesets_append:
- nexys-ips
- xilinx-ips
- xilinx-tcl
- emulation-rtl
- nexys-rtl
- nexys-xdc
- rom_init
tools:
vivado:
part: xc7a100tcsg324-1
toplevel: core_v_mcu_nexys
genesys2:
<<: *default_target
default_tool: vivado
description: Digilent Nexys-A7-100T Board
parameters:
- PULP_FPGA_EMUL=true
filesets_append:
- genesys2-ips
- xilinx-ips
- xilinx-tcl
- emulation-rtl
- genesys2-rtl
- genesys2-xdc
- rom_init
tools:
vivado:
part: xc7k325tffg900-2
toplevel: core_v_mcu_genesys2