Skip to content

Commit c8a3b42

Browse files
thommythomasophsauter
authored andcommitted
ci: artistic: add outline gen
1 parent 4d322a3 commit c8a3b42

File tree

4 files changed

+84
-12
lines changed

4 files changed

+84
-12
lines changed

.github/config/croc_ci.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"TV1" : {"layer" : "125/0", "color" : "#7FFFD4", "alpha" : "0.5" },
3535
"T1" : {"layer" : "126/0", "color" : "#7FFFD4", "alpha" : "0.5" },
3636
"TV2" : {"layer" : "133/0", "color" : "#1E90FF", "alpha" : "0.5" },
37-
"T2" : {"layer" : "134/0", "color" : "#FFFFFF", "alpha" : "0.8" }
37+
"T2" : {"layer" : "134/0", "color" : "#FFFFFF", "alpha" : "0.3" }
3838
},
3939
"work" : {
4040
"dir" : "/fosic/designs/croc/artistic/renderics"

.github/config/croc_map_ci.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
},
55
"gds" : {
66
"file" : "/fosic/designs/croc/artistic/meerkat_work/croc_chip.gds.gz",
7-
"x_offset_um" : 0,
8-
"y_offset_um" : 0,
9-
"width_um" : 1930,
10-
"height_um" : 1930
7+
"x_offset_um" : -59,
8+
"y_offset_um" : -59,
9+
"width_um" : 2048,
10+
"height_um" : 2048
1111
},
1212
"image": {
13-
"px_width" : 19300,
14-
"px_height" : 19300,
13+
"px_width" : 20480,
14+
"px_height" : 20480,
1515
"overrender_factor" : 1,
1616
"num_segs_width" : 5,
1717
"num_segs_height" : 5

.github/config/croc_modules.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"i_uart": {
3+
"name": "UART",
4+
"color": "#f88c05"
5+
},
6+
"i_dm_top": {
7+
"name": "Debug",
8+
"color": "#d489cc"
9+
},
10+
"i_dmi_jtag": {
11+
"name": "JTAG",
12+
"color": "#80499c"
13+
},
14+
"i_obi_timer": {
15+
"name": "Timer",
16+
"color": "#f3d408"
17+
},
18+
"i_core_wrap": {
19+
"name": "Core",
20+
"color": "#fb120d"
21+
},
22+
"i_user": {
23+
"name": "User",
24+
"color": "#1bb32c"
25+
},
26+
"i_gpio": {
27+
"name": "GPIO",
28+
"color": "#43fdaa"
29+
},
30+
"gen_sram_bank": {
31+
"name": "SRAM",
32+
"color": "#39729f"
33+
}
34+
}

.github/workflows/artistic.yml

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,28 @@ jobs:
4242
echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT"
4343
env:
4444
GH_TOKEN: ${{ github.token }}
45-
- name: Download artifact from "Full Flow" workflow
45+
- name: Download GDS artifact from "Full Flow" workflow
4646
uses: actions/download-artifact@v4
4747
with:
4848
name: croc-gds
4949
github-token: ${{ github.token }}
5050
repository: ${{ github.repository }}
5151
run-id: ${{ steps.get-run-id.outputs.run-id }}
5252
path: klayout
53+
- name: Download DEF artifact from "Full Flow" workflow
54+
uses: actions/download-artifact@v4
55+
with:
56+
name: croc-openroad-out
57+
github-token: ${{ github.token }}
58+
repository: ${{ github.repository }}
59+
run-id: ${{ steps.get-run-id.outputs.run-id }}
60+
path: openroad
5361

5462
- name: Checkout ArtistIC repository
5563
uses: actions/checkout@v4
5664
with:
5765
repository: pulp-platform/artistic
58-
ref: 33986fa39e07d89a8337d65e84b01113bf18ea03
66+
ref: 31277dfbcb5f15d219c9834bc9e6f1c9b4705bf3
5967
path: artistic
6068
- name: Update package lists and install Inkscape, img2pdf
6169
run: |
@@ -74,9 +82,10 @@ jobs:
7482
path: doc/artwork/logo.png
7583
continue-on-error: true
7684

