11# SPDX-FileCopyrightText: 2025 aesc silicon
22#
33# SPDX-License-Identifier: CERN-OHL-W-2.0
4+ # yaml-language-server: $schema=https://taskfile.dev/schema.json
45
56version : ' 3'
67
@@ -9,187 +10,158 @@ includes:
910 taskfile : ./modules/elements/zibal/Taskfile.yaml
1011 optional : true
1112 flatten : true
12-
13- env :
14- FPGA_FAMILY : ecp5
15- FPGA_DEVICE : um5g-45k
16- FPGA_PACKAGE : CABGA554
17- FPGA_FREQUENCY : 50
18- OPENFPGALOADER_BOARD : ecpix5_r03
19- PDK : ihp-sg13g2
20- PDK_ROOT : " {{ .PWD }}/pdks/IHP-Open-PDK/"
21- KLAYOUT_HOME : " {{ .PWD }}/pdks/IHP-Open-PDK/ihp-sg13g2/libs.tech/klayout/"
22- NAFARR_BASE : " {{ .PWD }}/modules/elements/nafarr/"
23- ZIBAL_BASE : " {{ .PWD }}/modules/elements/zibal/"
24- BUILD_ROOT : " {{ .PWD }}/build/"
25- GCC : " /opt/elements/zephyr-sdk-0.17.0/riscv64-zephyr-elf/bin/riscv64-zephyr-elf"
26- OPENROAD_FLOW_ROOT : " {{ .PWD }}/tools/OpenROAD-flow-scripts/flow"
13+ firmware :
14+ taskfile : ./Taskfile.firmware.yml
15+ fpga :
16+ taskfile : ./Taskfile.fpga.yml
2717
2818vars :
2919 SOC : ' {{.SOC | default "ElemRV-N"}}'
20+ TECH : ' {{.TECH | default "SG13G2"}}'
3021 package :
3122 sh : echo "{{.SOC}}" | tr '[:upper:]' '[:lower:]' | tr '-' '_'
23+ PDK :
24+ sh : echo "ihp-{{.TECH}}" | tr '[:upper:]' '[:lower:]'
25+ KLAYOUT_HOME : " {{.PWD}}/pdks/IHP-Open-PDK/{{.PDK}}/libs.tech/klayout/"
3226 CONTAINER_NAME : elemrv_container
3327 CONTAINER_ENV : " \
34- -e SOC={{ .SOC }} \
35- -e FPGA_FAMILY={{ .FPGA_FAMILY }} \
36- -e FPGA_DEVICE={{ .FPGA_DEVICE }} \
37- -e FPGA_PACKAGE={{ .FPGA_PACKAGE }} \
38- -e FPGA_FREQUENCY={{ .FPGA_FREQUENCY }} \
39- -e PDK={{ .PDK }} \
40- -e PDK_ROOT={{ .PDK_ROOT }} \
41- -e KLAYOUT_HOME={{ .KLAYOUT_HOME }} \
42- -e NAFARR_BASE={{ .NAFARR_BASE }} \
43- -e ZIBAL_BASE={{ .ZIBAL_BASE }} \
44- -e BUILD_ROOT={{ .BUILD_ROOT }} \
45- -e GCC={{ .GCC }} \
28+ -e SOC={{.SOC}} \
29+ -e TECH={{.TECH}} \
30+ -e FPGA_FAMILY={{.FPGA_FAMILY}} \
31+ -e FPGA_DEVICE={{.FPGA_DEVICE}} \
32+ -e FPGA_PACKAGE={{.FPGA_PACKAGE}} \
33+ -e FPGA_FREQUENCY={{.FPGA_FREQUENCY}} \
34+ -e PDK={{.PDK}} \
35+ -e PDK_ROOT={{.PDK_ROOT}} \
36+ -e KLAYOUT_HOME={{.KLAYOUT_HOME}} \
37+ -e NAFARR_BASE={{.NAFARR_BASE}} \
38+ -e ZIBAL_BASE={{.ZIBAL_BASE}} \
39+ -e VEXRISCV_ROOT={{.VEXRISCV_ROOT}} \
40+ -e BUILD_ROOT={{.BUILD_ROOT}} \
41+ -e GCC={{.GCC}} \
4642"
4743
44+ env :
45+ FPGA_FAMILY : ecp5
46+ FPGA_DEVICE : um5g-45k
47+ FPGA_PACKAGE : CABGA554
48+ FPGA_FREQUENCY : 50
49+ OPENFPGALOADER_BOARD : ecpix5_r03
50+ PDK_ROOT : " {{.PWD}}/pdks/IHP-Open-PDK/"
51+ NAFARR_BASE : " {{.PWD}}/modules/elements/nafarr/"
52+ ZIBAL_BASE : " {{.PWD}}/modules/elements/zibal/"
53+ VEXRISCV_ROOT : " {{.PWD}}/modules/elements/vexriscv/"
54+ BUILD_ROOT : " {{.PWD}}/build/"
55+ GCC : " /opt/elements/zephyr-sdk-0.17.0/riscv64-zephyr-elf/bin/riscv64-zephyr-elf"
56+ OPENROAD_FLOW_ROOT : " {{.PWD}}/tools/OpenROAD-flow-scripts/flow"
4857
4958tasks :
50- project-prepare :
51- desc : Sets up a virtual environment, installs tools, and initializes project dependencies.
59+ _project-prepare :
5260 cmds :
5361 - virtualenv venv
5462 - venv/bin/pip3 install podman-compose==1.0.6
5563 - curl https://storage.googleapis.com/git-repo-downloads/repo > repo
5664 - chmod a+rx repo
57- - ./repo init -u https://github.com/aesc-silicon/ElemRV.git -b {{if .branch}}{{.branch}}{{else}}main{{end}} -m manifest{{if .nightly}}-nightly{{end }}.xml
65+ - ./repo init -u https://github.com/aesc-silicon/ElemRV.git -b {{if .branch}}{{.branch}}{{else}}main{{end}} -m manifest{{.manifest_suffix }}.xml
5866
59- build-container :
60- desc : Creates a container with all necessary host requirements pre-installed.
67+ _build-container :
6168 cmds :
62- - venv/bin/podman-compose build
69+ - venv/bin/podman-compose {{if .CI}}--podman-pull-args=-q{{end}} pull
70+
6371 repo-sync :
6472 desc : Downloads and synchronizes all required dependencies.
6573 cmds :
66- - ./repo sync
74+ - ./repo sync {{if .CI}}-q{{end}}
75+
6776 install :
6877 desc : Installs all dependencies and prepares the project for FPGA and chip workflows.
6978 cmds :
70- - task : project -prepare
71- - task : build -container
79+ - task : _project -prepare
80+ - task : _build -container
7281 - task : repo-sync
7382 vars :
7483 branch : " main"
75- nightly : " false"
76-
77- fpga-prepare :
78- desc : Produces the Verilog file and metadata needed for FPGA operations.
79- cmds :
80- - task : lib-generate
81- vars :
82- board : " ECPIX5"
83- fpga-synthesize :
84- desc : Generates the FPGA bitstream by synthesizing the design.
85- cmds :
86- - task : lib-synthesize-fpga
87- vars :
88- board : " ECPIX5"
89- vendor : " Lattice"
90- fpga-flash :
91- desc : Programs the FPGA with the generated bitstream.
92- cmds :
93- - task : lib-flash-bitstream
94- vars :
95- board : " ECPIX5"
96- fpga-simulate :
97- desc : Runs simulations at the RTL level. Add 'duration=n' to specify the duration in n milliseconds.
98- cmds :
99- - task : lib-simulate
100- vars :
101- board : " ECPIX5"
102- fpga-view-simulation :
103- desc : Opens the simulation with GTKWave.
104- cmds :
105- - task : lib-view-simulation
106- vars :
107- board : " ECPIX5"
108-
109- compile-firmware :
110- desc : Compiles bare metal firmwares.
111- cmds :
112- - task : lib-baremetal-firmware
113- vars :
114- board : " SG13G2"
115- app : " bootrom"
116- - task : lib-baremetal-firmware
117- vars :
118- board : " SG13G2"
119- app : " demo"
84+ manifest_suffix : " "
12085
12186 prepare :
12287 desc : Generates all necessary source files and metadata for chip layout creation.
12388 cmds :
12489 - task : lib-generate
12590 vars :
126- board : " SG13G2 "
91+ board : " {{.TECH}} "
12792 - task : lib-sealring
12893 vars :
129- board : " SG13G2"
94+ board : " {{.TECH}}"
95+ - " mkdir -p {{.BUILD_ROOT}}/{{.SOC}}/{{.TECH}}/zibal/macros/bondpad"
96+ - " cp tmp/{{.PDK}}/bondpad_70x70.lef {{.BUILD_ROOT}}/{{.SOC}}/{{.TECH}}/zibal/macros/bondpad/"
97+ - " cp tmp/{{.PDK}}/bondpad_70x70.gds.gz {{.BUILD_ROOT}}/{{.SOC}}/{{.TECH}}/zibal/macros/bondpad/bondpad_70x70.gds.gz"
98+ # TODO: wait until bondpad.py got fixed
99+ # - task: lib-bondpad
100+ # vars:
101+ # board: "{{.TECH}}"
130102
131103 simulate :
132104 desc : Runs simulations at the RTL level. Add 'duration=n' to specify the duration in n milliseconds.
133105 cmds :
134106 - task : lib-simulate
135107 vars :
136- board : " SG13G2 "
108+ board : " {{.TECH}} "
137109
138110 view-simulation :
139111 desc : Opens the simulation with GTKWave.
140112 cmds :
141113 - task : lib-view-simulation
142114 vars :
143- board : " SG13G2 "
115+ board : " {{.TECH}} "
144116
145117 layout :
146118 desc : Creates the physical layout of the chip.
147119 cmds :
148120 - task : lib-layout
149121 vars :
150- board : " SG13G2 "
122+ board : " {{.TECH}} "
151123
152124 filler :
153125 desc : Inserts filler cells into the layout to ensure proper chip functionality.
154126 cmds :
155127 - task : lib-filler
156128 vars :
157- board : " SG13G2 "
129+ board : " {{.TECH}} "
158130
159131 run-drc :
160132 desc : Performs Design Rule Checks and reports violations; use 'level=minimal' for a basic check.
161133 cmds :
162134 - task : lib-run-drc
163135 vars :
164- board : " SG13G2 "
136+ board : " {{.TECH}} "
165137
166138 view-drc :
167139 desc : Displays DRC results in KLayout; 'level=minimal' opens minimal deck results.
168140 cmds :
169141 - task : lib-view-drc
170142 vars :
171- board : " SG13G2 "
143+ board : " {{.TECH}} "
172144
173145 view-openroad :
174146 desc : Loads the layout into OpenROAD for further analysis or modification.
175147 cmds :
176148 - task : lib-view-openroad
177149 vars :
178- board : " SG13G2 "
150+ board : " {{.TECH}} "
179151
180152 view-klayout :
181153 desc : Opens the chip layout in KLayout for inspection.
182154 cmds :
183155 - task : lib-view-klayout
184156 vars :
185- board : " SG13G2 "
157+ board : " {{.TECH}} "
186158
187159 check-logs :
188160 desc : Checks the build directory for warnings or errors in the logs.
189161 cmds :
190162 - task : lib-check-logs
191163 vars :
192- board : " SG13G2 "
164+ board : " {{.TECH}} "
193165
194166 default :
195167 desc : Executes the full IHP SG13G2 RTL-to-GDSII flow and validates the layout afterwards.
0 commit comments