|
################################################################################
|
|
##
|
|
## Filename:
|
|
##
|
|
## Project: XuLA2 board
|
|
##
|
|
## Purpose:
|
|
##
|
|
##
|
|
## Creator: Dan Gisselquist, Ph.D.
|
|
## Gisselquist Technology, LLC
|
|
##
|
|
################################################################################
|
|
##
|
|
## Copyright (C) 2015, Gisselquist Technology, LLC
|
|
##
|
|
## 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
|
|
## by the Free Software Foundation, either version 3 of the License, or (at
|
|
## your option) any later version.
|
|
##
|
|
## This program is distributed in the hope that it will be useful, but WITHOUT
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
## for more details.
|
|
##
|
|
## License: GPL, v3, as defined and found on www.gnu.org,
|
|
## http:##www.gnu.org/licenses/gpl.html
|
|
##
|
|
##
|
|
################################################################################
|
|
##
|
|
##
|
.PHONY: all
|
.PHONY: all
|
all: datestamp verilated bit
|
all: datestamp verilated bit
|
# Could also depend upon load, if desired, but not necessary
|
# Could also depend upon load, if desired, but not necessary
|
BENCH := `find bench -name Makefile` `find bench -name "*.cpp"` `find bench -name "*.h"`
|
BENCH := `find bench -name Makefile` `find bench -name "*.cpp"` `find bench -name "*.h"`
|
RTL := `find rtl -name "*.v"` `find rtl -name Makefile`
|
RTL := `find rtl -name "*.v"` `find rtl -name Makefile`
|
NOTES := `find . -name "*.txt"` `find . -name "*.html"`
|
NOTES := `find . -name "*.txt"` `find . -name "*.html"`
|
SW := `find sw -name "*.cpp"` `find sw -name "*.h"` \
|
SW := `find sw -name "*.cpp"` `find sw -name "*.h"` \
|
`find sw -name "*.sh"` `find sw -name "*.py"` \
|
`find sw -name "*.sh"` `find sw -name "*.py"` \
|
`find sw -name "*.pl"` `find sw -name Makefile`
|
`find sw -name "*.pl"` `find sw -name Makefile`
|
PROJ := xilinx/xula.prj xilinx/xula.xise xilinx/xula.xst \
|
PROJ := xilinx/xula.prj xilinx/xula.xise xilinx/xula.xst \
|
xilinx/xula.ut xilinx/Makefile
|
xilinx/xula.ut xilinx/Makefile
|
BIN := `find xilinx -name "*.bit"`
|
BIN := `find xilinx -name "*.bit"`
|
CONSTRAINTS := xula.ucf
|
CONSTRAINTS := xula.ucf
|
YYMMDD:=`date +%Y%m%d`
|
YYMMDD:=`date +%Y%m%d`
|
|
|
datestamp: $(YYMMDD)-build.v
|
datestamp: $(YYMMDD)-build.v
|
$(YYMMDD)-build.v:
|
$(YYMMDD)-build.v:
|
-rm -rf 2*-build.v
|
-rm -rf 2*-build.v
|
perl xilinx/mkdatev.pl > $(YYMMDD)-build.v
|
perl xilinx/mkdatev.pl > $(YYMMDD)-build.v
|
cd rtl; ln -fs ../$(YYMMDD)-build.v builddate.v
|
cd rtl; ln -fs ../$(YYMMDD)-build.v builddate.v
|
|
|
.PHONY: archive
|
.PHONY: archive
|
archive:
|
archive:
|
tar --transform s,^,$(YYMMDD)-xula/, -chjf $(YYMMDD)-xula.tjz $(BENCH) $(SW) $(RTL) $(NOTES) $(PROJ) $(BIN) $(CONSTRAINTS)
|
tar --transform s,^,$(YYMMDD)-xula/, -chjf $(YYMMDD)-xula.tjz $(BENCH) $(SW) $(RTL) $(NOTES) $(PROJ) $(BIN) $(CONSTRAINTS)
|
|
|
.PHONY: tare
|
.PHONY: tare
|
tare:
|
tare:
|
echo tar --transform s,^,$(YYMMDD)-xula/, -chjf $(YYMMDD)-xula.tjz $(BENCH) $(SW) $(RTL) $(NOTES) $(PROJ) $(BIN) $(CONSTRAINTS)
|
echo tar --transform s,^,$(YYMMDD)-xula/, -chjf $(YYMMDD)-xula.tjz $(BENCH) $(SW) $(RTL) $(NOTES) $(PROJ) $(BIN) $(CONSTRAINTS)
|
|
|
.PHONY: verilated
|
.PHONY: verilated
|
verilated:
|
verilated:
|
cd rtl ; make
|
cd rtl ; make
|
|
|
.PHONY: bit
|
.PHONY: bit
|
bit:
|
bit:
|
cd xilinx ; make xula.bit
|
cd xilinx ; make xula.bit
|
|
|
.PHONY: load
|
.PHONY: load
|
load: bit
|
load: bit
|
xsload -b xula2-lx25 --fpga xilinx/xula.bit
|
xsload -b xula2-lx25 --fpga xilinx/xula.bit
|
|
|
.PHONY: xload
|
.PHONY: xload
|
xload:
|
xload:
|
xsload -b xula2-lx25 --fpga xilinx/toplevel.bit
|
xsload -b xula2-lx25 --fpga xilinx/toplevel.bit
|
|
|
.PHONY: timing
|
.PHONY: timing
|
timing:
|
timing:
|
cd xilinx ; make timing
|
cd xilinx ; make timing
|
|
|
|
|
|
|