You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
556 B

  1. DESIGN_NAME := blink
  2. SRC_FILES := ../rtl/blink.vhd
  3. VHD_STD := 08
  4. .PHONY: all syn
  5. all: ${DESIGN_NAME}_synth.vhd syn
  6. syn: ${DESIGN_NAME}.v
  7. ${DESIGN_NAME}.o: ${SRC_FILES}
  8. ghdl -a --std=${VHD_STD} ${SRC_FILES}
  9. ${DESIGN_NAME}_synth.vhd: ${SRC_FILES}
  10. ghdl --synth --std=$(VHD_STD) ${SRC_FILES} -e ${DESIGN_NAME} > $@
  11. ${DESIGN_NAME}.v: ${DESIGN_NAME}.o
  12. yosys -m ghdl -p 'ghdl --std=${VHD_STD} --no-formal ${DESIGN_NAME}; synth_gatemate -nomx8 -vlog $@'
  13. clean :
  14. echo "# Cleaning files"
  15. rm -f *.o work*.cf ${DESIGN_NAME}.v ${DESIGN_NAME}_synth.vhd