diff --git a/+adi/Contents.m b/+adi/Contents.m
index 7e4b46c..052026c 100644
--- a/+adi/Contents.m
+++ b/+adi/Contents.m
@@ -1,5 +1,5 @@
% Analog Devices, Inc. High Speed Converter Toolbox
-% Version 21.1.1 (R2021a)
+% Version 21.1.1 (R2022b)
%
% ==== Table of Contents (TOC) ====
%
diff --git a/+adi/Version.m b/+adi/Version.m
index e84668c..8f17224 100644
--- a/+adi/Version.m
+++ b/+adi/Version.m
@@ -3,7 +3,7 @@
% BSP Version information
properties(Constant)
HDL = 'hdl_2022_r2';
- Vivado = '2022.2';
+ Vivado = '2023.1';
MATLAB = 'R2023b';
Release = '23.2.1';
AppName = 'Analog Devices, Inc. High-Speed Converter Toolbox';
diff --git a/CI/gen_doc/Makefile b/CI/gen_doc/Makefile
index dd6b1af..bc21b12 100644
--- a/CI/gen_doc/Makefile
+++ b/CI/gen_doc/Makefile
@@ -8,15 +8,15 @@ SHELL := /bin/bash
MLFLAGS := -nodisplay -nodesktop -nosplash
ifeq ($(MLRELEASE),)
-MLRELEASE := R2021a
+MLRELEASE := R2022b
endif
ifeq ($(VIVADORELEASE),)
-VIVADORELEASE := 2022.2
+VIVADORELEASE := 2023.1
endif
ifeq ($(HDLBRANCH),)
-HDLBRANCH := hdl_2018_r2
+HDLBRANCH := main
endif
ifeq ($(OS),Windows_NT)
diff --git a/CI/gen_doc/docs/_pages/install.md b/CI/gen_doc/docs/_pages/install.md
index 18280a2..c2dcafe 100644
--- a/CI/gen_doc/docs/_pages/install.md
+++ b/CI/gen_doc/docs/_pages/install.md
@@ -35,8 +35,8 @@ The base dependencies for the toolbox requires libiio and the libiio MATLAB bind
To leverage HDL-Coder and the reference designs with the toolbox requires the following components:
-- Xilinx Vivado 2021.1
-- Xilinx SDK 2021.1
+- Xilinx Vivado 2023.1
+- Xilinx SDK 2023.1
- Simulink
- [HDL-Coderâ„¢](https://www.mathworks.com/products/hdl-coder.html)
- [HDL Coderâ„¢ Support Package for Xilinx Zynq Platform](https://www.mathworks.com/matlabcentral/fileexchange/40447-hdl-coder-support-package-for-xilinx-zynq-platform)
diff --git a/CI/gen_doc/docs/_pages/targeting.md b/CI/gen_doc/docs/_pages/targeting.md
index d6016a9..6d69f86 100644
--- a/CI/gen_doc/docs/_pages/targeting.md
+++ b/CI/gen_doc/docs/_pages/targeting.md
@@ -11,18 +11,18 @@ High-Speed Converter Toolbox supports the IP Core generation flow from MathWorks
## Getting Started
-To perform targeting will require FPGA vendor tools for the FPGA system. For Xilinx this will be Vivado and the toolbox will require specific versions for each release. For the current release this is Vivado 2022.2. Using other versions are not supported. To build the necessary BOOT.BIN files will require the Xilinx Vitis as well.
+To perform targeting will require FPGA vendor tools for the FPGA system. For Xilinx this will be Vivado and the toolbox will require specific versions for each release. For the current release this is Vivado 2023.1. Using other versions are not supported. To build the necessary BOOT.BIN files will require the Xilinx Vitis as well.
Once you have the installed the necessary 3rd party tools MATLAB needs to be told where they are installed by use of the [hdlsetuptoolpath](https://www.mathworks.com/help/hdlcoder/ref/hdlsetuptoolpath.html) command. For Windows the following MATLAB command can be used:
```matlab
-hdlsetuptoolpath('ToolName', 'Xilinx Vivado', 'ToolPath', 'C:\Xilinx\Vivado\2022.2\bin\vivado.bat');
+hdlsetuptoolpath('ToolName', 'Xilinx Vivado', 'ToolPath', 'C:\Xilinx\Vivado\2023.1\bin\vivado.bat');
```
or Linux:
```matlab
-hdlsetuptoolpath('ToolName', 'Xilinx Vivado', 'ToolPath', '/opt/Xilinx/Vivado/2022.2/bin/vivado');
+hdlsetuptoolpath('ToolName', 'Xilinx Vivado', 'ToolPath', '/opt/Xilinx/Vivado/2023.1/bin/vivado');
```
Please change the tool path if it is different on your system.
diff --git a/CI/scripts/Makefile b/CI/scripts/Makefile
index 75bcc4e..93228b5 100644
--- a/CI/scripts/Makefile
+++ b/CI/scripts/Makefile
@@ -12,7 +12,7 @@ MLRELEASE := R2023b
endif
ifeq ($(VIVADORELEASE),)
-VIVADORELEASE := 2022.2
+VIVADORELEASE := 2023.1
endif
ifeq ($(HDLBRANCH),)
diff --git a/CI/scripts/build_bsp.sh b/CI/scripts/build_bsp.sh
index ed48b1a..2843a5e 100644
--- a/CI/scripts/build_bsp.sh
+++ b/CI/scripts/build_bsp.sh
@@ -2,7 +2,7 @@
set -x
if [ -z "${HDLBRANCH}" ]; then
-HDLBRANCH='hdl_2022_r2'
+HDLBRANCH='main'
fi
# Script is designed to run from specific location
@@ -29,20 +29,67 @@ if [ ! -d "hdl" ]; then
exit 1
fi
-# Get required vivado version needed for HDL
-if [ -f "hdl/library/scripts/adi_ip.tcl" ]; then
- TARGET="hdl/library/scripts/adi_ip.tcl"
-else
- TARGET="hdl/library/scripts/adi_ip_xilinx.tcl"
+if [ -z "${VIVADO}" ]; then
+ echo "VIVADO not set, will parse HDL"
+
+ # Get required vivado version needed for HDL
+ TARGET="hdl/scripts/adi_env.tcl"
+ # Use grep to find the line containing "set required_vivado_version"
+ matched_line=$(grep 'set required_vivado_version' "$TARGET")
+
+ # Use awk to extract the version number
+ VIVADO=$(echo "$matched_line" | awk -F'"' '{print $2}')
+
+ # Print the extracted version number
+ echo "Parsed Vivado Version: $VIVADO"
fi
-VER=$(awk '/set required_vivado_version/ {print $3}' $TARGET | sed 's/"//g')
-echo "Required Vivado version ${VER}"
-VIVADOFULL=${VER}
-if [ ${#VER} = 8 ]
-then
-VER=${VER:0:6}
+
+# If not of the form 20xx.x, exit
+if [[ ! $VIVADO =~ ^20[0-9]{2}\.[0-9]$ ]]; then
+ echo "Vivado version not of the form 20xx.x"
+ exit 1
fi
-VIVADO=${VER}
+
+# Update vivado version in MATLAB files
+echo "Updating toolbox files to use desired Vivado version"
+cd ..
+# Update Version.m
+sed -i "s/Vivado = .*/Vivado = \'${VIVADO}\';/" +adi/Version.m
+# Update plugin_rd
+sed -i "s/hRD\.SupportedToolVersion = .*/hRD\.SupportedToolVersion = {\'${VIVADO}\'};/" hdl/vendor/AnalogDevices/+AnalogDevices/plugin_rd.m
+
+# Demos
+cd trx_examples
+# Update all occurances of hWC.ReferenceDesignToolVersion = '20XX.X'; to use new version
+FILES=$(grep -lrn . -e 'hWC.ReferenceDesignToolVersion =')
+for f in $FILES; do
+ echo "Updating: $f"
+ sed -i "s/hWC\.ReferenceDesignToolVersion = .*/hWC\.ReferenceDesignToolVersion = \'${VIVADO}\';/" "$f"
+done
+# Update all occurances of hRD.SupportedToolVersion = {'20XX.X'}; to use new version
+FILES=$(grep -lr . -e 'hRD.SupportedToolVersion =')
+for f in $FILES; do
+ echo "Updating: $f"
+ sed -i "s/hRD\.SupportedToolVersion = .*/hRD\.SupportedToolVersion = {\'${VIVADO}\'};/" "$f"
+done
+# Update all occurances of Vivado sourcing
+FILES=$(grep -lrn . -e 'source /opt/Xilinx/Vivado/20')
+for f in $FILES; do
+ echo "Updating: $f"
+ sed -i "s/source \/opt\/Xilinx\/Vivado\/20.*/source \/opt\/Xilinx\/Vivado\/${VIVADO}\/settings64.sh/" "$f"
+done
+cd ..
+
+# Tests
+cd test
+# Update line 35 of DemoTests.m to use new version
+sed -i "35s/.*/ testCase.setupVivado('${VIVADO}');/" DemoTests.m
+sed -i "47s/.*/ testCase.setupVivado('${VIVADO}');/" DemoTests.m
+sed -i "59s/.*/ testCase.setupVivado('${VIVADO}');/" DemoTests.m
+
+cd ..
+
+cd CI
# Setup
source /opt/Xilinx/Vivado/$VIVADO/settings64.sh
diff --git a/Jenkinsfile b/Jenkinsfile
index be2eadc..f73b416 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -19,7 +19,8 @@ stage("Build Toolbox") {
checkout scm
sh 'git submodule update --init'
sh 'pip3 install -r ./CI/gen_doc/requirements_doc.txt'
- sh 'make -C ./CI/gen_doc doc_ml'
+ sh 'rm -rf doc || true'
+ sh 'make -C ./CI/gen_doc doc_ml'
sh 'make -C ./CI/scripts build'
sh 'make -C ./CI/scripts gen_tlbx'
}
diff --git a/JenkinsfileCron b/JenkinsfileCron
index 7ef9ac7..48c17d9 100644
--- a/JenkinsfileCron
+++ b/JenkinsfileCron
@@ -2,7 +2,7 @@
dockerConfig = getDockerConfig(['MATLAB','Vivado'], matlabHSPro=false)
dockerConfig.add("-e MLRELEASE=R2023b")
-dockerConfig.add("-e VIVADORELEASE=2022.2")
+dockerConfig.add("-e VIVADORELEASE=2023.1")
dockerHost = 'docker'
////////////////////////////
diff --git a/Jenkinsfile_dev b/Jenkinsfile_dev
deleted file mode 100644
index 010360b..0000000
--- a/Jenkinsfile_dev
+++ /dev/null
@@ -1,110 +0,0 @@
-@Library('tfc-lib') _
-
-dockerConfig = getDockerConfig(['MATLAB','Vivado'], matlabHSPro=false)
-dockerConfig.add("-e MLRELEASE=R2022b")
-dockerConfig.add("-e VIVADORELEASE=2022.2")
-dockerHost = 'docker'
-
-////////////////////////////
-
-hdlBranches = ['main']
-
-stage("Build Toolbox") {
- dockerParallelBuild(hdlBranches, dockerHost, dockerConfig) {
- branchName ->
- try {
- withEnv(['HDLBRANCH='+branchName]) {
- checkout scm
- sh 'git submodule update --init'
- sh 'pip3 install -r ./CI/gen_doc/requirements_doc.txt'
- sh 'make -C ./CI/gen_doc doc_ml'
- sh 'make -C ./CI/scripts build'
- sh 'make -C ./CI/scripts gen_tlbx'
- }
- } catch(Exception ex) {
- if (branchName == 'main') {
- error('Production Toolbox Build Failed')
- }
- else {
- unstable('Development Build Failed')
- }
- }
- if (branchName == 'main') {
- archiveArtifacts artifacts: '*.mltbx'
- stash includes: '**', name: 'builtSources', useDefaultExcludes: false
- }
- }
-}
-
-/////////////////////////////////////////////////////
-
-boardNames = ['daq2','ad9081']
-dockerConfig.add("-e HDLBRANCH=main")
-
-stage("HDL Tests") {
- dockerParallelBuild(boardNames, dockerHost, dockerConfig) {
- branchName ->
- withEnv(['BOARD='+branchName]) {
- stage("Source") {
- unstash "builtSources"
- sh 'make -C ./CI/scripts test'
- junit testResults: 'test/*.xml', allowEmptyResults: true
- archiveArtifacts artifacts: 'test/logs/*', followSymlinks: false, allowEmptyArchive: true
- }
- stage("Installer") {
- unstash "builtSources"
- sh 'make -C ./CI/scripts test_installer'
- junit testResults: 'test/*.xml', allowEmptyResults: true
- archiveArtifacts artifacts: 'test/logs/*', followSymlinks: false, allowEmptyArchive: true
- }
- }
- }
-}
-
-/////////////////////////////////////////////////////
-
-boardNames = ['NonHW']
-
-stage("NonHW Tests") {
- dockerParallelBuild(boardNames, dockerHost, dockerConfig) {
- branchName ->
- withEnv(['BOARD='+branchName]) {
- stage("NonHW") {
- unstash "builtSources"
- sh 'make -C ./CI/scripts run_NonHWTests'
- }
- }
- }
-}
-
-
-/////////////////////////////////////////////////////
-
-classNames = ['DAQ2']
-
-stage("Hardware Streaming Tests") {
- dockerParallelBuild(classNames, dockerHost, dockerConfig) {
- branchName ->
- withEnv(['HW='+branchName]) {
- unstash "builtSources"
- sh 'echo ${HW}'
- // sh 'make -C ./CI/scripts test_streaming'
- }
- }
-}
-
-//////////////////////////////////////////////////////
-
-node {
- stage('Deploy Development') {
- unstash "builtSources"
- uploadArtifactory('HighSpeedConverterToolbox','*.mltbx')
- }
- if (env.BRANCH_NAME == 'main') {
- stage('Deploy Production') {
- unstash "builtSources"
- uploadFTP('HighSpeedConverterToolbox','*.mltbx')
- }
- }
-}
-
diff --git a/info.xml b/info.xml
index 7e3b3a6..3503894 100644
--- a/info.xml
+++ b/info.xml
@@ -8,7 +8,7 @@
- R2021a
+ R2022b
Analog Devices, Inc. High Speed Converter Toolbox