# Makefile fragment with some variables global to this board board
|
# Makefile fragment with some variables global to this board board
|
# Expects BOARD_ROOT to be set
|
# Expects BOARD_ROOT to be set
|
|
|
FPGA_VENDOR=xilinx
|
FPGA_VENDOR=xilinx
|
BOARD_NAME=ml501
|
BOARD_NAME=ml501
|
BOARD=$(FPGA_VENDOR)/$(BOARD_NAME)
|
BOARD=$(FPGA_VENDOR)/$(BOARD_NAME)
|
DESIGN_NAME=orpsoc
|
DESIGN_NAME=orpsoc
|
|
|
# Path down to root of project
|
# Path down to root of project
|
PROJECT_ROOT=$(BOARD_ROOT)/../../..
|
PROJECT_ROOT=$(BOARD_ROOT)/../../..
|
|
|
SYNTHESIS_TOOL=xst
|
SYNTHESIS_TOOL=xst
|
|
|
export BOARD
|
export BOARD
|
|
|
include $(PROJECT_ROOT)/scripts/make/Makefile-misc.inc
|
include $(PROJECT_ROOT)/scripts/make/Makefile-misc.inc
|
include $(PROJECT_ROOT)/scripts/make/Makefile-board-paths.inc
|
include $(PROJECT_ROOT)/scripts/make/Makefile-board-paths.inc
|
include $(PROJECT_ROOT)/scripts/make/Makefile-board-tops.inc
|
include $(PROJECT_ROOT)/scripts/make/Makefile-board-tops.inc
|
include $(PROJECT_ROOT)/scripts/make/Makefile-board-definesparse.inc
|
include $(PROJECT_ROOT)/scripts/make/Makefile-board-definesparse.inc
|
|
|
# Check that the XILINX_PATH variable is set
|
# Check that the XILINX_PATH variable is set
|
ifeq ($(XILINX_PATH),)
|
ifeq ($(XILINX_PATH),)
|
$(error XILINX_PATH environment variable not set. Set it and rerun)
|
$(error XILINX_PATH environment variable not set. Set it and rerun)
|
endif
|
endif
|
XILINX_SETTINGS_SCRIPT=$(XILINX_PATH)/settings32.sh
|
XILINX_SETTINGS_SCRIPT=$(XILINX_PATH)/ISE/settings32.sh
|
XILINX_SETTINGS_SCRIPT_EXISTS=$(shell if [ -e $(XILINX_SETTINGS_SCRIPT) ]; then echo 1; else echo 0; fi)
|
XILINX_SETTINGS_SCRIPT_EXISTS=$(shell if [ -e $(XILINX_SETTINGS_SCRIPT) ]; then echo 1; else echo 0; fi)
|
ifeq ($(XILINX_SETTINGS_SCRIPT_EXISTS),0)
|
ifeq ($(XILINX_SETTINGS_SCRIPT_EXISTS),0)
|
$(error XILINX_PATH variable not set correctly. Cannot find $$XILINX_PATH/settings32.sh)
|
$(error XILINX_PATH variable not set correctly. Cannot find $(XILINX_SETTINGS_SCRIPT))
|
endif
|
endif
|
|
|
# Backend directories
|
# Backend directories
|
# This one is the board build's backend dir.
|
# This one is the board build's backend dir.
|
BOARD_BACKEND_DIR=$(BOARD_ROOT)/backend
|
BOARD_BACKEND_DIR=$(BOARD_ROOT)/backend
|
BOARD_BACKEND_VERILOG_DIR=$(BOARD_BACKEND_DIR)/rtl/verilog
|
BOARD_BACKEND_VERILOG_DIR=$(BOARD_BACKEND_DIR)/rtl/verilog
|
BOARD_BACKEND_BIN_DIR=$(BOARD_BACKEND_DIR)/bin
|
BOARD_BACKEND_BIN_DIR=$(BOARD_BACKEND_DIR)/bin
|
# Technology backend (vendor-specific)
|
# Technology backend (vendor-specific)
|
TECHNOLOGY_BACKEND_DIR=$(BOARD_ROOT)/../backend
|
TECHNOLOGY_BACKEND_DIR=$(BOARD_ROOT)/../backend
|
# This path is for the technology library
|
# This path is for the technology library
|
TECHNOLOGY_LIBRARY_VERILOG_DIR=$(XILINX_PATH)/verilog
|
TECHNOLOGY_LIBRARY_VERILOG_DIR=$(XILINX_PATH)/ISE/verilog
|
|
|
# Bootrom setup
|
# Bootrom setup
|
# BootROM code, which generates a verilog array select values
|
# BootROM code, which generates a verilog array select values
|
BOOTROM_FILE=bootrom.v
|
BOOTROM_FILE=bootrom.v
|
BOOTROM_SW_DIR=$(BOARD_SW_DIR)/bootrom
|
BOOTROM_SW_DIR=$(BOARD_SW_DIR)/bootrom
|
BOOTROM_SRC=$(shell ls $(BOOTROM_SW_DIR)/* | grep -v $(BOOTROM_FILE))
|
BOOTROM_SRC=$(shell ls $(BOOTROM_SW_DIR)/* | grep -v $(BOOTROM_FILE))
|
BOOTROM_VERILOG=$(BOOTROM_SW_DIR)/$(BOOTROM_FILE)
|
BOOTROM_VERILOG=$(BOOTROM_SW_DIR)/$(BOOTROM_FILE)
|
|
|
bootrom: $(BOOTROM_VERILOG)
|
bootrom: $(BOOTROM_VERILOG)
|
|
|
$(BOOTROM_VERILOG): $(BOOTROM_SRC)
|
$(BOOTROM_VERILOG): $(BOOTROM_SRC)
|
$(Q)echo; echo "\t### Generating bootup ROM ###"; echo
|
$(Q)echo; echo "\t### Generating bootup ROM ###"; echo
|
$(Q)$(MAKE) -C $(BOOTROM_SW_DIR) $(BOOTROM_FILE)
|
$(Q)$(MAKE) -C $(BOOTROM_SW_DIR) $(BOOTROM_FILE)
|
|
|
clean-bootrom:
|
clean-bootrom:
|
$(Q)echo; echo "\t### Cleaning bootup ROM ###"; echo
|
$(Q)echo; echo "\t### Cleaning bootup ROM ###"; echo
|
$(Q)$(MAKE) -C $(BOOTROM_SW_DIR) clean
|
$(Q)$(MAKE) -C $(BOOTROM_SW_DIR) clean
|
|
|
include $(PROJECT_ROOT)/scripts/make/Makefile-board-rtlmodules.inc
|
include $(PROJECT_ROOT)/scripts/make/Makefile-board-rtlmodules.inc
|
|
|
# "Backend" source file stuff (PLL, RAM macro models.)
|
# "Backend" source file stuff (PLL, RAM macro models.)
|
BOARD_BACKEND_VERILOG_SRC=$(shell ls $(BOARD_BACKEND_VERILOG_DIR)/*.v )
|
BOARD_BACKEND_VERILOG_SRC=$(shell ls $(BOARD_BACKEND_VERILOG_DIR)/*.v )
|
|
|
# Backend tool path
|
# Backend tool path
|
|
|
# BACKEND_TECHNOLOGY_VERILOG_SRC should be set if we need to compile specific
|
# BACKEND_TECHNOLOGY_VERILOG_SRC should be set if we need to compile specific
|
# libraries, as in the Actel and Altera case, and left empty for Xilinx who
|
# libraries, as in the Actel and Altera case, and left empty for Xilinx who
|
# allow us to simply pass the path with the -y option because they have each
|
# allow us to simply pass the path with the -y option because they have each
|
# bit of the tech library in individual files, and in which case this variable
|
# bit of the tech library in individual files, and in which case this variable
|
# should be left unset.
|
# should be left unset.
|
|
|
# Keep this variable empty
|
# Keep this variable empty
|
BACKEND_TECHNOLOGY_VERILOG_SRC=
|
BACKEND_TECHNOLOGY_VERILOG_SRC=
|
|
|