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.

23 lines
617 B

  1. DESIGN_NAME := blink
  2. WORK_FILES := ../rtl/blink.vhd
  3. GM_FILES := ../../lib/components.vhd
  4. GHDL_FLAGS := --std=08 --workdir=build -Pbuild
  5. .PHONY: all syn
  6. all: syn
  7. syn: ${DESIGN_NAME}.v
  8. work-obj08.cf: ${WORK_FILES} gatemate-obj08.cf
  9. ghdl -a ${GHDL_FLAGS} --work=work ${WORK_FILES}
  10. gatemate-obj08.cf: ${GM_FILES}
  11. mkdir -p build
  12. ghdl -a ${GHDL_FLAGS} --work=gatemate ${GM_FILES}
  13. ${DESIGN_NAME}.v: work-obj08.cf
  14. yosys -m ghdl -p 'ghdl ${GHDL_FLAGS} --no-formal ${DESIGN_NAME}; synth_gatemate -nomx8 -vlog $@' 2>&1 | tee build/yosys-report.txt
  15. clean :
  16. echo "# Cleaning files"
  17. rm -rf build ${DESIGN_NAME}.v