aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAimylios <20016942+aimylios@users.noreply.github.com>2020-04-19 14:20:37 +0200
committertgingold <tgingold@users.noreply.github.com>2020-04-19 16:08:35 +0200
commit8bb8453af7acd34705a449cac9cd8427d6db43ba (patch)
tree9243aaa5ec9c4f91abd7291af432dbba41772815 /examples
parentd941c8f65bbbb90f97c17e26b5610624c2198b10 (diff)
downloadghdl-yosys-plugin-8bb8453af7acd34705a449cac9cd8427d6db43ba.tar.gz
ghdl-yosys-plugin-8bb8453af7acd34705a449cac9cd8427d6db43ba.tar.bz2
ghdl-yosys-plugin-8bb8453af7acd34705a449cac9cd8427d6db43ba.zip
Improve examples for Lattice iCEstick
- move "leds" examples to subdirectory - add Makefile - add *.json files to .gitignore - adjust README.md and fix some typos
Diffstat (limited to 'examples')
-rw-r--r--examples/icestick/leds/Makefile34
-rw-r--r--examples/icestick/leds/blink.vhdl (renamed from examples/icestick/blink.vhdl)0
-rw-r--r--examples/icestick/leds/fixed1.vhdl (renamed from examples/icestick/fixed1.vhdl)0
-rw-r--r--examples/icestick/leds/leds.pcf (renamed from examples/icestick/leds.pcf)0
-rw-r--r--examples/icestick/leds/leds.vhdl (renamed from examples/icestick/leds.vhdl)0
-rw-r--r--examples/icestick/leds/multi1.vhdl (renamed from examples/icestick/multi1.vhdl)0
-rw-r--r--examples/icestick/leds/multi2.vhdl (renamed from examples/icestick/multi2.vhdl)0
-rw-r--r--examples/icestick/leds/rotate1.vhdl (renamed from examples/icestick/rotate1.vhdl)0
-rw-r--r--examples/icestick/leds/rotate2.vhdl (renamed from examples/icestick/rotate2.vhdl)0
-rw-r--r--examples/icestick/leds/rotate3.vhdl (renamed from examples/icestick/rotate3.vhdl)0
-rw-r--r--examples/icestick/leds/rotate4.vhdl (renamed from examples/icestick/rotate4.vhdl)0
-rw-r--r--examples/icestick/leds/spin1.vhdl (renamed from examples/icestick/spin1.vhdl)0
-rw-r--r--examples/icestick/leds/spin2.vhdl (renamed from examples/icestick/spin2.vhdl)0
13 files changed, 34 insertions, 0 deletions
diff --git a/examples/icestick/leds/Makefile b/examples/icestick/leds/Makefile
new file mode 100644
index 0000000..77a610d
--- /dev/null
+++ b/examples/icestick/leds/Makefile
@@ -0,0 +1,34 @@
+PROJ = blink
+#PROJ = fixed1
+#PROJ = multi1
+#PROJ = multi2
+#PROJ = rotate1
+#PROJ = rotate2
+#PROJ = rotate3
+#PROJ = rotate4
+#PROJ = spin1
+#PROJ = spin2
+
+PIN_DEF = leds.pcf
+DEVICE = hx1k
+
+all: $(PROJ).bin
+
+%.json: leds.vhdl %.vhdl
+ yosys -m ghdl -p 'ghdl $^ -e leds; synth_ice40 -json $@'
+
+%.asc: %.json
+ nextpnr-ice40 --package $(DEVICE) --pcf $(PIN_DEF) --json $< --asc $@
+
+%.bin: %.asc
+ icepack $< $@
+
+prog: $(PROJ).bin
+ iceprog $<
+
+clean:
+ rm -f $(PROJ).json $(PROJ).asc $(PROJ).bin
+
+.SECONDARY:
+
+.PHONY: all prog clean
diff --git a/examples/icestick/blink.vhdl b/examples/icestick/leds/blink.vhdl
index d7e6dd4..d7e6dd4 100644
--- a/examples/icestick/blink.vhdl
+++ b/examples/icestick/leds/blink.vhdl
diff --git a/examples/icestick/fixed1.vhdl b/examples/icestick/leds/fixed1.vhdl
index b1bbf4b..b1bbf4b 100644
--- a/examples/icestick/fixed1.vhdl
+++ b/examples/icestick/leds/fixed1.vhdl
diff --git a/examples/icestick/leds.pcf b/examples/icestick/leds/leds.pcf
index 397bdc4..397bdc4 100644
--- a/examples/icestick/leds.pcf
+++ b/examples/icestick/leds/leds.pcf
diff --git a/examples/icestick/leds.vhdl b/examples/icestick/leds/leds.vhdl
index 95aa5cf..95aa5cf 100644
--- a/examples/icestick/leds.vhdl
+++ b/examples/icestick/leds/leds.vhdl
diff --git a/examples/icestick/multi1.vhdl b/examples/icestick/leds/multi1.vhdl
index a304765..a304765 100644
--- a/examples/icestick/multi1.vhdl
+++ b/examples/icestick/leds/multi1.vhdl
diff --git a/examples/icestick/multi2.vhdl b/examples/icestick/leds/multi2.vhdl
index 78bf298..78bf298 100644
--- a/examples/icestick/multi2.vhdl
+++ b/examples/icestick/leds/multi2.vhdl
diff --git a/examples/icestick/rotate1.vhdl b/examples/icestick/leds/rotate1.vhdl
index 34c7afd..34c7afd 100644
--- a/examples/icestick/rotate1.vhdl
+++ b/examples/icestick/leds/rotate1.vhdl
diff --git a/examples/icestick/rotate2.vhdl b/examples/icestick/leds/rotate2.vhdl
index e51ec6c..e51ec6c 100644
--- a/examples/icestick/rotate2.vhdl
+++ b/examples/icestick/leds/rotate2.vhdl
diff --git a/examples/icestick/rotate3.vhdl b/examples/icestick/leds/rotate3.vhdl
index 213512f..213512f 100644
--- a/examples/icestick/rotate3.vhdl
+++ b/examples/icestick/leds/rotate3.vhdl
diff --git a/examples/icestick/rotate4.vhdl b/examples/icestick/leds/rotate4.vhdl
index e89aaa5..e89aaa5 100644
--- a/examples/icestick/rotate4.vhdl
+++ b/examples/icestick/leds/rotate4.vhdl
diff --git a/examples/icestick/spin1.vhdl b/examples/icestick/leds/spin1.vhdl
index 79e305c..79e305c 100644
--- a/examples/icestick/spin1.vhdl
+++ b/examples/icestick/leds/spin1.vhdl
diff --git a/examples/icestick/spin2.vhdl b/examples/icestick/leds/spin2.vhdl
index 0f23964..0f23964 100644
--- a/examples/icestick/spin2.vhdl
+++ b/examples/icestick/leds/spin2.vhdl