From 697469ee28bd8c4e65713f5db797f4fe05f34f20 Mon Sep 17 00:00:00 2001 From: Rejeesh Kutty Date: Tue, 15 Mar 2016 12:39:38 -0400 Subject: [PATCH] daq1- updates --- projects/daq1/common/daq1_bd.tcl | 8 +-- projects/daq1/zc706/system_constr.xdc | 11 ++-- projects/daq1/zc706/system_top.v | 91 ++++++++++++++------------- 3 files changed, 56 insertions(+), 54 deletions(-) diff --git a/projects/daq1/common/daq1_bd.tcl b/projects/daq1/common/daq1_bd.tcl index b86268444..74b8ad4f9 100644 --- a/projects/daq1/common/daq1_bd.tcl +++ b/projects/daq1/common/daq1_bd.tcl @@ -19,7 +19,7 @@ create_bd_port -dir I -from 13 -to 0 adc_data_in_n # daq1 irq -create_bd_port -dir I daq1_irq +create_bd_port -dir I spi_int # dac peripherals @@ -132,7 +132,7 @@ ad_connect sys_cpu_resetn axi_ad9122_dma/m_src_axi_aresetn # interrupts -ad_cpu_interrupt ps-13 mb-12 axi_ad9122_dma/irq -ad_cpu_interrupt ps-12 mb-13 axi_ad9684_dma/irq -ad_cpu_interrupt ps-11 mb-14 daq1_irq +ad_cpu_interrupt ps-11 mb-11 spi_int +ad_cpu_interrupt ps-12 mb-12 axi_ad9122_dma/irq +ad_cpu_interrupt ps-13 mb-13 axi_ad9684_dma/irq diff --git a/projects/daq1/zc706/system_constr.xdc b/projects/daq1/zc706/system_constr.xdc index f00fd103b..6cdaa0e7f 100644 --- a/projects/daq1/zc706/system_constr.xdc +++ b/projects/daq1/zc706/system_constr.xdc @@ -5,10 +5,8 @@ set_property -dict {PACKAGE_PIN AC28 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get set_property -dict {PACKAGE_PIN AD28 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get_ports dac_clk_in_n] ; ## G03 FMC_LPC_CLK1_M2C_N set_property -dict {PACKAGE_PIN AF29 IOSTANDARD LVDS_25 } [get_ports dac_clk_out_p] ; ## G27 FMC_LPC_LA25_P set_property -dict {PACKAGE_PIN AG29 IOSTANDARD LVDS_25 } [get_ports dac_clk_out_n] ; ## G28 FMC_LPC_LA25_N - set_property -dict {PACKAGE_PIN Y26 IOSTANDARD LVDS_25 } [get_ports dac_frame_out_p] ; ## H37 FMC_LPC_LA32_P set_property -dict {PACKAGE_PIN Y27 IOSTANDARD LVDS_25 } [get_ports dac_frame_out_n] ; ## H38 FMC_LPC_LA32_N - set_property -dict {PACKAGE_PIN AB15 IOSTANDARD LVDS_25 } [get_ports dac_data_out_p[0]] ; ## H19 FMC_LPC_LA15_P set_property -dict {PACKAGE_PIN AB14 IOSTANDARD LVDS_25 } [get_ports dac_data_out_n[0]] ; ## H20 FMC_LPC_LA15_N set_property -dict {PACKAGE_PIN AG26 IOSTANDARD LVDS_25 } [get_ports dac_data_out_p[1]] ; ## G21 FMC_LPC_LA20_P @@ -44,7 +42,6 @@ set_property -dict {PACKAGE_PIN AA30 IOSTANDARD LVDS_25 } [get_ports dac_data set_property -dict {PACKAGE_PIN AE13 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get_ports adc_clk_in_p] ; ## G06 FMC_LPC_LA00_CC_P set_property -dict {PACKAGE_PIN AF13 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get_ports adc_clk_in_n] ; ## G07 FMC_LPC_LA00_CC_N - set_property -dict {PACKAGE_PIN AC14 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get_ports adc_data_in_p[0]] ; ## C14 FMC_LPC_LA10_P set_property -dict {PACKAGE_PIN AC13 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get_ports adc_data_in_n[0]] ; ## C15 FMC_LPC_LA10_N set_property -dict {PACKAGE_PIN AF18 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get_ports adc_data_in_p[1]] ; ## C18 FMC_LPC_LA14_P @@ -74,10 +71,10 @@ set_property -dict {PACKAGE_PIN AF12 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get set_property -dict {PACKAGE_PIN AF15 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get_ports adc_data_in_p[13]] ; ## D08 FMC_LPC_LA01_CC_P set_property -dict {PACKAGE_PIN AG15 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get_ports adc_data_in_n[13]] ; ## D09 FMC_LPC_LA01_CC_N -set_property -dict {PACKAGE_PIN AG17 IOSTANDARD LVCMOS25} [get_ports cpld_sclk] ; ## H04 FMC_LPC_CLK0_M2C_P -set_property -dict {PACKAGE_PIN AG16 IOSTANDARD LVCMOS25} [get_ports cpld_csn] ; ## H05 FMC_LPC_CLK0_M2C_N -set_property -dict {PACKAGE_PIN AE18 IOSTANDARD LVCMOS25} [get_ports cpld_sdio] ; ## G18 FMC_LPC_LA16_P -set_property -dict {PACKAGE_PIN AE17 IOSTANDARD LVCMOS25} [get_ports daq1_irq] ; ## G19 FMC_LPC_LA16_N +set_property -dict {PACKAGE_PIN AG16 IOSTANDARD LVCMOS25} [get_ports spi_csn] ; ## H05 FMC_LPC_CLK0_M2C_N +set_property -dict {PACKAGE_PIN AG17 IOSTANDARD LVCMOS25} [get_ports spi_clk] ; ## H04 FMC_LPC_CLK0_M2C_P +set_property -dict {PACKAGE_PIN AE18 IOSTANDARD LVCMOS25} [get_ports spi_sdio] ; ## G18 FMC_LPC_LA16_P +set_property -dict {PACKAGE_PIN AE17 IOSTANDARD LVCMOS25} [get_ports spi_int] ; ## G19 FMC_LPC_LA16_N # clocks diff --git a/projects/daq1/zc706/system_top.v b/projects/daq1/zc706/system_top.v index c3d8dfcdc..109232e4a 100644 --- a/projects/daq1/zc706/system_top.v +++ b/projects/daq1/zc706/system_top.v @@ -34,8 +34,6 @@ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // *************************************************************************** // *************************************************************************** -// *************************************************************************** -// *************************************************************************** `timescale 1ns/100ps @@ -91,12 +89,10 @@ module system_top ( adc_data_in_p, adc_data_in_n, - daq1_irq, - - cpld_sclk, - cpld_csn, - cpld_sdio -); + spi_clk, + spi_csn, + spi_sdio, + spi_int); inout [14:0] ddr_addr; inout [ 2:0] ddr_ba; @@ -148,37 +144,47 @@ module system_top ( input [13:0] adc_data_in_p; input [13:0] adc_data_in_n; - input daq1_irq; - - output cpld_sclk; - output cpld_csn; - inout cpld_sdio; + output spi_clk; + output spi_csn; + inout spi_sdio; + input spi_int; // internal signals wire [63:0] gpio_i; wire [63:0] gpio_o; wire [63:0] gpio_t; + wire spi_mosi; + wire spi_miso; // instantiations - ad_iobuf #( - .DATA_WIDTH(15) - ) i_gpio_bd ( - .dio_t(gpio_t[14:0]), - .dio_i(gpio_o[14:0]), - .dio_o(gpio_i[14:0]), - .dio_p(gpio_bd)); + ad_iobuf #(.DATA_WIDTH(15)) i_gpio_bd ( + .dio_t (gpio_t[14:0]), + .dio_i (gpio_o[14:0]), + .dio_o (gpio_i[14:0]), + .dio_p (gpio_bd)); daq1_spi i_spi ( - .spi_csn(cpld_csn), - .spi_clk(cpld_sclk), - .spi_mosi(cpld_mosi), - .spi_miso(cpld_miso), - .spi_sdio(cpld_sdio) - ); + .spi_csn (spi_csn), + .spi_clk (spi_clk), + .spi_mosi (spi_mosi), + .spi_miso (spi_miso), + .spi_sdio (spi_sdio)); system_wrapper i_system_wrapper ( + .adc_clk_in_n (adc_clk_in_n), + .adc_clk_in_p (adc_clk_in_p), + .adc_data_in_n (adc_data_in_n), + .adc_data_in_p (adc_data_in_p), + .dac_clk_in_n (dac_clk_in_n), + .dac_clk_in_p (dac_clk_in_p), + .dac_clk_out_n (dac_clk_out_n), + .dac_clk_out_p (dac_clk_out_p), + .dac_data_out_n (dac_data_out_n), + .dac_data_out_p (dac_data_out_p), + .dac_frame_out_n (dac_frame_out_n), + .dac_frame_out_p (dac_frame_out_p), .ddr_addr (ddr_addr), .ddr_ba (ddr_ba), .ddr_cas_n (ddr_cas_n), @@ -223,25 +229,24 @@ module system_top ( .ps_intr_10 (1'b0), .spdif (spdif), .spi0_clk_i (1'b0), - .spi0_clk_o (cpld_sclk), - .spi0_csn_0_o (cpld_csn), + .spi0_clk_o (spi_clk), + .spi0_csn_0_o (spi_csn), + .spi0_csn_1_o (), + .spi0_csn_2_o (), .spi0_csn_i (1'b1), - .spi0_sdi_i (cpld_miso), + .spi0_sdi_i (spi_miso), .spi0_sdo_i (1'b0), - .spi0_sdo_o (cpld_mosi), - .dac_clk_in_p (dac_clk_in_p), - .dac_clk_in_n (dac_clk_in_n), - .dac_clk_out_p (dac_clk_out_p), - .dac_clk_out_n (dac_clk_out_n), - .dac_frame_out_p (dac_frame_out_p), - .dac_frame_out_n (dac_frame_out_n), - .dac_data_out_p (dac_data_out_p), - .dac_data_out_n (dac_data_out_n), - .adc_clk_in_p (adc_clk_in_p), - .adc_clk_in_n (adc_clk_in_n), - .adc_data_in_p (adc_data_in_p), - .adc_data_in_n (adc_data_in_n), - .daq1_irq (daq1_irq)); + .spi0_sdo_o (spi_mosi), + .spi1_clk_i (1'b0), + .spi1_clk_o (), + .spi1_csn_0_o (), + .spi1_csn_1_o (), + .spi1_csn_2_o (), + .spi1_csn_i (1'b1), + .spi1_sdi_i (1'b0), + .spi1_sdo_i (1'b0), + .spi1_sdo_o (), + .spi_int (spi_int)); endmodule