Skip to content

Commit

Permalink
library: Create util_sigma_delta_spi_hw.tcl file
Browse files Browse the repository at this point in the history
Signed-off-by: Pop Ioan Daniel <[email protected]>
  • Loading branch information
PIoandan committed Sep 16, 2024
1 parent 7a304fb commit c544450
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions library/util_sigma_delta_spi/util_sigma_delta_spi_hw.tcl
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c544450

Please sign in to comment.