From c1d1b6b3e5bd78f5095670e0bf16f4d883928649 Mon Sep 17 00:00:00 2001 From: Liviu 'Ceshu' Adace Date: Wed, 30 Oct 2024 15:51:41 +0200 Subject: [PATCH] projects: ad469x_fmc: Fixed findings for de10nano Signed-off-by: Liviu 'Ceshu' Adace --- projects/ad469x_fmc/common/ad469x_qsys.tcl | 2 +- .../ad469x_fmc/de10nano/system_project.tcl | 20 ++++++++++++++++++- projects/ad469x_fmc/de10nano/system_top.v | 1 + 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/projects/ad469x_fmc/common/ad469x_qsys.tcl b/projects/ad469x_fmc/common/ad469x_qsys.tcl index 024a5e6eba4..7552e6237c0 100644 --- a/projects/ad469x_fmc/common/ad469x_qsys.tcl +++ b/projects/ad469x_fmc/common/ad469x_qsys.tcl @@ -59,7 +59,7 @@ set_instance_parameter_value spi_engine_offload_0 {NUM_OF_SDI} {1} add_instance ad469x_trigger_gen axi_pwm_gen set_instance_parameter_value ad469x_trigger_gen {N_PWMS} {1} -set_instance_parameter_value ad469x_trigger_gen {PULSE_0_PERIOD} {$sampling_cycle} +set_instance_parameter_value ad469x_trigger_gen {PULSE_0_PERIOD} {160} set_instance_parameter_value ad469x_trigger_gen {PULSE_0_WIDTH} {1} # exported interface diff --git a/projects/ad469x_fmc/de10nano/system_project.tcl b/projects/ad469x_fmc/de10nano/system_project.tcl index 339eb806437..6194a8bbd3e 100644 --- a/projects/ad469x_fmc/de10nano/system_project.tcl +++ b/projects/ad469x_fmc/de10nano/system_project.tcl @@ -8,7 +8,25 @@ set QUARTUS_PRO_ISUSED 0 source ../../../scripts/adi_env.tcl source ../../scripts/adi_project_intel.tcl -adi_project ad469x_fmc_de10nano +# get_env_param retrieves parameter value from the environment if exists, +# other case use the default value +# +# Use over-writable parameters from the environment. +# +# e.g. +# make RX_LANE_SPI_4WIRE=0 +# make RX_LANE_SPI_4WIRE=1 + +# Parameter description: +# +# SPI_4WIRE - Defines if CNV signal is linked to PWM or to SPI_CS +# 0 - CNV signal is linked to PWM +# 1 - CNV signal is linked to SPI_CS + + +adi_project ad469x_fmc_de10nano [list \ + SPI_4WIRE [get_env_param SPI_4WIRE 0] \ +] source $ad_hdl_dir/projects/common/de10nano/de10nano_system_assign.tcl diff --git a/projects/ad469x_fmc/de10nano/system_top.v b/projects/ad469x_fmc/de10nano/system_top.v index 446fc94ae79..cced2733ac2 100644 --- a/projects/ad469x_fmc/de10nano/system_top.v +++ b/projects/ad469x_fmc/de10nano/system_top.v @@ -298,6 +298,7 @@ module system_top #( .ad469x_spi_resetn_reset_n (spi_resetn), .ad469x_spi_clk_clk (spi_clk_s), .ad469x_spi_cnv_if_pwm (ad469x_spi_cnv_s), + .ad469x_spi_trigger_if_pwm(spi_trigger), .sys_spi_MISO (1'b0), .sys_spi_MOSI (), .sys_spi_SCLK (),