Skip to content

Commit c3da521

Browse files
committed
openflow: flow.sh was split into yosys/icestorm and yosys/trellis
1 parent 1aa13e0 commit c3da521

File tree

9 files changed

+77
-58
lines changed

9 files changed

+77
-58
lines changed

openflow/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ DOCKER_CMD=docker run --rm -it -v $$HOME:$$HOME -w $$PWD ghdl/synth:beta
44

55
COMMAND=bash
66

7-
flow mix:
7+
mix:
88
$(COMMAND) $@.sh
99

1010
clean:

openflow/flow.sh

Lines changed: 0 additions & 57 deletions
This file was deleted.

yosys/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ vlog vhdl:
99

1010
clean:
1111
rm -fr *.cf
12+
make -C icestorm clean
13+
make -C trellis clean

yosys/icestorm/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/make
2+
3+
all: vlog
4+
5+
vlog prog:
6+
bash $@.sh
7+
8+
clean:
9+
rm -fr *.asc *.bit *.json *.rpt *.pcf

yosys/icestorm/prog.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
DOCKER="docker run --rm -v $HOME:$HOME -w $PWD"
6+
7+
$DOCKER --device /dev/bus/usb hdlc/prog iceprog blink.bit

yosys/icestorm/vlog.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
DOCKER="docker run --rm -v $HOME:$HOME -w $PWD"
6+
7+
cat ../../resources/constraints/icestick/clk.pcf ../../resources/constraints/icestick/led.pcf > icestick.pcf
8+
9+
$DOCKER hdlc/ghdl:yosys /bin/bash -c "
10+
yosys -Q -p '
11+
read_verilog -defer ../../resources/vlog/blink.v;
12+
synth_ice40 -top Blink -json blink.json
13+
'"
14+
15+
$DOCKER hdlc/nextpnr:ice40 /bin/bash -c "
16+
nextpnr-ice40 --json blink.json --hx8k --package tq144:4k --pcf icestick.pcf --asc blink.asc
17+
"
18+
19+
$DOCKER hdlc/icestorm /bin/bash -c "
20+
icepack blink.asc blink.bit
21+
icetime -d hx8k -mtr blink.rpt blink.asc
22+
"

yosys/trellis/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/make
2+
3+
all: vlog
4+
5+
vlog prog:
6+
bash $@.sh
7+
8+
clean:
9+
rm -fr *.bit *.config *.json *.svf

yosys/trellis/prog.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
DOCKER="docker run --rm -v $HOME:$HOME -w $PWD"
6+
7+
$DOCKER --device /dev/bus/usb hdlc/prog openocd -f ${TRELLIS}/misc/openocd/ecp5-evn.cfg -c "transport select jtag; init; svf blink.svf; exit"
8+
# tinyprog -p aux.bit

yosys/trellis/vlog.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
DOCKER="docker run --rm -v $HOME:$HOME -w $PWD"
6+
7+
$DOCKER hdlc/ghdl:yosys /bin/bash -c "
8+
yosys -Q -p '
9+
read_verilog -defer ../../resources/vlog/blink.v;
10+
synth_ecp5 -top Blink -json blink.json
11+
'"
12+
13+
$DOCKER hdlc/nextpnr:ecp5 /bin/bash -c "
14+
nextpnr-ecp5 --json blink.json --25k --package CSFBGA285 --lpf ../../resources/constraints/orangecrab/clk.lpf --lpf ../../resources/constraints/orangecrab/led.lpf --textcfg blink.config
15+
"
16+
17+
$DOCKER hdlc/prjtrellis /bin/bash -c "
18+
ecppack --svf blink.svf blink.config blink.bit
19+
"

0 commit comments

Comments
 (0)