Commit 65b7f54b authored by Marc's avatar Marc
Browse files

added zcu102 board and improved script generator

parent a03943a8
export CURRENT_DIR=$PWD
if [ -z "$2" ]
then export par1=4
else export par1=$2
s_flag=4;
p_flag="none";
print_usage() {
printf "Usage: ./mymake program [-s <SIZE>][-p <in/out/all>]\n"
}
if [ ${1#-} = $1 ]; then
FILE=$1
shift
fi
cd ../../software/marcmod/leon3/ && make $1 && cd - > /dev/null
while getopts 'hs:p:' flag; do
case "${flag}" in
s) s_flag="${OPTARG}" ;;
p) p_flag="${OPTARG}" ;;
h) print_usage
exit 0 ;;
*) print_usage
exit 1 ;;
esac
done
if [ -z $FILE ]; then
shift $(($OPTIND-1))
FILE=$1
fi
export SIZE=$s_flag
if [ $p_flag = "in" ]; then
export P_IN=1
elif [ $p_flag = "out" ]; then
export P_OUT=1
elif [ $p_flag = "all" ]; then
export P_IN=1
export P_OUT=1
fi
cd ../../software/marcmod/leon3/ && make $FILE && cd - > /dev/null
This diff is collapsed.
This diff is collapsed.
#
# Automatically generated make config: don't edit
#
CONFIG_HAS_SHARED_GRFPU=y
#
# Synthesis
#
# CONFIG_SYN_INFERRED is not set
# CONFIG_SYN_AXCEL is not set
# CONFIG_SYN_AXDSP is not set
# CONFIG_SYN_FUSION is not set
# CONFIG_SYN_PROASIC is not set
# CONFIG_SYN_PROASICPLUS is not set
# CONFIG_SYN_PROASIC3 is not set
# CONFIG_SYN_PROASIC3E is not set
# CONFIG_SYN_PROASIC3L is not set
# CONFIG_SYN_IGLOO is not set
# CONFIG_SYN_IGLOO2 is not set
# CONFIG_SYN_SF2 is not set
# CONFIG_SYN_RTG4 is not set
# CONFIG_SYN_POLARFIRE is not set
# CONFIG_SYN_UT025CRH is not set
# CONFIG_SYN_UT130HBD is not set
# CONFIG_SYN_UT90NHBD is not set
# CONFIG_SYN_CYCLONEIII is not set
# CONFIG_SYN_STRATIX is not set
# CONFIG_SYN_STRATIXII is not set
# CONFIG_SYN_STRATIXIII is not set
# CONFIG_SYN_STRATIXIV is not set
# CONFIG_SYN_STRATIXV is not set
# CONFIG_SYN_ALTERA is not set
# CONFIG_SYN_ATC18 is not set
# CONFIG_SYN_ATC18RHA is not set
# CONFIG_SYN_CUSTOM1 is not set
# CONFIG_SYN_DARE is not set
# CONFIG_SYN_CMOS9SF is not set
# CONFIG_SYN_BRAVEMED is not set
# CONFIG_SYN_ECLIPSE is not set
# CONFIG_SYN_RH_LIB18T is not set
# CONFIG_SYN_RHUMC is not set
# CONFIG_SYN_RHS65 is not set
# CONFIG_SYN_SAED32 is not set
# CONFIG_SYN_SMIC13 is not set
# CONFIG_SYN_TM65GPLUS is not set
# CONFIG_SYN_TSMC90 is not set
# CONFIG_SYN_UMC is not set
# CONFIG_SYN_ARTIX7 is not set
CONFIG_SYN_KINTEX7=y
# CONFIG_SYN_KINTEXU is not set
# CONFIG_SYN_SPARTAN3 is not set
# CONFIG_SYN_SPARTAN3E is not set
# CONFIG_SYN_SPARTAN6 is not set
# CONFIG_SYN_VIRTEX2 is not set
# CONFIG_SYN_VIRTEX4 is not set
# CONFIG_SYN_VIRTEX5 is not set
# CONFIG_SYN_VIRTEX6 is not set
# CONFIG_SYN_VIRTEX7 is not set
# CONFIG_SYN_ZYNQ7000 is not set
# CONFIG_SYN_INFER_RAM is not set
# CONFIG_SYN_INFER_PADS is not set
# CONFIG_SYN_NO_ASYNC is not set
# CONFIG_SYN_SCAN is not set
#
# Clock generation
#
# CONFIG_CLK_INFERRED is not set
# CONFIG_CLK_HCLKBUF is not set
# CONFIG_CLK_UT130HBD is not set
# CONFIG_CLK_ALTDLL is not set
# CONFIG_CLK_BRAVEMED is not set
# CONFIG_CLK_PRO3PLL is not set
# CONFIG_CLK_PRO3EPLL is not set
# CONFIG_CLK_PRO3LPLL is not set
# CONFIG_CLK_FUSPLL is not set
# CONFIG_CLK_LIB18T is not set
# CONFIG_CLK_RHUMC is not set
# CONFIG_CLK_DARE is not set
# CONFIG_CLK_SAED32 is not set
# CONFIG_CLK_EASIC45 is not set
# CONFIG_CLK_RHS65 is not set
CONFIG_CLK_CLKPLLE2=y
# CONFIG_CLK_CLKDLL is not set
# CONFIG_CLK_DCM is not set
CONFIG_CLK_MUL=4
CONFIG_CLK_DIV=8
# CONFIG_PCI_SYSCLK is not set
#
# Processor
#
CONFIG_LEON3=y
# CONFIG_LEON4 is not set
CONFIG_PROC_NUM=4
# CONFIG_LEON_MIN is not set
# CONFIG_LEON_GP is not set
# CONFIG_LEON_HP is not set
CONFIG_LEON_CUSTOM=y
#
# Integer unit
#
CONFIG_IU_NWINDOWS=8
# CONFIG_IU_RFINF is not set
CONFIG_IU_V8MULDIV=y
CONFIG_IU_MUL_LATENCY_2=y
# CONFIG_IU_MUL_LATENCY_4 is not set
# CONFIG_IU_MUL_LATENCY_5 is not set
CONFIG_IU_MUL_INFERRED=y
# CONFIG_IU_MUL_MODGEN is not set
# CONFIG_IU_MUL_TECHSPEC is not set
# CONFIG_IU_MUL_DW is not set
CONFIG_IU_SVT=y
CONFIG_IU_LDELAY=1
CONFIG_IU_WATCHPOINTS=4
CONFIG_PWD=y
CONFIG_IU_RSTADDR=00000
CONFIG_NP_ASI=y
CONFIG_WRPSR=y
# CONFIG_ALTWIN is not set
# CONFIG_REX is not set
#
# Floating-point unit
#
CONFIG_FPU_ENABLE=y
CONFIG_FPU_GRFPU=y
# CONFIG_FPU_GRFPULITE is not set
CONFIG_FPU_GRFPU_INFMUL=y
# CONFIG_FPU_GRFPU_DWMUL is not set
# CONFIG_FPU_GRFPU_MODGEN is not set
# CONFIG_FPU_GRFPU_TECHSPEC is not set
# CONFIG_FPU_GRFPU_SH is not set
# CONFIG_FPU_NETLIST is not set
# CONFIG_FPU_RFINF is not set
#
# Cache system
#
CONFIG_ICACHE_ENABLE=y
# CONFIG_ICACHE_ASSO1 is not set
# CONFIG_ICACHE_ASSO2 is not set
# CONFIG_ICACHE_ASSO3 is not set
CONFIG_ICACHE_ASSO4=y
# CONFIG_ICACHE_SZ1 is not set
# CONFIG_ICACHE_SZ2 is not set
CONFIG_ICACHE_SZ4=y
# CONFIG_ICACHE_SZ8 is not set
# CONFIG_ICACHE_SZ16 is not set
# CONFIG_ICACHE_SZ32 is not set
# CONFIG_ICACHE_SZ64 is not set
# CONFIG_ICACHE_SZ128 is not set
# CONFIG_ICACHE_SZ256 is not set
# CONFIG_ICACHE_LZ16 is not set
CONFIG_ICACHE_LZ32=y
# CONFIG_ICACHE_ALGORND is not set
CONFIG_ICACHE_ALGOLRU=y
# CONFIG_ICACHE_LOCK is not set
CONFIG_DCACHE_ENABLE=y
# CONFIG_DCACHE_ASSO1 is not set
# CONFIG_DCACHE_ASSO2 is not set
# CONFIG_DCACHE_ASSO3 is not set
CONFIG_DCACHE_ASSO4=y
# CONFIG_DCACHE_SZ1 is not set
# CONFIG_DCACHE_SZ2 is not set
CONFIG_DCACHE_SZ4=y
# CONFIG_DCACHE_SZ8 is not set
# CONFIG_DCACHE_SZ16 is not set
# CONFIG_DCACHE_SZ32 is not set
# CONFIG_DCACHE_SZ64 is not set
# CONFIG_DCACHE_SZ128 is not set
# CONFIG_DCACHE_SZ256 is not set
# CONFIG_DCACHE_LZ16 is not set
CONFIG_DCACHE_LZ32=y
# CONFIG_DCACHE_ALGORND is not set
CONFIG_DCACHE_ALGOLRU=y
# CONFIG_DCACHE_LOCK is not set
CONFIG_DCACHE_SNOOP=y
CONFIG_DCACHE_SNOOP_SEPTAG=y
# CONFIG_DCACHE_SNOOP_SP is not set
CONFIG_CACHE_FIXED=0
CONFIG_BWMASK=00F0
CONFIG_CACHE_64BIT=y
# CONFIG_CACHE_128BIT is not set
#
# MMU
#
CONFIG_MMU_ENABLE=y
# CONFIG_MMU_SV is not set
# CONFIG_MMU_COMBINED is not set
CONFIG_MMU_SPLIT=y
CONFIG_MMU_REPARRAY=y
# CONFIG_MMU_REPINCREMENT is not set
# CONFIG_MMU_I2 is not set
# CONFIG_MMU_I4 is not set
# CONFIG_MMU_I8 is not set
CONFIG_MMU_I16=y
# CONFIG_MMU_I32 is not set
# CONFIG_MMU_I64 is not set
# CONFIG_MMU_D2 is not set
# CONFIG_MMU_D4 is not set
# CONFIG_MMU_D8 is not set
CONFIG_MMU_D16=y
# CONFIG_MMU_D32 is not set
# CONFIG_MMU_D64 is not set
CONFIG_MMU_FASTWB=y
CONFIG_MMU_PAGE_4K=y
# CONFIG_MMU_PAGE_8K is not set
# CONFIG_MMU_PAGE_16K is not set
# CONFIG_MMU_PAGE_32K is not set
# CONFIG_MMU_PAGE_PROG is not set
# CONFIG_MMU_INF is not set
#
# Debug Support Unit
#
CONFIG_DSU_ENABLE=y
CONFIG_DSU_ITRACE=y
# CONFIG_DSU_ITRACESZ1 is not set
# CONFIG_DSU_ITRACESZ2 is not set
CONFIG_DSU_ITRACESZ4=y
# CONFIG_DSU_ITRACESZ8 is not set
# CONFIG_DSU_ITRACESZ16 is not set
# CONFIG_DSU_ITRACE_2P is not set
CONFIG_DSU_ATRACE=y
# CONFIG_DSU_ATRACESZ1 is not set
# CONFIG_DSU_ATRACESZ2 is not set
CONFIG_DSU_ATRACESZ4=y
# CONFIG_DSU_ATRACESZ8 is not set
# CONFIG_DSU_ATRACESZ16 is not set
# CONFIG_STAT_ENABLE is not set
#
# Fault-tolerance
#
CONFIG_IUFT_NONE=y
# CONFIG_IUFT_PAR is not set
# CONFIG_IUFT_DMR is not set
# CONFIG_IUFT_BCH is not set
# CONFIG_IUFT_BCHOTF is not set
# CONFIG_IUFT_TECHSPEC is not set
# CONFIG_IUFT_TMR is not set
CONFIG_FPUFT_NONE=y
# CONFIG_FPUFT_PAR is not set
# CONFIG_FPUFT_DMR is not set
# CONFIG_FPUFT_TMR is not set
# CONFIG_RF_ERRINJ is not set
CONFIG_CACHE_FT_NONE=y
# CONFIG_CACHE_FT_EN is not set
# CONFIG_CACHE_FT_TECH is not set
CONFIG_CACHE_ERRINJ=0
#
# VHDL debug settings
#
# CONFIG_IU_DISAS is not set
# CONFIG_DEBUG_PC32 is not set
#
# L2 Cache
#
# CONFIG_L2_ENABLE is not set
CONFIG_L2_ASSO1=y
# CONFIG_L2_ASSO2 is not set
# CONFIG_L2_ASSO3 is not set
# CONFIG_L2_ASSO4 is not set
# CONFIG_L2_SZ1 is not set
# CONFIG_L2_SZ2 is not set
# CONFIG_L2_SZ4 is not set
# CONFIG_L2_SZ8 is not set
# CONFIG_L2_SZ16 is not set
# CONFIG_L2_SZ32 is not set
CONFIG_L2_SZ64=y
# CONFIG_L2_SZ128 is not set
# CONFIG_L2_SZ256 is not set
# CONFIG_L2_SZ512 is not set
CONFIG_L2_LINE32=y
# CONFIG_L2_LINE64 is not set
# CONFIG_L2_HPROT is not set
# CONFIG_L2_PEN is not set
# CONFIG_L2_WT is not set
# CONFIG_L2_RAN is not set
# CONFIG_L2_SHARE is not set
CONFIG_L2_MAP=00F0
CONFIG_L2_MTRR=0
CONFIG_L2_EDAC_NONE=y
# CONFIG_L2_EDAC_YES is not set
# CONFIG_L2_EDAC_TECHSPEC is not set
# CONFIG_L2_AXI is not set
#
# AMBA configuration
#
CONFIG_AHB_DEFMST=0
CONFIG_AHB_RROBIN=y
CONFIG_AHB_SPLIT=y
CONFIG_AHB_FPNPEN=y
CONFIG_AHB_IOADDR=FFF
CONFIG_APB_HADDR=800
# CONFIG_AHB_MON is not set
# CONFIG_AHB_MONERR is not set
# CONFIG_AHB_MONWAR is not set
# CONFIG_AHB_DTRACE is not set
#
# Debug Link
#
CONFIG_DSU_UART=y
CONFIG_DSU_JTAG=y
CONFIG_DSU_ETH=y
# CONFIG_DSU_ETHSZ1 is not set
CONFIG_DSU_ETHSZ2=y
# CONFIG_DSU_ETHSZ4 is not set
# CONFIG_DSU_ETHSZ8 is not set
# CONFIG_DSU_ETHSZ16 is not set
CONFIG_DSU_IPMSB=C0A8
CONFIG_DSU_IPLSB=00AA
CONFIG_DSU_ETHMSB=020000
CONFIG_DSU_ETHLSB=000000
# CONFIG_DSU_ETH_PROG is not set
#
# Peripherals
#
#
# Memory controller
#
#
# Leon2 memory controller
#
CONFIG_MCTRL_LEON2=y
CONFIG_MCTRL_8BIT=y
CONFIG_MCTRL_16BIT=y
# CONFIG_MCTRL_5CS is not set
# CONFIG_MCTRL_SDRAM is not set
#
# MIG 7-Series memory controller
#
CONFIG_MIG_7SERIES=y
# CONFIG_MIG_7SERIES_MODEL is not set
# CONFIG_AHBSTAT_ENABLE is not set
CONFIG_AHBSTAT_NFTSLV=1
#
# On-chip RAM/ROM
#
# CONFIG_AHBROM_ENABLE is not set
CONFIG_AHBROM_START=000
# CONFIG_AHBROM_PIPE is not set
CONFIG_AHBRAM_ENABLE=y
# CONFIG_AHBRAM_SZ1 is not set
# CONFIG_AHBRAM_SZ2 is not set
CONFIG_AHBRAM_SZ4=y
# CONFIG_AHBRAM_SZ8 is not set
# CONFIG_AHBRAM_SZ16 is not set
# CONFIG_AHBRAM_SZ32 is not set
# CONFIG_AHBRAM_SZ64 is not set
# CONFIG_AHBRAM_SZ128 is not set
# CONFIG_AHBRAM_SZ256 is not set
# CONFIG_AHBRAM_SZ512 is not set
# CONFIG_AHBRAM_SZ1024 is not set
# CONFIG_AHBRAM_SZ2048 is not set
# CONFIG_AHBRAM_SZ4096 is not set
CONFIG_AHBRAM_START=A00
# CONFIG_AHBRAM_PIPE is not set
#
# Ethernet
#
CONFIG_GRETH_ENABLE=y
CONFIG_GRETH_GIGA=y
# CONFIG_GRETH_FMC_MODE is not set
#
# UARTs, timers and irq control
#
CONFIG_UART1_ENABLE=y
# CONFIG_UA1_FIFO1 is not set
# CONFIG_UA1_FIFO2 is not set
# CONFIG_UA1_FIFO4 is not set
# CONFIG_UA1_FIFO8 is not set
# CONFIG_UA1_FIFO16 is not set
CONFIG_UA1_FIFO32=y
CONFIG_IRQ3_ENABLE=y
# CONFIG_IRQ3_SEC is not set
CONFIG_GPT_ENABLE=y
CONFIG_GPT_NTIM=2
CONFIG_GPT_SW=8
CONFIG_GPT_TW=32
CONFIG_GPT_IRQ=8
CONFIG_GPT_SEPIRQ=y
# CONFIG_GPT_WDOGEN is not set
CONFIG_GRGPIO_ENABLE=y
CONFIG_GRGPIO_WIDTH=8
CONFIG_GRGPIO_IMASK=0000
CONFIG_I2C_ENABLE=y
#
# Keybord and VGA interface
#
# CONFIG_KBD_ENABLE is not set
# CONFIG_VGA_ENABLE is not set
# CONFIG_SVGA_ENABLE is not set
#
# SPI
#
#
# SPI memory controller
#
# CONFIG_SPIMCTRL is not set
CONFIG_SPIMCTRL_READCMD=0B
# CONFIG_SPIMCTRL_DUMMYBYTE is not set
# CONFIG_SPIMCTRL_DUALOUTPUT is not set
CONFIG_SPIMCTRL_OFFSET=0
CONFIG_SPIMCTRL_SCALER=1
CONFIG_SPIMCTRL_ASCALER=8
#
# VHDL Debugging
#
# CONFIG_DEBUG_UART is not set
### GRLIB general setup and extra target to clean software
include .config
GRLIB=../..
CLEAN=soft-clean
ifeq ("$(CONFIG_LEON4)","y")
GRLIB_CONFIG=grlib_config_leon4.vhd
endif
### Xilinx Vivado device and board setup
BOARD=xilinx-kc705-xc7k325t
DESIGN=leon3-xilinx-kc705
include $(GRLIB)/boards/$(BOARD)/Makefile.inc
DEVICE=$(PART)$(PACKAGE)-$(SPEED)
XDC=$(GRLIB)/boards/$(BOARD)/$(BOARD).xdc
### Simulation Options ###
# Design Top Level
TOP=leon3mp
# Simulation top level
SIMTOP=testbench
# Uncomment for Modelsim or change to specify your simulator
#GRLIB_SIMULATOR=ModelSim
#GRLIB_SIMULATOR=ALDEC
# Options used during compilation
VCOMOPT=-explicit -O0
# GRLIB Options
VSIMOPT=
# GRETH options
ifeq ($(CONFIG_GRETH_ENABLE),y)
VSIMOPT+= -L secureip -L unisims_ver -L unisim
endif
VIVADO_MIG_AXI=1
ifeq ("$(CONFIG_LEON4)","y")
ifeq ("$(CONFIG_CACHE_64BIT)","y")
AXI_64=1
endif
ifeq ("$(CONFIG_CACHE_128BIT)","y")
AXI_128=1
GRLIB_XILINX_SOURCE_MGMT_MODE=DisplayOnly
endif
endif
# - MIG -
ifeq ($(CONFIG_MIG_7SERIES),y)
VSIMOPT+= -t fs -voptargs="+acc -nowarn 1"
VSIMOPT+= -L secureip -L unisims_ver -L unisim glbl
ifndef CONFIG_MIG_7SERIES_MODEL
VSIMOPT+= -gUSE_MIG_INTERFACE_MODEL=false -gSIM_BYPASS_INIT_CAL=FAST -gSIMULATION=TRUE -gEXAMPLE_SIMULATION=1
ASIMOPT+= -gUSE_MIG_INTERFACE_MODEL=false -gSIM_BYPASS_INIT_CAL=FAST -gSIMULATION=TRUE -gEXAMPLE_SIMULATION=1
else
VSIMOPT+= -gUSE_MIG_INTERFACE_MODEL=true -t ps -gEXAMPLE_SIMULATION=1
ASIMOPT+= -gUSE_MIG_INTERFACE_MODEL=true -t ps -gEXAMPLE_SIMULATION=1
endif
endif
# Simulator switches
ifeq ("$(GRLIB_SIMULATOR)","ALDEC")
VSIMOPT+= +access +w -voptargs="+acc -nowarn 1" +notimingchecks
else
VSIMOPT+=-voptargs="+acc -nowarn 1" +notimingchecks
endif
# Run simulation in batch mode
#VSIMOPT+= -c
# Remove collision check in UNSIM library
VSIMOPT+= -GSIM_COLLISION_CHECK="GENERATE_X_ONLY"
ASIMOPT+= -GSIM_COLLISION_CHECK="GENERATE_X_ONLY"
# Simulation scripts
VSIMOPT+= -do $(GRLIB)/bin/runvsim.do
ASIMDO = run -all
# Toplevel
VSIMOPT+= $(SIMTOP)
### End of Simulation Options ###
### Synthesize Options ###
VIVADO_IMPL_STRATEGY=Performance_ExplorePostRoutePhysOpt
### End of Synthesize Options ###
### Testbench, design and libraries to compile and not to compile
VHDLSYNFILES= config.vhd ahbrom.vhd leon3mp.vhd ddr_dummy.vhd
VHDLSIMFILES=testbench.vhd
TECHLIBS = unisim
SKIP_SIM_TECHLIBS = 1
LIBSKIP = pci pci/pcif core1553bbc core1553brm srio core1553brt idt gr1553 corePCIF \
tmtc openchip ihp spw gsi cypress hynix ftaddr \
spansion secureip
DIRSKIP = b1553 pci pci/pcif leon2 leon2ft srio idt crypto satcan pci ambatest \
spacewire ascs slink ftaddr \
pwm gr1553b iommu ac97 secureip
ifeq ("$(CONFIG_LEON4)","")
DIRSKIP+=leon4v0
endif
FILESKIP = grcan.vhd ddr2.v mobile_ddr.v adapters/sgmii.vhd
include $(GRLIB)/bin/Makefile
include $(GRLIB)/software/leon3/Makefile
################## project specific targets ##########################
This design is tailored to the Xilinx Kintex-7 KC705 board
http://www.xilinx.com/kc705
Note: This design requires that the GRLIB_SIMULATOR variable is
correctly set. Please refer to the documentation in doc/grlib.pdf for
additional information.
Note: The Vivado flow and parts of this design are still
experimental. Currently the design configuration should be left as-is.
Note: You must have Vivado 2017.3 in your path for the make targets to work.
The XILINX_VIVADO variable must be exported for the mig_7series target
to work correctly: export XILINX_VIVADO
Design specifics
----------------
* Synthesis should be done using Vivado 2017.3 or newer. For newer versions
the MIG project may need to be updated.
* This design has GRFPU enabled by default. If your release doesn't contain
GRFPU, it has to be disabled in order to build the design.
* The DDR3 controller is implemented with Xilinx MIG 7-Seriesand
runs of the 200 MHz clock. The DDR3 memory runs at 400 MHz
(DDR3-800).
* The AHB clock is generated by the MMCM module in the DDR3
controller, and can be controlled via Vivado. When the
MIG DDR3 controller isn't present the AHB clock is generated