diff --git a/projects/cn0363/Makefile b/projects/cn0363/Makefile index 141f88d2a..97649c5b4 100644 --- a/projects/cn0363/Makefile +++ b/projects/cn0363/Makefile @@ -8,14 +8,17 @@ .PHONY: all clean clean-all all: -make -C zed all + -make -C microzed all clean: make -C zed clean + make -C microzed clean clean-all: make -C zed clean-all + make -C microzed clean-all #################################################################################### #################################################################################### diff --git a/projects/cn0363/microzed/Makefile b/projects/cn0363/microzed/Makefile new file mode 100644 index 000000000..103980135 --- /dev/null +++ b/projects/cn0363/microzed/Makefile @@ -0,0 +1,101 @@ +#################################################################################### +#################################################################################### +## Copyright 2011(c) Analog Devices, Inc. +## Auto-generated, do not modify! +#################################################################################### +#################################################################################### + +M_DEPS += system_top.v +M_DEPS += system_project.tcl +M_DEPS += system_constr.xdc +M_DEPS += system_bd.tcl +M_DEPS += ../../scripts/adi_project.tcl +M_DEPS += ../../scripts/adi_env.tcl +M_DEPS += ../../scripts/adi_board.tcl +M_DEPS += ../../common/microzed/microzed_system_constr.xdc +M_DEPS += ../../common/microzed/microzed_system_bd.tcl +M_DEPS += ../../../library/common/ad_iobuf.v +M_DEPS += ../../../library/axi_clkgen/axi_clkgen.xpr +M_DEPS += ../../../library/axi_dmac/axi_dmac.xpr +M_DEPS += ../../../library/axi_generic_adc/axi_generic_adc.xpr +M_DEPS += ../../../library/axi_hdmi_tx/axi_hdmi_tx.xpr +M_DEPS += ../../../library/axi_i2s_adi/axi_i2s_adi.xpr +M_DEPS += ../../../library/axi_spdif_tx/axi_spdif_tx.xpr +M_DEPS += ../../../library/spi_engine/axi_spi_engine/axi_spi_engine.xpr +M_DEPS += ../../../library/cn0363/cn0363_dma_sequencer/cn0363_dma_sequencer.xpr +M_DEPS += ../../../library/cn0363/cn0363_phase_data_sync/cn0363_phase_data_sync.xpr +M_DEPS += ../../../library/cordic_demod/cordic_demod.xpr +M_DEPS += ../../../library/spi_engine/spi_engine_execution/spi_engine_execution.xpr +M_DEPS += ../../../library/spi_engine/spi_engine_interconnect/spi_engine_interconnect.xpr +M_DEPS += ../../../library/spi_engine/spi_engine_offload/spi_engine_offload.xpr +M_DEPS += ../../../library/util_axis_resize/util_axis_resize.xpr +M_DEPS += ../../../library/util_i2c_mixer/util_i2c_mixer.xpr +M_DEPS += ../../../library/util_sigma_delta_spi/util_sigma_delta_spi.xpr + +M_VIVADO := vivado -mode batch -source + +M_FLIST := *.cache +M_FLIST += *.data +M_FLIST += *.xpr +M_FLIST += *.log +M_FLIST += *.jou +M_FLIST += xgui +M_FLIST += *.runs +M_FLIST += *.srcs +M_FLIST += *.sdk +M_FLIST += .Xil + + + +.PHONY: all lib clean clean-all +all: lib cn0363_microzed.sdk/system_top.hdf + + +clean: + rm -rf $(M_FLIST) + + +clean-all:clean + make -C ../../../library/axi_clkgen clean + make -C ../../../library/axi_dmac clean + make -C ../../../library/axi_generic_adc clean + make -C ../../../library/axi_hdmi_tx clean + make -C ../../../library/axi_i2s_adi clean + make -C ../../../library/axi_spdif_tx clean + make -C ../../../library/spi_engine/axi_spi_engine clean + make -C ../../../library/cn0363/cn0363_dma_sequencer clean + make -C ../../../library/cn0363/cn0363_phase_data_sync clean + make -C ../../../library/cordic_demod clean + make -C ../../../library/spi_engine/spi_engine_execution clean + make -C ../../../library/spi_engine/spi_engine_interconnect clean + make -C ../../../library/spi_engine/spi_engine_offload clean + make -C ../../../library/util_axis_resize clean + make -C ../../../library/util_i2c_mixer clean + make -C ../../../library/util_sigma_delta_spi clean + + +cn0363_microzed.sdk/system_top.hdf: $(M_DEPS) + rm -rf $(M_FLIST) + $(M_VIVADO) system_project.tcl >> cn0363_microzed_vivado.log 2>&1 + + +lib: + make -C ../../../library/axi_clkgen + make -C ../../../library/axi_dmac + make -C ../../../library/axi_generic_adc + make -C ../../../library/axi_hdmi_tx + make -C ../../../library/axi_i2s_adi + make -C ../../../library/axi_spdif_tx + make -C ../../../library/spi_engine/axi_spi_engine + make -C ../../../library/cn0363/cn0363_dma_sequencer + make -C ../../../library/cn0363/cn0363_phase_data_sync + make -C ../../../library/cordic_demod + make -C ../../../library/spi_engine/spi_engine_execution + make -C ../../../library/spi_engine/spi_engine_interconnect + make -C ../../../library/spi_engine/spi_engine_offload + make -C ../../../library/util_axis_resize + make -C ../../../library/util_i2c_mixer + make -C ../../../library/util_sigma_delta_spi + +#################################################################################### +#################################################################################### diff --git a/projects/cn0363/microzed/system_bd.tcl b/projects/cn0363/microzed/system_bd.tcl new file mode 100644 index 000000000..6c09795d3 --- /dev/null +++ b/projects/cn0363/microzed/system_bd.tcl @@ -0,0 +1,3 @@ + +source $ad_hdl_dir/projects/common/microzed/microzed_system_bd.tcl +source ../common/cn0363_bd.tcl diff --git a/projects/cn0363/microzed/system_constr.xdc b/projects/cn0363/microzed/system_constr.xdc new file mode 100644 index 000000000..0816b1b0a --- /dev/null +++ b/projects/cn0363/microzed/system_constr.xdc @@ -0,0 +1,23 @@ + +# PL PMOD + +set_property PACKAGE_PIN G17 [get_ports gain0_o] +set_property IOSTANDARD LVCMOS33 [get_ports gain0_o] +set_property PACKAGE_PIN G18 [get_ports gain1_o] +set_property IOSTANDARD LVCMOS33 [get_ports gain1_o] +set_property PACKAGE_PIN F19 [get_ports {spi_cs[1]}] +set_property IOSTANDARD LVCMOS33 [get_ports {spi_cs[1]}] +set_property PACKAGE_PIN F20 [get_ports led_clk_o] +set_property IOSTANDARD LVCMOS33 [get_ports led_clk_o] + +set_property PACKAGE_PIN N15 [get_ports {spi_cs[0]}] +set_property IOSTANDARD LVCMOS33 [get_ports {spi_cs[0]}] +set_property PACKAGE_PIN N16 [get_ports spi_sdo] +set_property IOSTANDARD LVCMOS33 [get_ports spi_sdo] +set_property PULLUP true [get_ports spi_sdo] +set_property PACKAGE_PIN L14 [get_ports spi_sdi] +set_property IOSTANDARD LVCMOS33 [get_ports spi_sdi] +set_property PULLUP true [get_ports spi_sdi] +set_property PACKAGE_PIN L15 [get_ports spi_sclk] +set_property IOSTANDARD LVCMOS33 [get_ports spi_sclk] + diff --git a/projects/cn0363/microzed/system_project.tcl b/projects/cn0363/microzed/system_project.tcl new file mode 100644 index 000000000..a66ba45b8 --- /dev/null +++ b/projects/cn0363/microzed/system_project.tcl @@ -0,0 +1,12 @@ +source ../../scripts/adi_env.tcl +source $ad_hdl_dir/projects/scripts/adi_project.tcl +source $ad_hdl_dir/projects/scripts/adi_board.tcl + +adi_project_create cn0363_microzed +adi_project_files cn0363_microzed [list \ + "system_top.v" \ + "system_constr.xdc" \ + "$ad_hdl_dir/projects/common/microzed/microzed_system_constr.xdc" \ + "$ad_hdl_dir/library/common/ad_iobuf.v"] + +adi_project_run cn0363_microzed diff --git a/projects/cn0363/microzed/system_top.v b/projects/cn0363/microzed/system_top.v new file mode 100644 index 000000000..f6ea4ce35 --- /dev/null +++ b/projects/cn0363/microzed/system_top.v @@ -0,0 +1,180 @@ +// *************************************************************************** +// *************************************************************************** +// Copyright 2011(c) Analog Devices, Inc. +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// - Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// - Neither the name of Analog Devices, Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// - The use of this software may or may not infringe the patent rights +// of one or more patent holders. This license does not release you +// from the requirement that you obtain separate licenses from these +// patent holders to use this software. +// - Use of the software either in source or binary form, must be run +// on or directly connected to an Analog Devices Inc. component. +// +// THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. +// +// IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY +// RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// *************************************************************************** +// *************************************************************************** +// *************************************************************************** +// *************************************************************************** + +`timescale 1ns/100ps + +module system_top ( + ddr_addr, + ddr_ba, + ddr_cas_n, + ddr_ck_n, + ddr_ck_p, + ddr_cke, + ddr_cs_n, + ddr_dm, + ddr_dq, + ddr_dqs_n, + ddr_dqs_p, + ddr_odt, + ddr_ras_n, + ddr_reset_n, + ddr_we_n, + + fixed_io_ddr_vrn, + fixed_io_ddr_vrp, + fixed_io_mio, + fixed_io_ps_clk, + fixed_io_ps_porb, + fixed_io_ps_srstb, + + spi_sdo, + spi_sdi, + spi_cs, + spi_sclk, + led_clk_o, + gain0_o, + gain1_o, + + otg_vbusoc); + + inout [14:0] ddr_addr; + inout [ 2:0] ddr_ba; + inout ddr_cas_n; + inout ddr_ck_n; + inout ddr_ck_p; + inout ddr_cke; + inout ddr_cs_n; + inout [ 3:0] ddr_dm; + inout [31:0] ddr_dq; + inout [ 3:0] ddr_dqs_n; + inout [ 3:0] ddr_dqs_p; + inout ddr_odt; + inout ddr_ras_n; + inout ddr_reset_n; + inout ddr_we_n; + + inout fixed_io_ddr_vrn; + inout fixed_io_ddr_vrp; + inout [53:0] fixed_io_mio; + inout fixed_io_ps_clk; + inout fixed_io_ps_porb; + inout fixed_io_ps_srstb; + + input spi_sdi; + inout spi_sdo; + output spi_sclk; + output [ 1:0] spi_cs; + output led_clk_o; + output gain0_o; + output gain1_o; + + input otg_vbusoc; + + // internal signals + + wire [34:0] gpio_i; + wire [34:0] gpio_o; + wire [34:0] gpio_t; + wire [23:0] offload_sdi_data; + + wire spi_sdo_o; + wire spi_sdo_t; + wire excitation; + + assign gain0_o = gpio_o[32]; + assign gain1_o = gpio_o[33]; + + assign gpio_i[34] = spi_sdi; // Interrupt + assign led_clk_o = excitation; + + ad_iobuf #( + .DATA_WIDTH(1) + ) i_sdo_iobuf ( + .dio_t(spi_sdo_t), + .dio_i(spi_sdo_o), + .dio_p(spi_sdo) + ); + + system_wrapper i_system_wrapper ( + .ddr_addr (ddr_addr), + .ddr_ba (ddr_ba), + .ddr_cas_n (ddr_cas_n), + .ddr_ck_n (ddr_ck_n), + .ddr_ck_p (ddr_ck_p), + .ddr_cke (ddr_cke), + .ddr_cs_n (ddr_cs_n), + .ddr_dm (ddr_dm), + .ddr_dq (ddr_dq), + .ddr_dqs_n (ddr_dqs_n), + .ddr_dqs_p (ddr_dqs_p), + .ddr_odt (ddr_odt), + .ddr_ras_n (ddr_ras_n), + .ddr_reset_n (ddr_reset_n), + .ddr_we_n (ddr_we_n), + .fixed_io_ddr_vrn (fixed_io_ddr_vrn), + .fixed_io_ddr_vrp (fixed_io_ddr_vrp), + .fixed_io_mio (fixed_io_mio), + .fixed_io_ps_clk (fixed_io_ps_clk), + .fixed_io_ps_porb (fixed_io_ps_porb), + .fixed_io_ps_srstb (fixed_io_ps_srstb), + .gpio_i (gpio_i), + .gpio_o (gpio_o), + .gpio_t (gpio_t), + .ps_intr_00 (1'b0), + .ps_intr_01 (1'b0), + .ps_intr_02 (1'b0), + .ps_intr_03 (1'b0), + .ps_intr_04 (1'b0), + .ps_intr_05 (1'b0), + .ps_intr_06 (1'b0), + .ps_intr_07 (1'b0), + .ps_intr_08 (1'b0), + .ps_intr_09 (1'b0), + .ps_intr_10 (1'b0), + .spi_sdo (spi_sdo_o), + .spi_sdo_t (spi_sdo_t), + .spi_sdi (spi_sdi), + .spi_cs (spi_cs), + .spi_sclk (spi_sclk), + .excitation (excitation)); + +endmodule + +// *************************************************************************** +// ***************************************************************************