summaryrefslogtreecommitdiff
path: root/filter/Makefile
diff options
context:
space:
mode:
authorMartin Stensgård <mastensg@mastensg.net>2025-07-16 22:44:32 +0200
committerMartin Stensgård <mastensg@mastensg.net>2025-07-16 22:44:32 +0200
commit2843105739db84851c3e9d2436c2c3c2c0563abf (patch)
tree08a56850da95c55a3f505d37d349b625908583f2 /filter/Makefile
parent7410377b0cecf00a38b53a073d2ca0edb424d4e2 (diff)
filter: transmit 16000 Hz signed 8 bit PCM over UART
Diffstat (limited to 'filter/Makefile')
-rw-r--r--filter/Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/filter/Makefile b/filter/Makefile
new file mode 100644
index 0000000..195fcbc
--- /dev/null
+++ b/filter/Makefile
@@ -0,0 +1,27 @@
+TOP = top
+VS = top.v ../cocotb_try/cic3_pdm.v
+
+all: check top.bin
+
+check:
+ verilator --lint-only --top $(TOP) $(VS)
+
+clean:
+ rm -f top.asc top.bin top.json
+
+gui:
+ nextpnr-ice40 --hx1k --package tq144 --json top.json --pcf top.pcf --asc top.asc --top $(TOP) --gui
+
+load: all
+ iceprog top.bin
+
+.PHONY: all check clean gui load
+
+top.asc: top.json top.pcf
+ nextpnr-ice40 --hx1k --package tq144 --json top.json --pcf top.pcf --asc top.asc --top $(TOP)
+
+top.bin: top.asc
+ icepack top.asc top.bin
+
+top.json: $(VS)
+ yosys -q -p "synth_ice40 -json top.json -top $(TOP)" $(VS)