Line 44... |
Line 44... |
|
|
# Directories
|
# Directories
|
BIN_FOLDER = ../bin
|
BIN_FOLDER = ../bin
|
LOG_FOLDER = ../logs
|
LOG_FOLDER = ../logs
|
BITFILE_FOLDER = ../bitfiles
|
BITFILE_FOLDER = ../bitfiles
|
|
BOOT_LOADER_ETHMAC = 1
|
|
|
# Can supply different work directories
|
# Can supply different work directories
|
# for multiple runs in parallel
|
# for multiple runs in parallel
|
ifdef WORK
|
ifdef WORK
|
WORK_FOLDER = ../$(WORK)
|
WORK_FOLDER = ../$(WORK)
|
else
|
else
|
WORK_FOLDER = ../work0
|
WORK_FOLDER = ../work0
|
endif
|
endif
|
|
|
VERILOG_INCLUDE_PATH = ../../vlog/lib ../../../sw/boot-loader
|
ifdef BOOT_LOADER_ETHMAC
|
|
BOOT_LOADER_DIR = ../../../sw/boot-loader-ethmac
|
|
BOOT_LOADER_DEF = BOOT_LOADER_ETHMAC
|
|
else
|
|
BOOT_LOADER_DIR = ../../../sw/boot-loader
|
|
BOOT_LOADER_DEF =
|
|
endif
|
|
|
|
VERILOG_INCLUDE_PATH = ../../vlog/lib $(BOOT_LOADER_DIR)
|
|
|
# Name of top level verilog file (must be the same as its module name)
|
# Name of top level verilog file (must be the same as its module name)
|
RTL_TOP = system
|
RTL_TOP = system
|
|
|
|
|
Line 83... |
Line 92... |
|
|
## FPGA type
|
## FPGA type
|
ifdef VIRTEX6
|
ifdef VIRTEX6
|
# Virtex-6 device
|
# Virtex-6 device
|
XILINX_FPGA = xc6vlx75tff784-3
|
XILINX_FPGA = xc6vlx75tff784-3
|
XST_DEFINES = XILINX_FPGA XILINX_VIRTEX6_FPGA $(AMBER_CORE) AMBER_CLK_DIVIDER=15
|
XST_DEFINES = XILINX_FPGA XILINX_VIRTEX6_FPGA $(AMBER_CORE) AMBER_CLK_DIVIDER=15 $(BOOT_LOADER_DEF)
|
# Xilinx placement and timing constraints
|
# Xilinx placement and timing constraints
|
XST_CONST_FILE = xv6_constraints.ucf
|
XST_CONST_FILE = xv6_constraints.ucf
|
# List of verilog source files for Xilinx Virtex-6 device
|
# List of verilog source files for Xilinx Virtex-6 device
|
XST_PROJ_FILE = xv6_source_files.prj
|
XST_PROJ_FILE = xv6_source_files.prj
|
else
|
else
|
# The spartan6 device used on SP605 Development board
|
# The spartan6 device used on SP605 Development board
|
XILINX_FPGA = xc6slx45tfgg484-3
|
XILINX_FPGA = xc6slx45tfgg484-3
|
XST_DEFINES = XILINX_FPGA XILINX_SPARTAN6_FPGA $(AMBER_CORE) AMBER_CLK_DIVIDER=20
|
XST_DEFINES = XILINX_FPGA XILINX_SPARTAN6_FPGA $(AMBER_CORE) AMBER_CLK_DIVIDER=20 $(BOOT_LOADER_DEF)
|
# Xilinx placement and timing constraints
|
# Xilinx placement and timing constraints
|
XST_CONST_FILE = xs6_constraints.ucf
|
XST_CONST_FILE = xs6_constraints.ucf
|
# List of verilog source files for Xilinx Spartan-6 device
|
# List of verilog source files for Xilinx Spartan-6 device
|
XST_PROJ_FILE = xs6_source_files.prj
|
XST_PROJ_FILE = xs6_source_files.prj
|
endif
|
endif
|
Line 240... |
Line 249... |
-p $(XILINX_FPGA) \
|
-p $(XILINX_FPGA) \
|
-ol high \
|
-ol high \
|
-t $(MAP_SEED) \
|
-t $(MAP_SEED) \
|
-w \
|
-w \
|
-ignore_keep_hierarchy \
|
-ignore_keep_hierarchy \
|
-detail \
|
|
-timing \
|
-timing \
|
|
-detail \
|
-register_duplication on \
|
-register_duplication on \
|
-lc auto \
|
-lc auto \
|
-xe c -mt off -ir off \
|
-xe c -mt off -ir off \
|
-pr off -power off \
|
-pr off -power off \
|
-o $(RTL_TOP).map.ncd \
|
-o $(RTL_TOP).map.ncd \
|
Line 284... |
Line 293... |
echo "run -ifn $(BIN_FOLDER)/$(XST_PROJ_FILE)" >> $(WORK_FOLDER)/$(RTL_TOP).xst
|
echo "run -ifn $(BIN_FOLDER)/$(XST_PROJ_FILE)" >> $(WORK_FOLDER)/$(RTL_TOP).xst
|
echo "-ofn $(RTL_TOP) -top $(RTL_TOP)" >> $(WORK_FOLDER)/$(RTL_TOP).xst
|
echo "-ofn $(RTL_TOP) -top $(RTL_TOP)" >> $(WORK_FOLDER)/$(RTL_TOP).xst
|
echo "-lso ./$(RTL_TOP).lso" >> $(WORK_FOLDER)/$(RTL_TOP).xst
|
echo "-lso ./$(RTL_TOP).lso" >> $(WORK_FOLDER)/$(RTL_TOP).xst
|
echo $(XST_OPTIONS) >> $(WORK_FOLDER)/$(RTL_TOP).xst
|
echo $(XST_OPTIONS) >> $(WORK_FOLDER)/$(RTL_TOP).xst
|
echo "-iobuf YES" >> $(WORK_FOLDER)/$(RTL_TOP).xst
|
echo "-iobuf YES" >> $(WORK_FOLDER)/$(RTL_TOP).xst
|
echo "-define { $(XST_DEFINES) )}" >> $(WORK_FOLDER)/$(RTL_TOP).xst
|
echo "-define { $(XST_DEFINES) }" >> $(WORK_FOLDER)/$(RTL_TOP).xst
|
cd $(WORK_FOLDER); \
|
cd $(WORK_FOLDER); \
|
xst -intstyle xflow -ifn ./$(RTL_TOP).xst -ofn $(LOG_FOLDER)/$(RTL_TOP).xst.$(RUN_ID).srp
|
xst -intstyle xflow -ifn ./$(RTL_TOP).xst -ofn $(LOG_FOLDER)/$(RTL_TOP).xst.$(RUN_ID).srp
|
|
|
|
|
# ----------------------------------------------------
|
# ----------------------------------------------------
|
Line 302... |
Line 311... |
test -e $(LOG_FOLDER) || mkdir $(LOG_FOLDER)
|
test -e $(LOG_FOLDER) || mkdir $(LOG_FOLDER)
|
test -e $(BITFILE_FOLDER) || mkdir $(BITFILE_FOLDER)
|
test -e $(BITFILE_FOLDER) || mkdir $(BITFILE_FOLDER)
|
echo 0 > $(WORK_FOLDER)/seed.txt
|
echo 0 > $(WORK_FOLDER)/seed.txt
|
date +%Y%m%d%H%M%S > $(WORK_FOLDER)/run_id.txt
|
date +%Y%m%d%H%M%S > $(WORK_FOLDER)/run_id.txt
|
$(BIN_FOLDER)/set_fpga_version.sh $(WORK_FOLDER)/run_id.txt
|
$(BIN_FOLDER)/set_fpga_version.sh $(WORK_FOLDER)/run_id.txt
|
$(MAKE) -C ../../../sw/boot-loader
|
$(MAKE) -C $(BOOT_LOADER_DIR) clean
|
|
$(MAKE) -C $(BOOT_LOADER_DIR)
|
|
|