f4pga-examples/examples/eos-s3/Makefile

37 lines
1.1 KiB
Makefile
Raw Normal View History

mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
current_dir := $(patsubst %/,%,$(dir $(mkfile_path)))
TOP:=top
VERILOG:=${current_dir}/btn_counter.v
PARTNAME:= ql-eos-s3_wlcsp
DEVICE := ql-eos-s3_wlcsp
BITSTREAM_DEVICE := ql-eos-s3_wlcsp
PCF:=${current_dir}/chandalar.pcf
BUILDDIR:=build
all: ${BUILDDIR}/${TOP}.bit
${BUILDDIR}:
mkdir ${BUILDDIR}
${BUILDDIR}/${TOP}.eblif: | ${BUILDDIR}
cd ${BUILDDIR} && synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} -P ${PCF}
${BUILDDIR}/${TOP}.net: ${BUILDDIR}/${TOP}.eblif
cd ${BUILDDIR} && pack -e ${TOP}.eblif -d ${DEVICE}
${BUILDDIR}/${TOP}.place: ${BUILDDIR}/${TOP}.net
cd ${BUILDDIR} && place -e ${TOP}.eblif -d ${DEVICE} -p ${PCF} -n ${TOP}.net -P ${PARTNAME}
${BUILDDIR}/${TOP}.route: ${BUILDDIR}/${TOP}.place
cd ${BUILDDIR} && route -e ${TOP}.eblif -d ${DEVICE}
${BUILDDIR}/${TOP}.fasm: ${BUILDDIR}/${TOP}.route
cd ${BUILDDIR} && write_fasm -e ${TOP}.eblif -d ${DEVICE}
${BUILDDIR}/${TOP}.bit: ${BUILDDIR}/${TOP}.fasm
cd ${BUILDDIR} && write_bitstream -d ${BITSTREAM_DEVICE} -f ${TOP}.fasm -p ${PARTNAME} -b ${TOP}.bit
clean:
rm -rf ${BUILDDIR}