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

Subversion Repositories System09

[/] [System09/] [trunk/] [rtl/] [System09_Xess_XSA-3S1000/] [Makefile] - Blame information for rev 120

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 59 davidgb
#===================================================================
2
# File:        Makefile
3
# Author:      David Burnette
4
# Created:     July 5, 2007
5
#
6
# Description:
7
#  Makefile to build the System09 by John Kent
8
#
9
#  This makefile will build John Kent's entire System09 project
10
#  (RTL synthesis and monitor ROMs) and even download the final
11
#  bitstream to the prototype board.
12
#
13
#  You can use Xilinx ISE interactively to add new RTL source files
14
#  to this project.
15
#
16
# Usage:
17
#  Use 'make help' to get a list of options.
18
#
19
# Dependencies:
20
#  Depends on makefile fragments in the 'MKFRAGS' directory.
21
#
22
# Revision History:
23
#   dgb  2007-07-05  Original version
24
#
25
#   dgb  2008-04-07  Split out files into fragments. Modified
26
#                    ROM source generation to be per src directory.
27
#
28
#===================================================================
29
 
30
MKFRAGS := ../../mkfiles
31
export MKFRAGS
32
 
33 93 davidgb
BRAM_TYPE := b16
34
export BRAM_TYPE
35
 
36 59 davidgb
#===================================================================
37
# User-modifiable variables
38
#
39
# This name must match the name of the design in Xilinx ISE (case
40
# sensitive).
41 114 davidgb
DESIGN_NAME := system09
42 59 davidgb
#
43
# Constraint file (unfortunately it cannot be extracted from ISE)
44
UCF_FILE    := XSA-3S1000.ucf
45
#
46
# Technology family (unfortunately it cannot be extracted from ISE)
47
FAMILY      := spartan3
48
 
49
# List of ROM VHDL files
50
.PHONY: roms
51
roms:
52 84 davidgb
        @$(MAKE) -C ../../Tools/as09
53
        @$(MAKE) -C ../../Tools/s19tovhd
54 59 davidgb
        @$(MAKE) -C ../../src/sys09bug sys09xes.vhd
55
        @$(MAKE) -C ../../src/Flex9 flex9ide.vhd
56
 
57
#===================================================================
58
# You should not need to edit anything below this line
59
 
60
# XESS Tools
61 69 davidgb
ifeq "$(findstring CYGWIN_NT,$(shell uname -s))" "CYGWIN_NT"
62
XESSPATH := $(shell cygpath "$(XSTOOLS_BIN_DIR)")
63
else
64
XESSPATH := $(XSTOOLS_BIN_DIR)
65
endif
66
XSLOAD     := "$(XESSPATH)/xsload.exe"
67 59 davidgb
 
68
include ../../mkfiles/xilinx_rules.mk
69
 
70
#===================================================================
71
# TARGETS
72
 
73
.PHONY: all
74
all: bit
75
 
76
.PHONY: bit
77
bit: roms $(DESIGN_NAME).bit
78
 
79
.PHONY: impact
80
impact: roms bit do_impact
81
 
82
prom: roms $(DESIGN_NAME).mcs
83
 
84
.PHONY: xsload
85
xsload: roms $(DESIGN_NAME).bit
86
        @$(ECHO)
87
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using XSLOAD (parallel) ="
88
        $(XSLOAD) -p 0 -b xsa-3s1000 -fpga $<
89
 
90
usbxsload.bit: roms $(DESIGN_NAME).bit
91
        @$(ECHO)
92
        @$(ECHO) "======= Generating special bitstream with StartUpClk=JtagClk ========"
93
        $(GREP) -v StartUpClk $(BITGEN_OPTIONS_FILE) >tmp.ut
94
        $(ECHO) "-g StartUpClk:JtagClk" >>tmp.ut
95
        $(BITGEN) $(BITGEN_FLAGS) -f tmp.ut $(DESIGN_NAME).ncd usbxsload.bit
96
 
