Update .gitignore and Makefile for reports directory and version increment

- Added "reports/" directory to .gitignore to exclude it from version control.
- Incremented Makefile version from 1.1.3 to 1.1.4.
- Introduced REPORT_DIR variable in Makefile to manage report files.
- Modified ISIM_CMD in Makefile to remove specific commands, simplifying the simulation process.
- Enhanced the clean target in Makefile to also remove the REPORT_DIR, ensuring a clean state for new builds.
- Updated project build process in Makefile to create and use REPORT_DIR for storing synthesis, map, place and route, pinout, and timing reports, improving organization and accessibility of build reports.
This commit is contained in:
2024-03-25 19:20:49 +01:00
parent c661c3f453
commit 63140660a3
2 changed files with 17 additions and 8 deletions

3
.gitignore vendored
View File

@@ -1 +1,2 @@
working/ working/
reports/

View File

@@ -12,7 +12,7 @@
# Version # Version
########################################################################### ###########################################################################
Makefile_Version := 1.1.3 Makefile_Version := 1.1.4
$(info ISE Makefile Version: $(Makefile_Version)) $(info ISE Makefile Version: $(Makefile_Version))
########################################################################### ###########################################################################
@@ -40,6 +40,7 @@ endif
TOPLEVEL ?= $(PROJECT) TOPLEVEL ?= $(PROJECT)
CONSTRAINTS ?= $(PROJECT).ucf CONSTRAINTS ?= $(PROJECT).ucf
BUILD_DIR ?= working BUILD_DIR ?= working
REPORT_DIR ?= reports
BITFILE ?= $(BUILD_DIR)/$(PROJECT).bit BITFILE ?= $(BUILD_DIR)/$(PROJECT).bit
COMMON_OPTS ?= -intstyle xflow COMMON_OPTS ?= -intstyle xflow
@@ -52,7 +53,7 @@ TRACE_OPTS ?= -v 3 -n 3
FUSE_OPTS ?= -incremental FUSE_OPTS ?= -incremental
ISIM_OPTS ?= -gui ISIM_OPTS ?= -gui
ISIM_CMD ?= vcd dumpfile $@.vcd\nvcd dumpvars -m /UUT\nrun all\nvcd dumpflush\nquit ISIM_CMD ?=
PROGRAMMER ?= none PROGRAMMER ?= none
PROGRAMMER_PRE ?= PROGRAMMER_PRE ?=
@@ -143,10 +144,12 @@ default: $(BITFILE)
clean: clean:
rm -rf $(BUILD_DIR) rm -rf $(BUILD_DIR)
rm -rf $(REPORT_DIR)
$(BUILD_DIR)/$(PROJECT).prj: ../project.cfg $(BUILD_DIR)/$(PROJECT).prj: ../project.cfg
@echo "Updating $@" @echo "Updating $@"
@mkdir -p $(BUILD_DIR) @mkdir -p $(BUILD_DIR)
@mkdir -p $(REPORT_DIR)
@rm -f $@ @rm -f $@
@$(foreach idx,$(shell seq 1 $(words $(V_PATHS))),echo "verilog $(word $(idx),$(V_LIBS)) \"../$(word $(idx),$(V_PATHS))\"" >> $@;) @$(foreach idx,$(shell seq 1 $(words $(V_PATHS))),echo "verilog $(word $(idx),$(V_LIBS)) \"../$(word $(idx),$(V_PATHS))\"" >> $@;)
@$(foreach idx,$(shell seq 1 $(words $(VHD_PATHS))),echo "vhdl $(word $(idx),$(VHD_LIBS)) \"../$(word $(idx),$(VHD_PATHS))\"" >> $@;) @$(foreach idx,$(shell seq 1 $(words $(VHD_PATHS))),echo "vhdl $(word $(idx),$(VHD_LIBS)) \"../$(word $(idx),$(VHD_PATHS))\"" >> $@;)
@@ -176,27 +179,31 @@ $(BITFILE): ../project.cfg $(V_PATHS) $(VHD_PATHS) ../$(CONSTRAINTS) $(BUILD_DIR
@mkdir -p $(BUILD_DIR) @mkdir -p $(BUILD_DIR)
$(call RUN,xst) $(COMMON_OPTS) \ $(call RUN,xst) $(COMMON_OPTS) \
-ifn $(PROJECT).scr -ifn $(PROJECT).scr
@cp ./$(BUILD_DIR)/$(PROJECT).srp $(REPORT_DIR)/$(PROJECT).SynthesisReport
$(call RUN,ngdbuild) $(COMMON_OPTS) $(NGDBUILD_OPTS) \ $(call RUN,ngdbuild) $(COMMON_OPTS) $(NGDBUILD_OPTS) \
-p $(TARGET_PART) -uc ../../$(CONSTRAINTS) \ -p $(TARGET_PART) -uc ../../$(CONSTRAINTS) \
$(PROJECT).ngc $(PROJECT).ngd $(PROJECT).ngc $(PROJECT).ngd
$(call RUN,map) $(COMMON_OPTS) $(MAP_OPTS) \ $(call RUN,map) $(COMMON_OPTS) $(MAP_OPTS) \
-p $(TARGET_PART) \ -p $(TARGET_PART) \
-w $(PROJECT).ngd -o $(PROJECT).map.ncd $(PROJECT).pcf -w $(PROJECT).ngd -o $(PROJECT).map.ncd $(PROJECT).pcf
@cp ./$(BUILD_DIR)/$(PROJECT).map.mrp $(REPORT_DIR)/$(PROJECT).MapReport
$(call RUN,par) $(COMMON_OPTS) $(PAR_OPTS) \ $(call RUN,par) $(COMMON_OPTS) $(PAR_OPTS) \
-w $(PROJECT).map.ncd $(PROJECT).ncd $(PROJECT).pcf -w $(PROJECT).map.ncd $(PROJECT).ncd $(PROJECT).pcf
@cp ./$(BUILD_DIR)/$(PROJECT).par $(REPORT_DIR)/$(PROJECT).PlaceRouteReport
$(call RUN,bitgen) $(COMMON_OPTS) $(BITGEN_OPTS) \ $(call RUN,bitgen) $(COMMON_OPTS) $(BITGEN_OPTS) \
-w $(PROJECT).ncd $(PROJECT).bit -w $(PROJECT).ncd $(PROJECT).bit
@echo "\e[1;32m============ OK ============\e[m\n\n" @echo "\e[1;32m============ OK ============\e[m\n\n"
@echo "\e[1;33m============ Reports.. ===========\e[m\n" @echo "\e[1;33m============ Reports.. ===========\e[m\n"
@echo "\e[1;97m==== Synthesis Summary Report ====\e[m" @echo "\e[1;97m==== Synthesis Summary Report ====\e[m"
@echo "\e[1;35m ./$(BUILD_DIR)/$(PROJECT).srp\e[m\n" @echo "\e[1;35m ./$(REPORT_DIR)/$(PROJECT).SynthesisReport\e[m\n"
@echo "\e[1;97m======= Map Summary Report =======\e[m" @echo "\e[1;97m======= Map Summary Report =======\e[m"
@echo "\e[1;35m ./$(BUILD_DIR)/$(PROJECT).map.mrp\e[m\n" @echo "\e[1;35m ./$(REPORT_DIR)/$(PROJECT).MapReport\e[m\n"
@echo "\e[1;97m======= PAR Summary Report =======\e[m" @echo "\e[1;97m======= PAR Summary Report =======\e[m"
@echo "\e[1;35m ./$(BUILD_DIR)/$(PROJECT).par\e[m\n" @echo "\e[1;35m ./$(REPORT_DIR)/$(PROJECT).PlaceRouteReport\e[m\n"
@echo "\e[1;97m===== Pinout Summary Report ======\e[m" @echo "\e[1;97m===== Pinout Summary Report ======\e[m"
@echo "\e[1;35m ./$(BUILD_DIR)/$(PROJECT)_pad.txt\e[m\n" @cp ./$(BUILD_DIR)/$(PROJECT)_pad.txt $(REPORT_DIR)/$(PROJECT).PinoutReport
@echo "\e[1;35m ./$(REPORT_DIR)/$(PROJECT).PinoutReport\e[m\n"
copy: $(BITFILE) copy: $(BITFILE)
@cp $(BITFILE) $(COPY_TARGET_DIR)/$(PROJECT).bit @cp $(BITFILE) $(COPY_TARGET_DIR)/$(PROJECT).bit
@echo "\n\e[1;32m= Copy bitfile successful =\e[m\n" @echo "\n\e[1;32m= Copy bitfile successful =\e[m\n"
@@ -210,6 +217,7 @@ trace: ../project.cfg $(BITFILE)
$(PROJECT).ncd $(PROJECT).pcf $(PROJECT).ncd $(PROJECT).pcf
@echo "\n\e[1;33m============ Reports.. ===========\e[m\n" @echo "\n\e[1;33m============ Reports.. ===========\e[m\n"
@echo "\e[1;97m===== Timing Summary Report ======\e[m" @echo "\e[1;97m===== Timing Summary Report ======\e[m"
@cp ./$(BUILD_DIR)/$(PROJECT).twr $(REPORT_DIR)/$(PROJECT).TimingReport
@echo "\e[1;35m ./$(BUILD_DIR)/$(PROJECT).twr\e[m\n" @echo "\e[1;35m ./$(BUILD_DIR)/$(PROJECT).twr\e[m\n"
test: buildtest runtest test: buildtest runtest