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

Subversion Repositories zipcpu

[/] [zipcpu/] [trunk/] [rtl/] [Makefile] - Blame information for rev 88

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

Line No. Rev Author Line
1 2 dgisselq
################################################################################
2
#
3
# Filename:     Makefile
4
#
5
# Project:      Zip CPU -- a small, lightweight, RISC CPU soft core
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
#
11
# Creator:      Dan Gisselquist, Ph.D.
12 69 dgisselq
#               Gisselquist Technology, LLC
13 2 dgisselq
#
14
################################################################################
15
#
16
# Copyright (C) 2015, Gisselquist Technology, LLC
17
#
18
# This program is free software (firmware): you can redistribute it and/or
19
# modify it under the terms of  the GNU General Public License as published
20
# by the Free Software Foundation, either version 3 of the License, or (at
21
# your option) any later version.
22
#
23
# This program is distributed in the hope that it will be useful, but WITHOUT
24
# ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
25
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
26
# for more details.
27
#
28
# License:      GPL, v3, as defined and found on www.gnu.org,
29
#               http://www.gnu.org/licenses/gpl.html
30
#
31
#
32
################################################################################
33
#
34
.PHONY: all
35 69 dgisselq
all: zipsystem zipbones cpudefs.h div
36 2 dgisselq
 
37
CORED:= core
38
PRPHD:= peripherals
39
AUXD := aux
40 56 dgisselq
VSRC := zipsystem.v cpudefs.v                                   \
41 36 dgisselq
                $(PRPHD)/wbdmac.v $(PRPHD)/icontrol.v           \
42 2 dgisselq
                $(PRPHD)/zipcounter.v $(PRPHD)/zipjiffies.v     \
43
                $(PRPHD)/ziptimer.v $(PRPHD)/ziptrap.v          \
44 69 dgisselq
        $(CORED)/zipcpu.v $(CORED)/cpuops.v $(CORED)/idecode.v  \
45 2 dgisselq
                $(CORED)/pipefetch.v $(CORED)/prefetch.v        \
46 69 dgisselq
                $(CORED)/pfcache.v                              \
47 38 dgisselq
                $(CORED)/memops.v $(CORED)/pipemem.v            \
48
        $(AUXD)/busdelay.v                                      \
49 69 dgisselq
                $(AUXD)/wbdblpriarb.v $(AUXD)/wbpriarbiter.v    \
50
        $(CORED)/idecode.v $(CORED)/cpuops.v
51 56 dgisselq
VZIP := zipbones.v cpudefs.v                                    \
52 69 dgisselq
        $(CORED)/zipcpu.v $(CORED)/cpuops.v $(CORED)/idecode.v  \
53 38 dgisselq
                $(CORED)/pipefetch.v $(CORED)/prefetch.v        \
54 69 dgisselq
                $(CORED)/pfcache.v                              \
55 38 dgisselq
                $(CORED)/memops.v $(CORED)/pipemem.v            \
56 69 dgisselq
        $(AUXD)/busdelay.v $(AUXD)/wbdblpriarb.v                \
57
        $(CORED)/idecode.v $(CORED)/cpuops.v
58 2 dgisselq
 
59
VOBJ := obj_dir
60
 
61
$(VOBJ)/Vzipsystem.cpp: $(VSRC)
62 18 dgisselq
        verilator -cc -y $(CORED) -y $(PRPHD) -y $(AUXD) zipsystem.v
63 56 dgisselq
$(VOBJ)/Vzipsystem.h: $(VOBJ)/Vzipsystem.cpp
64 2 dgisselq
 
65 38 dgisselq
$(VOBJ)/Vzipbones.cpp: $(VZIP)
66
        verilator -cc -y $(CORED) -y $(PRPHD) -y $(AUXD) zipbones.v
67 56 dgisselq
$(VOBJ)/Vzipbones.h: $(VOBJ)/Vzipbones.cpp
68 38 dgisselq
 
69 69 dgisselq
$(VOBJ)/Vdiv.cpp: $(CORED)/div.v
70
        verilator -cc -y $(CORED) -y $(PRPHD) -y $(AUXD) $(CORED)/div.v
71
$(VOBJ)/Vdiv.h: $(VOBJ)/Vdiv.cpp
72
 
73 2 dgisselq
$(VOBJ)/Vzipsystem__ALL.a: $(VOBJ)/Vzipsystem.cpp $(VOBJ)/Vzipsystem.h
74 69 dgisselq
        cd $(VOBJ); make --no-print-directory -f Vzipsystem.mk
75 2 dgisselq
 
76 38 dgisselq
$(VOBJ)/Vzipbones__ALL.a: $(VOBJ)/Vzipbones.cpp $(VOBJ)/Vzipbones.h
77 69 dgisselq
        cd $(VOBJ); make --no-print-directory -f Vzipbones.mk
78 38 dgisselq
 
79 69 dgisselq
$(VOBJ)/Vdiv__ALL.a: $(VOBJ)/Vdiv.cpp $(VOBJ)/Vdiv.h
80
        cd $(VOBJ); make --no-print-directory -f Vdiv.mk
81
 
82 56 dgisselq
cpudefs.h: cpudefs.v
83 69 dgisselq
        @echo "Building cpudefs.h"
84
        @echo "// " > $@
85
        @echo "// Do not edit this file, it is automatically generated!" >> $@
86
        @echo "// " >> $@
87
        @grep "^\`" $^ | sed -e '{ s/^`/#/ }' >> $@
88 38 dgisselq
 
89 2 dgisselq
.PHONY: zipsystem
90
zipsystem: $(VOBJ)/Vzipsystem__ALL.a
91
 
92 38 dgisselq
.PHONY: zipbones
93
zipbones: $(VOBJ)/Vzipbones__ALL.a
94
 
95 69 dgisselq
.PHONY: div
96
div: $(VOBJ)/Vdiv__ALL.a
97
 
98 2 dgisselq
.PHONY: clean
99
clean:
100 38 dgisselq
        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.