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

Subversion Repositories s6soc

[/] [s6soc/] [trunk/] [rtl/] [Makefile] - Blame information for rev 46

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

Line No. Rev Author Line
1 8 dgisselq
################################################################################
2 46 dgisselq
##
3
## Filename:    rtl/Makefile
4
##
5
## Project:     CMod S6 System on a Chip, ZipCPU demonstration project
6
##
7
## Purpose:     This makefile builds a verilator simulation of the zipsystem.
8
##              It does not make the system within Vivado or Quartus.
9
##
10
## Creator:     Dan Gisselquist, Ph.D.
11
##              Gisselquist Technology, LLC
12
##
13 8 dgisselq
################################################################################
14 46 dgisselq
##
15
## Copyright (C) 2015-2016, Gisselquist Technology, LLC
16
##
17
## This program is free software (firmware): you can redistribute it and/or
18
## modify it under the terms of  the GNU General Public License as published
19
## by the Free Software Foundation, either version 3 of the License, or (at
20
## your option) any later version.
21
##
22
## This program is distributed in the hope that it will be useful, but WITHOUT
23
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
24
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
25
## for more details.
26
##
27
## You should have received a copy of the GNU General Public License along
28
## with this program.  (It's in the $(ROOT)/doc directory, run make with no
29
## target there if the PDF file isn't present.)  If not, see
30
##  for a copy.
31
##
32
## License:     GPL, v3, as defined and found on www.gnu.org,
33
##              http://www.gnu.org/licenses/gpl.html
34
##
35 8 dgisselq
#
36
################################################################################
37 46 dgisselq
##
38
##
39 8 dgisselq
.PHONY: all
40
all: busmaster altbusmaster
41 46 dgisselq
YYMMDD=`date +%Y%m%d`
42 8 dgisselq
CPUD := cpu
43
RAWZIP := zipbones.v zipcpu.v cpudefs.v                         \
44
                prefetch.v idecode.v cpuops.v memops.v          \
45
                wbdblpriarb.v
46
ZIPSRC := $(addprefix $(CPUD)/,$(RAWZIP))
47 46 dgisselq
BUSSRC := builddate.v llqspi.v wbscope.v memdev.v spio.v wbgpio.v wbpwmaudio.v
48 8 dgisselq
MAINSRC := busmaster.v builddate.v flash_config.v wbqspiflash.v \
49
        $(BUSSRC) $(ZIPSRC)
50
# toplevel.v rxuart.v txuart.v
51
ALTSRC := altbusmaster.v builddate.v flash_config.v wbqspiflash.v       \
52 46 dgisselq
        $(BUSSRC) wbubus.v
53 8 dgisselq
# alttop.v rxuart.v txuart.v
54
VOBJ := obj_dir
55
 
56
$(VOBJ)/Vbusmaster.cpp: $(MAINSRC)
57 46 dgisselq
        verilator -trace -cc -y $(CPUD) busmaster.v
58 8 dgisselq
$(VOBJ)/Vbusmaster.h: $(VOBJ)/Vbusmaster.cpp
59
 
60
$(VOBJ)/Valtbusmaster.cpp: $(ALTSRC)
61 46 dgisselq
        verilator -trace -cc -y $(CPUD) altbusmaster.v
62 8 dgisselq
$(VOBJ)/Valtbusmaster.h: $(VOBJ)/Valtbusmaster.cpp
63
 
64
$(VOBJ)/Vbusmaster__ALL.a: $(VOBJ)/Vbusmaster.cpp $(VOBJ)/Vbusmaster.h
65
        cd $(VOBJ); make --no-print-directory -f Vbusmaster.mk
66
 
67 46 dgisselq
$(VOBJ)/V%__ALL.a: $(VOBJ)/V%.mk
68
        cd $(VDIRFB); make -f V$*.mk
69
 
70 8 dgisselq
$(VOBJ)/Valtbusmaster__ALL.a: $(VOBJ)/Valtbusmaster.cpp $(VOBJ)/Valtbusmaster.h
71
        cd $(VOBJ); make --no-print-directory -f Valtbusmaster.mk
72
 
73
cpudefs.h: cpudefs.v
74
        @echo "Building cpudefs.h"
75
        @echo "// " > $@
76
        @echo "// Do not edit this file, it is automatically generated!" >> $@
77
        @echo "// To generate this file, \"make cpudefs.h\" in the rtl directory." >> $@
78
        @echo "// " >> $@
79
        @grep "^\`" $^ | sed -e '{ s/^`/#/ }' >> $@
80
 
81
.PHONY: busmaster
82
busmaster: $(VOBJ)/Vbusmaster__ALL.a
83
 
84
.PHONY: altbusmaster
85
altbusmaster: $(VOBJ)/Valtbusmaster__ALL.a
86
 
87
.PHONY: clean
88
clean:
89
        rm -rf $(VOBJ) cpudefs.h

powered by: WebSVN 2.1.0

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