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.

26 lines
641 B

  1. DESIGN_NAME := blink
  2. RTL_SRC := ../rtl/${DESIGN_NAME}.vhd
  3. SIM_SRC := tb_${DESIGN_NAME}.vhd
  4. VHD_STD := 08
  5. .PHONY: all compile sim clean
  6. all: sim
  7. compile: tb_${DESIGN_NAME}
  8. tb_${DESIGN_NAME}: ${RTL_SRC} ${SIM_SRC} | work
  9. @echo "Analyze testbench & design ..."
  10. ghdl -a --std=${VHD_STD} -fpsl --workdir=work ${RTL_SRC} ${SIM_SRC}
  11. @echo "Elaborate testbench & design ..."
  12. ghdl -e --std=${VHD_STD} -fpsl --workdir=work $@
  13. sim: tb_${DESIGN_NAME}
  14. @echo "Run testbench ..."
  15. ghdl -r tb_${DESIGN_NAME} --assert-level=error
  16. work:
  17. mkdir $@
  18. clean:
  19. @echo "Cleaning simulation files ..."
  20. rm -rf tb_${DESIGN_NAME} *.o *.json work/