Commit 9cf2a6b9 authored by marvin.damschen's avatar marvin.damschen Committed by Marvin Damschen
Browse files

set up basic xilinx-vc707 design for CmdQueue integration

parent ffe460a3
#!/bin/bash
source /home/adm/xilinx_2014.4_64bit.setup # TODO adjust path to vivado 2014.4 environment
# Customize IP Cores in top
printf "customizing ip cores..."
cd leon3-xilinx-vc707
touch wave.do # workaround to avoid warning. seems to be missing in grlilb for this board
make ip_7series_generate > /dev/null
if [ $? -eq 0 ]; then
printf "DONE\n"
else
printf "FAILED\n"
exit
fi
# Begin Partial Reconfiguration Flow
cd ../pr_flow
printf "synthesizing ip cores..."
mkdir -p runs/sgmii_synth
cd runs/sgmii_synth
vivado -mode batch -source ../../tcl/sgmii.tcl > /dev/null
if [ $? -eq 0 ]; then
printf "DONE\n"
else
printf "FAILED\n"
exit
fi
printf "synthesizing top..."
cd ../..
mkdir -p runs/synth
cd runs/synth
vivado -mode batch -source ../../tcl/synth.tcl > /dev/null
if [ $? -eq 0 ]; then
printf "DONE\n"
else
printf "FAILED\n"
exit
fi
printf "implementing top..."
cd ../..
mkdir -p runs/impl
cd runs/impl
vivado -mode batch -source ../../tcl/impl.tcl > /dev/null
if [ $? -eq 0 ]; then
printf "DONE\n"
else
printf "FAILED\n"
exit
fi
printf "writing bitstream for inial configuration..."
cd ../..
mkdir -p bitstreams
mkdir -p runs/bitstream_config0
cd runs/bitstream_config0
vivado -mode batch -source ../../tcl/bitstream0.tcl > /dev/null
if [ $? -eq 0 ]; then
printf "DONE\n"
else
printf "FAILED\n"
exit
fi
#
# Automatically generated make config: don't edit
#
CONFIG_LEON3FT_PRESENT=y
CONFIG_HAS_SHARED_GRFPU=y
#
# Synthesis
#
# CONFIG_SYN_INFERRED 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_CYCLONEIII is not set
# CONFIG_SYN_ALTERA is not set
# CONFIG_SYN_AXCEL is not set
# CONFIG_SYN_AXDSP 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_FUSION is not set
# CONFIG_SYN_UT025CRH is not set
# CONFIG_SYN_UT130HBD is not set
# CONFIG_SYN_UT90NHBD is not set
# CONFIG_SYN_ATC18 is not set
# CONFIG_SYN_ATC18RHA is not set
# CONFIG_SYN_CMOS9SF is not set
# CONFIG_SYN_CUSTOM1 is not set
# CONFIG_SYN_IHP25 is not set
# CONFIG_SYN_IHP25RH is not set
# CONFIG_SYN_LATTICE is not set
# CONFIG_SYN_ECLIPSE is not set
# CONFIG_SYN_PEREGRINE is not set
# CONFIG_SYN_RH_LIB18T is not set
# CONFIG_SYN_RHUMC is not set
# CONFIG_SYN_SAED32 is not set
# CONFIG_SYN_DARE is not set
# CONFIG_SYN_RHS65 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 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=y
# CONFIG_SYN_ZYNQ7000 is not set
CONFIG_TRANS_GTP0=y
# CONFIG_TRANS_GTP1 is not set
# CONFIG_TRANS_GTX0 is not set
# CONFIG_TRANS_GTX1 is not set
# CONFIG_TRANS_GTH0 is not set
# CONFIG_TRANS_GTH1 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_LATDLL 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_PROC_NUM=1
# CONFIG_LEON3_MIN is not set
# CONFIG_LEON3_GP is not set
# CONFIG_LEON3_HP is not set
CONFIG_LEON3_CUSTOM=y
#
# Integer unit
#
CONFIG_IU_NWINDOWS=8
CONFIG_IU_V8MULDIV=y
# CONFIG_IU_MUL_LATENCY_2 is not set
# CONFIG_IU_MUL_LATENCY_4 is not set
CONFIG_IU_MUL_LATENCY_5=y
# CONFIG_IU_MUL_MAC 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_BP=y
CONFIG_IU_SVT=y
# CONFIG_NOTAG is not set
CONFIG_IU_LDELAY=1
CONFIG_IU_WATCHPOINTS=2
CONFIG_PWD=y
CONFIG_IU_RSTADDR=00000
# CONFIG_NP_ASI is not set
# CONFIG_WRPSR is not set
#
# Floating-point unit
#
# CONFIG_FPU_ENABLE is not set
#
# Cache system
#
CONFIG_ICACHE_ENABLE=y
# CONFIG_ICACHE_ASSO1 is not set
CONFIG_ICACHE_ASSO2=y
# CONFIG_ICACHE_ASSO3 is not set
# CONFIG_ICACHE_ASSO4 is not set
# 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=y
# CONFIG_ICACHE_LZ32 is not set
CONFIG_ICACHE_ALGORND=y
# CONFIG_ICACHE_ALGODIR is not set
# CONFIG_ICACHE_ALGOLRR is not set
# CONFIG_ICACHE_ALGOLRU is not set
# CONFIG_ICACHE_LOCK is not set
CONFIG_DCACHE_ENABLE=y
# CONFIG_DCACHE_ASSO1 is not set
CONFIG_DCACHE_ASSO2=y
# CONFIG_DCACHE_ASSO3 is not set
# CONFIG_DCACHE_ASSO4 is not set
# 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=y
# CONFIG_DCACHE_LZ32 is not set
CONFIG_DCACHE_ALGORND=y
# CONFIG_DCACHE_ALGODIR is not set
# CONFIG_DCACHE_ALGOLRR is not set
# CONFIG_DCACHE_ALGOLRU is not set
# CONFIG_DCACHE_LOCK is not set
CONFIG_DCACHE_SNOOP=y
CONFIG_DCACHE_SNOOP_SEPTAG=y
CONFIG_CACHE_FIXED=0
#
# MMU
#
CONFIG_MMU_ENABLE=y
# 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=y
# CONFIG_MMU_I16 is not set
# 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=y
# CONFIG_MMU_D16 is not set
# 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
#
# Debug Support Unit
#
# CONFIG_DSU_ENABLE is not set
#
# Fault-tolerance
#
# CONFIG_LEON3FT_EN is not set
#
# 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_MAP=00F0
CONFIG_L2_MTRR=0
# CONFIG_L2_EDAC is not set
#
# AMBA configuration
#
CONFIG_AHB_DEFMST=0
CONFIG_AHB_RROBIN=y
# CONFIG_AHB_SPLIT is not set
CONFIG_AHB_FPNPEN=y
CONFIG_AHB_IOADDR=FFF
CONFIG_APB_HADDR=800
# CONFIG_AHB_MON is not set
# CONFIG_AHB_DTRACE is not set
#
# Debug Link
#
CONFIG_DSU_UART=y
CONFIG_DSU_JTAG=y
# CONFIG_GRUSB_DCL is not set
CONFIG_DSU_ETH=y
# CONFIG_DSU_ETHSZ1 is not set
# CONFIG_DSU_ETHSZ2 is not set
# CONFIG_DSU_ETHSZ4 is not set
# CONFIG_DSU_ETHSZ8 is not set
CONFIG_DSU_ETHSZ16=y
CONFIG_DSU_IPMSB=C0A8
CONFIG_DSU_IPLSB=0033
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
#
# On-chip RAM/ROM
#
# CONFIG_AHBROM_ENABLE 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 is not set
# CONFIG_GRETH_FIFO4 is not set
CONFIG_GRETH_FIFO8=y
# CONFIG_GRETH_FIFO16 is not set
# CONFIG_GRETH_FIFO32 is not set
# CONFIG_GRETH_FIFO64 is not set
# CONFIG_GRETH_FT is not set
#
# USB 2.0 Host Controller
#
# CONFIG_GRUSBHC_ENABLE is not set
#
# USB 2.0 Device Controller
#
# CONFIG_GRUSBDC_ENABLE is not set
#
# CAN
#
# CONFIG_CAN_ENABLE is not set
#
# Spacewire
#
# CONFIG_SPW_ENABLE 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
#
# SPI controller(s)
#
CONFIG_SPICTRL_ENABLE=y
CONFIG_SPICTRL_NUM=1
CONFIG_SPICTRL_SLVS=1
CONFIG_SPICTRL_FIFO=1
# CONFIG_SPICTRL_SLVREG is not set
# CONFIG_SPICTRL_ASEL is not set
# CONFIG_SPICTRL_AM is not set
# CONFIG_SPICTRL_ODMODE is not set
# CONFIG_SPICTRL_TWEN is not set
CONFIG_SPICTRL_MAXWLEN=0
# CONFIG_SPICTRL_SYNCRAM is not set
#
# Partial Reconfiguration
#
# CONFIG_PARTIAL is not set
#
# VHDL Debugging
#
# CONFIG_DEBUG_UART is not set
### GRLIB general setup and extra target to clean software
include .config
GRLIB=../../grlib-gpl-1.4.1-b4156
CLEAN=soft-clean
### Xilinx Vivado device and board setup
BOARD=xilinx-vc707-xc7vx485t
DESIGN=leon3-xilinx-vc707
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= -gdisas=1
# GRETH options
ifeq ($(CONFIG_GRETH_ENABLE),y)
VSIMOPT+= -L gig_ethernet_pcs_pma_v14_3 -L secureip -L unisims_ver
endif
# - MIG -
ifeq ($(CONFIG_MIG_7SERIES),y)
VSIMOPT+= -t fs -novopt
VSIMOPT+= -L secureip -L unisims_ver glbl
ifndef CONFIG_MIG_7SERIES_MODEL
VSIMOPT+= -gUSE_MIG_INTERFACE_MODEL=false -gSIM_BYPASS_INIT_CAL=FAST -gSIMULATION=TRUE
ASIMOPT+= -gUSE_MIG_INTERFACE_MODEL=false -gSIM_BYPASS_INIT_CAL=FAST -gSIMULATION=TRUE
else
VSIMOPT+= -gUSE_MIG_INTERFACE_MODEL=true -t ps
ASIMOPT+= -gUSE_MIG_INTERFACE_MODEL=true -t ps
endif
endif
# Simulator switches
ifeq ("$(GRLIB_SIMULATOR)","ALDEC")
VSIMOPT+= +access +w -voptargs="+acc" +notimingchecks
else
VSIMOPT+=-novopt +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 "run -all"
ASIMDO = run -all
# Toplevel
VSIMOPT+= $(SIMTOP)
### End of Simulation Options ###
### Testbench, design and libraries to compile and not to compile
VHDLSYNFILES= config.vhd ahbram_sim.vhd ahbrom.vhd leon3mp.vhd ddr_dummy.vhd sgmii_vc707.vhd
VHDLSIMFILES=testbench.vhd
TECHLIBS = unisim
SKIP_SIM_TECHLIBS = 1
LIBSKIP = pci pci/pcif core1553bbc core1553brm core1553brt gr1553 corePCIF \
tmtc openchip ihp spw gsi cypress hynix \
spansion leon4 leon4v0 secureip
LIBADD = testgrouppolito
DIRSKIP = b1553 pci pci/pcif leon2 leon2ft crypto satcan pci ambatest \
spacewire ascs slink \
pwm gr1553b iommu ac97 secureip
FILESKIP = grcan.vhd ddr2.v mobile_ddr.v adapters/sgmii.vhd
include $(GRLIB)/bin/Makefile
include $(GRLIB)/software/leon3/Makefile
################## project specific targets ##########################
This diff is collapsed.
------------------------------------------------------------------------------
-- This file is a part of the GRLIB VHDL IP LIBRARY
-- Copyright (C) 2003 - 2008, Gaisler Research
-- Copyright (C) 2008 - 2014, Aeroflex Gaisler
-- Copyright (C) 2015, Cobham Gaisler
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-----------------------------------------------------------------------------
-- Entity: ahbram
-- File: ahbram.vhd
-- Author: Jiri Gaisler - Gaisler Research
-- Modified: Jan Andersson - Aeroflex Gaisler
-- Description: AHB ram. 0-waitstate read, 0/1-waitstate write.
-- Added Sx-Record read function
------------------------------------------------------------------------------
-- pragma translate_off
library ieee;
use ieee.std_logic_1164.all;
use std.textio.all;
use IEEE.Numeric_Std.all;
library grlib;
use grlib.config_types.all;
use grlib.config.all;
use grlib.amba.all;
use grlib.stdlib.all;
use grlib.devices.all;
use grlib.stdio.all;
library techmap;
use techmap.gencomp.all;
entity ahbram_sim is