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

Subversion Repositories System09

[/] [System09/] [trunk/] [rtl/] [System09_base/] [Makefile] - Blame information for rev 95

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    := my_system09.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
        @$(MAKE) -C ../../src/sys09bug sys09xes.vhd
50
        @$(MAKE) -C ../../src/Flex9 flex9ide.vhd
51
 
52
#===================================================================
53
# You should not need to edit anything below this line
54
 
55
# XESS Tools
56
XSLOAD     := C:/Progra~1/XSTOOLs/xsload.exe
57
 
58
include ../../mkfiles/xilinx_rules.mk
59
 
60
#===================================================================
61
# TARGETS
62
 
63
.PHONY: all
64
all: bit
65
 
66
.PHONY: bit
67
bit: roms $(DESIGN_NAME).bit
68
 
69
.PHONY: impact
70
impact: roms bit do_impact
71
 
72
prom: roms $(DESIGN_NAME).mcs
73
 
74
.PHONY: xsload
75
xsload: roms $(DESIGN_NAME).bit
76
        @$(ECHO)
77
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using XSLOAD (parallel) ="
78
        $(XSLOAD) -p 0 -b xsa-3s1000 -fpga $<
79
 
80
usbxsload.bit: roms $(DESIGN_NAME).bit
81
        @$(ECHO)
82
        @$(ECHO) "======= Generating special bitstream with StartUpClk=JtagClk ========"
83
        $(GREP) -v StartUpClk $(BITGEN_OPTIONS_FILE) >tmp.ut
84
        $(ECHO) "-g StartUpClk:JtagClk" >>tmp.ut
85
        $(BITGEN) $(BITGEN_FLAGS) -f tmp.ut $(DESIGN_NAME).ncd usbxsload.bit
86
 
87
.PHONY: usbxsload
88
usbxsload: roms usbxsload.bit
89
        @$(ECHO)
90
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using XSLOAD (USB) ======"
91
        $(XSLOAD) -usb 0 -b xsa-3s1000 -fpga usbxsload.bit
92
 
93
.PHONY: usbflash0
94
usbflash0: roms prom $(DESIGN_NAME).bit
95
        $(XSLOAD) -usb 0 -b xsa-3s1000 -flash $(DESIGN_NAME).mcs
96
 
97
.PHONY: help
98
help:
99
        @$(ECHO) "Use this Makefile to regenerate the entire System09 bitstream"
100
        @$(ECHO) "after modifying any of the source RTL or 6809 assembler code."
101
        @$(ECHO) ""
102
        @$(ECHO) "This makefile uses the following project files from the Xilinx ISE"
103
        @$(ECHO) "   $(XST_FILE)"
104
        @$(ECHO) ""
105
        @$(ECHO) "You use Xilinx ISE interactively to add new RTL source files."
106
        @$(ECHO) ""
107
        @$(ECHO) "            Availiable targets"
108
        @$(ECHO)
109
        @$(ECHO) "  For building all or part of the system:"
110
        @$(ECHO) "    roms      - Run asm09 and then generate the VHDL RTL rom files"
111
        @$(ECHO) "    bit       - Rebuild the entire system and generate the bitstream file"
112
        @$(ECHO) "    all       - Rebuild everything"
113
        @$(ECHO) "    prom      - Rebuild the entire system and generate an MCS prom file"
114
        @$(ECHO) "    exo       - Rebuild the entire system and generate an EXO prom file"
115
        @$(ECHO)
116
        @$(ECHO) "  For downloading the bitstream to the board:"
117
        @$(ECHO) "    xsload    - Download the bitstream to the FPGA via XSLOAD"
118
        @$(ECHO) "    usbxsload - Download the bitstream to the FPGA via usbXSLOAD"
119
        @$(ECHO) "    usbflash0 - Download the bitstream Flash slot 0 via usbXSLOAD"
120
        @$(ECHO) "    impact    - Download the bitstream to the FPGA via iMPACT"
121
        @$(ECHO)
122
        @$(ECHO) "  For project maintenance:"
123
        @$(ECHO) "    help      - Print this help text"
124
        @$(ECHO) "    clean     - Clean up the ISE files"
125
        @$(ECHO) ""
126
 
127
.PHONY: clean
128
clean:
129
        -$(MAKE) -C ../../src/sys09bug clean
130
        -$(MAKE) -C ../../src/Flex9 clean
131
        -$(RM) *.ncd *.ngc *.ngd *.twr *.bit *.mcs *.stx *.ucf.untf *.mrp
132
        -$(RM) *.ncl *.ngm *.prm *_pad.txt *.twx *.log *.syr *.par *.exo *.xpi
133
        -$(RM) *.cmd_log *.ngr *.bld *_summary.html *.nc1 *.pcf *.bgn
134
        -$(RM) *.pad *.placed_ncd_tracker *.routed_ncd_tracker *_pad.csv *.drc
135
        -$(RM) *.pad_txt $(DESIGN_NAME)_impact.cmd *.unroutes
136
        -$(RMDIR) _ngo _xmsgs
137
 

powered by: WebSVN 2.1.0

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