1 |
568 |
julius |
# Makefile fragment with some variables global to this board board
|
2 |
|
|
# Expects BOARD_ROOT to be set
|
3 |
|
|
|
4 |
|
|
FPGA_VENDOR=xilinx
|
5 |
|
|
BOARD_NAME=s3adsp1800
|
6 |
|
|
BOARD=$(FPGA_VENDOR)/$(BOARD_NAME)
|
7 |
|
|
DESIGN_NAME=orpsoc
|
8 |
|
|
|
9 |
|
|
# Doc:
|
10 |
|
|
# http://www.xilinx.com/support/documentation/boards_and_kits/ug454_sp3a_dsp_start_ug.pdf
|
11 |
|
|
|
12 |
|
|
# Path down to root of project
|
13 |
|
|
PROJECT_ROOT=$(BOARD_ROOT)/../../..
|
14 |
|
|
|
15 |
|
|
SYNTHESIS_TOOL=xst
|
16 |
|
|
|
17 |
|
|
export BOARD
|
18 |
|
|
|
19 |
|
|
include $(PROJECT_ROOT)/scripts/make/Makefile-misc.inc
|
20 |
|
|
include $(PROJECT_ROOT)/scripts/make/Makefile-board-paths.inc
|
21 |
|
|
include $(PROJECT_ROOT)/scripts/make/Makefile-board-tops.inc
|
22 |
|
|
include $(PROJECT_ROOT)/scripts/make/Makefile-board-definesparse.inc
|
23 |
|
|
|
24 |
|
|
# Check that the XILINX_PATH variable is set
|
25 |
|
|
ifeq ($(XILINX_PATH),)
|
26 |
|
|
$(error XILINX_PATH environment variable not set. Set it and rerun)
|
27 |
|
|
endif
|
28 |
|
|
|
29 |
|
|
#XILINX_SETTINGS_SCRIPT ?=/opt/xilinx/13.1/ISE_DS/settings32.sh
|
30 |
|
|
# ISE 13.1 ISE_DS version
|
31 |
|
|
XILINX_SETTINGS_SCRIPT ?=$(XILINX_PATH)/ISE_DS/settings32.sh
|
32 |
|
|
XILINX_SETTINGS_SCRIPT_EXISTS=$(shell if [ -e $(XILINX_SETTINGS_SCRIPT) ]; then echo 1; else echo 0; fi)
|
33 |
|
|
ifeq ($(XILINX_SETTINGS_SCRIPT_EXISTS),0)
|
34 |
|
|
$(error XILINX_SETTINGS_SCRIPT variable not set correctly. Cannot find $(XILINX_SETTINGS_SCRIPT))
|
35 |
|
|
endif
|
36 |
|
|
|
37 |
|
|
# Backend directories
|
38 |
|
|
# This one is the board build's backend dir.
|
39 |
|
|
BOARD_BACKEND_DIR=$(BOARD_ROOT)/backend
|
40 |
|
|
BOARD_BACKEND_VERILOG_DIR=$(BOARD_BACKEND_DIR)/rtl/verilog
|
41 |
|
|
BOARD_BACKEND_BIN_DIR=$(BOARD_BACKEND_DIR)/bin
|
42 |
|
|
# Technology backend (vendor-specific)
|
43 |
|
|
TECHNOLOGY_BACKEND_DIR=$(BOARD_ROOT)/../backend
|
44 |
|
|
# This path is for the technology library
|
45 |
|
|
TECHNOLOGY_LIBRARY_VERILOG_DIR=$(XILINX_PATH)/ISE/verilog
|
46 |
|
|
|
47 |
|
|
# Bootrom setup
|
48 |
|
|
# BootROM code, which generates a verilog array select values
|
49 |
|
|
BOOTROM_FILE=bootrom.v
|
50 |
|
|
BOOTROM_SW_DIR=$(BOARD_SW_DIR)/bootrom
|
51 |
|
|
BOOTROM_SRC=$(shell ls $(BOOTROM_SW_DIR)/* | grep -v $(BOOTROM_FILE))
|
52 |
|
|
BOOTROM_VERILOG=$(BOOTROM_SW_DIR)/$(BOOTROM_FILE)
|
53 |
|
|
|
54 |
|
|
bootrom: $(BOOTROM_VERILOG)
|
55 |
|
|
|
56 |
|
|
$(BOOTROM_VERILOG): $(BOOTROM_SRC)
|
57 |
|
|
$(Q)echo; echo "\t### Generating bootup ROM ###"; echo
|
58 |
|
|
$(Q)$(MAKE) -C $(BOOTROM_SW_DIR) $(BOOTROM_FILE)
|
59 |
|
|
|
60 |
|
|
clean-bootrom:
|
61 |
|
|
$(Q)echo; echo "\t### Cleaning bootup ROM ###"; echo
|
62 |
|
|
$(Q)$(MAKE) -C $(BOOTROM_SW_DIR) clean
|
63 |
|
|
|
64 |
|
|
include $(PROJECT_ROOT)/scripts/make/Makefile-board-rtlmodules.inc
|
65 |
|
|
|
66 |
|
|
# "Backend" source file stuff (PLL, RAM macro models.)
|
67 |
|
|
BOARD_BACKEND_VERILOG_SRC=$(shell ls $(BOARD_BACKEND_VERILOG_DIR)/*.v )
|
68 |
|
|
|
69 |
|
|
# Backend tool path
|
70 |
|
|
|
71 |
|
|
# BACKEND_TECHNOLOGY_VERILOG_SRC should be set if we need to compile specific
|
72 |
|
|
# libraries, as in the Actel and Altera case, and left empty for Xilinx who
|
73 |
|
|
# allow us to simply pass the path with the -y option because they have each
|
74 |
|
|
# bit of the tech library in individual files, and in which case this variable
|
75 |
|
|
# should be left unset.
|
76 |
|
|
|
77 |
|
|
# Keep this variable empty
|
78 |
|
|
BACKEND_TECHNOLOGY_VERILOG_SRC=
|
79 |
|
|
|