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

Subversion Repositories darkriscv

[/] [darkriscv/] [trunk/] [boards/] [digilent_spartan3_s200/] [darksocv.mk] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 marcelos
#
2
# Copyright (c) 2018, Marcelo Samsoniuk
3
# All rights reserved.
4
#
5
# Redistribution and use in source and binary forms, with or without
6
# modification, are permitted provided that the following conditions are met:
7
#
8
# * Redistributions of source code must retain the above copyright notice, this
9
#   list of conditions and the following disclaimer.
10
#
11
# * Redistributions in binary form must reproduce the above copyright notice,
12
#   this list of conditions and the following disclaimer in the documentation
13
#   and/or other materials provided with the distribution.
14
#
15
# * Neither the name of the copyright holder nor the names of its
16
#   contributors may be used to endorse or promote products derived from
17
#   this software without specific prior written permission.
18
#
19
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
#
30
# ===8<--------------------------------------------------------- cut here!
31
#
32
# The general concept is based in the article:
33
#
34
#       https://www.fpgarelated.com/showarticle/786.php
35
#
36
# However, since the ISE GUI itself creates a "darksocv.cmd_log" file with
37
# all commands executed and the respective options, it is possible change
38
# some options in the ISE and check the file in order to understand how
39
# enable/disable the different options.
40
#
41
 
42
# board Digilent Spartan-3 S200
43
BOARD  = digilent_spartan3_s200
44
DEVICE = xc3s200-4-ft256
45
 
46
ISE = ../boards/$(BOARD)
47
RTL = ../rtl
48
SRC = ../src
49
TMP = ../tmp
50
 
51
XST = $(ISE)/darksocv.xst
52
SYR = $(TMP)/darksocv.syr
53
UCF = $(ISE)/darksocv.ucf
54
IMP = $(ISE)/darksocv.imp
55
NGC = $(TMP)/darksocv.ngc
56
NGD = $(TMP)/darksocv.ngd
57
PCF = $(TMP)/darksocv.pcf
58
NCD = $(TMP)/darksocv.ncd
59
TWX = $(TMP)/darksocv.twx
60
TWR = $(TMP)/darksocv.twr
61
BIT = $(TMP)/darksocv.bit
62
MAP = $(TMP)/darksocv_map.ncd
63
UT  = $(ISE)/darksocv.ut
64
 
65
PRJS = $(ISE)/darksocv.prj
66
RTLS = $(RTL)/darksocv.v $(RTL)/darkriscv.v $(RTL)/darkuart.v $(RTL)/config.vh
67
 
68
ifdef HARVARD
69
        BOOT = $(SRC)/darksocv.rom.mem $(SRC)/darksocv.ram.mem
70
else
71
        BOOT = $(SRC)/darksocv.mem
72
endif
73
 
74
IMP  = $(ISE)/darksocv.imp
75
 
76
default: all
77
 
78
$(NGC): $(PRJS) $(BOOT) $(RTLS)
79
        cd $(TMP) && xst -intstyle ise -ifn $(XST) -ofn $(SYR)
80
 
81
$(NGD): $(NGC) $(UCF) $(BOOT) $(RTLS)
82
        cd $(TMP) && ngdbuild -intstyle ise -dd _ngo -nt timestamp -uc $(UCF) -p $(DEVICE) $(NGC) $(NGD)
83
 
84
$(PCF): $(NGD) $(BOOT) $(UCF) $(RTLS)
85
        cd $(TMP) && map -intstyle ise -p $(DEVICE) -w -logic_opt on -ol high -t 1 -register_duplication on -r 4 -global_opt off -detail -ir off -ignore_keep_hierarchy -pr off -power off -o $(MAP) $(NGD) $(PCF)
86
 
87
$(NCD): $(PCF) $(BOOT) $(UCF) $(RTLS)
88
        cd $(TMP) && par -w -intstyle ise -ol high -mt 2 $(MAP) $(NCD) $(PCF)
89
 
90
$(TWR): $(PCF) $(BOOT) $(UCF) $(RTLS) $(NCD)
91
        cd $(TMP) && trce -intstyle ise -v 3 -s 4 -n 3 -fastpaths -xml $(TWX) $(NCD) -o $(TWR) $(PCF)
92
 
93
$(BIT): $(UT) $(NCD) $(BOOT) $(UCF) $(RTLS)
94
        cd $(TMP) && bitgen -intstyle ise -f $(UT) $(NCD)
95
 
96
all: $(BIT) $(BOOT) $(UCF) $(RTLS)
97
 
98
install: $(BIT) $(BOOT) $(UCF) $(RTLS)
99
        cd $(TMP) && impact -batch $(IMP)
100
 
101
clean:
102
        -rm -v $(TMP)/*

powered by: WebSVN 2.1.0

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