-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
library: Create util_sigma_delta_spi_hw.tcl file
Signed-off-by: Pop Ioan Daniel <[email protected]>
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |