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

Subversion Repositories System09

[/] [System09/] [branches/] [mkfiles_rev1/] [mkfiles/] [xilinx_rules.mk] - Diff between revs 36 and 38

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 36 Rev 38
Line 62... Line 62...
BITGEN_FLAGS     ?= $(INTSTYLE)           # most bitgen flags are specified in the .ut file
BITGEN_FLAGS     ?= $(INTSTYLE)           # most bitgen flags are specified in the .ut file
PROMGEN_FLAGS    ?= -u 0                  # flags that control the MCS/EXO file generation
PROMGEN_FLAGS    ?= -u 0                  # flags that control the MCS/EXO file generation
 
 
BITGEN_OPTIONS_FILE   ?= $(DESIGN_NAME).ut
BITGEN_OPTIONS_FILE   ?= $(DESIGN_NAME).ut
 
 
 
#===================================================================
 
# Debug variable settings
 
debug_vars:
 
        @$(ECHO) "XST_FILE    = '$(XST_FILE)'"
 
        @$(ECHO) "PRJ_FILE    = '$(PRJ_FILE)'"
 
        @$(ECHO) "HDL_FILES   = '$(HDL_FILES)'"
 
        @$(ECHO) "PART        = '$(PART)'"
 
        @$(ECHO) "DEVICE      = '$(DEVICE)'"
 
        @$(ECHO) "SPEED       = '$(SPEED)'"
 
        @$(ECHO) "PACKAGE     = '$(PACKAGE)'"
 
        @$(ECHO) "UCF_FILE    = '$(UCF_FILE)'"
 
        @$(ECHO) "BSD_FILE    = '$(BSD_FILE)'"
 
        @$(ECHO) "XSTHDPDIR   = '$(XSTHDPDIR)'"
 
        @$(ECHO) "TMPDIR      = '$(TMPDIR)'"
 
 
#===================================================================
#===================================================================
# Make sure tmpdirs are created
# Make sure tmpdirs are created
$(XSTHDPDIR):
$(XSTHDPDIR):
        @$(MKDIR) $(XSTHDPDIR)
        @$(MKDIR) $(XSTHDPDIR)
 
 
$(TMPDIR):
$(TMPDIR):
        @$(MKDIR) $(TMPDIR)
        @$(MKDIR) $(TMPDIR)
 
 
xst_tmp_dirs: $(XSTHDPDIR) $(TMPDIR)
xst_tmp_dirs: $(XSTHDPDIR) $(TMPDIR)
 
        touch $@
 
 
#===================================================================
#===================================================================
# Define dependencies
# Define dependencies
 
 
$(DESIGN_NAME).ngc: $(XST_FILE) $(PRJ_FILE) $(DESIGN_NAME).lso
$(DESIGN_NAME).ngc: $(XST_FILE) $(PRJ_FILE) xst_tmp_dirs $(HDL_FILES) $(DESIGN_NAME).lso
 
 
$(DESIGN_NAME).ngd: $(DESIGN_NAME).ngc $(UCF_FILE)
$(DESIGN_NAME).ngd: $(DESIGN_NAME).ngc $(UCF_FILE)
 
 
$(DESIGN_NAME).bit: $(DESIGN_NAME).ncd $(BITGEN_OPTIONS_FILE)
$(DESIGN_NAME).bit: $(DESIGN_NAME).ncd $(BITGEN_OPTIONS_FILE)
 
 
 
$(DESIGN_NAME).mcs: $(DESIGN_NAME).bit
 
 
 
#===================================================================
 
# Rule to make impact cmd file
 
 
 
$(DESIGN_NAME)_impact.cmd:
 
        @$(ECHO)
 
        @$(ECHO) "======= Generating Impact command file ============"
 
        -@$(RM) $(DESIGN_NAME)_impact.cmd
 
        @$(ECHO) "setMode -bscan" >>$@
 
        @$(ECHO) "setCable -p auto" >>$@
 
        @$(ECHO) "addDevice -p 1 -file $(BSD_FILE)" >>$@
 
        @$(ECHO) "assignFile -p 1 -file $(DESIGN_NAME).bit" >>$@
 
        @$(ECHO) "program -p 1" >>$@
 
        @$(ECHO) "quit" >>$@
 
        @$(CAT) $@
 
 
 
.PHONY: do_impact
 
do_impact: $(DESIGN_NAME).bit $(DESIGN_NAME).ngc $(DESIGN_NAME)_impact.cmd
 
        @$(ECHO)
 
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using Impact ============"
 
        $(IMPACT) -batch $(DESIGN_NAME)_impact.cmd
 
 
#===================================================================
#===================================================================
# TRANSLATE RULES
# TRANSLATE RULES
 
 
#   RULE: .xst => .ngc
#   RULE: .xst => .ngc
# Synthesize the HDL files into an NGC file.  This rule is triggered if
# Synthesize the HDL files into an NGC file.  This rule is triggered if
# any of the HDL files are changed or the synthesis options are changed.
# any of the HDL files are changed or the synthesis options are changed.
$(DESIGN_NAME).ngc: $(HDL_FILES) $(XST_FILE) xst_tmp_dirs
%.ngc: %.xst
        @$(ECHO)
        @$(ECHO)
        @$(ECHO) "======= Synthesis - XST ============================"
        @$(ECHO) "======= Synthesis - XST ============================"
        $(XST) $(XST_FLAGS) -ifn $(XST_FILE) -ofn $(DESIGN_NAME).syr
        $(XST) $(XST_FLAGS) -ifn $(XST_FILE) -ofn $(DESIGN_NAME).syr
 
 
#   RULE: .ngc => .ngd
#   RULE: .ngc => .ngd
# Take the output of the synthesizer and create the NGD file.  This rule
# Take the output of the synthesizer and create the NGD file.  This rule
# will also be triggered if constraints file is changed.
# will also be triggered if constraints file is changed.
%.ngd: %.ngc $(UCF_FILE)
%.ngd: %.ngc
        @$(ECHO)
        @$(ECHO)
        @$(ECHO) "======= Synthesis - NGDBUILD ======================="
        @$(ECHO) "======= Synthesis - NGDBUILD ======================="
        $(NGDBUILD) $(NGDBUILD_FLAGS) -p $(PART) $*.ngc $*.ngd
        $(NGDBUILD) $(NGDBUILD_FLAGS) -p $(PART) $*.ngc $*.ngd
 
 
#   RULE: .ngd => _map.ncd and .pcf
#   RULE: .ngd => _map.ncd and .pcf

powered by: WebSVN 2.1.0

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