Merge pull request #78 from antmicro/separate_builddir
xc7: Separate build directory for each board
This commit is contained in:
commit
115558dc5a
|
@ -144,9 +144,9 @@ To build the counter example, run any or all of the following commands:
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
:name: xc7-counter
|
:name: xc7-counter
|
||||||
|
|
||||||
pushd xc7/counter_test && make clean && TARGET="arty_35" make && popd
|
pushd xc7/counter_test && TARGET="arty_35" make && popd
|
||||||
pushd xc7/counter_test && make clean && TARGET="arty_100" make && popd
|
pushd xc7/counter_test && TARGET="arty_100" make && popd
|
||||||
pushd xc7/counter_test && make clean && TARGET="basys3" make && popd
|
pushd xc7/counter_test && TARGET="basys3" make && popd
|
||||||
|
|
||||||
To build the picosoc example, run the following commands:
|
To build the picosoc example, run the following commands:
|
||||||
|
|
||||||
|
|
|
@ -76,9 +76,9 @@ To build the counter example, run any or all of the following commands:
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
:name: xc7-counter
|
:name: xc7-counter
|
||||||
|
|
||||||
pushd xc7/counter_test && make clean && TARGET="arty_35" make && popd
|
pushd xc7/counter_test && TARGET="arty_35" make && popd
|
||||||
pushd xc7/counter_test && make clean && TARGET="arty_100" make && popd
|
pushd xc7/counter_test && TARGET="arty_100" make && popd
|
||||||
pushd xc7/counter_test && make clean && TARGET="basys3" make && popd
|
pushd xc7/counter_test && TARGET="basys3" make && popd
|
||||||
|
|
||||||
To build the picosoc example, run the following commands:
|
To build the picosoc example, run the following commands:
|
||||||
|
|
||||||
|
|
|
@ -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 New Issue