|
| 1 | +# *************************************************************************** |
| 2 | +# *************************************************************************** |
| 3 | +# Copyright (C) 2024 Analog Devices, Inc. All rights reserved. |
| 4 | +# |
| 5 | +# In this HDL repository, there are many different and unique modules, consisting |
| 6 | +# of various HDL (Verilog or VHDL) components. The individual modules are |
| 7 | +# developed independently, and may be accompanied by separate and unique license |
| 8 | +# terms. |
| 9 | +# |
| 10 | +# The user should read each of these license terms, and understand the |
| 11 | +# freedoms and responsibilities that he or she has by using this source/core. |
| 12 | +# |
| 13 | +# This core is distributed in the hope that it will be useful, but WITHOUT ANY |
| 14 | +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
| 15 | +# A PARTICULAR PURPOSE. |
| 16 | +# |
| 17 | +# Redistribution and use of source or resulting binaries, with or without modification |
| 18 | +# of this file, are permitted under one of the following two license terms: |
| 19 | +# |
| 20 | +# 1. The GNU General Public License version 2 as published by the |
| 21 | +# Free Software Foundation, which can be found in the top level directory |
| 22 | +# of this repository (LICENSE_GPL2), and also online at: |
| 23 | +# <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html> |
| 24 | +# |
| 25 | +# OR |
| 26 | +# |
| 27 | +# 2. An ADI specific BSD license, which can be found in the top level directory |
| 28 | +# of this repository (LICENSE_ADIBSD), and also on-line at: |
| 29 | +# https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD |
| 30 | +# This will allow to generate bit files and not release the source code, |
| 31 | +# as long as it attaches to an ADI device. |
| 32 | +# |
| 33 | +# *************************************************************************** |
| 34 | +# *************************************************************************** |
| 35 | + |
| 36 | +source ../../scripts/adi_env.tcl |
| 37 | + |
| 38 | +global ad_project_params |
| 39 | + |
| 40 | +# Device clk |
| 41 | +ad_ip_instance clk_vip ssi_clk_vip [ list \ |
| 42 | + INTERFACE_MODE {MASTER} \ |
| 43 | + FREQ_HZ 250000000 \ |
| 44 | +] |
| 45 | +adi_sim_add_define "SSI_CLK=ssi_clk_vip" |
| 46 | +create_bd_port -dir O ssi_clk_out |
| 47 | +ad_connect ssi_clk_out ssi_clk_vip/clk_out |
| 48 | + |
| 49 | +# Remove duplicated objects |
| 50 | +delete_bd_objs \ |
| 51 | + [get_bd_cells sys_concat_intc] \ |
| 52 | + [get_bd_cells sys_rstgen] |
| 53 | + |
| 54 | +ad_disconnect [get_bd_pins sys_clk_vip/clk_out] sys_cpu_clk |
| 55 | + |
| 56 | +# Block design under test |
| 57 | +source $ad_hdl_dir/projects/pluto/system_bd.tcl |
| 58 | + |
| 59 | +# Remove unnecessary objects |
| 60 | +delete_bd_objs \ |
| 61 | + [get_bd_intf_nets axi_ad9361_adc_dma_m_dest_axi] \ |
| 62 | + [get_bd_intf_nets axi_ad9361_dac_dma_m_src_axi] \ |
| 63 | + [get_bd_intf_nets S00_AXI_1] \ |
| 64 | + [get_bd_intf_nets sys_ps7_DDR] \ |
| 65 | + [get_bd_intf_nets sys_ps7_FIXED_IO] \ |
| 66 | + [get_bd_nets gpio_i_1] \ |
| 67 | + [get_bd_nets spi0_clk_i_1] \ |
| 68 | + [get_bd_nets spi0_csn_i_1] \ |
| 69 | + [get_bd_nets spi0_sdi_i_1] \ |
| 70 | + [get_bd_nets spi0_sdo_i_1] \ |
| 71 | + [get_bd_nets sys_200m_clk] \ |
| 72 | + [get_bd_nets sys_concat_intc_dout] \ |
| 73 | + [get_bd_nets sys_ps7_FCLK_RESET0_N] \ |
| 74 | + [get_bd_nets sys_ps7_GPIO_O] \ |
| 75 | + [get_bd_nets sys_ps7_GPIO_T] \ |
| 76 | + [get_bd_nets sys_ps7_SPI0_MOSI_O] \ |
| 77 | + [get_bd_nets sys_ps7_SPI0_SCLK_O] \ |
| 78 | + [get_bd_nets sys_ps7_SPI0_SS_O] \ |
| 79 | + [get_bd_nets sys_ps7_SPI0_SS1_O] \ |
| 80 | + [get_bd_nets sys_ps7_SPI0_SS2_O] \ |
| 81 | + [get_bd_cells sys_ps7] |
| 82 | + |
| 83 | +ad_connect sys_cpu_clk sys_clk_vip/clk_out |
| 84 | +ad_connect sys_cpu_clk mng_axi_vip/aclk |
| 85 | +ad_connect sys_cpu_clk axi_intc/s_axi_aclk |
| 86 | +ad_connect sys_cpu_clk axi_axi_interconnect/aclk |
| 87 | +ad_connect sys_cpu_clk axi_mem_interconnect/aclk1 |
| 88 | +ad_connect sys_rst_vip/rst_out sys_rstgen/ext_reset_in |
| 89 | +ad_connect axi_intc/intr sys_concat_intc/dout |
| 90 | +ad_connect $sys_iodelay_clk axi_ad9361/delay_clk |
| 91 | + |
| 92 | +ad_mem_hp1_interconnect sys_cpu_clk axi_ad9361_adc_dma/m_dest_axi |
| 93 | +ad_mem_hp2_interconnect sys_cpu_clk axi_ad9361_dac_dma/m_src_axi |
| 94 | + |
| 95 | +ad_ip_parameter axi_ad9361 CONFIG.DELAY_REFCLK_FREQUENCY 400 |
| 96 | + |
| 97 | +set RX_DMA 0x7C400000 |
| 98 | +set_property offset $RX_DMA [get_bd_addr_segs {mng_axi_vip/Master_AXI/SEG_data_axi_ad9361_adc_dma}] |
| 99 | +adi_sim_add_define "RX_DMA_BA=[format "%d" ${RX_DMA}]" |
| 100 | + |
| 101 | +set TX_DMA 0x7C420000 |
| 102 | +set_property offset $TX_DMA [get_bd_addr_segs {mng_axi_vip/Master_AXI/SEG_data_axi_ad9361_dac_dma}] |
| 103 | +adi_sim_add_define "TX_DMA_BA=[format "%d" ${TX_DMA}]" |
| 104 | + |
| 105 | +set TDDN 0x7C440000 |
| 106 | +set_property offset $TDDN [get_bd_addr_segs {mng_axi_vip/Master_AXI/SEG_data_axi_tdd_0}] |
| 107 | +adi_sim_add_define "TDDN_BA=[format "%d" ${TDDN}]" |
| 108 | + |
| 109 | +set AXI_AD9361 0x79020000 |
| 110 | +set_property offset $AXI_AD9361 [get_bd_addr_segs {mng_axi_vip/Master_AXI/SEG_data_axi_ad9361}] |
| 111 | +adi_sim_add_define "AXI_AD9361_BA=[format "%d" ${AXI_AD9361}]" |
0 commit comments