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

Subversion Repositories System09

[/] [System09/] [rev_86/] [rtl/] [System09_Xess_XSA-3S1000/] [Makefile] - Blame information for rev 201

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

powered by: WebSVN 2.1.0

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