OpenCores
URL https://opencores.org/ocsvn/System09/System09/trunk

Subversion Repositories System09

[/] [System09/] [trunk/] [rtl/] [System09_base/] [Makefile] - Diff between revs 132 and 137

Only display areas with differences | Details | Blame | View Log

Rev 132 Rev 137
#===================================================================
#===================================================================
# File:        Makefile
# File:        Makefile
# Author:      David Burnette
# Author:      David Burnette
# Created:     July 5, 2007
# Created:     July 5, 2007
#
#
# Description:
# Description:
#  Makefile to build the System09 by John Kent
#  Makefile to build the System09 by John Kent
#
#
#  This makefile will build John Kent's entire System09 project
#  This makefile will build John Kent's entire System09 project
#  (RTL synthesis and monitor ROMs) and even download the final
#  (RTL synthesis and monitor ROMs) and even download the final
#  bitstream to the prototype board.
#  bitstream to the prototype board.
#
#
#  You can use Xilinx ISE interactively to add new RTL source files
#  You can use Xilinx ISE interactively to add new RTL source files
#  to this project.
#  to this project.
#
#
# Usage:
# Usage:
#  Use 'make help' to get a list of options.
#  Use 'make help' to get a list of options.
#
#
# Dependencies:
# Dependencies:
#  Depends on makefile fragments in the 'MKFRAGS' directory.
#  Depends on makefile fragments in the 'MKFRAGS' directory.
#
#
# Revision History:
# Revision History:
#   dgb  2007-07-05  Original version
#   dgb  2007-07-05  Original version
#
#
#   dgb  2008-04-07  Split out files into fragments. Modified
#   dgb  2008-04-07  Split out files into fragments. Modified
#                    ROM source generation to be per src directory.
#                    ROM source generation to be per src directory.
#
#
#===================================================================
#===================================================================
MKFRAGS := ../../mkfiles
MKFRAGS := ../../mkfiles
export MKFRAGS
export MKFRAGS
BRAM_TYPE := b16
BRAM_TYPE := b16
export BRAM_TYPE
export BRAM_TYPE
#===================================================================
#===================================================================
# User-modifiable variables
# User-modifiable variables
#
#
# This name must match the name of the design in Xilinx ISE (case
# This name must match the name of the design in Xilinx ISE (case
# sensitive).
# sensitive).
DESIGN_NAME := system09
DESIGN_NAME := system09
#
#
# Constraint file (unfortunately it cannot be extracted from ISE)
# Constraint file (unfortunately it cannot be extracted from ISE)
UCF_FILE    := system09.ucf
UCF_FILE    := system09.ucf
#
#
# Technology family (unfortunately it cannot be extracted from ISE)
# Technology family (unfortunately it cannot be extracted from ISE)
FAMILY      := spartan3
FAMILY      := spartan3
# List of ROM VHDL files
# List of ROM VHDL files
.PHONY: roms
.PHONY: roms
roms:
roms:
        @$(MAKE) -C ../../Tools/as09
        @$(MAKE) -C ../../Tools/as09
        @$(MAKE) -C ../../Tools/s19tovhd
        @$(MAKE) -C ../../Tools/s19tovhd
        @$(MAKE) -C ../../src/sys09bug sys09swt.vhd
        @$(MAKE) -C ../../src/sys09bug sys09swt.vhd
        @$(MAKE) -C ../../src/Flex9 flex9ide.vhd
        @$(MAKE) -C ../../src/Flex9 flex9ide.vhd
#===================================================================
#===================================================================
# You should not need to edit anything below this line
# You should not need to edit anything below this line
# XESS Tools
# XESS Tools
ifeq "$(findstring CYGWIN_NT,$(shell uname -s))" "CYGWIN_NT"
ifeq "$(findstring CYGWIN_NT,$(shell uname -s))" "CYGWIN_NT"
XESSPATH := $(shell cygpath "$(XSTOOLS_BIN_DIR)")
XESSPATH := $(shell cygpath "$(XSTOOLS_BIN_DIR)")
else
else
XESSPATH := $(XSTOOLS_BIN_DIR)
XESSPATH := $(XSTOOLS_BIN_DIR)
endif
endif
XSLOAD     := "$(XESSPATH)/xsload.exe"
XSLOAD     := "$(XESSPATH)/xsload.exe"
include ../../mkfiles/xilinx_rules.mk
include ../../mkfiles/xilinx_rules.mk
#===================================================================
#===================================================================
# TARGETS
# TARGETS
.PHONY: all
.PHONY: all
all: bit
all: bit
.PHONY: bit
.PHONY: bit
bit: roms $(DESIGN_NAME).bit
bit: roms $(DESIGN_NAME).bit
.PHONY: impact
.PHONY: impact
impact: roms bit do_impact
impact: roms bit do_impact
prom: roms $(DESIGN_NAME).mcs
prom: roms $(DESIGN_NAME).mcs
.PHONY: xsload
.PHONY: xsload
xsload: roms $(DESIGN_NAME).bit
xsload: roms $(DESIGN_NAME).bit
        @$(ECHO)
        @$(ECHO)
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using XSLOAD (parallel) ="
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using XSLOAD (parallel) ="
        $(XSLOAD) -p 0 -b xsa-3s1000 -fpga $<
        $(XSLOAD) -p 0 -b xsa-3s1000 -fpga $<