77-
- name: Install ImageMagick
85+
- name: Install ImageMagick, Potrace, Pillow, svgpathtools
7886
run: |
79-
sudo apt-get install -y imagemagick
87+
sudo apt-get install -y imagemagick potrace
88+
pip install --break-system-packages svgpathtools Pillow
8089
- name: Install packages in OSEDA
8190
uses: ./.github/actions/oseda-cmd
8291
with:
@@ -103,7 +112,7 @@ jobs:
103112
- name: Generate logo GDS
104113
uses: ./.github/actions/oseda-cmd
105114
with:
106-
cmd: "cd artistic; python3 scripts/meerkat.py -m '145,145,145,145' -i meerkat_work/logo_mono.png -g meerkat_work/croc_tm.gds -l 134 -n croc -s meerkat_work/croc_logo.svg -o meerkat_work/croc_logo.gds"
115+
cmd: "cd artistic; python3 scripts/meerkat.py -i meerkat_work/logo_mono.png -g meerkat_work/croc_tm.gds -l 134 -n croc -s meerkat_work/croc_logo.svg -o meerkat_work/croc_logo.gds"
107116
- name: Upload logo GDS
108117
uses: actions/upload-artifact@v4
109118
with:
@@ -162,6 +171,13 @@ jobs:
162171
mv artistic/renderics//DPI__croc_0-0.png artistic/renderics/croc_render.png
163172
mv artistic/renderics//PDF__croc_0-0.pdf artistic/renderics/croc_render.pdf
164173
convert artistic/renderics/croc_render.png artistic/renderics/croc_render.jpg
174+
- name: Create annotated outlines SVG
175+
run: |
176+
python3 artistic/scripts/gen_outline.py -i openroad/out/croc.def -o artistic/renderics/croc_modules.svg -b artistic/renderics/croc_render.jpg --lef_files ihp13/pdk/ihp-sg13g2/libs.ref/sg13g2_sram/lef/*.lef --px_scale 15000 --module_json .github/config/croc_modules.json --opacity 0.65 --font_size 35 --luminosity 0.85
177+
- name: Create annotated outlines PNG and PDF
178+
run: |
179+
inkscape artistic/renderics/croc_modules.svg -o artistic/renderics/croc_modules.png
180+
inkscape artistic/renderics/croc_modules.svg -o artistic/renderics/croc_modules.pdf
165181
- name: Upload render PNG
166182
uses: actions/upload-artifact@v4
167183
with:
@@ -180,6 +196,24 @@ jobs:
180196
name: render-jpg
181197
path: artistic/renderics/croc_render.jpg
182198
continue-on-error: true
199+
- name: Upload render module SVG
200+
uses: actions/upload-artifact@v4
201+
with:
202+
name: render-module-svg
203+
path: artistic/renderics/croc_modules.svg
204+
continue-on-error: true
205+
- name: Upload render module PNG
206+
uses: actions/upload-artifact@v4
207+
with:
208+
name: render-module-png
209+
path: artistic/renderics/croc_modules.png
210+
continue-on-error: true
211+
- name: Upload render module PDF
212+
uses: actions/upload-artifact@v4
213+
with:
214+
name: render-module-pdf
215+
path: artistic/renderics/croc_modules.pdf
216+
continue-on-error: true
183217
# Map render and deploy below:
184218
- name: Render b/w map layer tiles
185219
uses: ./.github/actions/oseda-cmd
@@ -203,6 +237,10 @@ jobs:
203237
- name: Copy GDS to be deployed
204238
run: |
205239
cp artistic/meerkat_work/croc_logo.gds artistic/mapify/croc_logo.gds
240+
- name: Copy Outlines to be deployed
241+
run: |
242+
cp artistic/renderics/croc_modules.* artistic/mapify/
243+
cp artistic/renderics/croc_render.jpg artistic/mapify/
206244
- name: Upload OpenStreetMap DB to pages
207245
uses: actions/upload-pages-artifact@v3
208246
with:

0 commit comments

Comments
 (0)