From bad1d0367891999b376782f89f5609fd543c0408 Mon Sep 17 00:00:00 2001 From: caosjr Date: Mon, 18 Dec 2023 10:52:26 -0300 Subject: [PATCH] spi_engine: Fixup param ranges and CPHA info (#1239) Set validation ranges for DATA_WIDTH and NUM_OF_CS for the expected min/max values in the verilog source code. Also, fix swapped description for CPHA in the documentation. Signed-off-by: Carlos Oliveira --- docs/library/spi_engine/instruction-format.rst | 6 +++--- .../spi_engine_execution/spi_engine_execution_ip.tcl | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/library/spi_engine/instruction-format.rst b/docs/library/spi_engine/instruction-format.rst index 8681fe242..9c296d603 100644 --- a/docs/library/spi_engine/instruction-format.rst +++ b/docs/library/spi_engine/instruction-format.rst @@ -210,9 +210,9 @@ bus behavior. high. * - [0] - CPHA - - Configures the phase of the SCLK signal. When 0, data is updated on the - leading edge and sampled on the trailing edge. When 1, data is is - sampled on the leading edge and updated on the trailing edge. + - Configures the phase of the SCLK signal. When 0, data is sampled on the + leading edge and updated on the trailing edge. When 1, data is + sampled on the trailing edge and updated on the leading edge. .. _spi_engine prescaler-configuration-register: diff --git a/library/spi_engine/spi_engine_execution/spi_engine_execution_ip.tcl b/library/spi_engine/spi_engine_execution/spi_engine_execution_ip.tcl index 61e0dfbfc..84c16d7c2 100644 --- a/library/spi_engine/spi_engine_execution/spi_engine_execution_ip.tcl +++ b/library/spi_engine/spi_engine_execution/spi_engine_execution_ip.tcl @@ -62,7 +62,7 @@ set cc [ipx::current_core] set_property -dict [list \ "value_validation_type" "range_long" \ "value_validation_range_minimum" "8" \ - "value_validation_range_maximum" "256" \ + "value_validation_range_maximum" "32" \ ] \ [ipx::get_user_parameters DATA_WIDTH -of_objects $cc] @@ -70,7 +70,7 @@ set_property -dict [list \ set_property -dict [list \ "value_validation_type" "range_long" \ "value_validation_range_minimum" "1" \ - "value_validation_range_maximum" "32" \ + "value_validation_range_maximum" "8" \ ] \ [ipx::get_user_parameters NUM_OF_CS -of_objects $cc]