mirror of
https://github.com/chipsalliance/f4pga-examples.git
synced 2025-01-03 03:43:38 -05:00
xc7: Separate build directory for each board
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
This commit is contained in:
parent
24929412ed
commit
876a14aa3b
2 changed files with 38 additions and 37 deletions
|
@ -10,38 +10,40 @@ BUILDDIR:=build
|
||||||
ifeq ($(TARGET),arty_35)
|
ifeq ($(TARGET),arty_35)
|
||||||
PARTNAME := xc7a35tcsg324-1
|
PARTNAME := xc7a35tcsg324-1
|
||||||
PCF:=${current_dir}/arty.pcf
|
PCF:=${current_dir}/arty.pcf
|
||||||
|
BOARD_BUILDDIR := ${BUILDDIR}/arty_35
|
||||||
else ifeq ($(TARGET),arty_100)
|
else ifeq ($(TARGET),arty_100)
|
||||||
PARTNAME:= xc7a100tcsg324-1
|
PARTNAME:= xc7a100tcsg324-1
|
||||||
PCF:=${current_dir}/arty.pcf
|
PCF:=${current_dir}/arty.pcf
|
||||||
DEVICE:= xc7a100t_test
|
DEVICE:= xc7a100t_test
|
||||||
|
BOARD_BUILDDIR := ${BUILDDIR}/arty_100
|
||||||
else
|
else
|
||||||
PARTNAME:= xc7a35tcpg236-1
|
PARTNAME:= xc7a35tcpg236-1
|
||||||
PCF:=${current_dir}/basys3.pcf
|
PCF:=${current_dir}/basys3.pcf
|
||||||
|
BOARD_BUILDDIR := ${BUILDDIR}/basys3
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: ${BUILDDIR}/${TOP}.bit
|
all: ${BOARD_BUILDDIR}/${TOP}.bit
|
||||||
|
|
||||||
${BUILDDIR}:
|
${BOARD_BUILDDIR}:
|
||||||
mkdir ${BUILDDIR}
|
mkdir -p ${BOARD_BUILDDIR}
|
||||||
|
|
||||||
${BUILDDIR}/${TOP}.eblif: | ${BUILDDIR}
|
${BOARD_BUILDDIR}/${TOP}.eblif: | ${BOARD_BUILDDIR}
|
||||||
cd ${BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} 2>&1 > /dev/null
|
cd ${BOARD_BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} 2>&1 > /dev/null
|
||||||
|
|
||||||
${BUILDDIR}/${TOP}.net: ${BUILDDIR}/${TOP}.eblif
|
${BOARD_BUILDDIR}/${TOP}.net: ${BOARD_BUILDDIR}/${TOP}.eblif
|
||||||
cd ${BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null
|
cd ${BOARD_BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null
|
||||||
|
|
||||||
${BUILDDIR}/${TOP}.place: ${BUILDDIR}/${TOP}.net
|
${BOARD_BUILDDIR}/${TOP}.place: ${BOARD_BUILDDIR}/${TOP}.net
|
||||||
cd ${BUILDDIR} && symbiflow_place -e ${TOP}.eblif -d ${DEVICE} -p ${PCF} -n ${TOP}.net -P ${PARTNAME} -s ${SDC} 2>&1 > /dev/null
|
cd ${BOARD_BUILDDIR} && symbiflow_place -e ${TOP}.eblif -d ${DEVICE} -p ${PCF} -n ${TOP}.net -P ${PARTNAME} -s ${SDC} 2>&1 > /dev/null
|
||||||
|
|
||||||
${BUILDDIR}/${TOP}.route: ${BUILDDIR}/${TOP}.place
|
${BOARD_BUILDDIR}/${TOP}.route: ${BOARD_BUILDDIR}/${TOP}.place
|
||||||
cd ${BUILDDIR} && symbiflow_route -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null
|
cd ${BOARD_BUILDDIR} && symbiflow_route -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null
|
||||||
|
|
||||||
${BUILDDIR}/${TOP}.fasm: ${BUILDDIR}/${TOP}.route
|
${BOARD_BUILDDIR}/${TOP}.fasm: ${BOARD_BUILDDIR}/${TOP}.route
|
||||||
cd ${BUILDDIR} && symbiflow_write_fasm -e ${TOP}.eblif -d ${DEVICE}
|
cd ${BOARD_BUILDDIR} && symbiflow_write_fasm -e ${TOP}.eblif -d ${DEVICE}
|
||||||
|
|
||||||
${BUILDDIR}/${TOP}.bit: ${BUILDDIR}/${TOP}.fasm
|
${BOARD_BUILDDIR}/${TOP}.bit: ${BOARD_BUILDDIR}/${TOP}.fasm
|
||||||
cd ${BUILDDIR} && symbiflow_write_bitstream -d ${BITSTREAM_DEVICE} -f ${TOP}.fasm -p ${PARTNAME} -b ${TOP}.bit
|
cd ${BOARD_BUILDDIR} && symbiflow_write_bitstream -d ${BITSTREAM_DEVICE} -f ${TOP}.fasm -p ${PARTNAME} -b ${TOP}.bit
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf ${BUILDDIR}
|
rm -rf ${BUILDDIR}
|
||||||
|
|
||||||
|
|
|
@ -10,42 +10,41 @@ BITSTREAM_DEVICE := artix7
|
||||||
PCF := ${current_dir}/arty.pcf
|
PCF := ${current_dir}/arty.pcf
|
||||||
SDC := ${current_dir}/arty.sdc
|
SDC := ${current_dir}/arty.sdc
|
||||||
XDC := ${current_dir}/arty.xdc
|
XDC := ${current_dir}/arty.xdc
|
||||||
BUILDDIR_35 := build
|
BUILDDIR := build
|
||||||
BUILDDIR_100 := build_100
|
|
||||||
|
|
||||||
ifeq ($(TARGET),arty_100)
|
ifeq ($(TARGET),arty_100)
|
||||||
PARTNAME := xc7a100tcsg324-1
|
PARTNAME := xc7a100tcsg324-1
|
||||||
DEVICE := xc7a100t_test
|
DEVICE := xc7a100t_test
|
||||||
BUILDDIR := ${BUILDDIR_100}
|
BOARD_BUILDDIR := ${BUILDDIR}/arty_35
|
||||||
else
|
else
|
||||||
PARTNAME := xc7a35tcsg324-1
|
PARTNAME := xc7a35tcsg324-1
|
||||||
DEVICE := xc7a50t_test
|
DEVICE := xc7a50t_test
|
||||||
BUILDDIR := ${BUILDDIR_35}
|
BOARD_BUILDDIR := ${BUILDDIR}/arty_100
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: ${BUILDDIR}/${TOP}.bit
|
all: ${BOARD_BUILDDIR}/${TOP}.bit
|
||||||
|
|
||||||
${BUILDDIR}:
|
${BOARD_BUILDDIR}:
|
||||||
mkdir ${BUILDDIR}
|
mkdir -p ${BOARD_BUILDDIR}
|
||||||
ln -s ${MEM_INIT} ${BUILDDIR}
|
ln -s ${MEM_INIT} ${BOARD_BUILDDIR}
|
||||||
|
|
||||||
${BUILDDIR}/${TOP}.eblif: | ${BUILDDIR}
|
${BOARD_BUILDDIR}/${TOP}.eblif: | ${BOARD_BUILDDIR}
|
||||||
cd ${BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} -x ${XDC} 2>&1 > /dev/null
|
cd ${BOARD_BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} -x ${XDC} 2>&1 > /dev/null
|
||||||
|
|
||||||
${BUILDDIR}/${TOP}.net: ${BUILDDIR}/${TOP}.eblif
|
${BOARD_BUILDDIR}/${TOP}.net: ${BOARD_BUILDDIR}/${TOP}.eblif
|
||||||
cd ${BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null
|
cd ${BOARD_BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null
|
||||||
|
|
||||||
${BUILDDIR}/${TOP}.place: ${BUILDDIR}/${TOP}.net
|
${BOARD_BUILDDIR}/${TOP}.place: ${BOARD_BUILDDIR}/${TOP}.net
|
||||||
cd ${BUILDDIR} && symbiflow_place -e ${TOP}.eblif -d ${DEVICE} -p ${PCF} -n ${TOP}.net -P ${PARTNAME} -s ${SDC} 2>&1 > /dev/null
|
cd ${BOARD_BUILDDIR} && symbiflow_place -e ${TOP}.eblif -d ${DEVICE} -p ${PCF} -n ${TOP}.net -P ${PARTNAME} -s ${SDC} 2>&1 > /dev/null
|
||||||
|
|
||||||
${BUILDDIR}/${TOP}.route: ${BUILDDIR}/${TOP}.place
|
${BOARD_BUILDDIR}/${TOP}.route: ${BOARD_BUILDDIR}/${TOP}.place
|
||||||
cd ${BUILDDIR} && symbiflow_route -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null
|
cd ${BOARD_BUILDDIR} && symbiflow_route -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null
|
||||||
|
|
||||||
${BUILDDIR}/${TOP}.fasm: ${BUILDDIR}/${TOP}.route
|
${BOARD_BUILDDIR}/${TOP}.fasm: ${BOARD_BUILDDIR}/${TOP}.route
|
||||||
cd ${BUILDDIR} && symbiflow_write_fasm -e ${TOP}.eblif -d ${DEVICE}
|
cd ${BOARD_BUILDDIR} && symbiflow_write_fasm -e ${TOP}.eblif -d ${DEVICE}
|
||||||
|
|
||||||
${BUILDDIR}/${TOP}.bit: ${BUILDDIR}/${TOP}.fasm
|
${BOARD_BUILDDIR}/${TOP}.bit: ${BOARD_BUILDDIR}/${TOP}.fasm
|
||||||
cd ${BUILDDIR} && symbiflow_write_bitstream -d ${BITSTREAM_DEVICE} -f ${TOP}.fasm -p ${PARTNAME} -b ${TOP}.bit
|
cd ${BOARD_BUILDDIR} && symbiflow_write_bitstream -d ${BITSTREAM_DEVICE} -f ${TOP}.fasm -p ${PARTNAME} -b ${TOP}.bit
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf ${BUILDDIR_35} ${BUILDDIR_100}
|
rm -rf ${BUILDDIR}
|
||||||
|
|
Loading…
Reference in a new issue