ad9783_zcu102_dev: Initial commit

main
Iulia Moldovan 2022-01-07 13:26:18 +02:00 committed by imoldovan
parent 08f029c757
commit 3d000ee6a8
6 changed files with 269 additions and 0 deletions

View File

@ -0,0 +1,71 @@
# dac interface
create_bd_port -dir O dci_p
create_bd_port -dir O dci_n
create_bd_port -dir I dco1_p
create_bd_port -dir I dco1_n
create_bd_port -dir O -from 15 -to 0 data_p
create_bd_port -dir O -from 15 -to 0 data_n
# dac peripherals
ad_ip_instance axi_ad9783 axi_ad9783
ad_ip_instance axi_dmac axi_ad9783_dma
ad_ip_parameter axi_ad9783_dma CONFIG.DMA_TYPE_SRC 0
ad_ip_parameter axi_ad9783_dma CONFIG.DMA_TYPE_DEST 1
ad_ip_parameter axi_ad9783_dma CONFIG.FIFO_SIZE 32
ad_ip_parameter axi_ad9783_dma CONFIG.DMA_2D_TRANSFER 0
ad_ip_parameter axi_ad9783_dma CONFIG.CYCLIC 1
ad_ip_parameter axi_ad9783_dma CONFIG.AXI_SLICE_DEST 1
ad_ip_parameter axi_ad9783_dma CONFIG.AXI_SLICE_SRC 1
ad_ip_parameter axi_ad9783_dma CONFIG.DMA_DATA_WIDTH_DEST 128
ad_ip_parameter axi_ad9783_dma CONFIG.DMA_DATA_WIDTH_SRC 128
ad_ip_parameter axi_ad9783_dma CONFIG.DMA_AXI_PROTOCOL_SRC 1
# dac-path channel upack
ad_ip_instance util_upack2 util_ad9783_dac_upack { \
NUM_OF_CHANNELS 2 \
SAMPLES_PER_CHANNEL 4 \
SAMPLE_DATA_WIDTH 16 \
}
# connections (dac)
ad_connect dci_p axi_ad9783/dac_clk_out_p
ad_connect dci_n axi_ad9783/dac_clk_out_n
ad_connect dco1_p axi_ad9783/dac_clk_in_p
ad_connect dco1_n axi_ad9783/dac_clk_in_n
ad_connect data_p axi_ad9783/dac_data_out_p
ad_connect data_n axi_ad9783/dac_data_out_n
ad_connect dac_div_clk axi_ad9783/dac_div_clk
ad_connect axi_ad9783/dac_valid util_ad9783_dac_upack/fifo_rd_en
ad_connect axi_ad9783/dac_div_clk util_ad9783_dac_upack/clk
ad_connect axi_ad9783/dac_div_clk axi_ad9783_dma/m_axis_aclk
ad_connect axi_ad9783/dac_rst util_ad9783_dac_upack/reset
ad_connect axi_ad9783/dac_enable_0 util_ad9783_dac_upack/enable_0
ad_connect axi_ad9783/dac_enable_1 util_ad9783_dac_upack/enable_1
ad_connect axi_ad9783_dma/m_axis util_ad9783_dac_upack/s_axis
ad_connect util_ad9783_dac_upack/fifo_rd_data_0 axi_ad9783/dac_ddata_0
ad_connect util_ad9783_dac_upack/fifo_rd_data_1 axi_ad9783/dac_ddata_1
ad_connect util_ad9783_dac_upack/fifo_rd_underflow axi_ad9783/dac_dunf
# interconnect (cpu)
ad_cpu_interconnect 0x74200000 axi_ad9783
ad_cpu_interconnect 0x7c420000 axi_ad9783_dma
# interconnect (mem/dac)
ad_mem_hp2_interconnect $sys_dma_clk sys_ps7/S_AXI_HP2
ad_mem_hp2_interconnect $sys_dma_clk axi_ad9783_dma/m_src_axi
ad_connect $sys_dma_resetn axi_ad9783_dma/m_src_axi_aresetn
# interrupts
ad_cpu_interrupt ps-12 mb-12 axi_ad9783_dma/irq

