aboutsummaryrefslogtreecommitdiffstats
path: root/fpga/usrp3/top/x400/cpld/scripts
diff options
context:
space:
mode:
authorMax Köhler <max.koehler@ni.com>2021-02-05 13:14:41 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2021-06-10 11:56:58 -0500
commit7015f5ed2d495f3908773b7c7d74864d0cc3871a (patch)
treee9c9f7d95f5c35c089bfc9534707934bfe41344a /fpga/usrp3/top/x400/cpld/scripts
parent6d3765605262016a80f71e36357f749ea35cbe5a (diff)
downloaduhd-7015f5ed2d495f3908773b7c7d74864d0cc3871a.tar.gz
uhd-7015f5ed2d495f3908773b7c7d74864d0cc3871a.tar.bz2
uhd-7015f5ed2d495f3908773b7c7d74864d0cc3871a.zip
fpga: x400: cpld: Add support for X410 motherboard CPLD
Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com> Co-authored-by: Javier Valenzuela <javier.valenzuela@ni.com>
Diffstat (limited to 'fpga/usrp3/top/x400/cpld/scripts')
-rw-r--r--fpga/usrp3/top/x400/cpld/scripts/ps_cs_analysis.tcl32
1 files changed, 32 insertions, 0 deletions
diff --git a/fpga/usrp3/top/x400/cpld/scripts/ps_cs_analysis.tcl b/fpga/usrp3/top/x400/cpld/scripts/ps_cs_analysis.tcl
new file mode 100644
index 000000000..03ff77d2c
--- /dev/null
+++ b/fpga/usrp3/top/x400/cpld/scripts/ps_cs_analysis.tcl
@@ -0,0 +1,32 @@
+#
+# Copyright 2021 Ettus Research, a National Instruments Brand
+#
+# SPDX-License-Identifier: LGPL-3.0-or-later
+#
+# Module: ps_cs_analysis
+#
+# Description:
+#
+# Analyze false path in PS SPI logic to ensure an upper delay boundary.
+#
+
+# get project to a working state
+project_open -force "mb_cpld.qpf"
+create_timing_netlist
+update_timing_netlist
+
+# Determine data path delay from MB CPLD chip select signal to MB CPLD internal
+# SPI slave
+set paths [report_path -from [get_registers {ps_spi_cs_n_decoded[0]}] -multi_corner]
+set spiSlaveCsPathDelay [lindex $paths 1]
+
+# clock period at 250 MHz (clock driving the decoding registers)
+set maxDelay 4
+
+# compare path from above with maximum delay
+if ([expr {$maxDelay < $spiSlaveCsPathDelay}]) {
+ puts "MB CPLD SPI CS line longer than expected."
+ exit 1
+}
+
+exit 0