Skip to content

Commit

Permalink
Merge pull request #151 from analogdevicesinc/v22_2_1
Browse files Browse the repository at this point in the history
V22.2.1
  • Loading branch information
tfcollins authored Aug 4, 2023
2 parents eabab2c + 4598066 commit bca4ea6
Show file tree
Hide file tree
Showing 129 changed files with 84 additions and 8,714 deletions.
2 changes: 1 addition & 1 deletion +adi/Contents.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% Analog Devices, Inc. Transceiver Toolbox
% Version 22.1.1 (R2022a)
% Version 22.1.1 (R2022b)
%
% ==== Table of Contents (TOC) ====
%
Expand Down
8 changes: 4 additions & 4 deletions +adi/Version.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
%Version
% BSP Version information
properties(Constant)
HDL = 'hdl_2021_r1';
Vivado = '2021.1';
MATLAB = 'R2022a';
Release = '22.1.1';
HDL = 'hdl_2021_r2';
Vivado = '2021.2';
MATLAB = 'R2022b';
Release = '22.2.1';
AppName = 'Analog Devices, Inc. Transceiver Toolbox';
ToolboxName = 'TransceiverToolbox';
ToolboxNameShort = 'trx';
Expand Down
4 changes: 2 additions & 2 deletions CI/gen_doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ SHELL := /bin/bash
MLFLAGS := -nodisplay -nodesktop -nosplash

ifeq ($(MLRELEASE),)
MLRELEASE := R2022a
MLRELEASE := R2022b
endif

ifeq ($(HDLBRANCH),)
HDLBRANCH := hdl_2021_r1
HDLBRANCH := hdl_2021_r2
endif

ifeq ($(OS),Windows_NT)
Expand Down
4 changes: 2 additions & 2 deletions CI/gen_doc/docs/_pages/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,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 2021.2
- Xilinx Vitis 2021.2
- 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)
Expand Down
4 changes: 2 additions & 2 deletions CI/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ SHELL := /bin/bash
MLFLAGS := -nodisplay -nodesktop -nosplash

ifeq ($(MLRELEASE),)
MLRELEASE := R2022a
MLRELEASE := R2022b
endif

ifeq ($(HDLBRANCH),)
HDLBRANCH := hdl_2021_r1
HDLBRANCH := hdl_2021_r2
endif

ifeq ($(OS),Windows_NT)
Expand Down
30 changes: 10 additions & 20 deletions CI/scripts/adi_project_xilinx.tcl
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@

## Define the supported tool version
set required_vivado_version "2021.1"
if {[info exists ::env(REQUIRED_VIVADO_VERSION)]} {
set required_vivado_version $::env(REQUIRED_VIVADO_VERSION)
} elseif {[info exists REQUIRED_VIVADO_VERSION]} {
set required_vivado_version $REQUIRED_VIVADO_VERSION
}

## Define the ADI_IGNORE_VERSION_CHECK environment variable to skip version check
if {[info exists ::env(ADI_IGNORE_VERSION_CHECK)]} {
set IGNORE_VERSION_CHECK 1
} elseif {![info exists IGNORE_VERSION_CHECK]} {
set IGNORE_VERSION_CHECK 0
}