View File

@ -0,0 +1,23 @@
####################################################################################
## Copyright (c) 2018 - 2021 Analog Devices, Inc.
### SPDX short identifier: BSD-1-Clause
## Auto-generated, do not modify!
####################################################################################
PROJECT_NAME := ad9783_zcu102
M_DEPS += ../common/ad9783_ebz_bd.tcl
M_DEPS += ../../scripts/adi_pd.tcl
M_DEPS += ../../common/zcu102/zcu102_system_constr.xdc
M_DEPS += ../../common/zcu102/zcu102_system_bd.tcl
LIB_DEPS += axi_ad9783
LIB_DEPS += axi_clkgen
LIB_DEPS += axi_dmac
LIB_DEPS += axi_hdmi_tx
LIB_DEPS += axi_spdif_tx
LIB_DEPS += axi_sysid
LIB_DEPS += util_pack/util_upack2
LIB_DEPS += sysid_rom
include ../../scripts/project-xilinx.mk

View File

@ -0,0 +1,11 @@
source $ad_hdl_dir/projects/common/zcu102/zcu102_system_bd.tcl
source ../common/ad9783_ebz_bd.tcl
source $ad_hdl_dir/projects/scripts/adi_pd.tcl
#system ID
ad_ip_parameter axi_sysid_0 CONFIG.ROM_ADDR_BITS 9
ad_ip_parameter rom_sys_0 CONFIG.PATH_TO_FILE "[pwd]/mem_init_sys.txt"
ad_ip_parameter rom_sys_0 CONFIG.ROM_ADDR_BITS 9
sysid_gen_sys_init_file

View File

