aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorbryan newbold <bnewbold@leaflabs.com>2013-06-19 13:04:46 -0400
committerbryan newbold <bnewbold@leaflabs.com>2013-06-19 13:04:46 -0400
commit10199d449f4d20786af2e8abb303d65db98f7d30 (patch)
tree462776b66d4ea656759bb27f95ccd514b6bb4464 /contrib
parent18c3d14cad3e41d82ec231e4f519dd12449c5633 (diff)
downloadbasic-hdl-template-10199d449f4d20786af2e8abb303d65db98f7d30.tar.gz
basic-hdl-template-10199d449f4d20786af2e8abb303d65db98f7d30.zip
proper Makefile syntax; device-specific; mcs bitwidth
Diffstat (limited to 'contrib')
-rw-r--r--contrib/example-device.mk7
-rw-r--r--contrib/xilinx.mk5
2 files changed, 10 insertions, 2 deletions
diff --git a/contrib/example-device.mk b/contrib/example-device.mk
new file mode 100644
index 0000000..88d2e28
--- /dev/null
+++ b/contrib/example-device.mk
@@ -0,0 +1,7 @@
+# Device-specific make targets
+
+.PHONY: spi_upload
+
+spi_upload: build/$(project).bit
+ @echo "unimplemented!"
+
diff --git a/contrib/xilinx.mk b/contrib/xilinx.mk
index 89bd465..253b91e 100644
--- a/contrib/xilinx.mk
+++ b/contrib/xilinx.mk
@@ -48,6 +48,7 @@ iseenvfile?= $(iseenv)/settings$(hostbits).sh
xil_env ?= mkdir -p build/; cd ./build; source $(iseenvfile) > /dev/null
sim_env ?= cd ./tb; source $(iseenvfile) > /dev/null
flashsize ?= 8192
+mcs_datawidth ?= 16
PWD := $(shell pwd)
intstyle ?= -intstyle xflow
@@ -115,11 +116,11 @@ programming_files: build/$(project).bit build/$(project).mcs
@bash -c "$(xil_env); xst -help | head -1 | sed 's/^/#/' | cat - build/$(project).scr > $@/$(date)/$(project).scr"
build/$(project).mcs: build/$(project).bit
- @bash -c "$(xil_env); promgen -w -s $(flashsize) -p mcs -o $(project).mcs -u 0 $(project).bit"
+ @bash -c "$(xil_env); promgen -w -data_width $(mcs_datawidth) -s $(flashsize) -p mcs -o $(project).mcs -u 0 $(project).bit"
build/$(project).bit: build/$(project)_par.ncd
@bash -c "$(xil_env); \
- bitgen $(intstyle) -g DriveDone:yes -g StartupClk:Cclk -w $(project)_par.ncd $(project).bit"
+ bitgen $(intstyle) -g Binary:yes -g DriveDone:yes -g StartupClk:Cclk -w $(project)_par.ncd $(project).bit"
build/$(project)_par.ncd: build/$(project).ncd