Skip to content

Commit

Permalink
Version: Use a constructor to set Vivado version dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
StancaPop committed Oct 14, 2024
1 parent 4954320 commit 557b5b6
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions +adi/Version.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
% BSP Version information
properties(Constant)
HDL = 'hdl_2022_r2';
Vivado = '2023.1';
MATLAB = 'R2023b';
Release = '23.2.1';
AppName = 'Analog Devices, Inc. High-Speed Converter Toolbox';
Expand All @@ -12,13 +11,27 @@
ExamplesDir = 'hsx_examples';
HasHDL = true;
end
properties(Dependent)

properties
Vivado
end

properties(Dependent)
VivadoShort
end

methods

methods
% Set Vivado version dynamically
function obj = Version(vivado_version)
if nargin > 0
obj.Vivado = vivado_version; % Set Vivado based on input
else
obj.Vivado = '2023.1'; % Default value
end
end

function value = get.VivadoShort(obj)
value = obj.Vivado(1:6);
value = obj.Vivado(1:6);
end
end
end
Expand Down

0 comments on commit 557b5b6

Please sign in to comment.