diff --git a/projects/ad9434_fmc/common/ad9434_bd.tcl b/projects/ad9434_fmc/common/ad9434_bd.tcl index 16d556dc0..5a04e9817 100644 --- a/projects/ad9434_fmc/common/ad9434_bd.tcl +++ b/projects/ad9434_fmc/common/ad9434_bd.tcl @@ -9,13 +9,14 @@ set adc_or_n [create_bd_port -dir I adc_or_n] # spi interface -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_csn_i [create_bd_port -dir I spi_csn_i] -set spi_csn_o [create_bd_port -dir O spi_csn_o] -set spi_mosi_i [create_bd_port -dir I spi_mosi_i] -set spi_mosi_o [create_bd_port -dir O spi_mosi_o] -set spi_miso_i [create_bd_port -dir I spi_miso_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_csn_i [create_bd_port -dir I spi_csn_i] +set spi_csn_adc_o [create_bd_port -dir O spi_csn_adc_o] +set spi_csn_clk_o [create_bd_port -dir O spi_csn_clk_o] +set spi_mosi_i [create_bd_port -dir I spi_mosi_i] +set spi_mosi_o [create_bd_port -dir O spi_mosi_o] +set spi_miso_i [create_bd_port -dir I spi_miso_i] # ad9434 @@ -54,13 +55,14 @@ set_property -dict [list CONFIG.PCW_SPI0_SPI0_IO {EMIO}] $sys_ps7 # spi connections -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_csn_o [get_bd_ports spi_csn_o] [get_bd_pins sys_ps7/SPI0_SS_O] -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_0] -connect_bd_net -net spi_mosi_i [get_bd_ports spi_mosi_i] [get_bd_pins sys_ps7/SPI0_MOSI_I] -connect_bd_net -net spi_mosi_o [get_bd_ports spi_mosi_o] [get_bd_pins sys_ps7/SPI0_MOSI_O] -connect_bd_net -net spi_miso_i [get_bd_ports spi_miso_i] [get_bd_pins sys_ps7/SPI0_MISO_I] +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_csn_adc_o [get_bd_ports spi_csn_adc_o] [get_bd_pins sys_ps7/SPI0_SS_O] +connect_bd_net -net spi_csn_clk_o [get_bd_ports spi_csn_clk_o] [get_bd_pins sys_ps7/SPI0_SS1_O] +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_mosi_i [get_bd_ports spi_mosi_i] [get_bd_pins sys_ps7/SPI0_MOSI_I] +connect_bd_net -net spi_mosi_o [get_bd_ports spi_mosi_o] [get_bd_pins sys_ps7/SPI0_MOSI_O] +connect_bd_net -net spi_miso_i [get_bd_ports spi_miso_i] [get_bd_pins sys_ps7/SPI0_MISO_I] # ad9434 connections diff --git a/projects/ad9434_fmc/zc706/system_constr.xdc b/projects/ad9434_fmc/zc706/system_constr.xdc index 11a8ede8a..99da754ab 100644 --- a/projects/ad9434_fmc/zc706/system_constr.xdc +++ b/projects/ad9434_fmc/zc706/system_constr.xdc @@ -33,10 +33,10 @@ set_property -dict {PACKAGE_PIN AC12 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get_ # spi -set_property -dict {PACKAGE_PIN Y30 IOSTANDARD LVDS_25} [get_ports spi_csn_clk] ; ## G36 FMC_LPC_LA33_P -set_property -dict {PACKAGE_PIN AA30 IOSTANDARD LVDS_25} [get_ports spi_csn_adc] ; ## G37 FMC_LPC_LA33_N -set_property -dict {PACKAGE_PIN Y27 IOSTANDARD LVDS_25} [get_ports spi_sclk] ; ## H38 FMC_LPC_LA32_N -set_property -dict {PACKAGE_PIN Y26 IOSTANDARD LVDS_25} [get_ports spi_dio] ; ## H37 FMC_LPC_LA32_P +set_property -dict {PACKAGE_PIN Y30 IOSTANDARD LVCMOS25} [get_ports spi_csn_clk] ; ## G36 FMC_LPC_LA33_P +set_property -dict {PACKAGE_PIN AA30 IOSTANDARD LVCMOS25} [get_ports spi_csn_adc] ; ## G37 FMC_LPC_LA33_N +set_property -dict {PACKAGE_PIN Y27 IOSTANDARD LVCMOS25} [get_ports spi_sclk] ; ## H38 FMC_LPC_LA32_N +set_property -dict {PACKAGE_PIN Y26 IOSTANDARD LVCMOS25} [get_ports spi_dio] ; ## H37 FMC_LPC_LA32_P # clocks diff --git a/projects/ad9434_fmc/zc706/system_top.v b/projects/ad9434_fmc/zc706/system_top.v index 9ea84b145..f86f78748 100644 --- a/projects/ad9434_fmc/zc706/system_top.v +++ b/projects/ad9434_fmc/zc706/system_top.v @@ -142,10 +142,12 @@ module system_top ( wire [31:0] gpio_i; wire [31:0] gpio_o; wire [31:0] gpio_t; - wire [ 1:0] spi_csn; wire spi_miso; wire spi_mosi; + wire spi_csn_adc; + wire spi_csn_clk; + // instantiations genvar n; @@ -159,11 +161,8 @@ module system_top ( end endgenerate - assign spi_csn_adc = spi_csn[0]; - assign spi_csn_clk = spi_csn[1]; - ad9434_spi i_spi ( - .spi_csn(spi_csn), + .spi_csn({spi_csn_clk, spi_csn_adc}), .spi_clk(spi_sclk), .spi_mosi(spi_mosi), .spi_miso(spi_miso), @@ -212,10 +211,11 @@ module system_top ( .spi_clk_i(1'b0), .spi_clk_o(spi_sclk), .spi_csn_i(1'b1), - .spi_csn_o(spi_csn), - .spi_mosi_i(spi_miso), - .spi_mosi_o(1'b0), - .spi_miso_i(spi_mosi)); + .spi_csn_adc_o(spi_csn_adc), + .spi_csn_clk_o(spi_csn_clk), + .spi_mosi_i(spi_mosi), + .spi_mosi_o(spi_mosi), + .spi_miso_i(spi_miso)); endmodule