diff --git a/library/util_sigma_delta_spi/util_sigma_delta_spi_hw.tcl b/library/util_sigma_delta_spi/util_sigma_delta_spi_hw.tcl new file mode 100644 index 0000000000..77517cf539 --- /dev/null +++ b/library/util_sigma_delta_spi/util_sigma_delta_spi_hw.tcl @@ -0,0 +1,45 @@ +############################################################################### +## Copyright (C) 2023-2024 Analog Devices, Inc. All rights reserved. +### SPDX short identifier: ADIBSD +################################################################################# + +# ip +package require qsys 14.0 +package require quartus::device + +source ../../scripts/adi_env.tcl +source ../scripts/adi_ip_intel.tcl + +ad_ip_create util_sigma_delta_spi {UTIL SIGMA DELTA SPI} +ad_ip_files util_sigma_delta_spi [list \ + util_sigma_delta_spi.v] + +# parameters + +ad_ip_parameter IDLE_TIMEOUT INTEGER 63 +ad_ip_parameter CS_PIN INTEGER 0 +ad_ip_parameter NUM_CS INTEGER 2 + +set num_cs [get_parameter_value NUM_CS] + +# interfaces + +# clock and reset interface + +ad_interface clock clk input 1 +ad_interface reset resetn input 1 if_clk + +ad_interface signal spi_active input 1 +ad_interface signal data_ready output 1 + +ad_interface signal s_sclk input 1 +ad_interface signal s_sdo input 1 +ad_interface signal s_sdo_t input 1 +ad_interface signal s_sdi output 1 +ad_interface signal s_cs input $num_cs + +ad_interface signal m_sclk output 1 +ad_interface signal m_sdo output 1 +ad_interface signal m_sdo_t output 1 +ad_interface signal m_sdi input 1 +ad_interface signal m_cs output $num_cs