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

Subversion Repositories System09

[/] [System09/] [branches/] [mkfiles_rev1/] [rtl/] [System09_Xilinx_ML506/] [Makefile] - Blame information for rev 162

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

Line No. Rev Author Line
1 56 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      := virtex5
45
 
46
# List of ROM VHDL files
47
roms:
48
        @$(MAKE) -C ../../src/sys09bug sys09s3s.vhd
49
        @$(MAKE) -C ../../src/Flex9 flex9ram.vhd
50
 
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
all: roms bit
64
 
65
roms: $(ROMFILES)
66
 
67
debug_vars:
68
        @$(ECHO) "XST_FILE    = '$(XST_FILE)'"
69
        @$(ECHO) "PRJ_FILE    = '$(PRJ_FILE)'"
70
        @$(ECHO) "HDL_FILES   = '$(HDL_FILES)'"
71
        @$(ECHO) "PART        = '$(PART)'"
72
        @$(ECHO) "DEVICE      = '$(DEVICE)'"
73
        @$(ECHO) "SPEED       = '$(SPEED)'"
74
        @$(ECHO) "PACKAGE     = '$(PACKAGE)'"
75
        @$(ECHO) "UCF_FILE    = '$(UCF_FILE)'"
76
        @$(ECHO) "BSD_FILE    = '$(BSD_FILE)'"
77
        @$(ECHO) "XSTHDPDIR    = '$(XSTHDPDIR)'"
78
        @$(ECHO) "TMPDIR    = '$(TMPDIR)'"
79
 
80
bit: roms $(DESIGN_NAME).bit
81
 
82
prom: $(DESIGN_NAME).mcs
83
 
84
xsload: $(DESIGN_NAME).bit
85
        @$(ECHO)
86
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using XSLOAD (parallel) ="
87
        $(XSLOAD) -p 0 -b xsa-3s1000 -fpga $<
88
 
89
usbxsload.bit: $(DESIGN_NAME).bit
90
        @$(ECHO)
91
        @$(ECHO) "======= Generating special bitstream with StartUpClk=JtagClk ========"
92
        $(GREP) -v StartUpClk $(BITGEN_OPTIONS_FILE) >tmp.ut
93
        $(ECHO) "-g StartUpClk:JtagClk" >>tmp.ut
94
        $(BITGEN) $(BITGEN_FLAGS) -f tmp.ut $(DESIGN_NAME).ncd usbxsload.bit
95
 
96
usbxsload: usbxsload.bit
97
        @$(ECHO)
98
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using XSLOAD (USB) ======"
99
        $(XSLOAD) -usb 0 -b xsa-3s1000 -fpga usbxsload.bit
100
 
101
impact: $(DESIGN_NAME).bit
102
        @$(ECHO)
103
        @$(ECHO) "======= Downloading bitstream to XSA-3S1000 using Impact ============"
104
        -@$(RM) $(DESIGN_NAME)_impact.cmd
105
        @$(ECHO) "setMode -bscan" >>$(DESIGN_NAME)_impact.cmd
106
        @$(ECHO) "setCable -p auto" >>$(DESIGN_NAME)_impact.cmd
107
        @$(ECHO) "addDevice -p 1 -file $(BSD_FILE)" >>$(DESIGN_NAME)_impact.cmd
108
        @$(ECHO) "assignFile -p 1 -file $<" >>$(DESIGN_NAME)_impact.cmd
109
        @$(ECHO) "program -p 1" >>$(DESIGN_NAME)_impact.cmd
110
        @$(ECHO) "quit" >>$(DESIGN_NAME)_impact.cmd
111
        $(IMPACT) -batch $(DESIGN_NAME)_impact.cmd
112
 
113
.PHONY: help
114
help:
115
        @$(ECHO) "Use this Makefile to regenerate the entire System09 bitstream"
116
        @$(ECHO) "after modifying any of the source RTL or 6809 assembler code."
117
        @$(ECHO) ""
118
        @$(ECHO) "This makefile uses the following project files from the Xilinx ISE"
119
        @$(ECHO) "   $(XST_FILE)"
120
        @$(ECHO) ""
121
        @$(ECHO) "You use Xilinx ISE interactively to add new RTL source files."
122
        @$(ECHO) ""
123
        @$(ECHO) "            Availiable targets"
124
        @$(ECHO)
125
        @$(ECHO) "  For building all or part of the system:"
126
        @$(ECHO) "    roms      - Run asm09 and then generate the VHDL RTL rom files"
127
        @$(ECHO) "    bit       - Rebuild the entire system and generate the bitstream file"
128
        @$(ECHO) "    all       - Rebuild everything"
129
        @$(ECHO) "    prom      - Rebuild the entire system and generate an MCS prom file"
130
        @$(ECHO) "    exo       - Rebuild the entire system and generate an EXO prom file"
131
        @$(ECHO)
132
        @$(ECHO) "  For downloading the bitstream to the board:"
133
        @$(ECHO) "    xsload    - Download the bitstream to the FPGA via XSLOAD"
134
        @$(ECHO) "    usbxsload - Download the bitstream to the FPGA via XSLOAD"
135
        @$(ECHO) "    impact    - Download the bitstream to the FPGA via iMPACT"
136
        @$(ECHO)
137
        @$(ECHO) "  For project maintenance:"
138
        @$(ECHO) "    help      - Print this help text"
139
        @$(ECHO) "    clean     - Clean up the ISE files"
140
        @$(ECHO) ""
141
 
142
.PHONY: clean
143
clean:
144
        -$(MAKE) -C ../../src/sys09bug clean
145
        -$(MAKE) -C ../../src/Flex9 clean
146
        -$(RM) *.ncd *.ngc *.ngd *.twr *.bit *.mcs *.stx *.ucf.untf *.mrp
147
        -$(RM) *.ncl *.ngm *.prm *_pad.txt *.twx *.log *.syr *.par *.exo *.xpi
148
        -$(RM) *.cmd_log *.ngr *.bld *_summary.html *.nc1 *.pcf *.bgn
149
        -$(RM) *.pad *.placed_ncd_tracker *.routed_ncd_tracker *_pad.csv *.drc
150
        -$(RM) *.pad_txt $(DESIGN_NAME)_impact.cmd *.unroutes
151
        -$(RMDIR) _ngo _xmsgs
152
 

powered by: WebSVN 2.1.0

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