diff --git a/projects/fmcomms8/zcu102/Makefile b/projects/fmcomms8/zcu102/Makefile index 752e6628f4..e2d534a125 100644 --- a/projects/fmcomms8/zcu102/Makefile +++ b/projects/fmcomms8/zcu102/Makefile @@ -6,7 +6,6 @@ PROJECT_NAME := fmcomms8_zcu102 -M_DEPS += ../common/fmcomms8_spi.v M_DEPS += ../common/fmcomms8_bd.tcl M_DEPS += ../../scripts/adi_pd.tcl M_DEPS += ../../common/zcu102/zcu102_system_constr.xdc @@ -14,6 +13,7 @@ M_DEPS += ../../common/zcu102/zcu102_system_bd.tcl M_DEPS += ../../common/xilinx/dacfifo_bd.tcl M_DEPS += ../../../library/jesd204/scripts/jesd204.tcl M_DEPS += ../../../library/common/ad_iobuf.v +M_DEPS += ../../../library/common/ad_3w_spi.v LIB_DEPS += axi_dmac LIB_DEPS += axi_sysid diff --git a/projects/fmcomms8/zcu102/system_project.tcl b/projects/fmcomms8/zcu102/system_project.tcl index 90421883fe..37444a1a0f 100644 --- a/projects/fmcomms8/zcu102/system_project.tcl +++ b/projects/fmcomms8/zcu102/system_project.tcl @@ -38,7 +38,7 @@ adi_project fmcomms8_zcu102 0 [list \ adi_project_files fmcomms8_zcu102 [list \ "system_top.v" \ "system_constr.xdc"\ - "../common/fmcomms8_spi.v" \ + "$ad_hdl_dir/library/common/ad_3w_spi.v" \ "$ad_hdl_dir/library/common/ad_iobuf.v" \ "$ad_hdl_dir/projects/common/zcu102/zcu102_system_constr.xdc" ] diff --git a/projects/fmcomms8/zcu102/system_top.v b/projects/fmcomms8/zcu102/system_top.v index b0a04af026..e3c2fdc1d7 100644 --- a/projects/fmcomms8/zcu102/system_top.v +++ b/projects/fmcomms8/zcu102/system_top.v @@ -176,13 +176,18 @@ module system_top ( assign spi_csn_adrv9009_d = spi_3_to_8_csn[1]; assign spi_csn_hmc7044 = spi_3_to_8_csn[2]; - fmcomms8_spi i_spi ( - .spi_csn(spi_3_to_8_csn), - .spi_clk(spi_clk), - .spi_mosi(spi_mosi), - .spi_miso_i(spi_miso), - .spi_miso_o(spi0_miso), - .spi_sdio(spi_sdio)); + ad_3w_spi #( + .NUM_OF_SLAVES(1) + ) fmcomms8_spi ( + .spi_csn (spi_3_to_8_csn[2]), + .spi_clk (spi_clk), + .spi_mosi (spi_mosi), + .spi_miso (fmcomms8_miso_3w), + .spi_sdio (spi_sdio), + .spi_dir ()); + + assign spi0_miso = ~spi_3_to_8_csn[2] ? fmcomms8_miso_3w : spi_miso; + assign spi_sdio = ~&spi_3_to_8_csn[1:0] ? spi_mosi : 1'bz; assign tx_sync = tx_sync_c & tx_sync_d;