## Define the ADI_USE_OOC_SYNTHESIS environment variable to enable out of context
# synthesis
if {[info exists ::env(ADI_USE_OOC_SYNTHESIS)]} {
Expand Down Expand Up @@ -134,7 +118,7 @@ proc adi_project {project_name {mode 0} {parameter_list {}} } {
set board [lindex [lsearch -all -inline [get_board_parts] *vck190*] end]
}
if [regexp "_vc709$" $project_name] {
set device "xc7vx690tffg1761-2"
set device "xc7vx690tffg1761-2"
set board [lindex [lsearch -all -inline [get_board_parts] *vc709*] end]
}

Expand Down Expand Up @@ -167,7 +151,7 @@ proc adi_project_create {project_name mode parameter_list device {board "not-app
## update the value of $p_device only if it was not already updated elsewhere
if {$p_device eq "none"} {
set p_device $device
}
}
set p_board $board

if [regexp "^xc7z" $p_device] {
Expand Down Expand Up @@ -234,8 +218,12 @@ proc adi_project_create {project_name mode parameter_list device {board "not-app
set lib_dirs [get_property ip_repo_paths [current_fileset]]
lappend lib_dirs $ad_hdl_dir/library
}
if {$ad_hdl_dir ne $ad_ghdl_dir} {
lappend lib_dirs $ad_ghdl_dir/library
if {[info exists ::env(ADI_GHDL_DIR)]} {
if {$ad_hdl_dir ne $ad_ghdl_dir} {
lappend lib_dirs $ad_ghdl_dir/library
}
} else {
# puts -nonew-line "INFO: ADI_GHDL_DIR not defined.\n"
}

# Set a common IP cache for all projects
Expand Down Expand Up @@ -312,6 +300,8 @@ proc adi_project_files {project_name project_files} {
foreach pfile $project_files {
if {[string range $pfile [expr 1 + [string last . $pfile]] end] == "xdc"} {
add_files -norecurse -fileset constrs_1 $pfile
} elseif [regexp "_constr.tcl" $pfile] {
add_files -norecurse -fileset sources_1 $pfile
} else {
add_files -norecurse -fileset sources_1 $pfile
}
Expand Down
2 changes: 1 addition & 1 deletion CI/scripts/build_bsp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -x

if [ -z "${HDLBRANCH}" ]; then
HDLBRANCH='hdl_2021_r1'
HDLBRANCH='hdl_2021_r2'
fi

# Script is designed to run from specific location
Expand Down
2 changes: 1 addition & 1 deletion CI/scripts/library/util_sync/sync_delay/util_delay_ip.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# ***************************************************************************
# ***************************************************************************

source ../../scripts/adi_env.tcl
source ../../../scripts/adi_env.tcl
source $ad_hdl_dir/library/scripts/adi_ip_xilinx.tcl

adi_ip_create util_delay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# ***************************************************************************
# ***************************************************************************

source ../../scripts/adi_env.tcl
source ../../../scripts/adi_env.tcl
source $ad_hdl_dir/library/scripts/adi_ip_xilinx.tcl

adi_ip_create sync_fast_to_slow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# ***************************************************************************
# ***************************************************************************

source ../../scripts/adi_env.tcl
source ../../../scripts/adi_env.tcl
source $ad_hdl_dir/library/scripts/adi_ip_xilinx.tcl

adi_ip_create sync_slow_to_fast
Expand Down
6 changes: 3 additions & 3 deletions CI/scripts/synth_designs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ MLFLAGS="-nodisplay -nodesktop -nosplash"

if [ -z "$MLRELEASE" ]
then
MLRELEASE=R2022a
MLRELEASE=R2022b
fi

MLPATH=/usr/local/MATLAB

cd ../..
cp hdl/vendor/AnalogDevices/hdlcoder_board_customization.m test/hdlcoder_board_customization_local.m
sed -i "s/hdlcoder_board_customization/hdlcoder_board_customization_local/g" test/hdlcoder_board_customization_local.m
source /opt/Xilinx/Vivado/2021.1/settings64.sh
source /opt/Xilinx/Vivado/2021.2/settings64.sh
Xvfb :77 &
export DISPLAY=:77
export SWT_GTK3=0
source /opt/Xilinx/Vivado/2021.1/settings64.sh
source /opt/Xilinx/Vivado/2021.2/settings64.sh
$MLPATH/$MLRELEASE/bin/matlab $MLFLAGS -r "cd('test');runSynthTests('$BOARD');"
kill -9 `pidof Xvfb`
6 changes: 3 additions & 3 deletions CI/scripts/targeting_designs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MLFLAGS="-nodisplay -nodesktop -nosplash"

if [ -z "$MLRELEASE" ]
then
MLRELEASE=R2022a
MLRELEASE=R2022b
fi
if [ -z "$DEMO" ]
then
Expand All @@ -15,10 +15,10 @@ echo "Testing demo: $DEMO"
MLPATH=/usr/local/MATLAB

cd ../..
source /opt/Xilinx/Vivado/2021.1/settings64.sh
source /opt/Xilinx/Vivado/2021.2/settings64.sh
Xvfb :77 &
export DISPLAY=:77
export SWT_GTK3=0
source /opt/Xilinx/Vivado/2021.1/settings64.sh
source /opt/Xilinx/Vivado/2021.2/settings64.sh
$MLPATH/$MLRELEASE/bin/matlab $MLFLAGS -r "addpath(genpath('test'));addpath(genpath('deps'));runDemoTests('$DEMO');"
kill -9 `pidof Xvfb`
12 changes: 6 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
flags = gitParseFlags()

dockerConfig = getDockerConfig(['MATLAB','Vivado'], matlabHSPro=false)
dockerConfig.add("-e MLRELEASE=R2022a")
dockerConfig.add("-e MLRELEASE=R2022b")
dockerHost = 'docker'

////////////////////////////

hdlBranches = ['master','hdl_2021_r1']
hdlBranches = ['master','hdl_2021_r2']

stage("Build Toolbox") {
dockerParallelBuild(hdlBranches, dockerHost, dockerConfig) {
Expand All @@ -24,14 +24,14 @@ stage("Build Toolbox") {
sh 'make -C ./CI/scripts gen_tlbx'
}
} catch(Exception ex) {
if (branchName == 'hdl_2021_r1') {
if (branchName == 'hdl_2021_r2') {
error('Production Toolbox Build Failed')
}
else {
unstable('Development Build Failed')
}
}
if (branchName == 'hdl_2021_r1') {
if (branchName == 'hdl_2021_r2') {
stash includes: '**', name: 'builtSources', useDefaultExcludes: false
archiveArtifacts artifacts: 'hdl/*', followSymlinks: false, allowEmptyArchive: true
}
Expand All @@ -48,7 +48,7 @@ boardNames = [
'adrv9361z7035_ccbob_cmos','adrv9361z7035_ccbob_lvds','adrv9361z7035_ccfmc_lvds','adrv9361z7035_ccpackrf_lvds',
'adrv9364z7020_ccbob_cmos','adrv9364z7020_ccbob_lvds',
'pluto']
dockerConfig.add("-e HDLBRANCH=hdl_2021_r1")
dockerConfig.add("-e HDLBRANCH=hdl_2021_r2")

cstage("HDL Tests", "", flags) {
dockerParallelBuild(boardNames, dockerHost, dockerConfig) {
Expand Down Expand Up @@ -90,7 +90,7 @@ for (int i=0; i < demoNames.size(); i++) {
nodeLabel = 'baremetal && high_memory';
deployments[demo] = { node(nodeLabel) {
stage("Demo Tests") {
withEnv(['DEMO='+demo,'MLRELEASE=R2022a','HDLBRANCH=hdl_2021_r1','LC_ALL=C.UTF-8','LANG=C.UTF-8']) {
withEnv(['DEMO='+demo,'MLRELEASE=R2022b','HDLBRANCH=hdl_2021_r2','LC_ALL=C.UTF-8','LANG=C.UTF-8']) {
try {
stage(demo) {
echo "Node: ${env.NODE_NAME}"
Expand Down
10 changes: 5 additions & 5 deletions JenkinsfileCron
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@Library('tfc-lib') _

dockerConfig = getDockerConfig(['MATLAB','Vivado'], matlabHSPro=false)
dockerConfig.add("-e MLRELEASE=R2022a")
dockerConfig.add("-e MLRELEASE=R2022b")
dockerHost = 'docker'

////////////////////////////

hdlBranches = ['hdl_2021_r1']
hdlBranches = ['hdl_2021_r2']

stage("Build Toolbox") {
dockerParallelBuild(hdlBranches, dockerHost, dockerConfig) {
Expand All @@ -22,14 +22,14 @@ stage("Build Toolbox") {
sh 'make -C ./CI/scripts gen_tlbx'
}
} catch(Exception ex) {
if (branchName == 'hdl_2021_r1') {
if (branchName == 'hdl_2021_r2') {
error('Production Toolbox Build Failed')
}
else {
unstable('Development Build Failed')
}
}
if (branchName == 'hdl_2021_r1') {
if (branchName == 'hdl_2021_r2') {
stash includes: '**', name: 'builtSources', useDefaultExcludes: false
archiveArtifacts artifacts: 'hdl/*', followSymlinks: false, allowEmptyArchive: true
}
Expand All @@ -56,7 +56,7 @@ for (int i=0; i < boardNames.size(); i++) {
nodeLabel = 'baremetal && high_memory';
deployments[board] = { node(nodeLabel) {
stage("Synthesis Tests") {
withEnv(['BOARD='+board,'MLRELEASE=R2022a','HDLBRANCH=hdl_2021_r1','LC_ALL=C.UTF-8','LANG=C.UTF-8']) {
withEnv(['BOARD='+board,'MLRELEASE=R2022b','HDLBRANCH=hdl_2021_r2','LC_ALL=C.UTF-8','LANG=C.UTF-8']) {
try {
stage("Synth") {
echo "Node: ${env.NODE_NAME}"
Expand Down
2 changes: 1 addition & 1 deletion JenkinsfileHW
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ lock(label: 'adgt_test_harness_boards') {
harness.set_env('telemetry_repo', 'https://github.com/sdgtt/telemetry.git')
harness.set_env('telemetry_branch', 'master')
harness.set_env('matlab_repo', 'https://github.com/analogdevicesinc/TransceiverToolbox.git') // Not necessary when using checkout scm
harness.set_env('matlab_release','R2022a')
harness.set_env('matlab_release','R2022b')

//Update nebula config from netbox
harness.set_update_nebula_config(true)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ As with many open source packages, we use [GitHub](https://github.com/analogdevi

| HDL Branch | MATLAB Release | Installer Package |
|:-----------------:|:--------------:|:-------------------:|
| 2021_R1 | R2022a | <a href="http://swdownloads.analog.com/cse/toolboxes/trx/master/AnalogDevicesTransceiverToolbox_v22.1.1.mltbx"><img src="https://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png" data-canonical-src="https://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png" height="40" /></a>|
| 2021_R2 | R2022b | <a href="http://swdownloads.analog.com/cse/toolboxes/trx/master/AnalogDevicesTransceiverToolbox_v22.2.1.mltbx"><img src="https://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png" data-canonical-src="https://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png" height="40" /></a>|

If you use it, and like it - please let us know. If you use it, and hate it - please let us know that too.

## Supported Tools and Releases

We provide support across two releases of MATLAB. This does not mean older releases will not work but they are not maintained. Currently supported tools are:
- Bug fixes only: MATLAB R2021b with Vivado 2019.1
- Bug fixes and new features: MATLAB R2022a with Vivado 2021.1
- Bug fixes only: MATLAB R2022a with Vivado 2021.1
- Bug fixes and new features: MATLAB R2022b with Vivado 2021.2

## Support and Documentation

Expand Down
7 changes: 4 additions & 3 deletions hdl/vendor/AnalogDevices/+AnalogDevices/plugin_rd.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

% Tool information
%hRD.SupportedToolVersion = {adi.Version.Vivado}; % FIXME
hRD.SupportedToolVersion = {'2021.1'};
hRD.SupportedToolVersion = {'2021.2'};

% Get the root directory
rootDir = fileparts(strtok(mfilename('fullpath'), '+'));
Expand Down Expand Up @@ -99,8 +99,9 @@

% custom source files
hRD.CustomFiles = {...
fullfile('projects')...,
fullfile('library')...,
fullfile('projects')...
fullfile('library')...
fullfile('scripts')...
};

if strcmpi(project, 'adrv9002')
Expand Down
2 changes: 1 addition & 1 deletion hdl/vendor/AnalogDevices/Contents.m
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
% HDL Coder BSP: Analog Devices Inc
% Version 22.1.1 (R2022a) 24-March-2023
% Version 22.2.1 (R2022b) 24-March-2023
2 changes: 1 addition & 1 deletion info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- Supply the following six elements in the order specified -->
<!-- (Required) Release of MATLAB. Not currently used but required -->
<!-- to parse the file -->
<matlabrelease>R2022a</matlabrelease>
<matlabrelease>R2022b</matlabrelease>
<!-- (Required) Title of toolbox. Appears in the Contents pane -->
<name>Analog Devices, Inc. Transceiver Toolbox</name>
<!-- (Required) Label for the toolbox. pick one: -->
Expand Down
Loading

0 comments on commit bca4ea6

Please sign in to comment.