%% Check Your Model for HDL Compatibility
% This example shows how to check whether a subsystem or model is 
% compatible for HDL code generation by using the HDL compatibility checker. 
% The HDL compatibility checker examines the specified system for compatibility 
% problems, such as use of unsupported blocks, illegal data type usage, and
% so on. The HDL compatibility checker generates an HDL Code Generation
% Check Report. The report is stored in the target |hdlsrc| folder. The report 
% file naming convention is system_report.html, where system is the name of the 
% subsystem or model that is passed to the HDL compatibility checker. The HDL Code 
% Generation Check Report is displayed in a MATLAB(TM) web browser window. 
% Each entry in the HDL Code Generation Check Report has hyperlinks to the block 
% or subsystem that is not compatible for HDL code generation. 
%
% Open this Simulink(TM) model that has a Product block inside a |DUT| Subsystem. 
% The inputs to the block are a mix of double and integer data types.
load_system('hdlcoder_product_mixed_types')
open_system('hdlcoder_product_mixed_types/DUT')
%%
% To check whether the DUT Subsystem is compatible for HDL code generation, run 
% the compatibility checker. To run the checker from the command line, use the 
% checkhdl function. To learn more about the checkhdl function, see 
% <matlab:helpview(fullfile(docroot,'hdlcoder/ref/checkhdl.html')) checkhdl>.
checkhdl('hdlcoder_product_mixed_types/DUT', ...
    'TargetDirectory','C:/HDL_Checks/hdlsrc')
%%
% <<../hdl_check_report_mixed_types.png>>
%
% Click the |hdlcoder_product_mixed_types/DUT/Product| link to highlight the 
% Product block inside the DUT Subsystem. 
% 
% To run the compatibility checker from the UI:
%
% # Open the Configuration Parameters dialog box or the Model Explorer. Select 
% the *HDL Code Generation* pane.
% # From the *Generate HDL for* dropdown, select the |DUT| Subsystem you want to check.
% # Click the *Run Compatibility Checker* button.
%
% For a Subsystem that passes the HDL compatibility check, the HDL Code Generation 
% Check Report contains a hyperlink to that subsystem.

%% 
% Copyright 2012 The MathWorks, Inc.