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

Subversion Repositories System09

[/] [System09/] [branches/] [mkfiles_rev1/] [rtl/] [System09_Xess_XSA-3S1000/] [Makefile] - Blame information for rev 38

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

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

powered by: WebSVN 2.1.0

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