.PHONY: clean all: bit netlist: $(PRJ).ngc translate: $(PRJ).ngd map: $(PRJ)_map.ncd par: $(PRJ).ncd bit: $(PRJ).bit prom : $(PRJ).mcs timing : $(PRJ).twr NETLIST_DIR ?= ./ MAP_EFFORT ?= high PAR_EFFORT ?= high BUILD_DIR := build XST_DIR := xst/tmp DIRS := $(BUILD_DIR) $(XST_DIR) # Netlist $(PRJ).ngc: $(DIRS) $(PREQ) ./project/$(PRJ).ucf xst -intstyle xflow -ifn ./project/$(PRJ).xst # Translate $(PRJ).ngd: $(NETLISTS) $(PRJ).ngc ./project/$(PRJ).ucf ngdbuild -dd $(BUILD_DIR) -p $(DEVICE) -sd $(NETLIST_DIR) -dd _ngo -nt timestamp -uc ./project/$(PRJ).ucf $(PRJ).ngc $(PRJ).ngd # Map $(PRJ)_map.ncd: $(PRJ).ngd map -intstyle xflow -p $(DEVICE) -timing -logic_opt on -ol $(MAP_EFFORT) -t 1 -register_duplication -cm area -ignore_keep_hierarchy -pr off -k 4 -power off -o $(PRJ)_map.ncd $(PRJ).ngd $(PRJ).pcf # PAR $(PRJ).ncd: $(PRJ)_map.ncd par -w -intstyle xflow -ol $(PAR_EFFORT) -t 1 $(PRJ)_map.ncd $(PRJ).ncd $(PRJ).pcf # Timing $(PRJ).twr: $(PRJ).ncd $(PRJ).pcf ./project/$(PRJ).ucf trce -intstyle xflow -v 3 $(PRJ).ncd -ucf ./project/$(PRJ).ucf -o $(PRJ).twr $(PRJ).pcf # Bitgen $(PRJ).bit: $(PRJ).ncd ./project/$(PRJ).ut bitgen -intstyle xflow -f ./project/$(PRJ).ut $(PRJ).ncd # Promgen $(PRJ).mcs: $(PRJ).bit promgen -w -p mcs -c FF -o $(PRJ) -ver 0 $(PRJ).bit -x xcf32p $(DIRS): mkdir -p $(DIRS) clean: rm -rf ./_ngo rm -rf ./xst rm -rf ./xlnx_auto_0_xdb rm -f xlnx_auto_0.ise rm -f smartpreview.twr rm -f $(PRJ)*.*