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

Subversion Repositories xulalx25soc

[/] [xulalx25soc/] [trunk/] [xilinx/] [Makefile] - Blame information for rev 50

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

Line No. Rev Author Line
1 6 dgisselq
################################################################################
2
##
3
## Filename:    Makefile
4
##
5
## Project:     XuLA2 board
6
##
7
## Purpose:     In case you don't want to fire up ISE, this Makefile attempts
8
##              to coordinate the build process without it.  While it works in
9
##      testing, there are some problems to this approach.  The first is that
10
##      if you bust timing, you may never know it--nothing will tell you it
11
##      failed.  Second, the output file is different from the output file
12
##      produced via ISE.  Still ... for a command line make script, it is a
13
##      (good) start.
14
##
15 7 dgisselq
##      Makefile targets:
16 6 dgisselq
##
17 7 dgisselq
##      xula.bit        The FPGA bitfile or configuration file
18
##
19
##      objdir          Makes a directory for temporary build files, which can
20
##                      then be removed later with a clean target.  While a
21
##                      great idea in principle, this doesn't work well in
22
##                      practice since Xilinx's ISE never uses it.
23
##
24
##      clean           Removes intermediate build files.
25
##
26 6 dgisselq
## Creator:     Dan Gisselquist, Ph.D.
27
##              Gisselquist Technology, LLC
28
##
29
################################################################################
30
##
31
## Copyright (C) 2015, Gisselquist Technology, LLC
32
##
33
## This program is free software (firmware): you can redistribute it and/or
34
## modify it under the terms of  the GNU General Public License as published
35
## by the Free Software Foundation, either version 3 of the License, or (at
36
## your option) any later version.
37
##
38
## This program is distributed in the hope that it will be useful, but WITHOUT
39
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
40
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
41
## for more details.
42
##
43
## License:     GPL, v3, as defined and found on www.gnu.org,
44
##              http:##www.gnu.org/licenses/gpl.html
45
##
46
##
47
################################################################################
48
##
49
##
50
DIR_SPACES  := $(subst /, ,$(CURDIR))
51
DIR_NAME    := $(word $(words $(DIR_SPACES)), $(DIR_SPACES))
52
PROJECT     := xula
53
BRD         := lx25
54
PART        := xc6s$(BRD)-ftg256-2
55
OBJDIR      := obj-xilinx
56
UCFFILE     := ../xula.ucf
57
ifeq ($(shell uname),Linux)
58
  MKDIR:=mkdir
59
else
60
  MKDIR:=gmkdir
61
endif
62
SRCDIR      := ../rtl
63
CPUDIR      := ../rtl/cpu
64
JTAGBUS := wbufifo.v wbubus.v wbucompactlines.v wbucompress.v           \
65
        wbudecompress.v wbudeword.v wbuexec.v wbuidleint.v wbuinput.v   \
66
        wbuoutput.v wbureadcw.v wbusixchar.v wbutohex.v
67 7 dgisselq
PERIPHERALS: wbgpio.v wbpwmaudio.v rxuart.v txuart.v uartdev.v          \
68
        rtcdate.v rtclight.v
69 6 dgisselq
CPUSRC := zipsystem.v                                                   \
70
        busdelay.v wbarbiter.v wbdblpriarb.v                            \
71
        zipcpu.v cpuops.v pfcache.v idecode.v pipemem.v pipefetch.v div.v \
72
        zipcounter.v zipjiffies.v ziptimer.v wbdmac.v wbwatchdog.v
73
SOURCES     := toplevel.v jtagser.v busmaster.v                         \
74
        ioslave.v memdev.v hexmap.v icontrol.v builddate.v              \
75
        wbspiflash.v lldspi.v                                           \
76
        wbsdramng.v wbscope.v wbscopc.v $(JTAGBUS)
77
 
78
RTLFILES := $(addprefix $(SRCDIR)/,$(SOURCES)) $(addprefix $(CPUDIR)/,$(CPUSRC))
79
 
80
 
81
all: objdir xula.bit
82
 
83
.PHONY: objdir
84
objdir:
85
        @bash -c "if [ ! -e $(OBJDIR)/ ]; then $(MKDIR) -p $(OBJDIR)/; fi"
86
 
87
$(OBJDIR)/$(PROJECT).ngc: $(RTLFILES) $(PROJECT).xst
88
        $(MKDIR) -p xst/projnav.tmp/
89
        xst -intstyle ise -ifn $(PROJECT).xst -ofn $(OBJDIR)/$(PROJECT).syr
90
        mv $(PROJECT).ngc $(OBJDIR)/$(PROJECT).ngc
91
        mv $(PROJECT).ngr $(OBJDIR)/$(PROJECT).ngr
92
 
93
$(OBJDIR)/$(PROJECT).ngd: $(OBJDIR)/$(PROJECT).ngc
94
        ngdbuild -intstyle ise -dd _ngo -nt timestamp \
95
        -uc $(UCFFILE) -p $(PART) $(OBJDIR)/$(PROJECT).ngc $(OBJDIR)/$(PROJECT).ngd
96
 
97 18 dgisselq
MAPOPTS := -w -logic_opt on -ol high -xe n -t 1 -xt 0 -r 4      \
98
        -global_opt speed -equivalent_register_removal on -mt 2 -detail \
99 12 dgisselq
        -ir off -ignore_keep_hierarchy -pr off -lc area -power off
100 6 dgisselq
$(OBJDIR)/$(PROJECT).ncd: $(OBJDIR)/$(PROJECT).ngd
101
        map -intstyle ise -p $(PART) $(MAPOPTS) \
102
        -o $(OBJDIR)/$(PROJECT)_map.ncd $(OBJDIR)/$(PROJECT).ngd $(OBJDIR)/$(PROJECT).pcf
103
 
104
$(OBJDIR)/$(PROJECT).ncd: $(OBJDIR)/$(PROJECT)_map.ncd
105 12 dgisselq
        par -w -intstyle ise -ol std -mt 4 $(OBJDIR)/$(PROJECT)_map.ncd $(OBJDIR)/$(PROJECT).ncd $(OBJDIR)/$(PROJECT).pcf
106 6 dgisselq
 
107
$(PROJECT).bit: $(OBJDIR)/$(PROJECT).ncd
108
        bitgen -f $(PROJECT).ut $(OBJDIR)/$(PROJECT).ncd $(PROJECT).bit
109
 
110
timing: $(OBJDIR)/$(PROJECT).ncd  $(OBJDIR)/$(PROJECT).pcf
111 12 dgisselq
        trce -intstyle ise -v 3 -s 2 -n 3 -fastpaths -xml $(OBJDIR)/$(PROJECT).twx -o $(OBJDIR)/$(PROJECT).ncd -o $(OBJDIR)/$(PROJECT).twr $(OBJDIR)/$(PROJECT).pcf
112 6 dgisselq
 
113
.PHONY: clean
114
clean:
115
        @-rm -rf $(OBJDIR)
116
        @-rm -f *.ngc *.ngd *.ncd *.pcf *.lso *.ngr *.bgn *.bld *.cmd_log
117
        @-rm -f *.drc *.gise *.map *.mrp *.ngm *.syr *.xwbt *.xrpt
118
        @-rm -f *.pad *.par *.psr *.ptwx *.unroutes *.xpi *.csv *.xml
119
        @-rm -f *.html *.xrpt *.log *.stx *.tcl *.txt *.twr *.twx
120
        @-rm -rf _ngo  _xmsgs xlnx_* ipcore_dir iseconfig templates xst
121
        @echo "All cleaned up"

powered by: WebSVN 2.1.0

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