function [b1, b2, b3, errstr, errid] = isedasimlinksinstalled
% ISEDASIMLINKSINSTALLED   Find out if the EDA link products are installed.
% RETURN VALUES: [b1, b2, b3, errstr, errid]
% b1 - Returns true if HDL Verifier is installed and licensed

% NOTE: keeping three return variables because of caller requirements.

%   Author(s): J. Sun
%   Copyright 2007-2012 The MathWorks, Inc.
%     
                                                      %

edalinkInstalled = edalinkSupportedOS && dig.isProductInstalled( 'HDL Verifier' );

b1 = edalinkInstalled;
b2 = b1;
b3 = b1;

if b1
    errstr = '';
    errid  = '';
else
    errstr = 'HDL Verifier is not available!';
    errid  = 'HDLShared:hdlcoderui:noEDALinksInstalled';
end

% -------------------------------------------------------------------------
function issupportedOS = edalinkSupportedOS

% List of supported Operating Systems for the HDL Verifier
supportedOSList = {'PCWIN','PCWIN64','GLNX86','GLNXA64'};     

% Didn't use strmatch due to speed and strcmpi because we need exact match.
issupportedOS = any(strcmp(computer,supportedOSList));


% [EOF]
