aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-01-14 10:45:35 +0000
committerDavid Shah <davey1576@gmail.com>2018-01-16 15:17:20 +0000
commit99857b1505fa6c651ad9cd4177d8fc68d3e3851c (patch)
treea36ab17c302758825f9320236e687c069f26e419 /examples
parent4b16c3735c0c183837994a4b4b07296f0bbba57c (diff)
downloadicestorm-99857b1505fa6c651ad9cd4177d8fc68d3e3851c.tar.gz
icestorm-99857b1505fa6c651ad9cd4177d8fc68d3e3851c.tar.bz2
icestorm-99857b1505fa6c651ad9cd4177d8fc68d3e3851c.zip
Add example for 5k UWG30 package
Diffstat (limited to 'examples')
-rw-r--r--examples/up5k_rgb/Makefile.uwg3036
-rw-r--r--examples/up5k_rgb/rgb_uwg30.pcf3
2 files changed, 39 insertions, 0 deletions
diff --git a/examples/up5k_rgb/Makefile.uwg30 b/examples/up5k_rgb/Makefile.uwg30
new file mode 100644
index 0000000..b3755ff
--- /dev/null
+++ b/examples/up5k_rgb/Makefile.uwg30
@@ -0,0 +1,36 @@
+PROJ = rgb
+PIN_DEF = rgb_uwg30.pcf
+DEVICE = up5k
+
+ARACHNE = arachne-pnr
+ARACHNE_ARGS =
+ICEPACK = icepack
+ICETIME = icetime
+ICEPROG = iceprog
+
+all: $(PROJ).bin
+
+%.blif: %.v
+ yosys -p 'synth_ice40 -top top -blif $@' $<
+
+%.asc: $(PIN_DEF) %.blif
+ $(ARACHNE) $(ARACHNE_ARGS) -d $(subst up,,$(subst hx,,$(subst lp,,$(DEVICE)))) -o $@ -p $^ -P uwg30
+
+%.bin: %.asc
+ $(ICEPACK) $< $@
+
+%.rpt: %.asc
+ $(ICETIME) -d $(DEVICE) -mtr $@ $<
+
+prog: $(PROJ).bin
+ $(ICEPROG) -S $<
+
+sudo-prog: $(PROJ).bin
+ @echo 'Executing prog as root!!!'
+ sudo $(ICEPROG) -S $<
+
+clean:
+ rm -f $(PROJ).blif $(PROJ).asc $(PROJ).rpt $(PROJ).bin
+
+.SECONDARY:
+.PHONY: all prog clean
diff --git a/examples/up5k_rgb/rgb_uwg30.pcf b/examples/up5k_rgb/rgb_uwg30.pcf
new file mode 100644
index 0000000..475cfd5
--- /dev/null
+++ b/examples/up5k_rgb/rgb_uwg30.pcf
@@ -0,0 +1,3 @@
+set_io RGB0 A5
+set_io RGB1 B5
+set_io RGB2 C5