-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtop.core
119 lines (107 loc) · 3.04 KB
/
top.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
CAPI=2:
#
# Recommended reading about FuseSoC core files: https://fusesoc.readthedocs.io/en/stable/user/build_system/core_files.html
#
name: ucsbieee::fpga_screensaver:1.0.0
description: screensaver
# This section describes which functional groups each of the source files belong
# to and in what language they're written.
filesets:
# default
rtl:
files:
- rtl/top.sv
- rtl/image.sv
- rtl/video_timer.sv
file_type: systemVerilogSource
tb:
files:
- tb/top.tb.sv: {file_type: systemVerilogSource}
- tb/to_png.py: {file_type: user, copyto: to_png.py}
lint:
files:
- lint.vlt: {file_type: vlt}
usage:
files:
- usage/post.tcl: {file_type: user, copyto: post.tcl}
tangnano:
files:
- tangnano/Gowin_rPLL.v: {file_type: verilogSource}
- tangnano/tangnano.sv: {file_type: systemVerilogSource}
- tangnano/pins.cst: {file_type: CST}
# This section defines the different FuseSoC build targets that can be called
# to either simulate (in some way) or synthesize the FPGA design. Each build
# target specifies which files it requires and how to call the tool specific to
# that process.
targets:
default: &default
filesets:
- rtl
parameters:
- IMAGE_SELECT=2
tb: # fusesoc run --target tb ucsbieee::fpga_screensaver
<<: *default
description: Simulate the design
filesets_append:
- tb
toplevel: top_tb
default_tool: icarus
tools:
icarus:
iverilog_options:
- -g2012
- -Wall
- -Wno-timescale
- -DSIM
lint: # fusesoc run --target lint ucsbieee::fpga_screensaver
<<: *default
description: Simulate the design
filesets_append:
- lint
toplevel: top
default_tool: verilator
tools:
verilator:
mode: lint-only
verilator_options: ["-Wall"]
usage: # fusesoc run --target usage ucsbieee::fpga_screensaver
<<: *default
description: Synthesize
filesets_append:
- usage
toplevel: top
default_tool: yosys
tools:
yosys:
arch: ice40
output_format: json
hooks:
pre_build:
- convert_to_prep
post_build:
- record_usage
tangnano: # fusesoc run --target tangnano ucsbieee::fpga_screensaver
<<: *default
description: Synthesize for Tang Nano
default_tool: apicula
filesets_append:
- tangnano
tools:
apicula:
device: GW1N-LV1QN48C6/I5
toplevel: tangnano
# This section defines non-Verilog scripts (e.g. shell commands or Python scripts)
# which are used in the above build targets to simulate the PPGA design.
scripts:
convert_to_prep:
cmd: [sed, -i, 's/synth_ice40/prep/g', edalize_yosys_procs.tcl]
record_usage:
cmd: [yosys, -c, post.tcl]
filesets: [usage]
# This section defines human-readable descriptions of the command-line parameters
# used in the above guild targets.
parameters:
IMAGE_SELECT:
datatype: int
description: Select which image to use
paramtype: vlogparam