usbxsload.bit: roms $(DESIGN_NAME).bit
usbxsload.bit: roms $(DESIGN_NAME).bit
        @$(ECHO)
        @$(ECHO)
        @$(ECHO) "======= Generating special bitstream with StartUpClk=JtagClk ========"
        @$(ECHO) "======= Generating special bitstream with StartUpClk=JtagClk ========"
        $(GREP) -v StartUpClk $(BITGEN_OPTIONS_FILE) >tmp.ut
        $(GREP) -v StartUpClk $(BITGEN_OPTIONS_FILE) >tmp.ut
        $(ECHO) "-g StartUpClk:JtagClk" >>tmp.ut
        $(ECHO) "-g StartUpClk:JtagClk" >>tmp.ut
        $(BITGEN) $(BITGEN_FLAGS) -f tmp.ut $(DESIGN_NAME).ncd usbxsload.bit
        $(BITGEN) $(BITGEN_FLAGS) -f tmp.ut $(DESIGN_NAME).ncd usbxsload.bit
.PHONY: usbxsload
.PHONY: usbxsload
usbxsload: roms usbxsload.bit
usbxsload: roms usbxsload.bit
        @$(ECHO)
        @$(ECHO)
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using XSLOAD (USB) ======"
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using XSLOAD (USB) ======"
        $(XSLOAD) -usb 0 -b xsa-3s1000 -fpga usbxsload.bit
        $(XSLOAD) -usb 0 -b xsa-3s1000 -fpga usbxsload.bit
.PHONY: usbflash0
.PHONY: usbflash0
usbflash0: roms prom $(DESIGN_NAME).bit
usbflash0: roms prom $(DESIGN_NAME).bit
        $(XSLOAD) -usb 0 -b xsa-3s1000 -flash $(DESIGN_NAME).mcs
        $(XSLOAD) -usb 0 -b xsa-3s1000 -flash $(DESIGN_NAME).mcs
