Skip to content

Commit 5490670

Browse files
committed
Update CI in order to add MiWi bitstream generation
1 parent 1f18e7c commit 5490670

File tree

2 files changed

+50
-4
lines changed

2 files changed

+50
-4
lines changed

.github/workflows/Pipeline.yml

+23-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515

1616
- name: '🧰 Checkout'
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818

1919
- uses: docker://ghcr.io/hdl/sim/osvb:latest
2020
with:
@@ -27,7 +27,7 @@ jobs:
2727
steps:
2828

2929
- name: '🧰 Checkout'
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131

3232
- uses: docker://ghcr.io/hdl/sim:latest
3333
with:
@@ -40,17 +40,36 @@ jobs:
4040
steps:
4141

4242
- name: '🧰 Checkout'
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4444

4545
- uses: docker://ghcr.io/hdl/impl/icestorm:latest
4646
with:
4747
args: ./Extra/run.sh
4848

4949
- name: '📤 Upload artifact'
50-
uses: actions/upload-artifact@v3
50+
uses: actions/upload-artifact@v4
5151
with:
5252
name: Extra
5353
path: |
5454
./Extra/top.asc
5555
./Extra/top.json
5656
./Extra/top.bin
57+
58+
MiWi:
59+
runs-on: ubuntu-latest
60+
61+
steps:
62+
63+
- name: '🧰 Checkout'
64+
uses: actions/checkout@v4
65+
66+
- uses: docker://ghcr.io/hdl/impl/icestorm:latest
67+
with:
68+
args: ./MiWi/make.sh
69+
70+
- name: '📤 Upload artifact'
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: MiWi
74+
path: ./top_MiWi.bin
75+

MiWi/make.sh

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
cd $(dirname "$0")
6+
7+
cd ..
8+
9+
mkdir -p build
10+
11+
echo "Analyze MIWI"
12+
13+
ghdl -i --std=08 --workdir=build ./MiWi/src/*.vhd
14+
ghdl -i --std=08 --workdir=build ./MiWi/impl/top.vhd
15+
ghdl -m --std=08 --workdir=build top
16+
17+
echo "Synthesis with yosys and ghdl as module"
18+
yosys -m ghdl -p 'ghdl --std=08 --workdir=build top; synth_ice40 -json top_MiWi.json'
19+
20+
echo "Place and route"
21+
nextpnr-ice40 --hx8k --package tq144:4k --pcf ./MiWi/impl/lib.pcf --asc top_MiWi.asc --json top_MiWi.json
22+
23+
echo "Generate bitstream"
24+
icepack top_MiWi.asc top_MiWi.bin
25+
26+
echo "Load bitstream in FPGA (make with sudo)"
27+
which iceprog && iceprog top_MiWi.bin || echo 'Skipping iceprog...'

0 commit comments

Comments
 (0)