#-----------------------------------------------------------------
|
#-----------------------------------------------------------------
|
# File: Makefile
|
# File: Makefile
|
# Author: David Burnette
|
# Author: David Burnette
|
# Date: April 7, 2008
|
# Date: April 7, 2008
|
#
|
#
|
# Description:
|
# Description:
|
# This makefile generates a VHDL file from assembler source.
|
# This makefile generates a VHDL file from assembler source.
|
# A translate rule in mktargets.mk handles compiling the .asm
|
# A translate rule in mktargets.mk handles compiling the .asm
|
# into a S19 record file (.s19) and then running s19tovhd to
|
# into a S19 record file (.S19) and then running s19tovhd to
|
# generate a VHDL file with SPARTAN3 block rams with INIT generics
|
# generate a VHDL file with SPARTAN3 block rams with INIT generics
|
# containing the binary data.
|
# containing the binary data.
|
#
|
#
|
# This particular makefile handles generating FLEX9 code.
|
# This particular makefile handles generating FLEX9 code.
|
#
|
#
|
# Usage:
|
# Usage:
|
# This make file is called recursively by the board-specific
|
# This make file is called recursively by the board-specific
|
# makefiles in the 'rtl' directory. The targets generated by
|
# makefiles in the 'rtl' directory. The targets generated by
|
# this makefile are:
|
# this makefile are:
|
#
|
#
|
# make - makes all variants
|
# make - makes all variants
|
# make all - makes all variants
|
# make all - makes all variants
|
# make flex9ide.vhd - Flex for and IDE drive mapped at $E100 with
|
# make flex9ide.vhd - Flex for and IDE drive mapped at $E100 with
|
# 16 bit transfers (Used on XSA-3S1000/XST-3.0)
|
# 16 bit transfers (Used on XSA-3S1000/XST-3.0)
|
# make flex9cf8.vhd - Flex for Compact Flash mapped at $E040
|
# make flex9cf8.vhd - Flex for Compact Flash mapped at $E040
|
# with 8 bit transfers (Used on B5-X300)
|
# with 8 bit transfers (Used on B5-X300)
|
# make flex9ram.vhd - Flex with RAM disk drivers (Untested)
|
# make flex9ram.vhd - Flex with RAM disk drivers (Untested)
|
# (Used on Spartan 3 Starter board)
|
# (Used on Spartan 3 Starter board)
|
# make flex9ads.vhd -
|
# make flex9ads.vhd -
|
#
|
#
|
# Target Descriptions:
|
# Target Descriptions:
|
# The first file listed is the source file passed to assembler.
|
# The first file listed is the source file passed to assembler.
|
# Remaining files are the dependencies. The option variables
|
# Remaining files are the dependencies. The option variables
|
# ADDRS, ENTITY and TOP_RAM are used by the s19tovhd utility
|
# ADDRS, ENTITY and TOP_RAM are used by the s19tovhd utility
|
# to generate the VHDL file.
|
# to generate the VHDL file.
|
#
|
#
|
# Dependencies:
|
# Dependencies:
|
# This makefile depends on def_rules.mk and the top-level
|
# This makefile depends on def_rules.mk and the top-level
|
# ram model file flex_ram_vhd.
|
# ram model file flex_ram_vhd.
|
#
|
#
|
# Revision History:
|
# Revision History:
|
# dgb 2008-04-07 Original version
|
# dgb 2008-04-07 Original version
|
#
|
#
|
#-----------------------------------------------------------------
|
#-----------------------------------------------------------------
|
|
|
ifeq "$(MKFRAGS)" ""
|
ifeq "$(MKFRAGS)" ""
|
MKFRAGS := ../../mkfiles
|
MKFRAGS := ../../mkfiles
|
endif
|
endif
|
|
|
include $(MKFRAGS)/def_rules.mk
|
include $(MKFRAGS)/def_rules.mk
|
|
|
BASE_FLEX_FILES := \
|
BASE_FLEX_FILES := \
|
f9-moneq.asm \
|
f9-moneq.asm \
|
f9-equ.asm \
|
f9-equ.asm \
|
f9-spool.asm \
|
f9-spool.asm \
|
f9-sfcb.asm \
|
f9-sfcb.asm \
|
f9-init.asm \
|
f9-init.asm \
|
f9-var.asm \
|
f9-var.asm \
|
f9-data.asm \
|
f9-data.asm \
|
f9-cli.asm \
|
f9-cli.asm \
|
f9-monio.asm \
|
f9-monio.asm \
|
f9-fms.asm
|
f9-fms.asm
|
|
|
all: flex9ide.vhd flex9cf8.vhd flex9ram.vhd flex9ads.vhd
|
all: flex9ide.vhd flex9cf8.vhd flex9ram.vhd flex9ads.vhd
|
|
|
flex9ide.vhd: flex9ide.asm $(BASE_FLEX_FILES) f9-dkide.asm
|
flex9ide.vhd: flex9ide.asm $(BASE_FLEX_FILES) f9-dkide.asm
|
flex9ide.vhd: ADDRS=C000 C800 D000 D800
|
flex9ide.vhd: ADDRS=C000 C800 D000 D800
|
flex9ide.vhd: ENTITY=FLEX9
|
flex9ide.vhd: ENTITY=FLEX9
|
flex9ide.vhd: TOP_RAM=flex_ram_vhd
|
flex9ide.vhd: TOP_RAM=flex_ram_vhd
|
|
|
flex9cf8.vhd: flex9cf8.asm $(BASE_FLEX_FILES) f9-dkcf8.asm
|
flex9cf8.vhd: flex9cf8.asm $(BASE_FLEX_FILES) f9-dkcf8.asm
|
flex9cf8.vhd: ADDRS=C000 C800 D000 D800
|
flex9cf8.vhd: ADDRS=C000 C800 D000 D800
|
flex9cf8.vhd: ENTITY=FLEX9
|
flex9cf8.vhd: ENTITY=FLEX9
|
flex9cf8.vhd: TOP_RAM=flex_ram_vhd
|
flex9cf8.vhd: TOP_RAM=flex_ram_vhd
|
|
|
flex9ram.vhd: flex9ram.asm $(BASE_FLEX_FILES) f9-dkram.asm
|
flex9ram.vhd: flex9ram.asm $(BASE_FLEX_FILES) f9-dkram.asm
|
flex9ram.vhd: ADDRS=C000 C800 D000 D800
|
flex9ram.vhd: ADDRS=C000 C800 D000 D800
|
flex9ram.vhd: ENTITY=FLEX9
|
flex9ram.vhd: ENTITY=FLEX9
|
flex9ram.vhd: TOP_RAM=flex_ram_vhd
|
flex9ram.vhd: TOP_RAM=flex_ram_vhd
|
|
|
flex9ads.vhd: flex9ads.asm $(BASE_FLEX_FILES) f9-dkfdc.asm
|
flex9ads.vhd: flex9ads.asm $(BASE_FLEX_FILES) f9-dkfdc.asm
|
flex9ads.vhd: ADDRS=C000 C800 D000 D800
|
flex9ads.vhd: ADDRS=C000 C800 D000 D800
|
flex9ads.vhd: ENTITY=FLEX9
|
flex9ads.vhd: ENTITY=FLEX9
|
flex9ads.vhd: TOP_RAM=flex_ram_vhd
|
flex9ads.vhd: TOP_RAM=flex_ram_vhd
|
|
|
.PHONY: clean
|
.PHONY: clean
|
clean:
|
clean:
|
-$(RM) *.s19
|
-$(RM) *.S19
|
-$(RM) *.lst
|
-$(RM) *.lst
|
-$(RM) *.vhd
|
-$(RM) *.vhd
|
|
|