@ -0,0 +1,54 @@
# constraints
# ad9783
# dac_clk_in_p
set_property -dict {PACKAGE_PIN AA7 IOSTANDARD LVDS DIFF_TERM_ADV TERM_100} [get_ports dco1_p] ; ## H04 FMC_HPC0_CLK0_M2C_P
# dac_clk_in_n
set_property -dict {PACKAGE_PIN AA6 IOSTANDARD LVDS DIFF_TERM_ADV TERM_100} [get_ports dco1_n] ; ## H05 FMC_HPC0_CLK0_M2C_N
# dac_clk_out_p
set_property -dict {PACKAGE_PIN Y4 IOSTANDARD LVDS} [get_ports dci_p] ; ## G6 FMC_HPC0_LA00_CC_P
# dac_clk_out_n
set_property -dict {PACKAGE_PIN Y3 IOSTANDARD LVDS} [get_ports dci_n] ; ## G7 FMC_HPC0_LA00_CC_N
set_property -dict {PACKAGE_PIN Y10 IOSTANDARD LVDS} [get_ports data_p[0]] ; ## H19 FMC_HPC0_LA15_P
set_property -dict {PACKAGE_PIN Y9 IOSTANDARD LVDS} [get_ports data_n[0]] ; ## H20 FMC_HPC0_LA15_N
set_property -dict {PACKAGE_PIN AC7 IOSTANDARD LVDS} [get_ports data_p[1]] ; ## C18 FMC_HPC0_LA14_P
set_property -dict {PACKAGE_PIN AC6 IOSTANDARD LVDS} [get_ports data_n[1]] ; ## C19 FMC_HPC0_LA14_N
set_property -dict {PACKAGE_PIN Y12 IOSTANDARD LVDS} [get_ports data_p[2]] ; ## G18 FMC_HPC0_LA16_P
set_property -dict {PACKAGE_PIN AA12 IOSTANDARD LVDS} [get_ports data_n[2]] ; ## G19 FMC_HPC0_LA16_N
set_property -dict {PACKAGE_PIN W2 IOSTANDARD LVDS} [get_ports data_p[3]] ; ## D14 FMC_HPC0_LA09_P
set_property -dict {PACKAGE_PIN W1 IOSTANDARD LVDS} [get_ports data_n[3]] ; ## D15 FMC_HPC0_LA09_N
set_property -dict {PACKAGE_PIN AB8 IOSTANDARD LVDS} [get_ports data_p[4]] ; ## D17 FMC_HPC0_LA13_P
set_property -dict {PACKAGE_PIN AC8 IOSTANDARD LVDS} [get_ports data_n[4]] ; ## D18 FMC_HPC0_LA13_N
set_property -dict {PACKAGE_PIN AB6 IOSTANDARD LVDS} [get_ports data_p[5]] ; ## H16 FMC_HPC0_LA11_P
set_property -dict {PACKAGE_PIN AB5 IOSTANDARD LVDS} [get_ports data_n[5]] ; ## H17 FMC_HPC0_LA11_N
set_property -dict {PACKAGE_PIN W7 IOSTANDARD LVDS} [get_ports data_p[6]] ; ## G15 FMC_HPC0_LA12_P
set_property -dict {PACKAGE_PIN W6 IOSTANDARD LVDS} [get_ports data_n[6]] ; ## G16 FMC_HPC0_LA12_N
set_property -dict {PACKAGE_PIN AB3 IOSTANDARD LVDS} [get_ports data_p[7]] ; ## D11 FMC_HPC0_LA05_P
set_property -dict {PACKAGE_PIN AC3 IOSTANDARD LVDS} [get_ports data_n[7]] ; ## D12 FMC_HPC0_LA05_N
set_property -dict {PACKAGE_PIN W5 IOSTANDARD LVDS} [get_ports data_p[8]] ; ## C14 FMC_HPC0_LA10_P
set_property -dict {PACKAGE_PIN W4 IOSTANDARD LVDS} [get_ports data_n[8]] ; ## C15 FMC_HPC0_LA10_N
set_property -dict {PACKAGE_PIN U5 IOSTANDARD LVDS} [get_ports data_p[9]] ; ## H13 FMC_HPC0_LA07_P
set_property -dict {PACKAGE_PIN U4 IOSTANDARD LVDS} [get_ports data_n[9]] ; ## H14 FMC_HPC0_LA07_N
set_property -dict {PACKAGE_PIN V4 IOSTANDARD LVDS} [get_ports data_p[10]] ; ## G12 FMC_HPC0_LA08_P
set_property -dict {PACKAGE_PIN V3 IOSTANDARD LVDS} [get_ports data_n[10]] ; ## G13 FMC_HPC0_LA08_N
set_property -dict {PACKAGE_PIN AC2 IOSTANDARD LVDS} [get_ports data_p[11]] ; ## C10 FMC_HPC0_LA06_P
set_property -dict {PACKAGE_PIN AC1 IOSTANDARD LVDS} [get_ports data_n[11]] ; ## C11 FMC_HPC0_LA06_N
set_property -dict {PACKAGE_PIN Y2 IOSTANDARD LVDS} [get_ports data_p[12]] ; ## G9 FMC_HPC0_LA03_P
set_property -dict {PACKAGE_PIN Y1 IOSTANDARD LVDS} [get_ports data_n[12]] ; ## G10 FMC_HPC0_LA03_N
set_property -dict {PACKAGE_PIN V2 IOSTANDARD LVDS} [get_ports data_p[13]] ; ## H7 FMC_HPC0_LA02_P
set_property -dict {PACKAGE_PIN V1 IOSTANDARD LVDS} [get_ports data_n[13]] ; ## H8 FMC_HPC0_LA02_N
set_property -dict {PACKAGE_PIN AA2 IOSTANDARD LVDS} [get_ports data_p[14]] ; ## H10 FMC_HPC0_LA04_P
set_property -dict {PACKAGE_PIN AA1 IOSTANDARD LVDS} [get_ports data_n[14]] ; ## H11 FMC_HPC0_LA04_N
set_property -dict {PACKAGE_PIN T8 IOSTANDARD LVDS} [get_ports data_p[15]] ; ## G2 FMC_HPC0_CLK1_M2C_P
set_property -dict {PACKAGE_PIN R8 IOSTANDARD LVDS} [get_ports data_n[15]] ; ## G3 FMC_HPC0_CLK1_M2C_N
set_property -dict {PACKAGE_PIN B21 IOSTANDARD LVCMOS33} [get_ports spi_clk] ; ## IO_L10N_AD2N_47
set_property -dict {PACKAGE_PIN C21 IOSTANDARD LVCMOS33} [get_ports spi_dio] ; ## IO_L10P_AD2P_47
set_property -dict {PACKAGE_PIN C22 IOSTANDARD LVCMOS33} [get_ports spi_do] ; ## IO_L9N_AD3N_47
set_property -dict {PACKAGE_PIN D21 IOSTANDARD LVCMOS33} [get_ports spi_en] ; ## IO_L9P_AD3P_47
# clocks
create_clock -name dco_p -period 2.00 [get_ports dco1_p]

