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

Subversion Repositories xulalx25soc

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

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
##
16
## Creator:     Dan Gisselquist, Ph.D.
17
##              Gisselquist Technology, LLC
18
##
19
################################################################################
20
##
21
## Copyright (C) 2015, Gisselquist Technology, LLC
22
##
23
## This program is free software (firmware): you can redistribute it and/or
24
## modify it under the terms of  the GNU General Public License as published
25
## by the Free Software Foundation, either version 3 of the License, or (at
26
## your option) any later version.
27
##
28
## This program is distributed in the hope that it will be useful, but WITHOUT
29
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
30
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
31
## for more details.
32
##
33
## License:     GPL, v3, as defined and found on www.gnu.org,
34
##              http:##www.gnu.org/licenses/gpl.html
35
##
36
##
37
################################################################################
38
##
39
##
40
DIR_SPACES  := $(subst /, ,$(CURDIR))
41
DIR_NAME    := $(word $(words $(DIR_SPACES)), $(DIR_SPACES))
42
PROJECT     := xula
43
BRD         := lx25
44
PART        := xc6s$(BRD)-ftg256-2
45
OBJDIR      := obj-xilinx
46
UCFFILE     := ../xula.ucf
47
ifeq ($(shell uname),Linux)
48
  MKDIR:=mkdir
49
else
50
  MKDIR:=gmkdir
51
endif
52
SRCDIR      := ../rtl
53
CPUDIR      := ../rtl/cpu
54
JTAGBUS := wbufifo.v wbubus.v wbucompactlines.v wbucompress.v           \
55
        wbudecompress.v wbudeword.v wbuexec.v wbuidleint.v wbuinput.v   \
56
        wbuoutput.v wbureadcw.v wbusixchar.v wbutohex.v
57
PERIPHERALS: wbgpio.v wbpwmaudio.v rxuart.v txuart.v rtcdate.v rtclight.v
58
CPUSRC := zipsystem.v                                                   \
59
        busdelay.v wbarbiter.v wbdblpriarb.v                            \
60
        zipcpu.v cpuops.v pfcache.v idecode.v pipemem.v pipefetch.v div.v \
61
        zipcounter.v zipjiffies.v ziptimer.v wbdmac.v wbwatchdog.v
62
SOURCES     := toplevel.v jtagser.v busmaster.v                         \
63
        ioslave.v memdev.v hexmap.v icontrol.v builddate.v              \
64
        wbspiflash.v lldspi.v                                           \
65
        wbsdramng.v wbscope.v wbscopc.v $(JTAGBUS)
66
 
67
RTLFILES := $(addprefix $(SRCDIR)/,$(SOURCES)) $(addprefix $(CPUDIR)/,$(CPUSRC))
68
 
69
 
70
all: objdir xula.bit
71
 
72
.PHONY: objdir
73
objdir:
74
        @bash -c "if [ ! -e $(OBJDIR)/ ]; then $(MKDIR) -p $(OBJDIR)/; fi"
75
 
76
$(OBJDIR)/$(PROJECT).ngc: $(RTLFILES) $(PROJECT).xst
77
        $(MKDIR) -p xst/projnav.tmp/
78
        xst -intstyle ise -ifn $(PROJECT).xst -ofn $(OBJDIR)/$(PROJECT).syr
79
        mv $(PROJECT).ngc $(OBJDIR)/$(PROJECT).ngc
80
        mv $(PROJECT).ngr $(OBJDIR)/$(PROJECT).ngr
81
 
82
$(OBJDIR)/$(PROJECT).ngd: $(OBJDIR)/$(PROJECT).ngc
83
        ngdbuild -intstyle ise -dd _ngo -nt timestamp \
84
        -uc $(UCFFILE) -p $(PART) $(OBJDIR)/$(PROJECT).ngc $(OBJDIR)/$(PROJECT).ngd
85
 
86
PRVMAPOPTS := -w -detail -ir off -ignore_keep_hierarchy -pr b -timing   \
87
        -ol high -logic_opt on
88
MAPOPTS := -w -detail -logic_opt on -ol high -xe n -t 1 -xt 0 -r 4      \
89
        -global_opt speed -equivalent_register_removal on -mt 2 -detail \
90
        -ir off -ignore_keep_hierarchy -pr off -lc off -power xe
91
$(OBJDIR)/$(PROJECT).ncd: $(OBJDIR)/$(PROJECT).ngd
92
        map -intstyle ise -p $(PART) $(MAPOPTS) \
93
        -o $(OBJDIR)/$(PROJECT)_map.ncd $(OBJDIR)/$(PROJECT).ngd $(OBJDIR)/$(PROJECT).pcf
94
 
95
$(OBJDIR)/$(PROJECT).ncd: $(OBJDIR)/$(PROJECT)_map.ncd
96
        par -w -intstyle ise -ol high -mt 4 $(OBJDIR)/$(PROJECT)_map.ncd $(OBJDIR)/$(PROJECT).ncd $(OBJDIR)/$(PROJECT).pcf
97
 
98
$(PROJECT).bit: $(OBJDIR)/$(PROJECT).ncd
99
        bitgen -f $(PROJECT).ut $(OBJDIR)/$(PROJECT).ncd $(PROJECT).bit
100
 
101
timing: $(OBJDIR)/$(PROJECT).ncd  $(OBJDIR)/$(PROJECT).pcf
102
        trce -v 3 -s 2 -n 3 -fastpaths -xml $(OBJDIR)/$(PROJECT).twx -o $(OBJDIR)/$(PROJECT).ncd -o $(OBJDIR)/$(PROJECT).twr $(OBJDIR)/$(PROJECT).pcf
103
 
104
.PHONY: clean
105
clean:
106
        @-rm -rf $(OBJDIR)
107
        @-rm -f *.ngc *.ngd *.ncd *.pcf *.lso *.ngr *.bgn *.bld *.cmd_log
108
        @-rm -f *.drc *.gise *.map *.mrp *.ngm *.syr *.xwbt *.xrpt
109
        @-rm -f *.pad *.par *.psr *.ptwx *.unroutes *.xpi *.csv *.xml
110
        @-rm -f *.html *.xrpt *.log *.stx *.tcl *.txt *.twr *.twx
111
        @-rm -rf _ngo  _xmsgs xlnx_* ipcore_dir iseconfig templates xst
112
        @echo "All cleaned up"

powered by: WebSVN 2.1.0

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