.PHONY: help
.PHONY: help
help:
help:
        @$(ECHO) "Use this Makefile to regenerate the entire System09 bitstream"
        @$(ECHO) "Use this Makefile to regenerate the entire System09 bitstream"
        @$(ECHO) "after modifying any of the source RTL or 6809 assembler code."
        @$(ECHO) "after modifying any of the source RTL or 6809 assembler code."
        @$(ECHO) ""
        @$(ECHO) ""
        @$(ECHO) "This makefile uses the following project files from the Xilinx ISE"
        @$(ECHO) "This makefile uses the following project files from the Xilinx ISE"
        @$(ECHO) "   $(XST_FILE)"
        @$(ECHO) "   $(XST_FILE)"
        @$(ECHO) ""
        @$(ECHO) ""
        @$(ECHO) "You use Xilinx ISE interactively to add new RTL source files."
        @$(ECHO) "You use Xilinx ISE interactively to add new RTL source files."
        @$(ECHO) ""
        @$(ECHO) ""
        @$(ECHO) "            Availiable targets"
        @$(ECHO) "            Availiable targets"
        @$(ECHO)
        @$(ECHO)
        @$(ECHO) "  For building all or part of the system:"
        @$(ECHO) "  For building all or part of the system:"
        @$(ECHO) "    roms      - Run asm09 and then generate the VHDL RTL rom files"
        @$(ECHO) "    roms      - Run asm09 and then generate the VHDL RTL rom files"
        @$(ECHO) "    bit       - Rebuild the entire system and generate the bitstream file"
        @$(ECHO) "    bit       - Rebuild the entire system and generate the bitstream file"
        @$(ECHO) "    all       - Rebuild everything"
        @$(ECHO) "    all       - Rebuild everything"
        @$(ECHO) "    prom      - Rebuild the entire system and generate an MCS prom file"
        @$(ECHO) "    prom      - Rebuild the entire system and generate an MCS prom file"
        @$(ECHO) "    exo       - Rebuild the entire system and generate an EXO prom file"
        @$(ECHO) "    exo       - Rebuild the entire system and generate an EXO prom file"
        @$(ECHO)
        @$(ECHO)
        @$(ECHO) "  For downloading the bitstream to the board:"
        @$(ECHO) "  For downloading the bitstream to the board:"
        @$(ECHO) "    xsload    - Download the bitstream to the FPGA via XSLOAD"
        @$(ECHO) "    xsload    - Download the bitstream to the FPGA via XSLOAD"
        @$(ECHO) "    usbxsload - Download the bitstream to the FPGA via usbXSLOAD"
        @$(ECHO) "    usbxsload - Download the bitstream to the FPGA via usbXSLOAD"
        @$(ECHO) "    usbflash0 - Download the bitstream Flash slot 0 via usbXSLOAD"
        @$(ECHO) "    usbflash0 - Download the bitstream Flash slot 0 via usbXSLOAD"
        @$(ECHO) "    impact    - Download the bitstream to the FPGA via iMPACT"
        @$(ECHO) "    impact    - Download the bitstream to the FPGA via iMPACT"
        @$(ECHO)
        @$(ECHO)
        @$(ECHO) "  For project maintenance:"
        @$(ECHO) "  For project maintenance:"
        @$(ECHO) "    help      - Print this help text"
        @$(ECHO) "    help      - Print this help text"
        @$(ECHO) "    clean     - Clean up the ISE files"
        @$(ECHO) "    clean     - Clean up the ISE files"
        @$(ECHO) "    cleanall  - Clean up the ISE files and the Tools directories"
        @$(ECHO) "    cleanall  - Clean up the ISE files and the Tools directories"
        @$(ECHO) ""
        @$(ECHO) ""
.PHONY: clean
.PHONY: clean
clean:
clean:
        -$(MAKE) -C ../../src/sys09bug clean
        -$(MAKE) -C ../../src/sys09bug clean
        -$(MAKE) -C ../../src/Flex9 clean
        -$(MAKE) -C ../../src/Flex9 clean
        -$(RM) *.ncd *.ngc *.ngd *.twr *.bit *.mcs *.stx *.ucf.untf *.mrp *.ptwx *_map.map
        -$(RM) *.ncd *.cfi *_bitgen.xwbt *.ngc *.ngd *.twr *.bit *.mcs *.stx *.ucf.untf *.mrp *.ptwx *_map.map
        -$(RM) *.ncl *.ngm *.prm *_pad.txt *.twx *.log *.syr *.par *.exo *.xpi *.xrpt *.xml
        -$(RM) *.ncl *.ngm *.prm *_pad.txt *.twx *.log *.syr *.par *.exo *.xpi *.xrpt *.xml
        -$(RM) *.cmd_log *.ngr *.bld *_summary.html *.nc1 *.pcf *.bgn tmp.ut
        -$(RM) *.cmd_log *.ngr *.bld *_summary.html *.nc1 *.pcf *.bgn tmp.ut
        -$(RM) *.pad *.placed_ncd_tracker *.routed_ncd_tracker *_pad.csv *.drc
        -$(RM) *.pad *.placed_ncd_tracker *.routed_ncd_tracker *_pad.csv *.drc
        -$(RM) *.pad_txt $(DESIGN_NAME)_impact.cmd *.unroutes $(DESIGN_NAME)_vhdl.prj
        -$(RM) *.pad_txt $(DESIGN_NAME)_impact.cmd *.unroutes $(DESIGN_NAME)_vhdl.prj
        -$(RMDIR) _ngo _xmsgs xst xlnx_auto_0_xdb xst_tmp_dirs
        -$(RMDIR) _ngo _xmsgs xst xlnx_auto_0_xdb xst_tmp_dirs
.PHONY: cleanall
.PHONY: cleanall
cleanall: clean
cleanall: clean
        -$(MAKE) -C ../../Tools/as09 clean
        -$(MAKE) -C ../../Tools/as09 clean
        -$(MAKE) -C ../../Tools/s19tovhd clean
        -$(MAKE) -C ../../Tools/s19tovhd clean
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.