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

Subversion Repositories zipcpu

[/] [zipcpu/] [trunk/] [rtl/] [Makefile] - Diff between revs 201 and 209

Show entire file | Details | Blame | View Log

Rev 201 Rev 209
Line 1... Line 1...
################################################################################
################################################################################
#
##
# Filename:     Makefile
## Filename:    Makefile
#
##
# Project:      Zip CPU -- a small, lightweight, RISC CPU soft core
## Project:     Zip CPU -- a small, lightweight, RISC CPU soft core
#
##
# Purpose:      This makefile builds a verilator simulation of the zipsystem.
## Purpose:     This makefile builds a verilator simulation of the zipsystem.
#               It does not make the system within Vivado or Quartus.
##              It does not make the system within Vivado or Quartus.
#
##
#
##
# Creator:      Dan Gisselquist, Ph.D.
## Creator:     Dan Gisselquist, Ph.D.
#               Gisselquist Technology, LLC
##              Gisselquist Technology, LLC
#
##
################################################################################
################################################################################
#
##
# Copyright (C) 2015-2017, Gisselquist Technology, LLC
## Copyright (C) 2015-2017, Gisselquist Technology, LLC
#
##
# This program is free software (firmware): you can redistribute it and/or
## This program is free software (firmware): you can redistribute it and/or
# modify it under the terms of  the GNU General Public License as published
## modify it under the terms of  the GNU General Public License as published
# by the Free Software Foundation, either version 3 of the License, or (at
## by the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
## your option) any later version.
#
##
# This program is distributed in the hope that it will be useful, but WITHOUT
## This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
## for more details.
#
##
# License:      GPL, v3, as defined and found on www.gnu.org,
## You should have received a copy of the GNU General Public License along
#               http://www.gnu.org/licenses/gpl.html
## with this program.  (It's in the $(ROOT)/doc directory.  Run make with no
#
## target there if the PDF file isn't present.)  If not, see
#
##  for a copy.
 
##
 
## License:     GPL, v3, as defined and found on www.gnu.org,
 
##              http://www.gnu.org/licenses/gpl.html
 
##
 
##
################################################################################
################################################################################
#
##
 
##
.PHONY: all
.PHONY: all
all: zipsystem zipbones cpudefs.h div zipmmu cpuops pfcache
all: zipsystem zipbones cpudefs.h div zipmmu cpuops pfcache
 
 
CORED:= core
CORED:= core
PRPHD:= peripherals
PRPHD:= peripherals
AUXD := aux
EXD  := ex
VSRC := zipsystem.v cpudefs.v                                   \
VSRC := zipsystem.v cpudefs.v                                   \
                $(PRPHD)/wbdmac.v $(PRPHD)/icontrol.v           \
                $(PRPHD)/wbdmac.v $(PRPHD)/icontrol.v           \
                $(PRPHD)/zipcounter.v $(PRPHD)/zipjiffies.v     \
                $(PRPHD)/zipcounter.v $(PRPHD)/zipjiffies.v     \
                $(PRPHD)/ziptimer.v                             \
                $(PRPHD)/ziptimer.v                             \
        $(CORED)/zipcpu.v $(CORED)/cpuops.v $(CORED)/idecode.v  \
        $(CORED)/zipcpu.v $(CORED)/cpuops.v $(CORED)/idecode.v  \
                $(CORED)/pipefetch.v $(CORED)/prefetch.v        \
                $(CORED)/pipefetch.v $(CORED)/prefetch.v        \
                $(CORED)/pfcache.v                              \
                $(CORED)/pfcache.v                              \
                $(CORED)/memops.v $(CORED)/pipemem.v            \
                $(CORED)/memops.v $(CORED)/pipemem.v            \
                $(CORED)/div.v                                  \
                $(CORED)/div.v                                  \
        $(AUXD)/busdelay.v                                      \
        $(EXD)/busdelay.v                                       \
                $(AUXD)/wbdblpriarb.v $(AUXD)/wbpriarbiter.v    \
                $(EXD)/wbdblpriarb.v $(EXD)/wbpriarbiter.v      \
        $(CORED)/idecode.v $(CORED)/cpuops.v
        $(CORED)/idecode.v $(CORED)/cpuops.v
VZIP := zipbones.v cpudefs.v                                    \
VZIP := zipbones.v cpudefs.v                                    \
        $(CORED)/zipcpu.v $(CORED)/cpuops.v $(CORED)/idecode.v  \
        $(CORED)/zipcpu.v $(CORED)/cpuops.v $(CORED)/idecode.v  \
                $(CORED)/pipefetch.v $(CORED)/prefetch.v        \
                $(CORED)/pipefetch.v $(CORED)/prefetch.v        \
                $(CORED)/pfcache.v                              \
                $(CORED)/pfcache.v                              \
                $(CORED)/memops.v $(CORED)/pipemem.v            \
                $(CORED)/memops.v $(CORED)/pipemem.v            \
                $(CORED)/div.v                                  \
                $(CORED)/div.v                                  \
        $(AUXD)/busdelay.v $(AUXD)/wbdblpriarb.v                \
        $(EXD)/busdelay.v $(EXD)/wbdblpriarb.v          \
        $(CORED)/idecode.v $(CORED)/cpuops.v
        $(CORED)/idecode.v $(CORED)/cpuops.v
VOBJ := obj_dir
VOBJ := obj_dir
SUBMAKE := $(MAKE) --no-print-directory --directory=$(VOBJ) -f
SUBMAKE := $(MAKE) --no-print-directory --directory=$(VOBJ) -f
 
ifeq ($(VERILATOR_ROOT),)
 
VERILATOR := verilator
 
else
 
VERILATOR := $(VERILATOR_ROOT)/bin/verilator
 
endif
 
# VFLAGS := -Wall -MMD -D__WORDSIZE=64 --trace -cc -y $(CORED) -y $(PRPHD) -y $(EXD)
 
VFLAGS := -Wall -MMD --trace -cc -y $(CORED) -y $(PRPHD) -y $(EXD)
 
 
 
 
VERILATE=verilator --trace -cc -y $(CORED) -y $(PRPHD) -y $(AUXD)
VERILATE=$(VERILATOR) $(VFLAGS)
 
 
$(VOBJ)/Vzipsystem.cpp: $(VSRC)
$(VOBJ)/Vzipsystem.cpp: $(VSRC)
        $(VERILATE) zipsystem.v
        $(VERILATE) zipsystem.v
$(VOBJ)/Vzipsystem.h: $(VOBJ)/Vzipsystem.cpp
$(VOBJ)/Vzipsystem.h: $(VOBJ)/Vzipsystem.cpp
 
 
Line 135... Line 148...
pfcache: $(VOBJ)/Vpfcache__ALL.a
pfcache: $(VOBJ)/Vpfcache__ALL.a
 
 
.PHONY: clean
.PHONY: clean
clean:
clean:
        rm -rf $(VOBJ) cpudefs.h
        rm -rf $(VOBJ) cpudefs.h
 
 
 
#
 
# Note Verilator's dependency created information, and include it here if we
 
# can
 
DEPS := $(wildcard $(VOBJ)/*.d)
 
 
 
ifneq ($(DEPS),)
 
include $(DEPS)
 
endif

powered by: WebSVN 2.1.0

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