From 9571ce3e3b1c1967eee5434f5893ac5066d77f7b Mon Sep 17 00:00:00 2001 From: Rejeesh Kutty Date: Thu, 19 Mar 2015 15:35:45 -0400 Subject: [PATCH] fmcomms6: 2014.4 updates --- projects/fmcomms6/common/fmcomms6_bd.tcl | 266 ++++------------------- 1 file changed, 45 insertions(+), 221 deletions(-) diff --git a/projects/fmcomms6/common/fmcomms6_bd.tcl b/projects/fmcomms6/common/fmcomms6_bd.tcl index 5e4c8f61c..c745e4170 100644 --- a/projects/fmcomms6/common/fmcomms6_bd.tcl +++ b/projects/fmcomms6/common/fmcomms6_bd.tcl @@ -1,59 +1,24 @@ -source $ad_hdl_dir/projects/common/xilinx/sys_wfifo.tcl - # adc interface -set adc_clk_in_p [create_bd_port -dir I adc_clk_in_p] -set adc_clk_in_n [create_bd_port -dir I adc_clk_in_n] -set adc_or_in_p [create_bd_port -dir I adc_or_in_p] -set adc_or_in_n [create_bd_port -dir I adc_or_in_n] -set adc_data_in_p [create_bd_port -dir I -from 15 -to 0 adc_data_in_p] -set adc_data_in_n [create_bd_port -dir I -from 15 -to 0 adc_data_in_n] - -if {$sys_zynq == 1} { - - set spi_csn_2_o [create_bd_port -dir O spi_csn_2_o] - set spi_csn_1_o [create_bd_port -dir O spi_csn_1_o] - set spi_csn_0_o [create_bd_port -dir O spi_csn_0_o] - set spi_csn_i [create_bd_port -dir I spi_csn_i] - -} else { - - set spi_csn_o [create_bd_port -dir O -from 2 -to 0 spi_csn_o] - set spi_csn_i [create_bd_port -dir I -from 2 -to 0 spi_csn_i] -} - -set spi_clk_i [create_bd_port -dir I spi_clk_i] -set spi_clk_o [create_bd_port -dir O spi_clk_o] -set spi_sdo_i [create_bd_port -dir I spi_sdo_i] -set spi_sdo_o [create_bd_port -dir O spi_sdo_o] -set spi_sdi_i [create_bd_port -dir I spi_sdi_i] - -if {$sys_zynq == 0} { - - set gpio_fmcomms6_i [create_bd_port -dir I gpio_fmcomms6_i] - set gpio_fmcomms6_o [create_bd_port -dir O gpio_fmcomms6_o] - set gpio_fmcomms6_t [create_bd_port -dir O gpio_fmcomms6_t] -} - -# interrupts - -set fmcomms6_dma_irq [create_bd_port -dir O fmcomms6_dma_irq] -set fmcomms6_spi_irq [create_bd_port -dir O fmcomms6_spi_irq] -set fmcomms6_gpio_irq [create_bd_port -dir O fmcomms6_gpio_irq] +create_bd_port -dir I adc_clk_in_p +create_bd_port -dir I adc_clk_in_n +create_bd_port -dir I adc_or_in_p +create_bd_port -dir I adc_or_in_n +create_bd_port -dir I -from 15 -to 0 adc_data_in_p +create_bd_port -dir I -from 15 -to 0 adc_data_in_n # dma interface -set adc_clk [create_bd_port -dir O adc_clk] -set adc_valid_0 [create_bd_port -dir O adc_valid_0] -set adc_enable_0 [create_bd_port -dir O adc_enable_0] -set adc_data_0 [create_bd_port -dir O -from 15 -to 0 adc_data_0] -set adc_valid_1 [create_bd_port -dir O adc_valid_1] -set adc_enable_1 [create_bd_port -dir O adc_enable_1] -set adc_data_1 [create_bd_port -dir O -from 15 -to 0 adc_data_1] -set adc_dma_wr [create_bd_port -dir I adc_dma_wr] -set adc_dma_sync [create_bd_port -dir I adc_dma_sync] -set adc_dma_wdata [create_bd_port -dir I -from 31 -to 0 adc_dma_wdata] +create_bd_port -dir O adc_clk +create_bd_port -dir O adc_valid_0 +create_bd_port -dir O adc_enable_0 +create_bd_port -dir O -from 15 -to 0 adc_data_0 +create_bd_port -dir O adc_valid_1 +create_bd_port -dir O adc_enable_1 +create_bd_port -dir O -from 15 -to 0 adc_data_1 +create_bd_port -dir I adc_dwr +create_bd_port -dir I -from 31 -to 0 adc_ddata # adc peripherals @@ -67,187 +32,46 @@ set_property -dict [list CONFIG.C_CYCLIC {0}] $axi_ad9652_dma set_property -dict [list CONFIG.C_DMA_DATA_WIDTH_DEST {64}] $axi_ad9652_dma set_property -dict [list CONFIG.C_FIFO_SIZE {8}] $axi_ad9652_dma -if {$sys_zynq == 0} { - - set axi_fmcomms6_gpio [create_bd_cell -type ip -vlnv xilinx.com:ip:axi_gpio:2.0 axi_fmcomms6_gpio] - set_property -dict [list CONFIG.C_IS_DUAL {0}] $axi_fmcomms6_gpio - set_property -dict [list CONFIG.C_GPIO_WIDTH {1}] $axi_fmcomms6_gpio - set_property -dict [list CONFIG.C_INTERRUPT_PRESENT {1}] $axi_fmcomms6_gpio - - set axi_fmcomms6_spi [create_bd_cell -type ip -vlnv xilinx.com:ip:axi_quad_spi:3.1 axi_fmcomms6_spi] - set_property -dict [list CONFIG.C_USE_STARTUP {0}] $axi_fmcomms6_spi - set_property -dict [list CONFIG.C_NUM_SS_BITS {3}] $axi_fmcomms6_spi - set_property -dict [list CONFIG.C_SCK_RATIO {8}] $axi_fmcomms6_spi -} - -# additions to default configuration - -if {$sys_zynq == 1} { - - set_property -dict [list CONFIG.NUM_MI {9}] $axi_cpu_interconnect - set_property -dict [list CONFIG.PCW_USE_S_AXI_HP1 {1}] $sys_ps7 - set_property -dict [list CONFIG.PCW_EN_CLK2_PORT {1}] $sys_ps7 - set_property -dict [list CONFIG.PCW_EN_RST2_PORT {1}] $sys_ps7 - set_property -dict [list CONFIG.PCW_FPGA2_PERIPHERAL_FREQMHZ {170.0}] $sys_ps7 - set_property -dict [list CONFIG.PCW_GPIO_EMIO_GPIO_IO {17}] $sys_ps7 - set_property -dict [list CONFIG.PCW_SPI0_PERIPHERAL_ENABLE {1}] $sys_ps7 - set_property -dict [list CONFIG.PCW_SPI0_SPI0_IO {EMIO}] $sys_ps7 - - set_property LEFT 16 [get_bd_ports GPIO_I] - set_property LEFT 16 [get_bd_ports GPIO_O] - set_property LEFT 16 [get_bd_ports GPIO_T] - -} else { - - set_property -dict [list CONFIG.NUM_MI {11}] $axi_cpu_interconnect - set_property -dict [list CONFIG.NUM_SI {9}] $axi_mem_interconnect -} - -# connections (spi and gpio) - -if {$sys_zynq == 1 } { - - connect_bd_net -net spi_csn_2_o [get_bd_ports spi_csn_2_o] [get_bd_pins sys_ps7/SPI0_SS2_O] - connect_bd_net -net spi_csn_1_o [get_bd_ports spi_csn_1_o] [get_bd_pins sys_ps7/SPI0_SS1_O] - connect_bd_net -net spi_csn_0_o [get_bd_ports spi_csn_0_o] [get_bd_pins sys_ps7/SPI0_SS_O] - connect_bd_net -net spi_csn_i [get_bd_ports spi_csn_i] [get_bd_pins sys_ps7/SPI0_SS_I] - connect_bd_net -net spi_clk_i [get_bd_ports spi_clk_i] [get_bd_pins sys_ps7/SPI0_SCLK_I] - connect_bd_net -net spi_clk_o [get_bd_ports spi_clk_o] [get_bd_pins sys_ps7/SPI0_SCLK_O] - connect_bd_net -net spi_sdo_i [get_bd_ports spi_sdo_i] [get_bd_pins sys_ps7/SPI0_MOSI_I] - connect_bd_net -net spi_sdo_o [get_bd_ports spi_sdo_o] [get_bd_pins sys_ps7/SPI0_MOSI_O] - connect_bd_net -net spi_sdi_i [get_bd_ports spi_sdi_i] [get_bd_pins sys_ps7/SPI0_MISO_I] - -} else { - - connect_bd_net -net spi_csn_i [get_bd_ports spi_csn_i] [get_bd_pins axi_fmcomms6_spi/ss_i] - connect_bd_net -net spi_csn_o [get_bd_ports spi_csn_o] [get_bd_pins axi_fmcomms6_spi/ss_o] - connect_bd_net -net spi_clk_i [get_bd_ports spi_clk_i] [get_bd_pins axi_fmcomms6_spi/sck_i] - connect_bd_net -net spi_clk_o [get_bd_ports spi_clk_o] [get_bd_pins axi_fmcomms6_spi/sck_o] - connect_bd_net -net spi_sdo_i [get_bd_ports spi_sdo_i] [get_bd_pins axi_fmcomms6_spi/io0_i] - connect_bd_net -net spi_sdo_o [get_bd_ports spi_sdo_o] [get_bd_pins axi_fmcomms6_spi/io0_o] - connect_bd_net -net spi_sdi_i [get_bd_ports spi_sdi_i] [get_bd_pins axi_fmcomms6_spi/io1_i] - - connect_bd_net -net gpio_fmcomms6_i [get_bd_ports gpio_fmcomms6_i] [get_bd_pins axi_fmcomms6_gpio/gpio_io_i] - connect_bd_net -net gpio_fmcomms6_o [get_bd_ports gpio_fmcomms6_o] [get_bd_pins axi_fmcomms6_gpio/gpio_io_o] - connect_bd_net -net gpio_fmcomms6_t [get_bd_ports gpio_fmcomms6_t] [get_bd_pins axi_fmcomms6_gpio/gpio_io_t] - - connect_bd_net -net axi_fmcomms6_spi_irq [get_bd_pins axi_fmcomms6_spi/ip2intc_irpt] [get_bd_ports fmcomms6_spi_irq] - connect_bd_net -net axi_fmcomms6_gpio_irq [get_bd_pins axi_fmcomms6_gpio/ip2intc_irpt] [get_bd_ports fmcomms6_gpio_irq] -} - # connections (adc) p_sys_wfifo [current_bd_instance .] sys_wfifo 32 64 -connect_bd_net -net adc_clk [get_bd_ports adc_clk] [get_bd_pins axi_ad9652/adc_clk] [get_bd_pins sys_wfifo/m_clk] -connect_bd_net -net sys_200m_clk [get_bd_pins sys_wfifo/s_clk] [get_bd_pins axi_ad9652_dma/fifo_wr_clk] [get_bd_pins axi_ad9652/delay_clk] -connect_bd_net -net sys_100m_resetn [get_bd_pins sys_wfifo/rstn] $sys_100m_resetn_source - -connect_bd_net -net axi_ad9652_adc_clk_in_p [get_bd_ports adc_clk_in_p] [get_bd_pins axi_ad9652/adc_clk_in_p] -connect_bd_net -net axi_ad9652_adc_clk_in_n [get_bd_ports adc_clk_in_n] [get_bd_pins axi_ad9652/adc_clk_in_n] -connect_bd_net -net axi_ad9652_adc_or_in_p [get_bd_ports adc_or_in_p] [get_bd_pins axi_ad9652/adc_or_in_p] -connect_bd_net -net axi_ad9652_adc_or_in_n [get_bd_ports adc_or_in_n] [get_bd_pins axi_ad9652/adc_or_in_n] -connect_bd_net -net axi_ad9652_adc_data_in_p [get_bd_ports adc_data_in_p] [get_bd_pins axi_ad9652/adc_data_in_p] -connect_bd_net -net axi_ad9652_adc_data_in_n [get_bd_ports adc_data_in_n] [get_bd_pins axi_ad9652/adc_data_in_n] - -connect_bd_net -net axi_ad9652_adc_valid_0 [get_bd_ports adc_valid_0] [get_bd_pins axi_ad9652/adc_valid_0] -connect_bd_net -net axi_ad9652_adc_enable_0 [get_bd_ports adc_enable_0] [get_bd_pins axi_ad9652/adc_enable_0] -connect_bd_net -net axi_ad9652_adc_data_0 [get_bd_ports adc_data_0] [get_bd_pins axi_ad9652/adc_data_0] -connect_bd_net -net axi_ad9652_adc_valid_1 [get_bd_ports adc_valid_1] [get_bd_pins axi_ad9652/adc_valid_1] -connect_bd_net -net axi_ad9652_adc_enable_1 [get_bd_ports adc_enable_1] [get_bd_pins axi_ad9652/adc_enable_1] -connect_bd_net -net axi_ad9652_adc_data_1 [get_bd_ports adc_data_1] [get_bd_pins axi_ad9652/adc_data_1] -connect_bd_net -net axi_ad9652_adc_dovf [get_bd_pins axi_ad9652/adc_dovf] [get_bd_pins sys_wfifo/m_wovf] - -connect_bd_net -net axi_ad9652_fifo_wr [get_bd_ports adc_dma_wr] [get_bd_pins sys_wfifo/m_wr] -connect_bd_net -net axi_ad9652_fifo_wdata [get_bd_ports adc_dma_wdata] [get_bd_pins sys_wfifo/m_wdata] - -connect_bd_net -net axi_ad9652_dma_dwr [get_bd_pins sys_wfifo/s_wr] [get_bd_pins axi_ad9652_dma/fifo_wr_en] -connect_bd_net -net axi_ad9652_dma_dsync [get_bd_ports adc_dma_sync] [get_bd_pins axi_ad9652_dma/fifo_wr_sync] -connect_bd_net -net axi_ad9652_dma_ddata [get_bd_pins sys_wfifo/s_wdata] [get_bd_pins axi_ad9652_dma/fifo_wr_din] -connect_bd_net -net axi_ad9652_dma_dovf [get_bd_pins sys_wfifo/s_wovf] [get_bd_pins axi_ad9652_dma/fifo_wr_overflow] -connect_bd_net -net axi_ad9652_dma_irq [get_bd_pins axi_ad9652_dma/irq] [get_bd_ports fmcomms6_dma_irq] +ad_connect adc_clk_in_p axi_ad9652/adc_clk_in_p +ad_connect adc_clk_in_n axi_ad9652/adc_clk_in_n +ad_connect adc_or_in_p axi_ad9652/adc_or_in_p +ad_connect adc_or_in_n axi_ad9652/adc_or_in_n +ad_connect adc_data_in_p axi_ad9652/adc_data_in_p +ad_connect adc_data_in_n axi_ad9652/adc_data_in_n +ad_connect axi_ad9652/adc_clk adc_clk +ad_connect axi_ad9652/adc_clk sys_wfifo/adc_clk +ad_connect axi_ad9652/adc_dovf sys_wfifo/adc_wovf +ad_connect sys_200m_clk sys_wfifo/dma_clk +ad_connect sys_200m_clk axi_ad9652/delay_clk +ad_connect sys_200m_clk axi_ad9652_dma/fifo_wr_clk +ad_connect adc_valid_0 axi_ad9652/adc_valid_0 +ad_connect adc_enable_0 axi_ad9652/adc_enable_0 +ad_connect adc_data_0 axi_ad9652/adc_data_0 +ad_connect adc_valid_1 axi_ad9652/adc_valid_1 +ad_connect adc_enable_1 axi_ad9652/adc_enable_1 +ad_connect adc_data_1 axi_ad9652/adc_data_1 +ad_connect adc_dwr sys_wfifo/adc_wr +ad_connect adc_ddata sys_wfifo/adc_wdata +ad_connect sys_wfifo/dma_wr axi_ad9652_dma/fifo_wr_en +ad_connect sys_wfifo/dma_wdata axi_ad9652_dma/fifo_wr_din +ad_connect sys_wfifo/dma_wovf axi_ad9652_dma/fifo_wr_overflow # interconnect (cpu) -connect_bd_intf_net -intf_net axi_cpu_interconnect_m07_axi [get_bd_intf_pins axi_cpu_interconnect/M07_AXI] [get_bd_intf_pins axi_ad9652/s_axi] -connect_bd_intf_net -intf_net axi_cpu_interconnect_m08_axi [get_bd_intf_pins axi_cpu_interconnect/M08_AXI] [get_bd_intf_pins axi_ad9652_dma/s_axi] -connect_bd_net -net sys_100m_clk [get_bd_pins axi_cpu_interconnect/M07_ACLK] $sys_100m_clk_source -connect_bd_net -net sys_100m_clk [get_bd_pins axi_cpu_interconnect/M08_ACLK] $sys_100m_clk_source -connect_bd_net -net sys_100m_resetn [get_bd_pins axi_cpu_interconnect/M07_ARESETN] $sys_100m_resetn_source -connect_bd_net -net sys_100m_resetn [get_bd_pins axi_cpu_interconnect/M08_ARESETN] $sys_100m_resetn_source -connect_bd_net -net sys_100m_clk [get_bd_pins axi_ad9652/s_axi_aclk] -connect_bd_net -net sys_100m_clk [get_bd_pins axi_ad9652_dma/s_axi_aclk] -connect_bd_net -net sys_100m_resetn [get_bd_pins axi_ad9652/s_axi_aresetn] -connect_bd_net -net sys_100m_resetn [get_bd_pins axi_ad9652_dma/s_axi_aresetn] - -if {$sys_zynq == 0} { - - connect_bd_intf_net -intf_net axi_cpu_interconnect_m09_axi [get_bd_intf_pins axi_cpu_interconnect/M09_AXI] [get_bd_intf_pins axi_fmcomms6_spi/axi_lite] - connect_bd_intf_net -intf_net axi_cpu_interconnect_m10_axi [get_bd_intf_pins axi_cpu_interconnect/M10_AXI] [get_bd_intf_pins axi_fmcomms6_gpio/s_axi] - connect_bd_net -net sys_100m_clk [get_bd_pins axi_cpu_interconnect/M09_ACLK] $sys_100m_clk_source - connect_bd_net -net sys_100m_clk [get_bd_pins axi_cpu_interconnect/M10_ACLK] $sys_100m_clk_source - connect_bd_net -net sys_100m_resetn [get_bd_pins axi_cpu_interconnect/M09_ARESETN] $sys_100m_resetn_source - connect_bd_net -net sys_100m_resetn [get_bd_pins axi_cpu_interconnect/M10_ARESETN] $sys_100m_resetn_source - connect_bd_net -net sys_100m_clk [get_bd_pins axi_fmcomms6_spi/s_axi_aclk] - connect_bd_net -net sys_100m_clk [get_bd_pins axi_fmcomms6_gpio/s_axi_aclk] - connect_bd_net -net sys_100m_clk [get_bd_pins axi_fmcomms6_spi/ext_spi_clk] - connect_bd_net -net sys_100m_resetn [get_bd_pins axi_fmcomms6_spi/s_axi_aresetn] - connect_bd_net -net sys_100m_resetn [get_bd_pins axi_fmcomms6_gpio/s_axi_aresetn] -} - -# memory interconnects share the same clock (fclk2) - -if {$sys_zynq == 1} { - set sys_fmc_dma_clk_source [get_bd_pins sys_ps7/FCLK_CLK2] - connect_bd_net -net sys_fmc_dma_clk $sys_fmc_dma_clk_source - set_property -dict [list CONFIG.C_DMA_AXI_PROTOCOL_DEST {1}] $axi_ad9652_dma -} +ad_cpu_interconnect 0x79020000 axi_ad9652 +ad_cpu_interconnect 0x7c420000 axi_ad9652_dma # interconnect (mem/adc) -if {$sys_zynq == 0} { +ad_mem_hp1_interconnect sys_200m_clk sys_ps7/S_AXI_HP1 +ad_mem_hp1_interconnect sys_200m_clk axi_ad9652_dma/m_dest_axi +ad_connect sys_cpu_resetn axi_ad9652_dma/m_dest_axi_aresetn - connect_bd_intf_net -intf_net axi_mem_interconnect_s08_axi [get_bd_intf_pins axi_mem_interconnect/S08_AXI] [get_bd_intf_pins axi_ad9652_dma/m_dest_axi] - connect_bd_net -net sys_200m_clk [get_bd_pins axi_mem_interconnect/S08_ACLK] $sys_200m_clk_source - connect_bd_net -net sys_200m_clk [get_bd_pins axi_ad9652_dma/m_dest_axi_aclk] - connect_bd_net -net sys_100m_resetn [get_bd_pins axi_mem_interconnect/S08_ARESETN] $sys_100m_resetn_source - connect_bd_net -net sys_100m_resetn [get_bd_pins axi_ad9652_dma/m_dest_axi_aresetn] +# interrupts -} else { +ad_cpu_interrupt ps-13 mb-13 axi_ad9652_dma/irq - connect_bd_intf_net -intf_net axi_ad9652_dma_axi [get_bd_intf_pins axi_ad9652_dma/m_dest_axi] [get_bd_intf_pins sys_ps7/S_AXI_HP1] - connect_bd_net -net sys_fmc_dma_clk [get_bd_pins axi_ad9652_dma/m_dest_axi_aclk] - connect_bd_net -net sys_fmc_dma_clk [get_bd_pins sys_ps7/S_AXI_HP1_ACLK] - connect_bd_net -net sys_100m_resetn [get_bd_pins axi_ad9652_dma/m_dest_axi_aresetn] -} - -# ila (adc) - -set ila_adc [create_bd_cell -type ip -vlnv xilinx.com:ip:ila:4.0 ila_adc] -set_property -dict [list CONFIG.C_MONITOR_TYPE {Native}] $ila_adc -set_property -dict [list CONFIG.C_NUM_OF_PROBES {3}] $ila_adc -set_property -dict [list CONFIG.C_PROBE0_WIDTH {1}] $ila_adc -set_property -dict [list CONFIG.C_PROBE1_WIDTH {64}] $ila_adc -set_property -dict [list CONFIG.C_PROBE2_WIDTH {1}] $ila_adc -set_property -dict [list CONFIG.C_TRIGIN_EN {false}] $ila_adc - -connect_bd_net -net sys_200m_clk [get_bd_pins ila_adc/clk] -connect_bd_net -net axi_ad9652_dma_dwr [get_bd_pins ila_adc/probe0] -connect_bd_net -net axi_ad9652_dma_ddata [get_bd_pins ila_adc/probe1] -connect_bd_net -net axi_ad9652_dma_dovf [get_bd_pins ila_adc/probe2] - -# address map - -create_bd_addr_seg -range 0x00010000 -offset 0x79020000 $sys_addr_cntrl_space [get_bd_addr_segs axi_ad9652/s_axi/axi_lite] SEG_data_ad9652 -create_bd_addr_seg -range 0x00010000 -offset 0x7c420000 $sys_addr_cntrl_space [get_bd_addr_segs axi_ad9652_dma/s_axi/axi_lite] SEG_data_ad9652_dma - -if {$sys_zynq == 0} { - create_bd_addr_seg -range 0x00010000 -offset 0x44A70000 $sys_addr_cntrl_space [get_bd_addr_segs axi_fmcomms6_spi/axi_lite/Reg] SEG_data_fmcomms6_spi - create_bd_addr_seg -range 0x00010000 -offset 0x40030000 $sys_addr_cntrl_space [get_bd_addr_segs axi_fmcomms6_gpio/s_axi/Reg] SEG_data_gpio_3 -} - -if {$sys_zynq == 0} { - create_bd_addr_seg -range $sys_mem_size -offset 0x80000000 [get_bd_addr_spaces axi_ad9652_dma/m_dest_axi] [get_bd_addr_segs axi_ddr_cntrl/memmap/memaddr] SEG_axi_ddr_cntrl -} else { - create_bd_addr_seg -range $sys_mem_size -offset 0x00000000 [get_bd_addr_spaces axi_ad9652_dma/m_dest_axi] [get_bd_addr_segs sys_ps7/S_AXI_HP1/HP1_DDR_LOWOCM] SEG_sys_ps7_hp1_ddr_lowocm -}