97
.PHONY: usbxsload
98
usbxsload: roms usbxsload.bit
99
        @$(ECHO)
100
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using XSLOAD (USB) ======"
101
        $(XSLOAD) -usb 0 -b xsa-3s1000 -fpga usbxsload.bit
102
 
103
.PHONY: usbflash0
104
usbflash0: roms prom $(DESIGN_NAME).bit
105
        $(XSLOAD) -usb 0 -b xsa-3s1000 -flash $(DESIGN_NAME).mcs
106
 
107
.PHONY: help
108
help:
109
        @$(ECHO) "Use this Makefile to regenerate the entire System09 bitstream"
110
        @$(ECHO) "after modifying any of the source RTL or 6809 assembler code."
111
        @$(ECHO) ""
112
        @$(ECHO) "This makefile uses the following project files from the Xilinx ISE"
113
        @$(ECHO) "   $(XST_FILE)"
114
        @$(ECHO) ""
115
        @$(ECHO) "You use Xilinx ISE interactively to add new RTL source files."
116
        @$(ECHO) ""
117
        @$(ECHO) "            Availiable targets"
118
        @$(ECHO)
119
        @$(ECHO) "  For building all or part of the system:"
120
        @$(ECHO) "    roms      - Run asm09 and then generate the VHDL RTL rom files"
121
        @$(ECHO) "    bit       - Rebuild the entire system and generate the bitstream file"
122
        @$(ECHO) "    all       - Rebuild everything"
123
        @$(ECHO) "    prom      - Rebuild the entire system and generate an MCS prom file"
124
        @$(ECHO) "    exo       - Rebuild the entire system and generate an EXO prom file"
125
        @$(ECHO)
126
        @$(ECHO) "  For downloading the bitstream to the board:"
127
        @$(ECHO) "    xsload    - Download the bitstream to the FPGA via XSLOAD"
128
        @$(ECHO) "    usbxsload - Download the bitstream to the FPGA via usbXSLOAD"
129
        @$(ECHO) "    usbflash0 - Download the bitstream Flash slot 0 via usbXSLOAD"
130
        @$(ECHO) "    impact    - Download the bitstream to the FPGA via iMPACT"
131
        @$(ECHO)
132
        @$(ECHO) "  For project maintenance:"
133
        @$(ECHO) "    help      - Print this help text"
134
        @$(ECHO) "    clean     - Clean up the ISE files"
135 84 davidgb
        @$(ECHO) "    cleanall  - Clean up the ISE files and the Tools directories"
136 59 davidgb
        @$(ECHO) ""
137
 
138
.PHONY: clean
139
clean:
140
        -$(MAKE) -C ../../src/sys09bug clean
141
        -$(MAKE) -C ../../src/Flex9 clean
142 113 davidgb
        -$(RM) *.ncd *.ngc *.ngd *.twr *.bit *.mcs *.stx *.ucf.untf *.mrp *.ptwx *_map.map
143
        -$(RM) *.ncl *.ngm *.prm *_pad.txt *.twx *.log *.syr *.par *.exo *.xpi *.xrpt *.xml
144
        -$(RM) *.cmd_log *.ngr *.bld *_summary.html *.nc1 *.pcf *.bgn tmp.ut
145 59 davidgb
        -$(RM) *.pad *.placed_ncd_tracker *.routed_ncd_tracker *_pad.csv *.drc
146 113 davidgb
        -$(RM) *.pad_txt $(DESIGN_NAME)_impact.cmd *.unroutes $(DESIGN_NAME)_vhdl.prj
147
        -$(RMDIR) _ngo _xmsgs xst xlnx_auto_0_xdb xst_tmp_dirs
148 59 davidgb
 
149 84 davidgb
.PHONY: cleanall
150
cleanall: clean
151
        -$(MAKE) -C ../../Tools/as09 clean
152
        -$(MAKE) -C ../../Tools/s19tovhd clean
153
 

powered by: WebSVN 2.1.0

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