function varargout = hdlsetuptoolpath(varargin)
% HDLSETUPTOOLPATH  Setup synthesis tool path and environment variables 
%                   in current MATLAB session.
%
%   HDLSETUPTOOLPATH('ToolName', TOOLNAME, 'ToolPath', TOOLPATH) adds the
%   necessary synthesis tool folders to system path, and sets up the system 
%   environment variables for the specified synthesis tool.
%
%   The input property-value pairs include:
% 
%   'ToolName',   ['Xilinx ISE' |         specify the synthesis tool name
%                  'Xilinx Vivado' |
%                  'Altera Quartus II' |
%                  'Microchip Libero SoC']       
% 
%   'ToolPath',    'TOOLPATH'             specify the full path to the 
%                                         synthesis tool executable
%
%   Xilinx ISE example:
%     hdlsetuptoolpath('ToolName', 'Xilinx ISE', ...
%                      'ToolPath', 'C:\Xilinx\13.1\ISE_DS\ISE\bin\nt64\ise.exe');
%
%   Xilinx Vivado example:
%     hdlsetuptoolpath('ToolName', 'Xilinx Vivado', ...
%                      'ToolPath', 'C:\Xilinx\Vivado\2013.4\bin\vivado.bat');
%
%     Note: Please note that Xilinx Vivado launcher for Windows is a '.bat' file.
%           If you are providing full path to the launcher to hdlsetuptoolpath, make sure to provide correct '.bat' file
%
%
%   Altera Quartus II example:
%     hdlsetuptoolpath('ToolName', 'Altera Quartus II', ...
%                      'ToolPath', 'C:\Altera\QuartusII-13.1-tmw-000\Windows\quartus\bin64\quartus.exe');
%
%   Microchip Libero SoC example:
%	  hdlsetuptoolpath('ToolName', 'Microchip Libero SoC', ...
%                      'ToolPath', 'C:\Microsemi\Libero_SoC_v11.8\Designer\bin\libero.exe')
%
%   All changes to system path or system environment variables using 
%   HDLSETUPTOOLPATH are performed for the current MATLAB session only.
%
%   Optionally add HDLSETUPTOOLPATH commands to the MATLAB startup.m
%   script to execute it automatically when the MATLAB program starts.

%   Copyright 2010-2018 The MathWorks, Inc.

if nargout == 0
    setupToolPath(varargin{:});
else
    varargout{1} = setupToolPath(varargin{:});
end