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

Subversion Repositories System09

[/] [System09/] [trunk/] [rtl/] [System09_Digilent_Atlys/] [Makefile] - Blame information for rev 158

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

Line No. Rev Author Line
1 141 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
BRAM_TYPE := b16
34
export BRAM_TYPE
35
 
36
#===================================================================
37
# User-modifiable variables
38
#
39
# This name must match the name of the design in Xilinx ISE (case
40
# sensitive).
41
DESIGN_NAME := system09
42
#
43
# Constraint file (unfortunately it cannot be extracted from ISE)
44
UCF_FILE    := system09.ucf
45
#
46
# Technology family (unfortunately it cannot be extracted from ISE)
47 148 davidgb
FAMILY      := spartan6
48 141 davidgb
 
49 148 davidgb
 
50
 
51
 
52 141 davidgb
# List of ROM VHDL files
53
.PHONY: roms
54
roms:
55
        @$(MAKE) -C ../../Tools/as09
56
        @$(MAKE) -C ../../Tools/s19tovhd
57
        @$(MAKE) -C ../../src/sys09bug sys09swt.vhd
58 148 davidgb
        @$(MAKE) -C ../../src/Flex9 flex9ram.vhd
59 141 davidgb
 
60
#===================================================================
61
# You should not need to edit anything below this line
62
 
63
# XESS Tools
64
ifeq "$(findstring CYGWIN_NT,$(shell uname -s))" "CYGWIN_NT"
65
XESSPATH := $(shell cygpath "$(XSTOOLS_BIN_DIR)")
66
else
67
XESSPATH := $(XSTOOLS_BIN_DIR)
68
endif
69
XSLOAD     := "$(XESSPATH)/xsload.exe"
70
 
71
include ../../mkfiles/xilinx_rules.mk
72
 
73
#===================================================================
74
# TARGETS
75
 
76
.PHONY: all
77
all: bit
78
 
79
.PHONY: bit
80
bit: roms $(DESIGN_NAME).bit
81
 
82
.PHONY: impact
83
impact: roms bit do_impact
84
 
85
prom: roms $(DESIGN_NAME).mcs
86
 
87
.PHONY: xsload
88
xsload: roms $(DESIGN_NAME).bit
89
        @$(ECHO)
90
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using XSLOAD (parallel) ="
91
        $(XSLOAD) -p 0 -b xsa-3s1000 -fpga $<
92
 
93
usbxsload.bit: roms $(DESIGN_NAME).bit
94
        @$(ECHO)
95
        @$(ECHO) "======= Generating special bitstream with StartUpClk=JtagClk ========"
96
        $(GREP) -v StartUpClk $(BITGEN_OPTIONS_FILE) >tmp.ut
97
        $(ECHO) "-g StartUpClk:JtagClk" >>tmp.ut
98
        $(BITGEN) $(BITGEN_FLAGS) -f tmp.ut $(DESIGN_NAME).ncd usbxsload.bit
99
 
100
.PHONY: usbxsload
101
usbxsload: roms usbxsload.bit
102
        @$(ECHO)
103
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using XSLOAD (USB) ======"
104
        $(XSLOAD) -usb 0 -b xsa-3s1000 -fpga usbxsload.bit
105
 
106
.PHONY: usbflash0
107
usbflash0: roms prom $(DESIGN_NAME).bit
108
        $(XSLOAD) -usb 0 -b xsa-3s1000 -flash $(DESIGN_NAME).mcs
109
 
110
.PHONY: help
111
help:
112
        @$(ECHO) "Use this Makefile to regenerate the entire System09 bitstream"
113
        @$(ECHO) "after modifying any of the source RTL or 6809 assembler code."
114
        @$(ECHO) ""
115
        @$(ECHO) "This makefile uses the following project files from the Xilinx ISE"
116
        @$(ECHO) "   $(XST_FILE)"
117
        @$(ECHO) ""
118
        @$(ECHO) "You use Xilinx ISE interactively to add new RTL source files."
119
        @$(ECHO) ""
120
        @$(ECHO) "            Availiable targets"
121
        @$(ECHO)
122
        @$(ECHO) "  For building all or part of the system:"
123
        @$(ECHO) "    roms      - Run asm09 and then generate the VHDL RTL rom files"
124
        @$(ECHO) "    bit       - Rebuild the entire system and generate the bitstream file"
125
        @$(ECHO) "    all       - Rebuild everything"
126
        @$(ECHO) "    prom      - Rebuild the entire system and generate an MCS prom file"
127
        @$(ECHO) "    exo       - Rebuild the entire system and generate an EXO prom file"
128
        @$(ECHO)
129
        @$(ECHO) "  For downloading the bitstream to the board:"
130
        @$(ECHO) "    xsload    - Download the bitstream to the FPGA via XSLOAD"
131
        @$(ECHO) "    usbxsload - Download the bitstream to the FPGA via usbXSLOAD"
132
        @$(ECHO) "    usbflash0 - Download the bitstream Flash slot 0 via usbXSLOAD"
133
        @$(ECHO) "    impact    - Download the bitstream to the FPGA via iMPACT"
134
        @$(ECHO)
135
        @$(ECHO) "  For project maintenance:"
136
        @$(ECHO) "    help      - Print this help text"
137
        @$(ECHO) "    clean     - Clean up the ISE files"
138
        @$(ECHO) "    cleanall  - Clean up the ISE files and the Tools directories"
139
        @$(ECHO) ""
140
 
141
.PHONY: clean
142
clean:
143
        -$(MAKE) -C ../../src/sys09bug clean
144
        -$(MAKE) -C ../../src/Flex9 clean
145 148 davidgb
        -$(RM) *.cfi *_bitgen.xwbt *.ncd *.ngc *.ngd *.twr *.bit *.mcs *.stx *.ucf.untf *.mrp *.ptwx *_map.map
146 141 davidgb
        -$(RM) *.ncl *.ngm *.prm *_pad.txt *.twx *.log *.syr *.par *.exo *.xpi *.xrpt *.xml
147
        -$(RM) *.cmd_log *.ngr *.bld *_summary.html *.nc1 *.pcf *.bgn tmp.ut
148
        -$(RM) *.pad *.placed_ncd_tracker *.routed_ncd_tracker *_pad.csv *.drc
149
        -$(RM) *.pad_txt $(DESIGN_NAME)_impact.cmd *.unroutes $(DESIGN_NAME)_vhdl.prj
150 152 davidgb
        -$(RM) par_usage_statistics.html $(DESIGN_NAME)_envsettings.html
151
        -$(RMDIR) _ngo _xmsgs xst xlnx_auto_0_xdb xst_tmp_dirs iseconfig
152 141 davidgb
 
153
.PHONY: cleanall
154
cleanall: clean
155
        -$(MAKE) -C ../../Tools/as09 clean
156
        -$(MAKE) -C ../../Tools/s19tovhd clean
157
 

powered by: WebSVN 2.1.0

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