From 37db02b7265e1dc1cf5fb93a45cfd3fc2091daa0 Mon Sep 17 00:00:00 2001 From: Joshua Fife Date: Tue, 10 Aug 2021 16:47:29 -0600 Subject: [PATCH 1/6] Added common makefile and modified counter makefile for testing Signed-off-by: Joshua Fife --- common/Makefile | 86 +++++++++++++++++++++++++++++++++++++++ xc7/counter_test/Makefile | 72 ++++---------------------------- 2 files changed, 94 insertions(+), 64 deletions(-) create mode 100644 common/Makefile diff --git a/common/Makefile b/common/Makefile new file mode 100644 index 0000000..0565a09 --- /dev/null +++ b/common/Makefile @@ -0,0 +1,86 @@ +BUILDDIR := ${current_dir}/build + +# Set board properties based on TARGET variable +ifeq ($(TARGET),arty_35) + DEVICE := xc7a50t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a35tcsg324-1 + CONSTRAINT_PATH := ${current_dir}/arty + BOARD_BUILDDIR := ${BUILDDIR}/arty_35 +else ifeq ($(TARGET),arty_100) + DEVICE := xc7a100t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a100tcsg324-1 + CONSTRAINT_PATH := ${current_dir}/arty + BOARD_BUILDDIR := ${BUILDDIR}/arty_100 +else ifeq ($(TARGET),nexys4ddr) + DEVICE := xc7a100t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a100tcsg324-1 + CONSTRAINT_PATH := ${current_dir}/nexys4ddr + BOARD_BUILDDIR := ${BUILDDIR}/nexys4ddr +else ifeq ($(TARGET),zybo) + DEVICE := xc7z010_test + BITSTREAM_DEVICE := zynq7 + PARTNAME := xc7z010clg400-1 + CONSTRAINT_PATH := ${current_dir}/zybo + BOARD_BUILDDIR := ${BUILDDIR}/zybo + SOURCES := ${current_dir}/counter_zynq.v +else ifeq ($(TARGET),nexys_video) + DEVICE := xc7a200t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a200tsbg484-1 + CONSTRAINT_PATH := ${current_dir}/nexys_video + BOARD_BUILDDIR := ${BUILDDIR}/nexys_video +else + DEVICE := xc7a50t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a35tcpg236-1 + CONSTRAINT_PATH := ${current_dir}/basys3 + BOARD_BUILDDIR := ${BUILDDIR}/basys3 +endif + +# Determine the type of constraint being used +ifneq ($(wildcard ${CONSTRAINT_PATH}.xdc),) + XDC_CMD := -x ${CONSTRAINT_PATH}.xdc +endif +ifneq ($(wildcard ${CONSTRAINT_PATH}.sdc),) + SDC_CMD := -s ${CONSTRAINT_PATH}.sdc +endif +ifneq ($(wildcard ${CONSTRAINT_PATH}.pcf),) + PCF_CMD := -p ${CONSTRAINT_PATH}.pcf +endif + +.DELETE_ON_ERROR: + +# Build design +all: ${BOARD_BUILDDIR}/${TOP}.bit + +${BOARD_BUILDDIR}: + mkdir -p ${BOARD_BUILDDIR} + #Check if design includes initialization files for memory + ifneq (${MEM_INIT},) + #if there are memory initialization files link them to the build/board_type directory + ln -s ${MEM_INIT} ${BOARD_BUILDDIR} + endif + +${BOARD_BUILDDIR}/${TOP}.eblif: | ${BOARD_BUILDDIR} + cd ${BOARD_BUILDDIR} && symbiflow_synth -t ${TOP} -v ${SOURCES} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} ${XDC_CMD} 2>&1 > /dev/null + +${BOARD_BUILDDIR}/${TOP}.net: ${BOARD_BUILDDIR}/${TOP}.eblif + cd ${BOARD_BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} ${SDC_CMD} 2>&1 > /dev/null + +${BOARD_BUILDDIR}/${TOP}.place: ${BOARD_BUILDDIR}/${TOP}.net + cd ${BOARD_BUILDDIR} && symbiflow_place -e ${TOP}.eblif -d ${DEVICE} ${PCF_CMD} -n ${TOP}.net -P ${PARTNAME} ${SDC_CMD} 2>&1 > /dev/null + +${BOARD_BUILDDIR}/${TOP}.route: ${BOARD_BUILDDIR}/${TOP}.place + cd ${BOARD_BUILDDIR} && symbiflow_route -e ${TOP}.eblif -d ${DEVICE} ${SDC_CMD} 2>&1 > /dev/null + +${BOARD_BUILDDIR}/${TOP}.fasm: ${BOARD_BUILDDIR}/${TOP}.route + cd ${BOARD_BUILDDIR} && symbiflow_write_fasm -e ${TOP}.eblif -d ${DEVICE} + +${BOARD_BUILDDIR}/${TOP}.bit: ${BOARD_BUILDDIR}/${TOP}.fasm + cd ${BOARD_BUILDDIR} && symbiflow_write_bitstream -d ${BITSTREAM_DEVICE} -f ${TOP}.fasm -p ${PARTNAME} -b ${TOP}.bit + +clean: + rm -rf ${BUILDDIR} \ No newline at end of file diff --git a/xc7/counter_test/Makefile b/xc7/counter_test/Makefile index 07bc449..a12a7ba 100644 --- a/xc7/counter_test/Makefile +++ b/xc7/counter_test/Makefile @@ -1,68 +1,12 @@ -mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) -current_dir := $(patsubst %/,%,$(dir $(mkfile_path))) -TOP := top -VERILOG := ${current_dir}/counter.v -DEVICE := xc7a50t_test -BITSTREAM_DEVICE := artix7 -BUILDDIR := build +export mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) +export current_dir := $(patsubst %/,%,$(dir $(mkfile_path))) -ifeq ($(TARGET),arty_35) - PARTNAME := xc7a35tcsg324-1 - XDC := ${current_dir}/arty.xdc - BOARD_BUILDDIR := ${BUILDDIR}/arty_35 -else ifeq ($(TARGET),arty_100) - PARTNAME := xc7a100tcsg324-1 - XDC := ${current_dir}/arty.xdc - DEVICE := xc7a100t_test - BOARD_BUILDDIR := ${BUILDDIR}/arty_100 -else ifeq ($(TARGET),nexys4ddr) - PARTNAME := xc7a100tcsg324-1 - XDC := ${current_dir}/nexys4ddr.xdc - DEVICE := xc7a100t_test - BOARD_BUILDDIR := ${BUILDDIR}/nexys4ddr -else ifeq ($(TARGET),zybo) - PARTNAME := xc7z010clg400-1 - XDC := ${current_dir}/zybo.xdc - DEVICE := xc7z010_test - BITSTREAM_DEVICE := zynq7 - BOARD_BUILDDIR := ${BUILDDIR}/zybo - VERILOG:=${current_dir}/counter_zynq.v -else ifeq ($(TARGET),nexys_video) - PARTNAME := xc7a200tsbg484-1 - XDC := ${current_dir}/nexys_video.xdc - DEVICE := xc7a200t_test - BOARD_BUILDDIR := ${BUILDDIR}/nexys_video -else - PARTNAME := xc7a35tcpg236-1 - XDC := ${current_dir}/basys3.xdc - BOARD_BUILDDIR := ${BUILDDIR}/basys3 -endif +export TOP := top +export SOURCES := ${current_dir}/counter.v -.DELETE_ON_ERROR: - - -all: ${BOARD_BUILDDIR}/${TOP}.bit - -${BOARD_BUILDDIR}: - mkdir -p ${BOARD_BUILDDIR} - -${BOARD_BUILDDIR}/${TOP}.eblif: | ${BOARD_BUILDDIR} - cd ${BOARD_BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} -x ${XDC} 2>&1 > /dev/null - -${BOARD_BUILDDIR}/${TOP}.net: ${BOARD_BUILDDIR}/${TOP}.eblif - cd ${BOARD_BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} 2>&1 > /dev/null - -${BOARD_BUILDDIR}/${TOP}.place: ${BOARD_BUILDDIR}/${TOP}.net - cd ${BOARD_BUILDDIR} && symbiflow_place -e ${TOP}.eblif -d ${DEVICE} -n ${TOP}.net -P ${PARTNAME} 2>&1 > /dev/null - -${BOARD_BUILDDIR}/${TOP}.route: ${BOARD_BUILDDIR}/${TOP}.place - cd ${BOARD_BUILDDIR} && symbiflow_route -e ${TOP}.eblif -d ${DEVICE} 2>&1 > /dev/null - -${BOARD_BUILDDIR}/${TOP}.fasm: ${BOARD_BUILDDIR}/${TOP}.route - cd ${BOARD_BUILDDIR} && symbiflow_write_fasm -e ${TOP}.eblif -d ${DEVICE} - -${BOARD_BUILDDIR}/${TOP}.bit: ${BOARD_BUILDDIR}/${TOP}.fasm - cd ${BOARD_BUILDDIR} && symbiflow_write_bitstream -d ${BITSTREAM_DEVICE} -f ${TOP}.fasm -p ${PARTNAME} -b ${TOP}.bit +all: + cd ../../common && $(MAKE) clean: - rm -rf ${BUILDDIR} + cd ../../common && $(MAKE) clean + From 5d1de9005598672a0cb16e670c5a3d23789d4325 Mon Sep 17 00:00:00 2001 From: Joshua Fife Date: Tue, 10 Aug 2021 17:00:16 -0600 Subject: [PATCH 2/6] Common Makefile v2 and changed all examples Signed-off-by: Joshua Fife --- common/Makefile | 53 ++++------------------------- xc7/counter_test/Makefile | 42 ++++++++++++++++++++--- xc7/linux_litex_demo/Makefile | 42 +++++------------------ xc7/picosoc_demo/Makefile | 63 ++++++++++------------------------- 4 files changed, 71 insertions(+), 129 deletions(-) diff --git a/common/Makefile b/common/Makefile index 0565a09..ecc459b 100644 --- a/common/Makefile +++ b/common/Makefile @@ -1,54 +1,15 @@ BUILDDIR := ${current_dir}/build - -# Set board properties based on TARGET variable -ifeq ($(TARGET),arty_35) - DEVICE := xc7a50t_test - BITSTREAM_DEVICE := artix7 - PARTNAME := xc7a35tcsg324-1 - CONSTRAINT_PATH := ${current_dir}/arty - BOARD_BUILDDIR := ${BUILDDIR}/arty_35 -else ifeq ($(TARGET),arty_100) - DEVICE := xc7a100t_test - BITSTREAM_DEVICE := artix7 - PARTNAME := xc7a100tcsg324-1 - CONSTRAINT_PATH := ${current_dir}/arty - BOARD_BUILDDIR := ${BUILDDIR}/arty_100 -else ifeq ($(TARGET),nexys4ddr) - DEVICE := xc7a100t_test - BITSTREAM_DEVICE := artix7 - PARTNAME := xc7a100tcsg324-1 - CONSTRAINT_PATH := ${current_dir}/nexys4ddr - BOARD_BUILDDIR := ${BUILDDIR}/nexys4ddr -else ifeq ($(TARGET),zybo) - DEVICE := xc7z010_test - BITSTREAM_DEVICE := zynq7 - PARTNAME := xc7z010clg400-1 - CONSTRAINT_PATH := ${current_dir}/zybo - BOARD_BUILDDIR := ${BUILDDIR}/zybo - SOURCES := ${current_dir}/counter_zynq.v -else ifeq ($(TARGET),nexys_video) - DEVICE := xc7a200t_test - BITSTREAM_DEVICE := artix7 - PARTNAME := xc7a200tsbg484-1 - CONSTRAINT_PATH := ${current_dir}/nexys_video - BOARD_BUILDDIR := ${BUILDDIR}/nexys_video -else - DEVICE := xc7a50t_test - BITSTREAM_DEVICE := artix7 - PARTNAME := xc7a35tcpg236-1 - CONSTRAINT_PATH := ${current_dir}/basys3 - BOARD_BUILDDIR := ${BUILDDIR}/basys3 -endif +BOARD_BUILDDIR := ${BUILDDIR}/${TARGET} # Determine the type of constraint being used -ifneq ($(wildcard ${CONSTRAINT_PATH}.xdc),) - XDC_CMD := -x ${CONSTRAINT_PATH}.xdc +ifneq (${XDC},) + XDC_CMD := -x ${XDC} endif -ifneq ($(wildcard ${CONSTRAINT_PATH}.sdc),) - SDC_CMD := -s ${CONSTRAINT_PATH}.sdc +ifneq (${SDC},) + SDC_CMD := -s ${SDC} endif -ifneq ($(wildcard ${CONSTRAINT_PATH}.pcf),) - PCF_CMD := -p ${CONSTRAINT_PATH}.pcf +ifneq (${PCF},) + PCF_CMD := -p ${PCF} endif .DELETE_ON_ERROR: diff --git a/xc7/counter_test/Makefile b/xc7/counter_test/Makefile index a12a7ba..f6c79aa 100644 --- a/xc7/counter_test/Makefile +++ b/xc7/counter_test/Makefile @@ -1,12 +1,44 @@ -export mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) -export current_dir := $(patsubst %/,%,$(dir $(mkfile_path))) +current_dir := ${CURDIR} +TOP := top +SOURCES := ${current_dir}/counter.v -export TOP := top -export SOURCES := ${current_dir}/counter.v +ifeq ($(TARGET),arty_35) + DEVICE := xc7a50t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a35tcsg324-1 + XDC := ${current_dir}/arty.xdc +else ifeq ($(TARGET),arty_100) + DEVICE := xc7a100t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a100tcsg324-1 + XDC := ${current_dir}/arty.xdc +else ifeq ($(TARGET),nexys4ddr) + DEVICE := xc7a100t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a100tcsg324-1 + XDC := ${current_dir}/nexys4ddr.xdc +else ifeq ($(TARGET),zybo) + DEVICE := xc7z010_test + BITSTREAM_DEVICE := zynq7 + PARTNAME := xc7z010clg400-1 + XDC := ${current_dir}/zybo.xdc + SOURCES:=${current_dir}/counter_zynq.v +else ifeq ($(TARGET),nexys_video) + DEVICE := xc7a200t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a200tsbg484-1 + XDC := ${current_dir}/nexys_video.xdc +else + DEVICE := xc7a50t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a35tcpg236-1 + XDC := ${current_dir}/basys3.xdc +endif + +export all: cd ../../common && $(MAKE) - clean: cd ../../common && $(MAKE) clean diff --git a/xc7/linux_litex_demo/Makefile b/xc7/linux_litex_demo/Makefile index 31c50e1..7318bab 100644 --- a/xc7/linux_litex_demo/Makefile +++ b/xc7/linux_litex_demo/Makefile @@ -1,53 +1,29 @@ -mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) -current_dir := $(patsubst %/,%,$(dir $(mkfile_path))) +current_dir := ${CURDIR} TOP := top -VERILOG := ${current_dir}/baselitex_arty.v \ +SOURCES := ${current_dir}/baselitex_arty.v \ ${current_dir}/VexRiscv_Linux.v MEM_INIT := ${current_dir}/mem.init \ ${current_dir}/mem_1.init \ ${current_dir}/mem_2.init -BITSTREAM_DEVICE := artix7 PCF := ${current_dir}/arty.pcf SDC := ${current_dir}/arty.sdc XDC := ${current_dir}/arty.xdc -BUILDDIR := build + + +BITSTREAM_DEVICE := artix7 ifeq ($(TARGET),arty_100) PARTNAME := xc7a100tcsg324-1 DEVICE := xc7a100t_test - BOARD_BUILDDIR := ${BUILDDIR}/arty_100 else PARTNAME := xc7a35tcsg324-1 DEVICE := xc7a50t_test - BOARD_BUILDDIR := ${BUILDDIR}/arty_35 endif -.DELETE_ON_ERROR: +export - -all: ${BOARD_BUILDDIR}/${TOP}.bit - -${BOARD_BUILDDIR}: - mkdir -p ${BOARD_BUILDDIR} - ln -s ${MEM_INIT} ${BOARD_BUILDDIR} - -${BOARD_BUILDDIR}/${TOP}.eblif: | ${BOARD_BUILDDIR} - cd ${BOARD_BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} -x ${XDC} 2>&1 > /dev/null - -${BOARD_BUILDDIR}/${TOP}.net: ${BOARD_BUILDDIR}/${TOP}.eblif - cd ${BOARD_BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null - -${BOARD_BUILDDIR}/${TOP}.place: ${BOARD_BUILDDIR}/${TOP}.net - cd ${BOARD_BUILDDIR} && symbiflow_place -e ${TOP}.eblif -d ${DEVICE} -p ${PCF} -n ${TOP}.net -P ${PARTNAME} -s ${SDC} 2>&1 > /dev/null - -${BOARD_BUILDDIR}/${TOP}.route: ${BOARD_BUILDDIR}/${TOP}.place - cd ${BOARD_BUILDDIR} && symbiflow_route -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null - -${BOARD_BUILDDIR}/${TOP}.fasm: ${BOARD_BUILDDIR}/${TOP}.route - cd ${BOARD_BUILDDIR} && symbiflow_write_fasm -e ${TOP}.eblif -d ${DEVICE} - -${BOARD_BUILDDIR}/${TOP}.bit: ${BOARD_BUILDDIR}/${TOP}.fasm - cd ${BOARD_BUILDDIR} && symbiflow_write_bitstream -d ${BITSTREAM_DEVICE} -f ${TOP}.fasm -p ${PARTNAME} -b ${TOP}.bit +all: + cd ../../common && $(MAKE) clean: - rm -rf ${BUILDDIR} + cd ../../common && $(MAKE) clean \ No newline at end of file diff --git a/xc7/picosoc_demo/Makefile b/xc7/picosoc_demo/Makefile index cf01292..f6c9404 100644 --- a/xc7/picosoc_demo/Makefile +++ b/xc7/picosoc_demo/Makefile @@ -1,66 +1,39 @@ -mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) -current_dir := $(patsubst %/,%,$(dir $(mkfile_path))) +current_dir := ${CURDIR} TOP := top -VERILOG := ${current_dir}/picosoc_noflash.v \ +SOURCES := ${current_dir}/picosoc_noflash.v \ ${current_dir}/picorv32.v \ ${current_dir}/simpleuart.v \ ${current_dir}/progmem.v -PARTNAME := xc7a35tcpg236-1 -DEVICE := xc7a50t_test -BITSTREAM_DEVICE := artix7 -PCF := ${current_dir}/basys3.pcf + SDC := ${current_dir}/picosoc.sdc -BUILDDIR := build +BITSTREAM_DEVICE := artix7 ifeq ($(TARGET),arty_35) - VERILOG += ${current_dir}/arty.v + DEVICE := xc7a50t_test + SOURCES += ${current_dir}/arty.v PARTNAME := xc7a35tcsg324-1 PCF := ${current_dir}/arty.pcf - BOARD_BUILDDIR := ${BUILDDIR}/arty_35 else ifeq ($(TARGET),arty_100) - VERILOG += ${current_dir}/arty.v - PARTNAME := xc7a100tcsg324-1 - PCF:=${current_dir}/arty.pcf DEVICE := xc7a100t_test - BOARD_BUILDDIR := ${BUILDDIR}/arty_100 + SOURCES += ${current_dir}/arty.v + PARTNAME := xc7a100tcsg324-1 + PCF := ${current_dir}/arty.pcf else ifeq ($(TARGET),nexys4ddr) - VERILOG += ${current_dir}/nexys4ddr.v + DEVICE := xc7a100t_test + SOURCES += ${current_dir}/nexys4ddr.v PARTNAME := xc7a100tcsg324-1 - PCF:=${current_dir}/nexys4ddr.pcf - DEVICE := xc7a100t_test - BOARD_BUILDDIR := ${BUILDDIR}/nexys4ddr + PCF := ${current_dir}/nexys4ddr.pcf else - VERILOG += ${current_dir}/basys3.v + DEVICE := xc7a50t_test + SOURCES += ${current_dir}/basys3.v PARTNAME := xc7a35tcpg236-1 PCF := ${current_dir}/basys3.pcf - BOARD_BUILDDIR := ${BUILDDIR}/basys3 endif -.DELETE_ON_ERROR: +export - -all: ${BOARD_BUILDDIR}/${TOP}.bit - -${BOARD_BUILDDIR}: - mkdir -p ${BOARD_BUILDDIR} - -${BOARD_BUILDDIR}/${TOP}.eblif: | ${BOARD_BUILDDIR} - cd ${BOARD_BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} 2>&1 > /dev/null - -${BOARD_BUILDDIR}/${TOP}.net: ${BOARD_BUILDDIR}/${TOP}.eblif - cd ${BOARD_BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null - -${BOARD_BUILDDIR}/${TOP}.place: ${BOARD_BUILDDIR}/${TOP}.net - cd ${BOARD_BUILDDIR} && symbiflow_place -e ${TOP}.eblif -d ${DEVICE} -p ${PCF} -n ${TOP}.net -P ${PARTNAME} -s ${SDC} 2>&1 > /dev/null - -${BOARD_BUILDDIR}/${TOP}.route: ${BOARD_BUILDDIR}/${TOP}.place - cd ${BOARD_BUILDDIR} && symbiflow_route -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null - -${BOARD_BUILDDIR}/${TOP}.fasm: ${BOARD_BUILDDIR}/${TOP}.route - cd ${BOARD_BUILDDIR} && symbiflow_write_fasm -e ${TOP}.eblif -d ${DEVICE} - -${BOARD_BUILDDIR}/${TOP}.bit: ${BOARD_BUILDDIR}/${TOP}.fasm - cd ${BOARD_BUILDDIR} && symbiflow_write_bitstream -d ${BITSTREAM_DEVICE} -f ${TOP}.fasm -p ${PARTNAME} -b ${TOP}.bit +all: + cd ../../common && $(MAKE) clean: - rm -rf ${BUILDDIR} + cd ../../common && $(MAKE) clean \ No newline at end of file From 2af9d695a74458a210581a223af791d2c58a0974 Mon Sep 17 00:00:00 2001 From: Joshua Fife Date: Tue, 10 Aug 2021 17:57:37 -0600 Subject: [PATCH 3/6] Common Makefile v3 and changed all designs Signed-off-by: Joshua Fife --- common/Makefile | 29 +++++++++++++++++++++++++++++ xc7/counter_test/Makefile | 18 ------------------ xc7/linux_litex_demo/Makefile | 11 ----------- xc7/picosoc_demo/Makefile | 9 --------- 4 files changed, 29 insertions(+), 38 deletions(-) diff --git a/common/Makefile b/common/Makefile index ecc459b..aee7230 100644 --- a/common/Makefile +++ b/common/Makefile @@ -1,6 +1,35 @@ BUILDDIR := ${current_dir}/build BOARD_BUILDDIR := ${BUILDDIR}/${TARGET} +# Set board properties based on TARGET variable +ifeq ($(TARGET),arty_35) + DEVICE := xc7a50t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a35tcsg324-1 +else ifeq ($(TARGET),arty_100) + DEVICE := xc7a100t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a100tcsg324-1 +else ifeq ($(TARGET),nexys4ddr) + DEVICE := xc7a100t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a100tcsg324-1 +else ifeq ($(TARGET),zybo) + DEVICE := xc7z010_test + BITSTREAM_DEVICE := zynq7 + PARTNAME := xc7z010clg400-1 +else ifeq ($(TARGET),nexys_video) + DEVICE := xc7a200t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a200tsbg484-1 +else ifeq ($(TARGET),basys3) + DEVICE := xc7a50t_test + BITSTREAM_DEVICE := artix7 + PARTNAME := xc7a35tcpg236-1 +else + $(error Unsupported board type) +endif + # Determine the type of constraint being used ifneq (${XDC},) XDC_CMD := -x ${XDC} diff --git a/xc7/counter_test/Makefile b/xc7/counter_test/Makefile index f6c79aa..7dccb0c 100644 --- a/xc7/counter_test/Makefile +++ b/xc7/counter_test/Makefile @@ -3,35 +3,17 @@ TOP := top SOURCES := ${current_dir}/counter.v ifeq ($(TARGET),arty_35) - DEVICE := xc7a50t_test - BITSTREAM_DEVICE := artix7 - PARTNAME := xc7a35tcsg324-1 XDC := ${current_dir}/arty.xdc else ifeq ($(TARGET),arty_100) - DEVICE := xc7a100t_test - BITSTREAM_DEVICE := artix7 - PARTNAME := xc7a100tcsg324-1 XDC := ${current_dir}/arty.xdc else ifeq ($(TARGET),nexys4ddr) - DEVICE := xc7a100t_test - BITSTREAM_DEVICE := artix7 - PARTNAME := xc7a100tcsg324-1 XDC := ${current_dir}/nexys4ddr.xdc else ifeq ($(TARGET),zybo) - DEVICE := xc7z010_test - BITSTREAM_DEVICE := zynq7 - PARTNAME := xc7z010clg400-1 XDC := ${current_dir}/zybo.xdc SOURCES:=${current_dir}/counter_zynq.v else ifeq ($(TARGET),nexys_video) - DEVICE := xc7a200t_test - BITSTREAM_DEVICE := artix7 - PARTNAME := xc7a200tsbg484-1 XDC := ${current_dir}/nexys_video.xdc else - DEVICE := xc7a50t_test - BITSTREAM_DEVICE := artix7 - PARTNAME := xc7a35tcpg236-1 XDC := ${current_dir}/basys3.xdc endif diff --git a/xc7/linux_litex_demo/Makefile b/xc7/linux_litex_demo/Makefile index 7318bab..f4d39ac 100644 --- a/xc7/linux_litex_demo/Makefile +++ b/xc7/linux_litex_demo/Makefile @@ -9,17 +9,6 @@ PCF := ${current_dir}/arty.pcf SDC := ${current_dir}/arty.sdc XDC := ${current_dir}/arty.xdc - -BITSTREAM_DEVICE := artix7 - -ifeq ($(TARGET),arty_100) - PARTNAME := xc7a100tcsg324-1 - DEVICE := xc7a100t_test -else - PARTNAME := xc7a35tcsg324-1 - DEVICE := xc7a50t_test -endif - export all: diff --git a/xc7/picosoc_demo/Makefile b/xc7/picosoc_demo/Makefile index f6c9404..bb7b591 100644 --- a/xc7/picosoc_demo/Makefile +++ b/xc7/picosoc_demo/Makefile @@ -6,27 +6,18 @@ SOURCES := ${current_dir}/picosoc_noflash.v \ ${current_dir}/progmem.v SDC := ${current_dir}/picosoc.sdc -BITSTREAM_DEVICE := artix7 ifeq ($(TARGET),arty_35) - DEVICE := xc7a50t_test SOURCES += ${current_dir}/arty.v - PARTNAME := xc7a35tcsg324-1 PCF := ${current_dir}/arty.pcf else ifeq ($(TARGET),arty_100) - DEVICE := xc7a100t_test SOURCES += ${current_dir}/arty.v - PARTNAME := xc7a100tcsg324-1 PCF := ${current_dir}/arty.pcf else ifeq ($(TARGET),nexys4ddr) - DEVICE := xc7a100t_test SOURCES += ${current_dir}/nexys4ddr.v - PARTNAME := xc7a100tcsg324-1 PCF := ${current_dir}/nexys4ddr.pcf else - DEVICE := xc7a50t_test SOURCES += ${current_dir}/basys3.v - PARTNAME := xc7a35tcpg236-1 PCF := ${current_dir}/basys3.pcf endif From 052c10e2f27514250e4e393dcde5b2fdb7d96598 Mon Sep 17 00:00:00 2001 From: Joshua Fife Date: Wed, 11 Aug 2021 11:32:59 -0600 Subject: [PATCH 4/6] Changed example makefiles to include common Makefile instead of adding additional targets Signed-off-by: Joshua Fife --- xc7/counter_test/Makefile | 7 +------ xc7/linux_litex_demo/Makefile | 8 +------- xc7/picosoc_demo/Makefile | 8 +------- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/xc7/counter_test/Makefile b/xc7/counter_test/Makefile index 7dccb0c..df92f1f 100644 --- a/xc7/counter_test/Makefile +++ b/xc7/counter_test/Makefile @@ -17,10 +17,5 @@ else XDC := ${current_dir}/basys3.xdc endif -export - -all: - cd ../../common && $(MAKE) -clean: - cd ../../common && $(MAKE) clean +include ${current_dir}/../../common/Makefile diff --git a/xc7/linux_litex_demo/Makefile b/xc7/linux_litex_demo/Makefile index f4d39ac..300d9d2 100644 --- a/xc7/linux_litex_demo/Makefile +++ b/xc7/linux_litex_demo/Makefile @@ -9,10 +9,4 @@ PCF := ${current_dir}/arty.pcf SDC := ${current_dir}/arty.sdc XDC := ${current_dir}/arty.xdc -export - -all: - cd ../../common && $(MAKE) - -clean: - cd ../../common && $(MAKE) clean \ No newline at end of file +include ${current_dir}/../../common/Makefile \ No newline at end of file diff --git a/xc7/picosoc_demo/Makefile b/xc7/picosoc_demo/Makefile index bb7b591..c39fdf7 100644 --- a/xc7/picosoc_demo/Makefile +++ b/xc7/picosoc_demo/Makefile @@ -21,10 +21,4 @@ else PCF := ${current_dir}/basys3.pcf endif -export - -all: - cd ../../common && $(MAKE) - -clean: - cd ../../common && $(MAKE) clean \ No newline at end of file +include ${current_dir}/../../common/Makefile \ No newline at end of file From d4742b8c7f0a1589b00e141bfa389f57ec6cc04c Mon Sep 17 00:00:00 2001 From: Joshua Fife Date: Thu, 12 Aug 2021 12:13:06 -0600 Subject: [PATCH 5/6] Removed MEM_INIT symilinks Signed-off-by: Joshua Fife --- common/Makefile | 5 ----- xc7/linux_litex_demo/Makefile | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/common/Makefile b/common/Makefile index aee7230..9f519ec 100644 --- a/common/Makefile +++ b/common/Makefile @@ -48,11 +48,6 @@ all: ${BOARD_BUILDDIR}/${TOP}.bit ${BOARD_BUILDDIR}: mkdir -p ${BOARD_BUILDDIR} - #Check if design includes initialization files for memory - ifneq (${MEM_INIT},) - #if there are memory initialization files link them to the build/board_type directory - ln -s ${MEM_INIT} ${BOARD_BUILDDIR} - endif ${BOARD_BUILDDIR}/${TOP}.eblif: | ${BOARD_BUILDDIR} cd ${BOARD_BUILDDIR} && symbiflow_synth -t ${TOP} -v ${SOURCES} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} ${XDC_CMD} 2>&1 > /dev/null diff --git a/xc7/linux_litex_demo/Makefile b/xc7/linux_litex_demo/Makefile index 300d9d2..81f81b5 100644 --- a/xc7/linux_litex_demo/Makefile +++ b/xc7/linux_litex_demo/Makefile @@ -2,9 +2,7 @@ current_dir := ${CURDIR} TOP := top SOURCES := ${current_dir}/baselitex_arty.v \ ${current_dir}/VexRiscv_Linux.v -MEM_INIT := ${current_dir}/mem.init \ - ${current_dir}/mem_1.init \ - ${current_dir}/mem_2.init + PCF := ${current_dir}/arty.pcf SDC := ${current_dir}/arty.sdc XDC := ${current_dir}/arty.xdc From b9eaf29529276143b25d41cf64667284d892fa5c Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Tue, 17 Aug 2021 11:37:17 +0200 Subject: [PATCH 6/6] xc7: update symbiflow packages Signed-off-by: Alessandro Comodi --- docs/getting-symbiflow.rst | 10 +++++----- xc7/environment.yml | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/getting-symbiflow.rst b/docs/getting-symbiflow.rst index 7118029..4ed500a 100644 --- a/docs/getting-symbiflow.rst +++ b/docs/getting-symbiflow.rst @@ -117,11 +117,11 @@ Download architecture definitions: :name: download-arch-def-xc7 mkdir -p $INSTALL_DIR/xc7/install - wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/201/20210325-000253/symbiflow-arch-defs-install-1c7a3d1e.tar.xz | tar -xJC $INSTALL_DIR/xc7/install - wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/201/20210325-000253/symbiflow-arch-defs-xc7a50t_test-1c7a3d1e.tar.xz | tar -xJC $INSTALL_DIR/xc7/install - wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/201/20210325-000253/symbiflow-arch-defs-xc7a100t_test-1c7a3d1e.tar.xz | tar -xJC $INSTALL_DIR/xc7/install - wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/201/20210325-000253/symbiflow-arch-defs-xc7a200t_test-1c7a3d1e.tar.xz | tar -xJC $INSTALL_DIR/xc7/install - wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/201/20210325-000253/symbiflow-arch-defs-xc7z010_test-1c7a3d1e.tar.xz | tar -xJC $INSTALL_DIR/xc7/install + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/361/20210816-133520/symbiflow-arch-defs-install-5bd496ab.tar.xz | tar -xJC $INSTALL_DIR/xc7/install + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/361/20210816-133520/symbiflow-arch-defs-xc7a50t_test-5bd496ab.tar.xz | tar -xJC $INSTALL_DIR/xc7/install + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/361/20210816-133520/symbiflow-arch-defs-xc7a100t_test-5bd496ab.tar.xz | tar -xJC $INSTALL_DIR/xc7/install + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/361/20210816-133520/symbiflow-arch-defs-xc7a200t_test-5bd496ab.tar.xz | tar -xJC $INSTALL_DIR/xc7/install + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/361/20210816-133520/symbiflow-arch-defs-xc7z010_test-5bd496ab.tar.xz | tar -xJC $INSTALL_DIR/xc7/install .. group-tab:: EOS-S3 diff --git a/xc7/environment.yml b/xc7/environment.yml index d0aba2a..86c0ac4 100644 --- a/xc7/environment.yml +++ b/xc7/environment.yml @@ -3,12 +3,12 @@ channels: - litex-hub dependencies: - litex-hub::openocd=0.10.0_1514_ga8edbd020=20201119_154304 - - litex-hub::symbiflow-yosys-plugins=1.0.0_7_323_gfca6031=20210507_125510 - litex-hub::prjxray-tools=0.1_2842_g6867429c=20210301_104249 - - litex-hub::prjxray-db=0.0_248_g2e51ad3=20210312_125539 - - litex-hub::vtr-optimized=8.0.0_3445_ga806b1609=20210312_125539 - - litex-hub::yosys=0.9_5266_g0fb4224e=20210301_104249_py37 - litex-hub::gcc-riscv64-elf-newlib=9.2.0=20201119_154229 + - litex-hub::prjxray-db=0.0_248_g2e51ad3=20210312_125539 + - litex-hub::vtr-optimized=8.0.0_4118_g06317d042=20210813_070938 + - litex-hub::yosys=0.9_5567_g539d4ee9=20210813_070938_py37 + - litex-hub::symbiflow-yosys-plugins=1.0.0_7_375_ge9e412b=20210813_070938 - make - lxml - simplejson