%% Display Parameters that Affect HDL Code Generation

% Copyright 2018 The MathWorks, Inc.

%% Guideline ID
% |1.1.12|

%% Severity
% _Recommended_

%% Description
% Certain HDL block properties such as |DistributedPipelining| and |SharingFactor| 
% can significantly affect HDL code generation. If the block properties are enabled
% for a certain block or Subsystem, it is recommended that you annotate the block 
% properties beside that block in the Simulink(TM) diagram. When you annotate the 
% model, use delimiters such as |--HDL--| to separate the annotation from
% the block name.
%%
% For example, open the model |hdlcoder_block_annotation_HDL_params.slx|.
open_system('hdlcoder_block_annotation_HDL_params')
set_param('hdlcoder_block_annotation_HDL_params','SimulationCommand','Update')
%%
% The DUT Subsystem performs a simple multiply-add operation.
open_system('hdlcoder_block_annotation_HDL_params/DUT')
%% 
% There are HDL block parameters saved on the model. To see the parameters,
% use the |hdlsaveparams| function.
hdlsaveparams('hdlcoder_block_annotation_HDL_params/DUT')
%%
% To annotate the model with the HDL block parameters saved on the model,
% use the |showHdlBlockParams| script attached with the example.
showHdlBlockParams('hdlcoder_block_annotation_HDL_params/DUT','on')
%%
open_system('hdlcoder_block_annotation_HDL_params')
%%
open_system('hdlcoder_block_annotation_HDL_params/DUT')
%%
% To remove the HDL block parameters annotation from the model,
% run the |showHdlBlockParams| set to |off|.
showHdlBlockParams('hdlcoder_block_annotation_HDL_params/DUT','off')
%%
open_system('hdlcoder_block_annotation_HDL_params')
%%
open_system('hdlcoder_block_annotation_HDL_params/DUT')