View File

@ -0,0 +1,12 @@
source ../../scripts/adi_env.tcl
source $ad_hdl_dir/projects/scripts/adi_project_xilinx.tcl
source $ad_hdl_dir/projects/scripts/adi_board.tcl
adi_project ad9783_zcu102
adi_project_files ad9783_zcu102 [list \
"system_top.v" \
"system_constr.xdc"\
"$ad_hdl_dir/projects/common/zcu102/zcu102_system_constr.xdc" ]
adi_project_run ad9783_zcu102

View File

@ -0,0 +1,98 @@
// ***************************************************************************
// ***************************************************************************
// Copyright 2021 (c) Analog Devices, Inc. All rights reserved.
//
// In this HDL repository, there are many different and unique modules, consisting
// of various HDL (Verilog or VHDL) components. The individual modules are
// developed independently, and may be accompanied by separate and unique license
// terms.
//
// The user should read each of these license terms, and understand the
// freedoms and responsibilities that he or she has by using this source/core.
//
// This core 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.
//
// Redistribution and use of source or resulting binaries, with or without modification
// of this file, are permitted under one of the following two license terms:
//
// 1. The GNU General Public License version 2 as published by the
// Free Software Foundation, which can be found in the top level directory
// of this repository (LICENSE_GPL2), and also online at:
// <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
//
// OR
//
// 2. An ADI specific BSD license, which can be found in the top level directory
// of this repository (LICENSE_ADIBSD), and also on-line at:
// https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD
// This will allow to generate bit files and not release the source code,
// as long as it attaches to an ADI device.
//
// ***************************************************************************
// ***************************************************************************
`timescale 1ns/100ps
module system_top (
input [12:0] gpio_bd_i,
output [ 7:0] gpio_bd_o,
// dci_p&n enter the chip
output dci_p,
output dci_n,
// dco_p&n leave the chip
input dco1_p,
input dco1_n,
output [15:0] data_p,
output [15:0] data_n,
output spi_clk,
output spi_dio,
input spi_do,
output spi_en);
// internal signals
wire [94:0] gpio_i;
wire [94:0] gpio_o;
wire [ 2:0] spi_csb;
// defaults
assign gpio_bd_o = gpio_o[20:13];
assign gpio_i[94:13] = gpio_o[94:13];
assign gpio_i[12: 0] = gpio_bd_i;
assign spi_en = spi_csb[0];
// instantiations
system_wrapper i_system_wrapper (
.gpio_i (gpio_i),
.gpio_o (gpio_o),
.gpio_t (),
.spi0_csn (spi_csb),
.spi0_miso (spi_do),
.spi0_mosi (spi_dio),
.spi0_sclk (spi_clk),
.spi1_csn (),
.spi1_miso (1'b0),
.spi1_mosi (),
.spi1_sclk (),
.dco1_n (dco1_n),
.dco1_p (dco1_p),
.dci_n (dci_n),
.dci_p (dci_p),
.data_n (data_n),
.data_p (data_p));
endmodule
// ***************************************************************************
// ***************************************************************************